Browse Source

version 3.5.0 msg: 算法更新为1.2.3,优化部分误识别

Your Name 2 years ago
parent
commit
c7a817f0b0

BIN
data/models/yolov5m_best5_int8_0415_4b_4c.cambricon


+ 2 - 2
modules/osd/src/cnosd.cpp

@@ -136,7 +136,7 @@ void CnOsd::DrawLabel(cv::Mat image, const CNInferObjsPtr& objs_holder, std::vec
     if (LabelIsFound(label_id)) {
       color = colors_[label_id];
     }
-
+    
     // Draw Detection window
     LOGD(OSD) << "Draw Bounding Box: "
               << "top_left: (" << top_left.x << "," << top_left.y << ") bottom_right:(" << bottom_right.x << ","
@@ -158,7 +158,7 @@ void CnOsd::DrawLabel(cv::Mat image, const CNInferObjsPtr& objs_holder, std::vec
       LOGD(OSD) << "Draw Label and Score: " << text;
     }
     if(drawText) DrawText(image, bottom_left, text, color);
-
+ 
     // draw secondary inference information
     int label_bottom_y = 0;
     int text_height = 0;

+ 1 - 1
source/cns_launcher/configs/decode_config.json

@@ -6,7 +6,7 @@
       "output_type" : "mlu",
       "decoder_type" : "mlu",
       "output_buf_number" : 20,
-      // "interval": 6,
+      //"interval": 0,
       "device_id" : 0
     }
   }

+ 7 - 14
source/cns_launcher/configs/sinker_configs/rtsp.json

@@ -1,21 +1,14 @@
 {
   "rtsp_sink" : {
     "class_name" : "cnstream::RtspSink",
-    "parallelism" : 1,
-    "max_input_queue_size" : 10,
+    "parallelism" : 4,
+    "max_input_queue_size" : 20,
     "custom_params" : {
-      "http_port" : 13002,
-      "encoder_type" : "mlu",
-      "port" : 9554,
-      "kbit_rate" : 1000,
-      "input_frame": "cpu",
-      "frame_rate" :20,
-      "gop_size" : 40,
-      "view_mode" : "single",
-      "dst_width" : 960,
-      "dst_height": 540,
-      "color_mode" : "bgr",
-      "device_id" : 0
+       "encoder_type" : "mlu",
+       "rtsp_over_http": true,
+       "port" : 9554,
+       "device_id" : 0,
+       "bit_rate": 1000000
     }
   }
 }

+ 1 - 1
source/cns_launcher/configs/yolov3_object_detection_mlu220.json

@@ -8,7 +8,7 @@
       "func_name" : "subnet0",
       "postproc_name" : "PostprocYolov3",
       "keep_aspect_ratio" : "true",
-      "threshold" : 0.5,
+      "threshold" : 0.1,
       "model_input_pixel_format" : "ARGB32",
       "batching_timeout" : 100,
       "device_id" : 0

+ 2 - 2
source/cns_launcher/configs/yolov5_object_detection_mlu220.json

@@ -4,7 +4,7 @@
     "parallelism" : 2,
     "max_input_queue_size" : 20,
     "custom_params" : {
-      "model_path" : "../../../data/models/yolov5m_best1_int8_4b_4c_.cambricon",
+      "model_path" : "../../../data/models/yolov5_4c4b_rgb_220.cambricon",
       "func_name" : "subnet0",
       // Uncomment the following 2 lines to use cncv
       // "preproc_name" : "CNCV",
@@ -14,7 +14,7 @@
       "keep_aspect_ratio" : "true",
       "model_input_pixel_format" : "RGB24",
       "batching_timeout" : 50,
-      "threshold" : 0.6,
+      "threshold" : 0.5,
       "infer_interval": 6,
       "show_stats": true,
       "engine_num" : 2,

+ 5 - 5
source/cns_launcher/object_tracking/config_template.json

@@ -11,14 +11,14 @@
 
   "subgraph:object_detection" : {
     "config_path" : "../configs/__NN___object_detection___PLATFORM_PLACEHOLDER__.json",
-    "next_modules" : ["subgraph:object_tracking"]
-  },
-
-  "subgraph:object_tracking" : {
-    "config_path" : "../configs/object_tracking___PLATFORM_PLACEHOLDER__.json",
     "next_modules" : ["subgraph:udp"]
   },
 
+  // "subgraph:object_tracking" : {
+  //   "config_path" : "../configs/object_tracking___PLATFORM_PLACEHOLDER__.json",
+  //   "next_modules" : ["subgraph:udp"]
+  // },
+
   "subgraph:udp" : {
     "config_path" : "../configs/udp.json",
     "next_modules" : ["subgraph:kafka"]

+ 5 - 5
source/cns_launcher/object_tracking/detection_config.json

@@ -11,14 +11,14 @@
 
   "subgraph:object_detection" : {
     "config_path" : "../configs/yolov5_object_detection_mlu220.json",
-    "next_modules" : ["subgraph:object_tracking"]
-  },
-
-  "subgraph:object_tracking" : {
-    "config_path" : "../configs/object_tracking_mlu220.json",
     "next_modules" : ["subgraph:udp"]
   },
 
+  // "subgraph:object_tracking" : {
+  //   "config_path" : "../configs/object_tracking_mlu220.json",
+  //   "next_modules" : ["subgraph:udp"]
+  // },
+
   "subgraph:udp" : {
     "config_path" : "../configs/udp.json",
     "next_modules" : ["subgraph:kafka"]

+ 1 - 1
source/common/postprocess/postprocess_yolov3.cpp

@@ -91,7 +91,7 @@ class PostprocYolov3 : public cnstream::Postproc {
       obj->bbox.w = std::min(1.0f - obj->bbox.x, right - left);
       obj->bbox.h = std::min(1.0f - obj->bbox.y, bottom - top);
 
-      if (obj->bbox.h <= 0 || obj->bbox.w <= 0 || (obj->score < threshold_ && threshold_ > 0)) continue;
+      if (obj->bbox.h <= 0 || obj->bbox.w <= 0 || (obj->score < threshold_ && threshold_ > 0) || obj->id != "14") continue;
       std::lock_guard<std::mutex> objs_mutex(objs_holder->mutex_);
       objs.push_back(obj);
     }