leon před 2 měsíci
rodič
revize
35a59ad885
2 změnil soubory, kde provedl 199 přidání a 12 odebrání
  1. 198 1
      README.md
  2. 1 11
      workspace/demo.json

+ 198 - 1
README.md

@@ -3,14 +3,211 @@
 ## 支持功能
 1. opencv 软解码
 2. nvcuvid 硬解码
-3. yolo 检测、关键点模型识别
+3. yolov5/v8/11 检测、关键点、分割模型识别
 4. depth-adnything 深度模型识别
 5. bytetrack 目标追踪
 6. 结果绘制
 7. 识别后的视频保存
 8. 识别结果http推送
 9. 逻辑判断节点
+10. 根据配置文件创建pipeline
 
+## 配置文件示例
+```json
+{
+    "models": {
+        "yolo_model_main": {
+            "model_path": "model/model1.engine",
+            "model_type": "YOLO11SEG",
+            "names": [
+                "person",
+                "bicycle",
+                "car",
+                "motorcycle",
+                "airplane",
+                "bus",
+                "train",
+                "truck",
+                "boat",
+                "traffic light",
+                "fire hydrant",
+                "stop sign",
+                "parking meter",
+                "bench",
+                "bird",
+                "cat",
+                "dog",
+                "horse",
+                "sheep",
+                "cow",
+                "elephant",
+                "bear",
+                "zebra",
+                "giraffe",
+                "backpack",
+                "umbrella",
+                "handbag",
+                "tie",
+                "suitcase",
+                "frisbee",
+                "skis",
+                "snowboard",
+                "sports ball",
+                "kite",
+                "baseball bat",
+                "baseball glove",
+                "skateboard",
+                "surfboard",
+                "tennis racket",
+                "bottle",
+                "wine glass",
+                "cup",
+                "fork",
+                "knife",
+                "spoon",
+                "bowl",
+                "banana",
+                "apple",
+                "sandwich",
+                "orange",
+                "broccoli",
+                "carrot",
+                "hot dog",
+                "pizza",
+                "donut",
+                "cake",
+                "chair",
+                "couch",
+                "potted plant",
+                "bed",
+                "dining table",
+                "toilet",
+                "tv",
+                "laptop",
+                "mouse",
+                "remote",
+                "keyboard",
+                "cell phone",
+                "microwave",
+                "oven",
+                "toaster",
+                "sink",
+                "refrigerator",
+                "book",
+                "clock",
+                "vase",
+                "scissors",
+                "teddy bear",
+                "hair drier",
+                "toothbrush"
+            ],
+            "gpu_id": 1,
+            "confidence_threshold": 0.25,
+            "nms_threshold": 0.45
+        }
+    },
+    "pipelines": [
+        {
+            "pipeline_id": "pipeline_0",
+            "description": "处理摄像头0的视频流",
+            "nodes": [
+                {
+                    "node_id": "src_0",
+                    "node_type": "Source",
+                    "params": {
+                        "stream_url": "rtsp://admin:lww123456@172.16.22.16:554/Streaming/Channels/101",
+                        "gpu_id": 1,
+                        "decode_type": "GPU",
+                        "skip_frame": 1
+                    }
+                },
+                {
+                    "node_id": "infer_0",
+                    "node_type": "Inference",
+                    "params": {
+                        "model_id": "yolo_model_main"
+                    }
+                },
+                {
+                    "node_id": "track_0",
+                    "node_type": "Tracker",
+                    "params": {
+                        "track_name": "person",
+                        "track_frame": 30,
+                        "track_distance": 30
+                    }
+                },
+                {
+                    "node_id": "analyze_0",
+                    "node_type": "Analyzer",
+                    "params": {}
+                },
+                {
+                    "node_id": "draw_0",
+                    "node_type": "Drawer",
+                    "params": {}
+                },
+                {
+                    "node_id": "record_0",
+                    "node_type": "Recorder",
+                    "params": {
+                        "record_path": "result/result_pipeline0.mp4"
+                    }
+                }
+            ]
+        },
+        {
+            "pipeline_id": "pipeline_1",
+            "description": "处理摄像头1的视频流",
+            "nodes": [
+                {
+                    "node_id": "src_1",
+                    "node_type": "Source",
+                    "params": {
+                        "stream_url": "rtsp://admin:lww123456@172.16.22.16:554/Streaming/Channels/101",
+                        "gpu_id": 1,
+                        "decode_type": "GPU",
+                        "skip_frame": 1
+                    }
+                },
+                {
+                    "node_id": "infer_1",
+                    "node_type": "Inference",
+                    "params": {
+                        "model_id": "yolo_model_main"
+                    }
+                },
+                {
+                    "node_id": "track_1",
+                    "node_type": "Tracker",
+                    "params": {
+                        "track_name": "person",
+                        "track_frame": 30,
+                        "track_distance": 30
+                    }
+                },
+                {
+                    "node_id": "analyze_1",
+                    "node_type": "Analyzer",
+                    "params": {}
+                },
+                {
+                    "node_id": "draw_1",
+                    "node_type": "Drawer",
+                    "params": {}
+                },
+                {
+                    "node_id": "record_1",
+                    "node_type": "Recorder",
+                    "params": {
+                        "record_path": "result/result_pipeline1.mp4"
+                    }
+                }
+            ]
+        }
+    ]
+}
+```
 
 ## 使用示例
 ```c++

+ 1 - 11
workspace/demo.json

@@ -99,7 +99,7 @@
                     "node_id": "src_0",
                     "node_type": "Source",
                     "params": {
-                        "stream_url": "carperson.mp4",
+                        "stream_url": "rtsp://admin:lww123456@172.16.22.16:554/Streaming/Channels/101",
                         "gpu_id": 1,
                         "decode_type": "GPU",
                         "skip_frame": 1
@@ -131,11 +131,6 @@
                     "node_type": "Drawer",
                     "params": {}
                 },
-                {
-                    "node_id": "push_0",
-                    "node_type": "Push",
-                    "params": {}
-                },
                 {
                     "node_id": "record_0",
                     "node_type": "Recorder",
@@ -185,11 +180,6 @@
                     "node_type": "Drawer",
                     "params": {}
                 },
-                {
-                    "node_id": "push_1",
-                    "node_type": "Push",
-                    "params": {}
-                },
                 {
                     "node_id": "record_1",
                     "node_type": "Recorder",