98 lines
2.6 KiB
YAML
98 lines
2.6 KiB
YAML
|
|
api_version: cmvr.edge.ai/v1
|
||
|
|
|
||
|
|
runtime:
|
||
|
|
# Decoder, YOLO and viewer drawing share this bounded application pool.
|
||
|
|
thread_workers: 3
|
||
|
|
shutdown_timeout_s: 8
|
||
|
|
|
||
|
|
endpoints:
|
||
|
|
cmvr_es:
|
||
|
|
transport: grpc
|
||
|
|
# Remote cmvr-es address. Keep this aligned with the robot being viewed.
|
||
|
|
target: 192.168.0.119:50052
|
||
|
|
tls: false
|
||
|
|
timeout_s: 5
|
||
|
|
options:
|
||
|
|
max_receive_mb: 32
|
||
|
|
|
||
|
|
pipelines:
|
||
|
|
detection_show:
|
||
|
|
enabled: true
|
||
|
|
nodes:
|
||
|
|
camera:
|
||
|
|
uses: cmvr.grpc.camera_rgb_stream@1
|
||
|
|
with:
|
||
|
|
endpoint: cmvr_es
|
||
|
|
device_id: wrist_cam
|
||
|
|
pixel_format: BGR8
|
||
|
|
reconnect: true
|
||
|
|
reconnect_initial_s: 0.5
|
||
|
|
reconnect_max_s: 10
|
||
|
|
stream_log_interval_s: 5
|
||
|
|
|
||
|
|
decoder:
|
||
|
|
uses: media.video_decoder.pyav@1
|
||
|
|
|
||
|
|
detector:
|
||
|
|
uses: detection.model@1
|
||
|
|
with:
|
||
|
|
model: construction-ppe-yolov8@1
|
||
|
|
detect_labels:
|
||
|
|
- No-Boots
|
||
|
|
- No-Ear-Protection
|
||
|
|
- No-Glass
|
||
|
|
- No-Glove
|
||
|
|
- No-Helmet
|
||
|
|
- No-Mask
|
||
|
|
- No-Vest
|
||
|
|
confidence: 0.50
|
||
|
|
# A 30 FPS stream starts at most 10 model inferences each second.
|
||
|
|
max_fps: 10
|
||
|
|
inference_log_interval_s: 5
|
||
|
|
# Required so the viewer receives the exact decoded inference frame.
|
||
|
|
attach_frame: true
|
||
|
|
model_options:
|
||
|
|
# Repository-relative path; launch the viewer from the repository root.
|
||
|
|
weights: models/detection/construction-ppe-yolov8/v1/best.pt
|
||
|
|
device: cpu
|
||
|
|
imgsz: 640
|
||
|
|
iou: 0.70
|
||
|
|
half: false
|
||
|
|
max_det: 100
|
||
|
|
|
||
|
|
viewer:
|
||
|
|
uses: demo.opencv_detection_viewer@1
|
||
|
|
with:
|
||
|
|
window_name: CMVR PPE Detection
|
||
|
|
window_width: 1280
|
||
|
|
window_height: 720
|
||
|
|
wait_key_ms: 1
|
||
|
|
box_thickness: 2
|
||
|
|
font_scale: 0.6
|
||
|
|
show_stats: true
|
||
|
|
|
||
|
|
edges:
|
||
|
|
# H264/H265 packets must remain contiguous until decoding.
|
||
|
|
- from: camera.frames
|
||
|
|
to: decoder.frames
|
||
|
|
qos:
|
||
|
|
profile: video_contiguous
|
||
|
|
capacity: 8
|
||
|
|
overflow: block
|
||
|
|
|
||
|
|
# Keep only the latest decoded frame while YOLO is busy.
|
||
|
|
- from: decoder.frames
|
||
|
|
to: detector.frames
|
||
|
|
qos:
|
||
|
|
profile: realtime_latest
|
||
|
|
capacity: 1
|
||
|
|
overflow: drop_oldest
|
||
|
|
|
||
|
|
# A slow GUI must not accumulate raw frames or stale detection results.
|
||
|
|
- from: detector.detections
|
||
|
|
to: viewer.input
|
||
|
|
qos:
|
||
|
|
profile: realtime_latest
|
||
|
|
capacity: 1
|
||
|
|
overflow: drop_oldest
|