Selaa lähdekoodia

change depth model preprocess

leon 1 kuukausi sitten
vanhempi
commit
9b43ad5ce9
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2 2
      src/infer/trt/depth/depth.cu

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

@@ -20,8 +20,8 @@ bool DepthModelImpl::load(const std::string &engine_file)
     network_input_width_ = input_dim[3];
     network_input_height_ = input_dim[2];
     isdynamic_model_ = trt_->has_dynamic_dim();
-
-    normalize_ = affine::Norm::alpha_beta(1 / 255.0f, 0.0f, affine::ChannelType::SwapRB);
+    normalize_ = affine::Norm::mean_std({0.485f, 0.456f, 0.406f}, {0.229f, 0.224f, 0.225f}, 1 / 255.0f, affine::ChannelType::SwapRB);
+    // normalize_ = affine::Norm::alpha_beta(1 / 255.0f, 0.0f, affine::ChannelType::SwapRB);
     return true;
 }