leon пре 1 месец
родитељ
комит
5647516794
3 измењених фајлова са 2 додато и 4 уклоњено
  1. 0 2
      src/infer/trt/depth/depth.cu
  2. 1 1
      src/nodes/draw/drawNode.cpp
  3. 1 1
      src/nodes/infer/inferNode.cpp

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

@@ -29,8 +29,6 @@ void DepthModelImpl::preprocess(const tensor::Image &image, affine::LetterBoxMat
 {
     affine.compute(std::make_tuple(image.width, image.height),
                 std::make_tuple(network_input_width_, network_input_height_));
-
-    size_t input_numel = network_input_width_ * network_input_height_ * 3;
     float *input_device = input_buffer_.gpu();
     size_t size_image = image.width * image.height * 3;
     

+ 1 - 1
src/nodes/draw/drawNode.cpp

@@ -55,7 +55,7 @@ void DrawNode::work()
             std::cout << "depth map size : " << metaData->depth.size() << std::endl;
         }
         if (!has_data) {
-            printf("draw wait data");
+            // printf("draw wait data\n");
             std::unique_lock<std::mutex> lock(mutex_);
             cond_var_->wait_for(lock, std::chrono::milliseconds(100), [this] {
                 return !running_;  // 等待时检查退出条件

+ 1 - 1
src/nodes/infer/inferNode.cpp

@@ -31,6 +31,7 @@ void InferNode::work()
                 printf("model is nullptr\n");
                 continue;
             }
+            printf("model type: %d\n", static_cast<int>(model_type_));
             auto det_result = model_->forward(tensor::cvimg(image));
 
             if (std::holds_alternative<data::BoxArray>(det_result)) 
@@ -45,7 +46,6 @@ void InferNode::work()
             } 
             else if(std::holds_alternative<cv::Mat>(det_result))
             {
-                // 记录错误或抛出明确异常
                 auto depth_mat = std::get<cv::Mat>(det_result);
                 metaData->depth = depth_mat;
             }