diff --git a/configs/person_shoe_two_stage_recommended.json b/configs/person_shoe_two_stage_recommended.json deleted file mode 100644 index b8293b3..0000000 --- a/configs/person_shoe_two_stage_recommended.json +++ /dev/null @@ -1,170 +0,0 @@ -{ - "queue": { - "size": 8, - "strategy": "drop_oldest" - }, - "graphs": [ - { - "name": "person_shoe_two_stage_recommended", - "executor": { - "batch_size": 2, - "run_budget": 8 - }, - "nodes": [ - { - "id": "in", - "type": "input_rtsp", - "role": "source", - "enable": true, - "url": "rtsp://10.0.0.49:8554/cam", - "fps": 30, - "width": 1920, - "height": 1080, - "use_ffmpeg": true, - "use_mpp": false, - "force_tcp": true - }, - { - "id": "pre_rgb", - "type": "preprocess", - "role": "filter", - "enable": true, - "dst_w": 1920, - "dst_h": 1080, - "dst_format": "rgb", - "dst_packed": true, - "resize_mode": "stretch", - "rga_gate": "person_shoe_two_stage_recommended", - "use_rga": true - }, - { - "id": "person_det", - "type": "ai_yolo", - "role": "filter", - "enable": true, - "cpu_affinity": [4], - "use_rga": true, - "rga_gate": "person_shoe_two_stage_recommended", - "rga_max_inflight": 4, - "dst_packed": true, - "use_dma_input": true, - "infer_fps": 2, - "infer_phase_ms": 0, - "model_path": "./models/yolov8n-640.rknn", - "model_version": "v8", - "model_w": 640, - "model_h": 640, - "num_classes": 80, - "conf": 0.35, - "nms": 0.45, - "class_filter": [0], - "bbox_expand": { - "enable": true, - "class_id": 0, - "left": 0.06, - "right": 0.06, - "top": 0.04, - "bottom": 0.16 - } - }, - { - "id": "person_trk", - "type": "tracker", - "role": "filter", - "enable": true, - "cpu_affinity": [5], - "mode": "bytetrack_lite", - "per_class": true, - "track_classes": [0], - "high_th": 0.6, - "low_th": 0.15, - "iou_th": 0.3, - "max_age_ms": 700, - "min_hits": 2 - }, - { - "id": "shoe_det", - "type": "ai_shoe_det", - "role": "filter", - "enable": true, - "cpu_affinity": [6], - "use_rga": true, - "rga_gate": "person_shoe_two_stage_recommended", - "rga_max_inflight": 4, - "dst_packed": true, - "use_dma_input": false, - "infer_fps": 2, - "infer_phase_ms": 250, - "model_path": "./models/shoe_detector_openimages_ppe_v1.rknn", - "model_w": 640, - "model_h": 640, - "conf": 0.20, - "nms": 0.45, - "v8_box_format": "cxcywh", - "append_detections": true, - "dynamic_roi": { - "enable": true, - "person_class_id": 0, - "shoe_class_id": 1, - "debug_roi_class_id": -1, - "max_rois": 1, - "min_person_height": 80, - "x_offset": -0.20, - "y_offset": 0.68, - "width_scale": 1.40, - "height_scale": 0.50 - } - }, - { - "id": "osd", - "type": "osd", - "role": "filter", - "enable": true, - "cpu_affinity": [7], - "draw_bbox": true, - "draw_text": false, - "use_rga_bbox": false, - "labels": ["person", "shoe"] - }, - { - "id": "post", - "type": "preprocess", - "role": "filter", - "enable": true, - "cpu_affinity": [7], - "dst_w": 1920, - "dst_h": 1080, - "dst_format": "nv12", - "resize_mode": "stretch", - "rga_gate": "person_shoe_two_stage_recommended", - "use_rga": true - }, - { - "id": "pub", - "type": "publish", - "role": "filter", - "enable": true, - "cpu_affinity": [3], - "codec": "h264", - "fps": 30, - "bitrate_kbps": 2000, - "mpp_output_timeout_ms": 50, - "mpp_packet_wait_ms": 10, - "use_mpp": true, - "outputs": [ - {"proto": "rtsp_server", "port": 8555, "path": "/live/cam1"} - ] - } - ], - "edges": [ - ["in", "pre_rgb"], - ["pre_rgb", "person_det"], - ["person_det", "person_trk"], - ["person_trk", "shoe_det", {"queue": {"size": 16, "strategy": "drop_oldest"}}], - ["shoe_det", "osd", {"queue": {"size": 16, "strategy": "drop_oldest"}}], - ["osd", "post", {"queue": {"size": 32, "strategy": "drop_oldest"}}], - ["post", "pub", {"queue": {"size": 64, "strategy": "drop_oldest"}}] - ] - } - ] -} diff --git a/configs/person_shoe_two_stage_recommended_alarm.json b/configs/person_shoe_two_stage_recommended_alarm.json deleted file mode 100644 index ba2ad21..0000000 --- a/configs/person_shoe_two_stage_recommended_alarm.json +++ /dev/null @@ -1,228 +0,0 @@ -{ - "queue": { - "size": 8, - "strategy": "drop_oldest" - }, - "graphs": [ - { - "name": "person_shoe_two_stage_recommended_alarm", - "executor": { - "batch_size": 2, - "run_budget": 8 - }, - "nodes": [ - { - "id": "in", - "type": "input_rtsp", - "role": "source", - "enable": true, - "url": "rtsp://10.0.0.49:8554/cam", - "fps": 30, - "width": 1920, - "height": 1080, - "use_ffmpeg": true, - "use_mpp": false, - "force_tcp": true - }, - { - "id": "pre_rgb", - "type": "preprocess", - "role": "filter", - "enable": true, - "dst_w": 1920, - "dst_h": 1080, - "dst_format": "rgb", - "dst_packed": true, - "resize_mode": "stretch", - "rga_gate": "person_shoe_two_stage_recommended_alarm", - "use_rga": true - }, - { - "id": "person_det", - "type": "ai_yolo", - "role": "filter", - "enable": true, - "cpu_affinity": [4], - "use_rga": true, - "rga_gate": "person_shoe_two_stage_recommended_alarm", - "rga_max_inflight": 4, - "dst_packed": true, - "use_dma_input": true, - "infer_fps": 2, - "infer_phase_ms": 0, - "model_path": "./models/yolov8n-640.rknn", - "model_version": "v8", - "model_w": 640, - "model_h": 640, - "num_classes": 80, - "conf": 0.35, - "nms": 0.45, - "class_filter": [0], - "bbox_expand": { - "enable": true, - "class_id": 0, - "left": 0.06, - "right": 0.06, - "top": 0.04, - "bottom": 0.16 - } - }, - { - "id": "person_trk", - "type": "tracker", - "role": "filter", - "enable": true, - "cpu_affinity": [5], - "mode": "bytetrack_lite", - "per_class": true, - "track_classes": [0], - "high_th": 0.55, - "low_th": 0.10, - "iou_th": 0.3, - "max_age_ms": 900, - "min_hits": 2 - }, - { - "id": "shoe_det", - "type": "ai_shoe_det", - "role": "filter", - "enable": true, - "cpu_affinity": [6], - "use_rga": true, - "rga_gate": "person_shoe_two_stage_recommended_alarm", - "rga_max_inflight": 4, - "dst_packed": true, - "use_dma_input": false, - "infer_fps": 2, - "infer_phase_ms": 150, - "model_path": "./models/shoe_detector_openimages_ppe_v1.rknn", - "model_w": 640, - "model_h": 640, - "conf": 0.15, - "nms": 0.45, - "v8_box_format": "cxcywh", - "append_detections": true, - "dynamic_roi": { - "enable": true, - "person_class_id": 0, - "shoe_class_id": 1, - "debug_roi_class_id": -1, - "max_rois": 3, - "min_person_height": 60, - "x_offset": -0.24, - "y_offset": 0.64, - "width_scale": 1.48, - "height_scale": 0.58 - } - }, - { - "id": "shoe_logic", - "type": "logic_gate", - "role": "filter", - "enable": true, - "cpu_affinity": [6], - "mode": "person_shoe_check", - "debug": false, - "person_shoe_check": { - "person_class": 0, - "shoe_class": 1, - "violation_class": 2, - "min_person_score": 0.30, - "min_shoe_score": 0.15, - "require_person_track_id": true, - "use_person_bbox_for_violation": true, - "attach_person_track_to_shoe": true, - "match_iou": 0.02, - "foot_region": { - "x_offset": -0.24, - "y_offset": 0.64, - "width_scale": 1.48, - "height_scale": 0.58 - } - } - }, - { - "id": "osd", - "type": "osd", - "role": "filter", - "enable": true, - "cpu_affinity": [7], - "draw_bbox": true, - "draw_text": false, - "use_rga_bbox": false, - "labels": ["person", "shoe", "no_shoe"] - }, - { - "id": "post", - "type": "preprocess", - "role": "filter", - "enable": true, - "cpu_affinity": [7], - "dst_w": 1920, - "dst_h": 1080, - "dst_format": "nv12", - "resize_mode": "stretch", - "rga_gate": "person_shoe_two_stage_recommended_alarm", - "use_rga": true - }, - { - "id": "pub", - "type": "publish", - "role": "filter", - "enable": true, - "cpu_affinity": [3], - "codec": "h264", - "fps": 30, - "bitrate_kbps": 2000, - "mpp_output_timeout_ms": 50, - "mpp_packet_wait_ms": 10, - "use_mpp": true, - "outputs": [ - {"proto": "rtsp_server", "port": 8555, "path": "/live/cam1"} - ] - }, - { - "id": "alarm", - "type": "alarm", - "role": "sink", - "enable": true, - "eval_fps": 2, - "labels": ["person", "shoe", "no_shoe"], - "rules": [ - { - "name": "missing_shoe", - "class_ids": [2], - "roi": {"x": 0.0, "y": 0.0, "w": 1.0, "h": 1.0}, - "min_score": 0.30, - "require_track_id": true, - "min_duration_ms": 800, - "min_hits": 2, - "hit_window_ms": 2000, - "cooldown_ms": 10000, - "per_track_cooldown_ms": 15000 - } - ], - "actions": { - "log": { - "enable": true, - "level": "info", - "include_detections": true, - "min_interval_ms": 2000 - } - } - } - ], - "edges": [ - ["in", "pre_rgb"], - ["pre_rgb", "person_det"], - ["person_det", "person_trk"], - ["person_trk", "shoe_det", {"queue": {"size": 16, "strategy": "drop_oldest"}}], - ["shoe_det", "shoe_logic", {"queue": {"size": 16, "strategy": "drop_oldest"}}], - ["shoe_logic", "osd", {"queue": {"size": 16, "strategy": "drop_oldest"}}], - ["osd", "post", {"queue": {"size": 32, "strategy": "drop_oldest"}}], - ["post", "pub", {"queue": {"size": 64, "strategy": "drop_oldest"}}], - ["pub", "alarm", {"queue": {"size": 64, "strategy": "drop_oldest"}}] - ] - } - ] -} diff --git a/configs/person_shoe_two_stage_recommended_recall.json b/configs/person_shoe_two_stage_recommended_recall.json deleted file mode 100644 index e53676d..0000000 --- a/configs/person_shoe_two_stage_recommended_recall.json +++ /dev/null @@ -1,170 +0,0 @@ -{ - "queue": { - "size": 8, - "strategy": "drop_oldest" - }, - "graphs": [ - { - "name": "person_shoe_two_stage_recommended_recall", - "executor": { - "batch_size": 2, - "run_budget": 8 - }, - "nodes": [ - { - "id": "in", - "type": "input_rtsp", - "role": "source", - "enable": true, - "url": "rtsp://10.0.0.49:8554/cam", - "fps": 30, - "width": 1920, - "height": 1080, - "use_ffmpeg": true, - "use_mpp": false, - "force_tcp": true - }, - { - "id": "pre_rgb", - "type": "preprocess", - "role": "filter", - "enable": true, - "dst_w": 1920, - "dst_h": 1080, - "dst_format": "rgb", - "dst_packed": true, - "resize_mode": "stretch", - "rga_gate": "person_shoe_two_stage_recommended_recall", - "use_rga": true - }, - { - "id": "person_det", - "type": "ai_yolo", - "role": "filter", - "enable": true, - "cpu_affinity": [4], - "use_rga": true, - "rga_gate": "person_shoe_two_stage_recommended_recall", - "rga_max_inflight": 4, - "dst_packed": true, - "use_dma_input": true, - "infer_fps": 2, - "infer_phase_ms": 0, - "model_path": "./models/yolov8n-640.rknn", - "model_version": "v8", - "model_w": 640, - "model_h": 640, - "num_classes": 80, - "conf": 0.35, - "nms": 0.45, - "class_filter": [0], - "bbox_expand": { - "enable": true, - "class_id": 0, - "left": 0.06, - "right": 0.06, - "top": 0.04, - "bottom": 0.16 - } - }, - { - "id": "person_trk", - "type": "tracker", - "role": "filter", - "enable": true, - "cpu_affinity": [5], - "mode": "bytetrack_lite", - "per_class": true, - "track_classes": [0], - "high_th": 0.55, - "low_th": 0.10, - "iou_th": 0.3, - "max_age_ms": 900, - "min_hits": 2 - }, - { - "id": "shoe_det", - "type": "ai_shoe_det", - "role": "filter", - "enable": true, - "cpu_affinity": [6], - "use_rga": true, - "rga_gate": "person_shoe_two_stage_recommended_recall", - "rga_max_inflight": 4, - "dst_packed": true, - "use_dma_input": false, - "infer_fps": 2, - "infer_phase_ms": 150, - "model_path": "./models/shoe_detector_openimages_ppe_v1.rknn", - "model_w": 640, - "model_h": 640, - "conf": 0.15, - "nms": 0.45, - "v8_box_format": "cxcywh", - "append_detections": true, - "dynamic_roi": { - "enable": true, - "person_class_id": 0, - "shoe_class_id": 1, - "debug_roi_class_id": -1, - "max_rois": 3, - "min_person_height": 60, - "x_offset": -0.24, - "y_offset": 0.64, - "width_scale": 1.48, - "height_scale": 0.58 - } - }, - { - "id": "osd", - "type": "osd", - "role": "filter", - "enable": true, - "cpu_affinity": [7], - "draw_bbox": true, - "draw_text": false, - "use_rga_bbox": false, - "labels": ["person", "shoe"] - }, - { - "id": "post", - "type": "preprocess", - "role": "filter", - "enable": true, - "cpu_affinity": [7], - "dst_w": 1920, - "dst_h": 1080, - "dst_format": "nv12", - "resize_mode": "stretch", - "rga_gate": "person_shoe_two_stage_recommended_recall", - "use_rga": true - }, - { - "id": "pub", - "type": "publish", - "role": "filter", - "enable": true, - "cpu_affinity": [3], - "codec": "h264", - "fps": 30, - "bitrate_kbps": 2000, - "mpp_output_timeout_ms": 50, - "mpp_packet_wait_ms": 10, - "use_mpp": true, - "outputs": [ - {"proto": "rtsp_server", "port": 8555, "path": "/live/cam1"} - ] - } - ], - "edges": [ - ["in", "pre_rgb"], - ["pre_rgb", "person_det"], - ["person_det", "person_trk"], - ["person_trk", "shoe_det", {"queue": {"size": 16, "strategy": "drop_oldest"}}], - ["shoe_det", "osd", {"queue": {"size": 16, "strategy": "drop_oldest"}}], - ["osd", "post", {"queue": {"size": 32, "strategy": "drop_oldest"}}], - ["post", "pub", {"queue": {"size": 64, "strategy": "drop_oldest"}}] - ] - } - ] -} diff --git a/configs/person_shoe_two_stage_workshoe_alarm.json b/configs/person_shoe_two_stage_workshoe_alarm.json deleted file mode 100644 index baededd..0000000 --- a/configs/person_shoe_two_stage_workshoe_alarm.json +++ /dev/null @@ -1,247 +0,0 @@ -{ - "queue": { - "size": 8, - "strategy": "drop_oldest" - }, - "graphs": [ - { - "name": "person_shoe_two_stage_workshoe_alarm", - "executor": { - "batch_size": 2, - "run_budget": 8 - }, - "nodes": [ - { - "id": "in", - "type": "input_rtsp", - "role": "source", - "enable": true, - "url": "rtsp://10.0.0.49:8554/cam", - "fps": 30, - "width": 1920, - "height": 1080, - "use_ffmpeg": true, - "use_mpp": false, - "force_tcp": true - }, - { - "id": "pre_rgb", - "type": "preprocess", - "role": "filter", - "enable": true, - "dst_w": 1920, - "dst_h": 1080, - "dst_format": "rgb", - "dst_packed": true, - "resize_mode": "stretch", - "rga_gate": "person_shoe_two_stage_workshoe_alarm", - "use_rga": true - }, - { - "id": "person_det", - "type": "ai_yolo", - "role": "filter", - "enable": true, - "cpu_affinity": [4], - "use_rga": true, - "rga_gate": "person_shoe_two_stage_workshoe_alarm", - "rga_max_inflight": 4, - "dst_packed": true, - "use_dma_input": true, - "infer_fps": 2, - "infer_phase_ms": 0, - "model_path": "./models/yolov8n-640.rknn", - "model_version": "v8", - "model_w": 640, - "model_h": 640, - "num_classes": 80, - "conf": 0.35, - "nms": 0.45, - "class_filter": [0], - "bbox_expand": { - "enable": true, - "class_id": 0, - "left": 0.06, - "right": 0.06, - "top": 0.04, - "bottom": 0.16 - } - }, - { - "id": "person_trk", - "type": "tracker", - "role": "filter", - "enable": true, - "cpu_affinity": [5], - "mode": "bytetrack_lite", - "per_class": true, - "track_classes": [0], - "high_th": 0.55, - "low_th": 0.10, - "iou_th": 0.3, - "max_age_ms": 900, - "min_hits": 2 - }, - { - "id": "shoe_det", - "type": "ai_shoe_det", - "role": "filter", - "enable": true, - "cpu_affinity": [6], - "use_rga": true, - "rga_gate": "person_shoe_two_stage_workshoe_alarm", - "rga_max_inflight": 4, - "dst_packed": true, - "use_dma_input": false, - "infer_fps": 2, - "infer_phase_ms": 150, - "model_path": "./models/shoe_detector_openimages_ppe_v1.rknn", - "model_w": 640, - "model_h": 640, - "conf": 0.15, - "nms": 0.45, - "v8_box_format": "cxcywh", - "append_detections": true, - "dynamic_roi": { - "enable": true, - "person_class_id": 0, - "shoe_class_id": 1, - "debug_roi_class_id": -1, - "max_rois": 3, - "min_person_height": 60, - "max_box_area_ratio": 0.60, - "x_offset": -0.24, - "y_offset": 0.64, - "width_scale": 1.48, - "height_scale": 0.58 - } - }, - { - "id": "shoe_assoc", - "type": "logic_gate", - "role": "filter", - "enable": true, - "cpu_affinity": [6], - "mode": "person_shoe_check", - "debug": false, - "person_shoe_check": { - "person_class": 0, - "shoe_class": 1, - "violation_class": 2, - "min_person_score": 0.30, - "min_shoe_score": 0.15, - "require_person_track_id": true, - "attach_person_track_to_shoe": true, - "emit_missing_violation": false, - "foot_region": { - "x_offset": -0.24, - "y_offset": 0.64, - "width_scale": 1.48, - "height_scale": 0.58 - } - } - }, - { - "id": "shoe_color", - "type": "logic_gate", - "role": "filter", - "enable": true, - "cpu_affinity": [6], - "mode": "ppe_boots_check", - "anchor_class": 0, - "boots_class": 1, - "violation_class": 2, - "debug": false, - "color_check": { - "enable": true, - "method": "brightness", - "dark_threshold": 90, - "roi_expand": 1.0 - } - }, - { - "id": "osd", - "type": "osd", - "role": "filter", - "enable": true, - "cpu_affinity": [7], - "draw_bbox": true, - "draw_text": false, - "use_rga_bbox": false, - "labels": ["person", "shoe", "non_black_shoe"] - }, - { - "id": "post", - "type": "preprocess", - "role": "filter", - "enable": true, - "cpu_affinity": [7], - "dst_w": 1920, - "dst_h": 1080, - "dst_format": "nv12", - "resize_mode": "stretch", - "rga_gate": "person_shoe_two_stage_workshoe_alarm", - "use_rga": true - }, - { - "id": "pub", - "type": "publish", - "role": "filter", - "enable": true, - "cpu_affinity": [3], - "codec": "h264", - "fps": 30, - "bitrate_kbps": 2000, - "mpp_output_timeout_ms": 50, - "mpp_packet_wait_ms": 10, - "use_mpp": true, - "outputs": [ - {"proto": "rtsp_server", "port": 8555, "path": "/live/cam1"} - ] - }, - { - "id": "alarm", - "type": "alarm", - "role": "sink", - "enable": true, - "eval_fps": 2, - "labels": ["person", "shoe", "non_black_shoe"], - "rules": [ - { - "name": "non_compliant_workshoe", - "class_ids": [2], - "roi": {"x": 0.0, "y": 0.0, "w": 1.0, "h": 1.0}, - "min_score": 0.30, - "require_track_id": false, - "min_duration_ms": 800, - "min_hits": 2, - "hit_window_ms": 2000, - "cooldown_ms": 15000, - "per_track_cooldown_ms": 0 - } - ], - "actions": { - "log": { - "enable": true, - "level": "info", - "include_detections": true, - "min_interval_ms": 2000 - } - } - } - ], - "edges": [ - ["in", "pre_rgb"], - ["pre_rgb", "person_det"], - ["person_det", "person_trk"], - ["person_trk", "shoe_det", {"queue": {"size": 16, "strategy": "drop_oldest"}}], - ["shoe_det", "shoe_assoc", {"queue": {"size": 16, "strategy": "drop_oldest"}}], - ["shoe_assoc", "shoe_color", {"queue": {"size": 16, "strategy": "drop_oldest"}}], - ["shoe_color", "osd", {"queue": {"size": 16, "strategy": "drop_oldest"}}], - ["osd", "post", {"queue": {"size": 32, "strategy": "drop_oldest"}}], - ["post", "pub", {"queue": {"size": 64, "strategy": "drop_oldest"}}], - ["pub", "alarm", {"queue": {"size": 64, "strategy": "drop_oldest"}}] - ] - } - ] -} diff --git a/configs/sample_logic_gate_ppe.json b/configs/sample_logic_gate_ppe.json deleted file mode 100644 index fd99754..0000000 --- a/configs/sample_logic_gate_ppe.json +++ /dev/null @@ -1,120 +0,0 @@ -{ - "queue": { - "size": 8, - "strategy": "drop_oldest" - }, - "graphs": [ - { - "name": "ppe_logic_gate_demo", - "nodes": [ - { - "id": "in", - "type": "input_rtsp", - "role": "source", - "enable": true, - "url": "rtsp://10.0.0.49:8554/cam", - "fps": 30, - "width": 1280, - "height": 720, - "use_mpp": true, - "force_tcp": true - }, - { - "id": "pre", - "type": "preprocess", - "role": "filter", - "enable": true, - "dst_w": 640, - "dst_h": 640, - "dst_format": "rgb", - "resize_mode": "stretch", - "use_rga": true - }, - { - "id": "yolo", - "type": "ai_yolo", - "role": "filter", - "enable": true, - "infer_fps": 10, - "model_path": "./models/shoe_detector_openimages_ppe_v1.rknn", - "model_version": "v8", - "model_w": 640, - "model_h": 640, - "num_classes": 1, - "conf": 0.35, - "nms": 0.45, - "class_filter": [0] - }, - { - "id": "trk", - "type": "tracker", - "role": "filter", - "enable": true, - "mode": "bytetrack_lite", - "per_class": true, - "track_classes": [0], - "max_age_ms": 1500, - "min_hits": 2 - }, - { - "id": "logic", - "type": "logic_gate", - "role": "filter", - "enable": true, - "mode": "simple", - "anchor_class": 0, - "boots_class": 0, - "color_check": { - "enable": true, - "method": "hsv", - "dark_threshold": 80, - "roi_expand": 1.0 - }, - "debug": true - }, - { - "id": "osd", - "type": "osd", - "role": "filter", - "enable": true, - "draw_bbox": true, - "draw_text": true, - "labels": ["shoe"] - }, - { - "id": "post", - "type": "preprocess", - "role": "filter", - "enable": true, - "dst_w": 1280, - "dst_h": 720, - "dst_format": "nv12", - "resize_mode": "stretch", - "use_rga": true - }, - { - "id": "pub", - "type": "publish", - "role": "filter", - "enable": true, - "codec": "h264", - "fps": 30, - "bitrate_kbps": 2000, - "use_mpp": true, - "outputs": [ - {"proto": "rtsp_server", "port": 8555, "path": "/live/cam1"} - ] - } - ], - "edges": [ - ["in", "pre"], - ["pre", "yolo"], - ["yolo", "trk"], - ["trk", "logic"], - ["logic", "osd"], - ["osd", "post"], - ["post", "pub"] - ] - } - ] -} diff --git a/configs/sample_person_shoe_two_stage.json b/configs/sample_person_shoe_two_stage.json deleted file mode 100644 index f7fc290..0000000 --- a/configs/sample_person_shoe_two_stage.json +++ /dev/null @@ -1,153 +0,0 @@ -{ - "queue": { - "size": 8, - "strategy": "drop_oldest" - }, - "graphs": [ - { - "name": "person_shoe_two_stage", - "nodes": [ - { - "id": "in", - "type": "input_rtsp", - "role": "source", - "enable": true, - "url": "rtsp://10.0.0.49:8554/cam", - "fps": 30, - "width": 1920, - "height": 1080, - "use_mpp": true, - "force_tcp": true - }, - { - "id": "pre_rgb", - "type": "preprocess", - "role": "filter", - "enable": true, - "dst_w": 1920, - "dst_h": 1080, - "dst_format": "rgb", - "dst_packed": true, - "resize_mode": "stretch", - "rga_gate": "person_shoe_two_stage", - "use_rga": true - }, - { - "id": "person_det", - "type": "ai_yolo", - "role": "filter", - "enable": true, - "use_rga": true, - "rga_gate": "person_shoe_two_stage", - "rga_max_inflight": 4, - "dst_packed": true, - "infer_fps": 2, - "model_path": "./models/yolov8n-640.rknn", - "model_version": "v8", - "model_w": 640, - "model_h": 640, - "num_classes": 80, - "conf": 0.4, - "nms": 0.45, - "class_filter": [0], - "bbox_expand": { - "enable": true, - "class_id": 0, - "left": 0.06, - "right": 0.06, - "top": 0.04, - "bottom": 0.16 - } - }, - { - "id": "person_trk", - "type": "tracker", - "role": "filter", - "enable": true, - "mode": "bytetrack_lite", - "per_class": true, - "track_classes": [0], - "high_th": 0.6, - "low_th": 0.15, - "iou_th": 0.3, - "max_age_ms": 600, - "min_hits": 3 - }, - { - "id": "shoe_det", - "type": "ai_shoe_det", - "role": "filter", - "enable": true, - "use_rga": true, - "rga_gate": "person_shoe_two_stage", - "rga_max_inflight": 4, - "dst_packed": true, - "infer_fps": 1, - "model_path": "./models/shoe_detector_openimages_ppe_v1.rknn", - "model_w": 640, - "model_h": 640, - "conf": 0.25, - "nms": 0.45, - "v8_box_format": "cxcywh", - "append_detections": true, - "dynamic_roi": { - "enable": true, - "person_class_id": 0, - "shoe_class_id": 1, - "debug_roi_class_id": -1, - "max_rois": 2, - "min_person_height": 80, - "x_offset": -0.20, - "y_offset": 0.68, - "width_scale": 1.40, - "height_scale": 0.50 - } - }, - { - "id": "osd", - "type": "osd", - "role": "filter", - "enable": true, - "draw_bbox": true, - "draw_text": false, - "use_rga_bbox": false, - "labels": ["person", "shoe", "foot_roi"] - }, - { - "id": "post", - "type": "preprocess", - "role": "filter", - "enable": true, - "dst_w": 1920, - "dst_h": 1080, - "dst_format": "nv12", - "resize_mode": "stretch", - "rga_gate": "person_shoe_two_stage", - "use_rga": true - }, - { - "id": "pub", - "type": "publish", - "role": "filter", - "enable": true, - "codec": "h264", - "fps": 30, - "bitrate_kbps": 2000, - "use_mpp": true, - "outputs": [ - {"proto": "rtsp_server", "port": 8555, "path": "/live/cam1"} - ] - } - ], - "edges": [ - ["in", "pre_rgb"], - ["pre_rgb", "person_det"], - ["person_det", "person_trk"], - ["person_trk", "shoe_det"], - ["shoe_det", "osd"], - ["osd", "post"], - ["post", "pub"] - ] - } - ] -} diff --git a/configs/sample_person_shoe_two_stage_balanced.json b/configs/sample_person_shoe_two_stage_balanced.json deleted file mode 100644 index 78e843c..0000000 --- a/configs/sample_person_shoe_two_stage_balanced.json +++ /dev/null @@ -1,169 +0,0 @@ -{ - "queue": { - "size": 8, - "strategy": "drop_oldest" - }, - "graphs": [ - { - "name": "person_shoe_two_stage_balanced", - "executor": { - "batch_size": 2, - "run_budget": 8 - }, - "nodes": [ - { - "id": "in", - "type": "input_rtsp", - "role": "source", - "enable": true, - "url": "rtsp://10.0.0.49:8554/cam", - "fps": 30, - "width": 1920, - "height": 1080, - "use_mpp": true, - "force_tcp": true - }, - { - "id": "pre_rgb", - "type": "preprocess", - "role": "filter", - "enable": true, - "dst_w": 1920, - "dst_h": 1080, - "dst_format": "rgb", - "dst_packed": true, - "resize_mode": "stretch", - "rga_gate": "person_shoe_two_stage_balanced", - "use_rga": true - }, - { - "id": "person_det", - "type": "ai_yolo", - "role": "filter", - "enable": true, - "cpu_affinity": [4], - "use_rga": true, - "rga_gate": "person_shoe_two_stage_balanced", - "rga_max_inflight": 4, - "dst_packed": true, - "use_dma_input": true, - "infer_fps": 2, - "infer_phase_ms": 0, - "model_path": "./models/yolov8n-640.rknn", - "model_version": "v8", - "model_w": 640, - "model_h": 640, - "num_classes": 80, - "conf": 0.35, - "nms": 0.45, - "class_filter": [0], - "bbox_expand": { - "enable": true, - "class_id": 0, - "left": 0.06, - "right": 0.06, - "top": 0.04, - "bottom": 0.16 - } - }, - { - "id": "person_trk", - "type": "tracker", - "role": "filter", - "enable": true, - "cpu_affinity": [5], - "mode": "bytetrack_lite", - "per_class": true, - "track_classes": [0], - "high_th": 0.6, - "low_th": 0.15, - "iou_th": 0.3, - "max_age_ms": 700, - "min_hits": 2 - }, - { - "id": "shoe_det", - "type": "ai_shoe_det", - "role": "filter", - "enable": true, - "cpu_affinity": [6], - "use_rga": true, - "rga_gate": "person_shoe_two_stage_balanced", - "rga_max_inflight": 4, - "dst_packed": true, - "use_dma_input": false, - "infer_fps": 2, - "infer_phase_ms": 250, - "model_path": "./models/shoe_detector_openimages_ppe_v1.rknn", - "model_w": 640, - "model_h": 640, - "conf": 0.20, - "nms": 0.45, - "v8_box_format": "cxcywh", - "append_detections": true, - "dynamic_roi": { - "enable": true, - "person_class_id": 0, - "shoe_class_id": 1, - "debug_roi_class_id": -1, - "max_rois": 1, - "min_person_height": 80, - "x_offset": -0.20, - "y_offset": 0.68, - "width_scale": 1.40, - "height_scale": 0.50 - } - }, - { - "id": "osd", - "type": "osd", - "role": "filter", - "enable": true, - "cpu_affinity": [7], - "draw_bbox": true, - "draw_text": false, - "use_rga_bbox": false, - "labels": ["person", "shoe"] - }, - { - "id": "post", - "type": "preprocess", - "role": "filter", - "enable": true, - "cpu_affinity": [7], - "dst_w": 1920, - "dst_h": 1080, - "dst_format": "nv12", - "resize_mode": "stretch", - "rga_gate": "person_shoe_two_stage_balanced", - "use_rga": true - }, - { - "id": "pub", - "type": "publish", - "role": "filter", - "enable": true, - "cpu_affinity": [3], - "codec": "h264", - "fps": 30, - "bitrate_kbps": 2000, - "mpp_output_timeout_ms": 50, - "mpp_packet_wait_ms": 10, - "use_mpp": true, - "outputs": [ - {"proto": "rtsp_server", "port": 8555, "path": "/live/cam1"} - ] - } - ], - "edges": [ - ["in", "pre_rgb"], - ["pre_rgb", "person_det"], - ["person_det", "person_trk"], - ["person_trk", "shoe_det", {"queue": {"size": 16, "strategy": "drop_oldest"}}], - ["shoe_det", "osd", {"queue": {"size": 16, "strategy": "drop_oldest"}}], - ["osd", "post", {"queue": {"size": 32, "strategy": "drop_oldest"}}], - ["post", "pub", {"queue": {"size": 64, "strategy": "drop_oldest"}}] - ] - } - ] -} diff --git a/configs/sample_person_shoe_two_stage_balanced_ffmpeg_decode.json b/configs/sample_person_shoe_two_stage_balanced_ffmpeg_decode.json deleted file mode 100644 index 5d65841..0000000 --- a/configs/sample_person_shoe_two_stage_balanced_ffmpeg_decode.json +++ /dev/null @@ -1,170 +0,0 @@ -{ - "queue": { - "size": 8, - "strategy": "drop_oldest" - }, - "graphs": [ - { - "name": "person_shoe_two_stage_balanced_ffmpeg_decode", - "executor": { - "batch_size": 2, - "run_budget": 8 - }, - "nodes": [ - { - "id": "in", - "type": "input_rtsp", - "role": "source", - "enable": true, - "url": "rtsp://10.0.0.49:8554/cam", - "fps": 30, - "width": 1920, - "height": 1080, - "use_ffmpeg": true, - "use_mpp": false, - "force_tcp": true - }, - { - "id": "pre_rgb", - "type": "preprocess", - "role": "filter", - "enable": true, - "dst_w": 1920, - "dst_h": 1080, - "dst_format": "rgb", - "dst_packed": true, - "resize_mode": "stretch", - "rga_gate": "person_shoe_two_stage_balanced_ffmpeg_decode", - "use_rga": true - }, - { - "id": "person_det", - "type": "ai_yolo", - "role": "filter", - "enable": true, - "cpu_affinity": [4], - "use_rga": true, - "rga_gate": "person_shoe_two_stage_balanced_ffmpeg_decode", - "rga_max_inflight": 4, - "dst_packed": true, - "use_dma_input": true, - "infer_fps": 2, - "infer_phase_ms": 0, - "model_path": "./models/yolov8n-640.rknn", - "model_version": "v8", - "model_w": 640, - "model_h": 640, - "num_classes": 80, - "conf": 0.35, - "nms": 0.45, - "class_filter": [0], - "bbox_expand": { - "enable": true, - "class_id": 0, - "left": 0.06, - "right": 0.06, - "top": 0.04, - "bottom": 0.16 - } - }, - { - "id": "person_trk", - "type": "tracker", - "role": "filter", - "enable": true, - "cpu_affinity": [5], - "mode": "bytetrack_lite", - "per_class": true, - "track_classes": [0], - "high_th": 0.6, - "low_th": 0.15, - "iou_th": 0.3, - "max_age_ms": 700, - "min_hits": 2 - }, - { - "id": "shoe_det", - "type": "ai_shoe_det", - "role": "filter", - "enable": true, - "cpu_affinity": [6], - "use_rga": true, - "rga_gate": "person_shoe_two_stage_balanced_ffmpeg_decode", - "rga_max_inflight": 4, - "dst_packed": true, - "use_dma_input": false, - "infer_fps": 2, - "infer_phase_ms": 250, - "model_path": "./models/shoe_detector_openimages_ppe_v1.rknn", - "model_w": 640, - "model_h": 640, - "conf": 0.20, - "nms": 0.45, - "v8_box_format": "cxcywh", - "append_detections": true, - "dynamic_roi": { - "enable": true, - "person_class_id": 0, - "shoe_class_id": 1, - "debug_roi_class_id": -1, - "max_rois": 1, - "min_person_height": 80, - "x_offset": -0.20, - "y_offset": 0.68, - "width_scale": 1.40, - "height_scale": 0.50 - } - }, - { - "id": "osd", - "type": "osd", - "role": "filter", - "enable": true, - "cpu_affinity": [7], - "draw_bbox": true, - "draw_text": false, - "use_rga_bbox": false, - "labels": ["person", "shoe"] - }, - { - "id": "post", - "type": "preprocess", - "role": "filter", - "enable": true, - "cpu_affinity": [7], - "dst_w": 1920, - "dst_h": 1080, - "dst_format": "nv12", - "resize_mode": "stretch", - "rga_gate": "person_shoe_two_stage_balanced_ffmpeg_decode", - "use_rga": true - }, - { - "id": "pub", - "type": "publish", - "role": "filter", - "enable": true, - "cpu_affinity": [3], - "codec": "h264", - "fps": 30, - "bitrate_kbps": 2000, - "mpp_output_timeout_ms": 50, - "mpp_packet_wait_ms": 10, - "use_mpp": true, - "outputs": [ - {"proto": "rtsp_server", "port": 8555, "path": "/live/cam1"} - ] - } - ], - "edges": [ - ["in", "pre_rgb"], - ["pre_rgb", "person_det"], - ["person_det", "person_trk"], - ["person_trk", "shoe_det", {"queue": {"size": 16, "strategy": "drop_oldest"}}], - ["shoe_det", "osd", {"queue": {"size": 16, "strategy": "drop_oldest"}}], - ["osd", "post", {"queue": {"size": 32, "strategy": "drop_oldest"}}], - ["post", "pub", {"queue": {"size": 64, "strategy": "drop_oldest"}}] - ] - } - ] -} diff --git a/configs/sample_person_shoe_two_stage_recall.json b/configs/sample_person_shoe_two_stage_recall.json deleted file mode 100644 index 263acaf..0000000 --- a/configs/sample_person_shoe_two_stage_recall.json +++ /dev/null @@ -1,153 +0,0 @@ -{ - "queue": { - "size": 8, - "strategy": "drop_oldest" - }, - "graphs": [ - { - "name": "person_shoe_two_stage_recall", - "nodes": [ - { - "id": "in", - "type": "input_rtsp", - "role": "source", - "enable": true, - "url": "rtsp://10.0.0.49:8554/cam", - "fps": 30, - "width": 1920, - "height": 1080, - "use_mpp": true, - "force_tcp": true - }, - { - "id": "pre_rgb", - "type": "preprocess", - "role": "filter", - "enable": true, - "dst_w": 1920, - "dst_h": 1080, - "dst_format": "rgb", - "dst_packed": true, - "resize_mode": "stretch", - "rga_gate": "person_shoe_two_stage_recall", - "use_rga": true - }, - { - "id": "person_det", - "type": "ai_yolo", - "role": "filter", - "enable": true, - "use_rga": true, - "rga_gate": "person_shoe_two_stage_recall", - "rga_max_inflight": 4, - "dst_packed": true, - "infer_fps": 3, - "model_path": "./models/yolov8n-640.rknn", - "model_version": "v8", - "model_w": 640, - "model_h": 640, - "num_classes": 80, - "conf": 0.32, - "nms": 0.45, - "class_filter": [0], - "bbox_expand": { - "enable": true, - "class_id": 0, - "left": 0.06, - "right": 0.06, - "top": 0.04, - "bottom": 0.16 - } - }, - { - "id": "person_trk", - "type": "tracker", - "role": "filter", - "enable": true, - "mode": "bytetrack_lite", - "per_class": true, - "track_classes": [0], - "high_th": 0.55, - "low_th": 0.12, - "iou_th": 0.3, - "max_age_ms": 800, - "min_hits": 2 - }, - { - "id": "shoe_det", - "type": "ai_shoe_det", - "role": "filter", - "enable": true, - "use_rga": true, - "rga_gate": "person_shoe_two_stage_recall", - "rga_max_inflight": 4, - "dst_packed": true, - "infer_fps": 2, - "model_path": "./models/shoe_detector_openimages_ppe_v1.rknn", - "model_w": 640, - "model_h": 640, - "conf": 0.20, - "nms": 0.45, - "v8_box_format": "cxcywh", - "append_detections": true, - "dynamic_roi": { - "enable": true, - "person_class_id": 0, - "shoe_class_id": 1, - "debug_roi_class_id": -1, - "max_rois": 4, - "min_person_height": 60, - "x_offset": -0.22, - "y_offset": 0.66, - "width_scale": 1.45, - "height_scale": 0.54 - } - }, - { - "id": "osd", - "type": "osd", - "role": "filter", - "enable": true, - "draw_bbox": true, - "draw_text": false, - "use_rga_bbox": false, - "labels": ["person", "shoe"] - }, - { - "id": "post", - "type": "preprocess", - "role": "filter", - "enable": true, - "dst_w": 1920, - "dst_h": 1080, - "dst_format": "nv12", - "resize_mode": "stretch", - "rga_gate": "person_shoe_two_stage_recall", - "use_rga": true - }, - { - "id": "pub", - "type": "publish", - "role": "filter", - "enable": true, - "codec": "h264", - "fps": 30, - "bitrate_kbps": 2000, - "use_mpp": true, - "outputs": [ - {"proto": "rtsp_server", "port": 8555, "path": "/live/cam1"} - ] - } - ], - "edges": [ - ["in", "pre_rgb"], - ["pre_rgb", "person_det"], - ["person_det", "person_trk"], - ["person_trk", "shoe_det"], - ["shoe_det", "osd"], - ["osd", "post"], - ["post", "pub"] - ] - } - ] -} diff --git a/configs/sample_rtsp_preprocess_publish.json b/configs/sample_rtsp_preprocess_publish.json deleted file mode 100644 index e0abec0..0000000 --- a/configs/sample_rtsp_preprocess_publish.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "queue": { - "size": 16, - "strategy": "drop_oldest" - }, - "graphs": [ - { - "name": "rtsp_preprocess_publish", - "executor": { - "batch_size": 2, - "run_budget": 8 - }, - "nodes": [ - { - "id": "in", - "type": "input_rtsp", - "role": "source", - "enable": true, - "url": "rtsp://10.0.0.49:8554/cam", - "fps": 30, - "width": 1920, - "height": 1080, - "use_mpp": true, - "force_tcp": true - }, - { - "id": "pre_rgb", - "type": "preprocess", - "role": "filter", - "enable": true, - "cpu_affinity": [7], - "dst_w": 1920, - "dst_h": 1080, - "dst_format": "rgb", - "dst_packed": true, - "resize_mode": "stretch", - "rga_gate": "rtsp_preprocess_publish", - "use_rga": true - }, - { - "id": "post", - "type": "preprocess", - "role": "filter", - "enable": true, - "cpu_affinity": [7], - "dst_w": 1920, - "dst_h": 1080, - "dst_format": "nv12", - "resize_mode": "stretch", - "rga_gate": "rtsp_preprocess_publish", - "use_rga": true - }, - { - "id": "pub", - "type": "publish", - "role": "filter", - "enable": true, - "cpu_affinity": [3], - "codec": "h264", - "fps": 30, - "bitrate_kbps": 2000, - "mpp_output_timeout_ms": 50, - "mpp_packet_wait_ms": 10, - "use_mpp": true, - "outputs": [ - {"proto": "rtsp_server", "port": 8555, "path": "/live/cam1"} - ] - } - ], - "edges": [ - ["in", "pre_rgb"], - ["pre_rgb", "post", {"queue": {"size": 32, "strategy": "drop_oldest"}}], - ["post", "pub", {"queue": {"size": 64, "strategy": "drop_oldest"}}] - ] - } - ] -} diff --git a/configs/sample_rtsp_publish_only.json b/configs/sample_rtsp_publish_only.json deleted file mode 100644 index 223c542..0000000 --- a/configs/sample_rtsp_publish_only.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "queue": { - "size": 16, - "strategy": "drop_oldest" - }, - "graphs": [ - { - "name": "rtsp_publish_only", - "executor": { - "batch_size": 2, - "run_budget": 8 - }, - "nodes": [ - { - "id": "in", - "type": "input_rtsp", - "role": "source", - "enable": true, - "url": "rtsp://10.0.0.49:8554/cam", - "fps": 30, - "width": 1920, - "height": 1080, - "use_mpp": true, - "force_tcp": true - }, - { - "id": "pub", - "type": "publish", - "role": "filter", - "enable": true, - "cpu_affinity": [3], - "codec": "h264", - "fps": 30, - "bitrate_kbps": 2000, - "mpp_output_timeout_ms": 50, - "mpp_packet_wait_ms": 10, - "use_mpp": true, - "outputs": [ - {"proto": "rtsp_server", "port": 8555, "path": "/live/cam1"} - ] - } - ], - "edges": [ - ["in", "pub", {"queue": {"size": 64, "strategy": "drop_oldest"}}] - ] - } - ] -} diff --git a/configs/sample_rtsp_publish_only_ffmpeg_decode.json b/configs/sample_rtsp_publish_only_ffmpeg_decode.json deleted file mode 100644 index b2e3905..0000000 --- a/configs/sample_rtsp_publish_only_ffmpeg_decode.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "queue": { - "size": 16, - "strategy": "drop_oldest" - }, - "graphs": [ - { - "name": "rtsp_publish_only_ffmpeg_decode", - "executor": { - "batch_size": 2, - "run_budget": 8 - }, - "nodes": [ - { - "id": "in", - "type": "input_rtsp", - "role": "source", - "enable": true, - "url": "rtsp://10.0.0.49:8554/cam", - "fps": 30, - "width": 1920, - "height": 1080, - "use_ffmpeg": true, - "use_mpp": false, - "force_tcp": true - }, - { - "id": "pub", - "type": "publish", - "role": "filter", - "enable": true, - "cpu_affinity": [3], - "codec": "h264", - "fps": 30, - "bitrate_kbps": 2000, - "mpp_output_timeout_ms": 50, - "mpp_packet_wait_ms": 10, - "use_mpp": true, - "outputs": [ - {"proto": "rtsp_server", "port": 8555, "path": "/live/cam1"} - ] - } - ], - "edges": [ - ["in", "pub", {"queue": {"size": 64, "strategy": "drop_oldest"}}] - ] - } - ] -} diff --git a/configs/sample_shoe_detect.json b/configs/sample_shoe_detect.json deleted file mode 100644 index 9704446..0000000 --- a/configs/sample_shoe_detect.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - "queue": { - "size": 8, - "strategy": "drop_oldest" - }, - "graphs": [ - { - "name": "shoe_detector", - "nodes": [ - { - "id": "in", - "type": "input_rtsp", - "role": "source", - "enable": true, - "url": "rtsp://10.0.0.49:8554/cam", - "fps": 30, - "width": 1920, - "height": 1080, - "use_mpp": true, - "force_tcp": true - }, - { - "id": "pre", - "type": "preprocess", - "role": "filter", - "enable": true, - "dst_w": 1920, - "dst_h": 1080, - "dst_format": "rgb", - "resize_mode": "stretch", - "rga_gate": "shoe_detector", - "use_rga": true - }, - { - "id": "shoe_det", - "type": "ai_shoe_det", - "role": "filter", - "enable": true, - "model_path": "./models/shoe_detector_openimages_ppe_v1.rknn", - "model_w": 640, - "model_h": 640, - "conf": 0.35, - "nms": 0.45, - "windows": [ - {"x": 0, "y": 0, "w": 960, "h": 1080}, - {"x": 960, "y": 0, "w": 960, "h": 1080} - ] - }, - { - "id": "trk", - "type": "tracker", - "role": "filter", - "enable": true, - "mode": "bytetrack_lite", - "per_class": true, - "track_classes": [0], - "max_age_ms": 1500, - "min_hits": 2 - }, - { - "id": "osd", - "type": "osd", - "role": "filter", - "enable": true, - "draw_bbox": true, - "draw_text": true, - "use_rga_bbox": false, - "labels": ["shoe"] - }, - { - "id": "post", - "type": "preprocess", - "role": "filter", - "enable": true, - "dst_w": 1920, - "dst_h": 1080, - "dst_format": "nv12", - "resize_mode": "stretch", - "rga_gate": "shoe_detector", - "use_rga": true - }, - { - "id": "pub", - "type": "publish", - "role": "filter", - "enable": true, - "codec": "h264", - "fps": 30, - "bitrate_kbps": 2000, - "use_mpp": true, - "outputs": [ - {"proto": "rtsp_server", "port": 8555, "path": "/live/cam1"} - ] - } - ], - "edges": [ - ["in", "pre"], - ["pre", "shoe_det"], - ["shoe_det", "trk"], - ["trk", "osd"], - ["osd", "post"], - ["post", "pub"] - ] - } - ] -} diff --git a/docs/config_guide.md b/docs/config_guide.md index 43dd1a5..7a84dd0 100644 --- a/docs/config_guide.md +++ b/docs/config_guide.md @@ -459,9 +459,9 @@ input_rtsp | 配置文件 | 说明 | |----------|------| -| `configs/person_shoe_two_stage_recommended.json` | 单路两阶段鞋检测稳定版 | -| `configs/person_shoe_two_stage_recommended_recall.json` | 单路两阶段鞋检测高召回版 | -| `configs/person_shoe_two_stage_workshoe_alarm.json` | 单路劳保鞋颜色告警主线配置 | +| `configs/person_shoe_two_stage_workshoe_alarm_v8s_shoe640.json` | 单路劳保鞋颜色告警主线配置 | +| `configs/person_shoe_two_stage_workshoe_alarm_v8s_shoe640_strict.json` | 单路劳保鞋颜色告警严格版 | +| `configs/full_pipeline_1080p.json` | 人脸检测/识别 + 劳保鞋颜色告警完整流程 | --- @@ -478,6 +478,51 @@ input_rtsp 4. `alarm.min_hits / min_duration_ms / cooldown_ms` 目标:把“会报警”收敛成“稳一点再报警” +### 6.1 实施人员重点参数 + +实施时优先看下面这些参数,不建议一开始改其它项。 + +| 节点 | 参数 | 期望效果 | 调大后的典型结果 | 调小后的典型结果 | +|------|------|----------|------------------|------------------| +| `input_rtsp` | `use_ffmpeg / use_mpp` | 解决固定画面卡顿 | `use_ffmpeg=true` 一般更稳 | `use_mpp=true` 某些源可能卡顿 | +| `person_det` | `infer_fps` | 控制人体检测负载 | 召回更及时,但更吃 NPU | 更省资源,但人框更新更慢 | +| `person_det` | `bbox_expand.bottom` | 给脚部 ROI 留空间 | 更不容易漏脚 | 人框更紧,鞋 ROI 更容易裁偏 | +| `shoe_det` | `conf` | 控制鞋框召回和误报平衡 | 误报减少,但漏鞋增多 | 鞋框更多,但误报也更多 | +| `shoe_det.dynamic_roi` | `max_rois` | 控制每帧最多处理多少人 | 覆盖更多人,但 FPS 下降 | 更省资源,但多人时会漏掉部分鞋 | +| `shoe_det.dynamic_roi` | `min_person_height` | 过滤远景小人 | 远处小人不参与鞋检 | 更多远景人进入鞋检 | +| `shoe_det.dynamic_roi` | `max_box_area_ratio` | 过滤接近整块脚区的大误框 | 大蓝框减少 | 更容易保留整块 ROI 级误报 | +| `shoe_assoc` | `min_shoe_score` | 控制低分鞋框是否参与人鞋关联 | 低分误框减少 | 弱鞋框更容易进入后续逻辑 | +| `shoe_color` | `dark_threshold` | 控制黑鞋/非黑鞋边界 | 更多深灰鞋被判合规 | 更多鞋会被判非黑鞋 | +| `alarm` | `min_duration_ms` | 控制要稳定多久才报警 | 更稳,但慢一点 | 更灵敏,但更容易闪报 | +| `alarm` | `cooldown_ms` | 控制两次告警间隔 | 减少重复告警 | 同一事件会更频繁重复报 | + +### 6.2 推荐调参动作 + +现场遇到问题时,优先按下面方式处理: + +- 鞋子漏报多: + - 先降低 `shoe_det.conf` + - 再降低 `shoe_assoc.min_shoe_score` + - 必要时降低 `dynamic_roi.min_person_height` + +- 蓝框误报多: + - 先提高 `shoe_det.conf` + - 再提高 `shoe_assoc.min_shoe_score` + - 如出现整块脚区级误框,再降低 `max_box_area_ratio` + +- 黑色劳保鞋被误报: + - 提高 `shoe_color.dark_threshold` + +- 非黑鞋不报警: + - 降低 `shoe_color.dark_threshold` + - 检查 `alarm.min_score` + - 检查 `alarm.min_duration_ms / min_hits` + +- 完整流程 FPS 不够: + - 先降低 `face_det.infer_fps` + - 再降低 `face_recog.infer_fps` + - 再考虑降低 `dynamic_roi.max_rois` + --- ## 7. 常见问题 @@ -490,7 +535,7 @@ input_rtsp 优先检查: -- 是否跑的是 `person_shoe_two_stage_workshoe_alarm.json` +- 是否跑的是 `person_shoe_two_stage_workshoe_alarm_v8s_shoe640.json` - `alarm.rules[].class_ids` 是否包含 `2` - `min_score / min_hits / min_duration_ms` 是否过严 diff --git a/docs/deployment.md b/docs/deployment.md index a9e985f..f0d7979 100644 --- a/docs/deployment.md +++ b/docs/deployment.md @@ -153,18 +153,6 @@ sudo ./scripts/ops.sh ddr-restore 对高位监控、烟雾多、偶发 H.264 参考帧异常的 RTSP 源,优先使用 `FFmpeg CPU decode + MPP encode` 组合。 -推荐配置: - -```bash -./build/media-server -c configs/person_shoe_two_stage_recommended.json -``` - -如需直接启用“缺鞋”判定和按人冷却告警,可使用: - -```bash -./build/media-server -c configs/person_shoe_two_stage_recommended_alarm.json -``` - 如果业务目标是“只关心已检测到的鞋是否为黑色劳保鞋”,优先使用当前主线配置: ```bash @@ -185,9 +173,29 @@ sudo ./scripts/ops.sh ddr-restore - 适用场景:源流在 VLC 中播放正常,但项目内 `ffmpeg demux + mpp decode` 会出现固定画面卡顿 - 当前业务目标:只对“检测到鞋,但颜色不符合黑色劳保鞋要求”的目标告警 +现场实施时,优先修改这些参数: + +- 鞋漏报多: + - `shoe_det.conf` + - `shoe_assoc.person_shoe_check.min_shoe_score` + - `dynamic_roi.min_person_height` +- 蓝框误报多: + - `shoe_det.conf` + - `shoe_assoc.person_shoe_check.min_shoe_score` + - `dynamic_roi.max_box_area_ratio` +- 黑鞋被误报: + - `shoe_color.color_check.dark_threshold` +- 告警太频繁: + - `alarm.rules[].min_duration_ms` + - `alarm.rules[].cooldown_ms` +- 完整流程 FPS 不够: + - `face_det.infer_fps` + - `face_recog.infer_fps` + - `dynamic_roi.max_rois` + 排障建议: -- 若 `configs/sample_rtsp_publish_only.json` 会卡,但 VLC 直接拉原始 RTSP 源不卡,优先切到 FFmpeg 解码版验证 +- 若 VLC 直接拉原始 RTSP 源不卡,而项目内画面会在固定位置卡顿,优先切到 `use_ffmpeg: true`、`use_mpp: false` - 若 FFmpeg 解码版不卡,则说明问题主要在 MPP 解码兼容性,而不是 AI 链路或发布链路 ### 4. 卸载