|
@@ -2,6 +2,7 @@
|
|
#include "nodes/stream/streamNode.hpp"
|
|
#include "nodes/stream/streamNode.hpp"
|
|
#include "nodes/infer/inferNode.hpp"
|
|
#include "nodes/infer/inferNode.hpp"
|
|
#include "nodes/draw/drawNode.hpp"
|
|
#include "nodes/draw/drawNode.hpp"
|
|
|
|
+#include "nodes/track/trackNode.hpp"
|
|
#include "nodes/httpPush/httpPush.hpp"
|
|
#include "nodes/httpPush/httpPush.hpp"
|
|
|
|
|
|
|
|
|
|
@@ -37,14 +38,18 @@ void test_yolo()
|
|
std::shared_ptr<Node::InferNode> infer_node = std::make_shared<Node::InferNode>("yolo11");
|
|
std::shared_ptr<Node::InferNode> infer_node = std::make_shared<Node::InferNode>("yolo11");
|
|
infer_node->set_model_instance(yolo_model, ModelType::YOLO11);
|
|
infer_node->set_model_instance(yolo_model, ModelType::YOLO11);
|
|
|
|
|
|
|
|
+ std::shared_ptr<Node::TrackNode> track_node = std::make_shared<Node::TrackNode>("tracker", 30, 30);
|
|
|
|
+
|
|
std::shared_ptr<Node::DrawNode> draw_node = std::make_shared<Node::DrawNode>("draw");
|
|
std::shared_ptr<Node::DrawNode> draw_node = std::make_shared<Node::DrawNode>("draw");
|
|
std::shared_ptr<Node::HttpPushNode> push_node = std::make_shared<Node::HttpPushNode>("push", "172.16.20.168", 8080, "/push");
|
|
std::shared_ptr<Node::HttpPushNode> push_node = std::make_shared<Node::HttpPushNode>("push", "172.16.20.168", 8080, "/push");
|
|
|
|
|
|
Node::LinkNode(src_node0, infer_node);
|
|
Node::LinkNode(src_node0, infer_node);
|
|
- Node::LinkNode(infer_node, draw_node);
|
|
|
|
|
|
+ Node::LinkNode(infer_node, track_node);
|
|
|
|
+ Node::LinkNode(track_node, draw_node);
|
|
Node::LinkNode(draw_node, push_node);
|
|
Node::LinkNode(draw_node, push_node);
|
|
push_node->start();
|
|
push_node->start();
|
|
draw_node->start();
|
|
draw_node->start();
|
|
|
|
+ track_node->start();
|
|
infer_node->start();
|
|
infer_node->start();
|
|
src_node0->start();
|
|
src_node0->start();
|
|
getchar();
|
|
getchar();
|
|
@@ -92,7 +97,7 @@ void test_multi()
|
|
|
|
|
|
int main()
|
|
int main()
|
|
{
|
|
{
|
|
- test_multi();
|
|
|
|
|
|
+ test_yolo();
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
@@ -110,6 +115,3 @@ int main()
|
|
// 通过配置文件创建 pipeline
|
|
// 通过配置文件创建 pipeline
|
|
// 日志
|
|
// 日志
|
|
// 设置电子围栏
|
|
// 设置电子围栏
|
|
-
|
|
|
|
-
|
|
|
|
-python3 detect.py --weights carperson/carperson.pt --source carperson/carperson.mp4
|
|
|