Browse Source

test bug fix

leon 1 month ago
parent
commit
04acb1b640
2 changed files with 1 additions and 2 deletions
  1. 1 0
      src/infer/trt/depth/depth.cu
  2. 0 2
      src/nodes/infer/inferNode.cpp

+ 1 - 0
src/infer/trt/depth/depth.cu

@@ -90,6 +90,7 @@ Result DepthModelImpl::forward(const tensor::Image &image, int slice_width, int
 
 Result DepthModelImpl::forward(const tensor::Image &image, void *stream)
 {
+    std::lock_guard<std::mutex> lock(mutex_); // 自动加锁/解锁
     int num_image = 1;
     if (num_image == 0) return {};
     

+ 0 - 2
src/nodes/infer/inferNode.cpp

@@ -54,8 +54,6 @@ void InferNode::work()
                 {
                     metaData->boxes.push_back(r);
                 }
-                metaData->boxes = result;
-                // 处理检测框...
             } 
             else if(std::holds_alternative<cv::Mat>(det_result))
             {