Resize interpolation in DeepStream 3

I am seeing low accuracy of my models when running through DeepStream. One reason I have identified is that the resize operations in DeepStream seem to use different interpolation methods than what I’ve used during inference. So far, by looking at some samples and the gstdsexample source code, my suspicion is that:

  • nvstreammux uses nearest interpolation
  • nvinfer uses linear interpolation

Could someone please correct/confirm these?

streammux in 3.0 uses


Thanks for the quick reply, could you also confirm what nvinfer uses, please? Also, what’s the value used for the eInterpolation argument?

nvinfer resize uses tex2D, filterMode = cudaFilterModePoint

  cudaResourceDesc resDesc = {};
  resDesc.resType = cudaResourceTypePitch2D;
  resDesc.res.pitch2D.devPtr = (void *)dpSrc_new;
  resDesc.res.pitch2D.desc = cudaCreateChannelDesc<uint8_t>();
  resDesc.res.pitch2D.width = nSrcWidth;
  resDesc.res.pitch2D.height = bs * hhSrc;
  resDesc.res.pitch2D.pitchInBytes = nSrcPitch;

  cudaTextureDesc texDesc = {};
  texDesc.filterMode = cudaFilterModePoint;
  texDesc.readMode = cudaReadModeElementType;

  cudaTextureObject_t texLuma = 0;
  ck(cudaCreateTextureObject(&texLuma, &resDesc, &texDesc, NULL));