|
@@ -42,16 +42,44 @@ void test_yolo()
|
|
|
OverflowStrategy stage = OverflowStrategy::BlockTimeout;
|
|
|
int max_size = 100;
|
|
|
|
|
|
+ std::vector<std::string> 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"};
|
|
|
|
|
|
// std::vector<std::string> names = { "person", "clothes", "vest" };
|
|
|
- std::vector<std::string> names = { "person", "car", "close", "open" };
|
|
|
+ // std::vector<std::string> names = { "person", "car", "close", "open" };
|
|
|
// std::shared_ptr<GNode::StreamNode> src_node0 = std::make_shared<GNode::StreamNode>("src0", "rtsp://admin:lww123456@172.16.22.16:554/Streaming/Channels/201", 0, GNode::DecodeType::GPU);
|
|
|
std::shared_ptr<GNode::StreamNode> src_node0 = std::make_shared<GNode::StreamNode>("src0", "carperson.mp4", 1, GNode::DecodeType::GPU);
|
|
|
src_node0->set_skip_frame(1);
|
|
|
|
|
|
- std::shared_ptr<Infer> yolo_model = load("model/carperson.engine", ModelType::YOLO11, names, 1, 0.25, 0.45);
|
|
|
- std::shared_ptr<GNode::InferNode> infer_node = std::make_shared<GNode::InferNode>("carperson_model");
|
|
|
- infer_node->set_model_instance(yolo_model, ModelType::YOLO11, 1);
|
|
|
+ std::shared_ptr<Infer> yolo_model = load("model/model1.engine", ModelType::YOLO11SEG, names, 1, 0.25, 0.45);
|
|
|
+ std::shared_ptr<GNode::InferNode> infer_node = std::make_shared<GNode::InferNode>("seg");
|
|
|
+ infer_node->set_model_instance(yolo_model, ModelType::YOLO11SEG, 1);
|
|
|
|
|
|
std::shared_ptr<GNode::TrackNode> track_node = std::make_shared<GNode::TrackNode>("tracker", "person", 30, 30);
|
|
|
|
|
@@ -133,10 +161,11 @@ int main()
|
|
|
// 画图节点 完成
|
|
|
// 推送节点 基本完成
|
|
|
// 日志 完成
|
|
|
+// YOLO11 seg 完成
|
|
|
|
|
|
|
|
|
// 分析节点
|
|
|
-// YOLO11 seg
|
|
|
+
|
|
|
// 通过配置文件创建 pipeline
|
|
|
// 置信度阈值修改
|
|
|
// 设置电子围栏
|