leon 1 mēnesi atpakaļ
vecāks
revīzija
f3d2765b9d
2 mainītis faili ar 11 papildinājumiem un 3 dzēšanām
  1. 6 0
      src/infer/trt/affine.hpp
  2. 5 3
      src/infer/trt/depth/depth.cu

+ 6 - 0
src/infer/trt/affine.hpp

@@ -107,6 +107,12 @@ void warp_affine_bilinear_and_normalize_plane(uint8_t *src, int src_line_size, i
                                                 uint8_t const_value, const Norm &norm,
                                                 cudaStream_t stream);
 
+
+void warp_affine_bilinear_single_channel_plane(float *src, int src_line_size, int src_width,
+    int src_height, float *dst, int dst_width,
+    int dst_height, float *matrix_2_3,
+    float const_value, cudaStream_t stream);
+
 }
 
 #endif // AFFINE_HPP__

+ 5 - 3
src/infer/trt/depth/depth.cu

@@ -63,8 +63,6 @@ void DepthModelImpl::preprocess(const tensor::Image &image, affine::LetterBoxMat
 void DepthModelImpl::postprocess(int width, int height, void *stream)
 {
     adjust_memory(width, height);
-
-    size_t size_matrix = sizeof(affine.d2i);
     
     cudaStream_t stream_ = (cudaStream_t)stream;
     float *affine_matrix_device = affine_matrix_.gpu();
@@ -78,6 +76,10 @@ void DepthModelImpl::postprocess(int width, int height, void *stream)
         stream_);
 }
 
+Result DepthModelImpl::forward(const tensor::Image &image, int slice_width, int slice_height, float overlap_width_ratio, float overlap_height_ratio, void *stream)
+{
+    return cv::Mat();
+}
 
 Result DepthModelImpl::forward(const tensor::Image &image, void *stream)
 {
@@ -118,7 +120,7 @@ Result DepthModelImpl::forward(const tensor::Image &image, void *stream)
     #ifdef TRT10
     if (!trt_->forward(std::unordered_map<std::string, const void *>{
             { "input", input_buffer_.gpu() }, 
-            { "output", bbox_predict_.gpu() }
+            { "output", depth_map_buffer_.gpu() }
         }, stream_))
     {
         printf("Failed to tensorRT forward.");