Inference classifier results differ between ds6.0 and ds6.3

• Hardware Platform Jetson NX - JP 4.6 - DS 6.0 and Jetson Orin NX - JP5.1.2 - DS 6.3
pipeline: Pgie1 (YoloDetection) → Sgie1 (YoloDetecion on class0 of pgie1) → Sige2 (OCR on class0 of Sgie1)
** Sample app using: deepstream-test5
appconfig: test5_config_file_src_infer_tracker_sgie.txt (4.2 KB)
Pgie config: config_infer_primary_yoloV7_tiny.txt (733 Bytes)
Sgie1 config:config_infer_sgie1_yoloV7_tiny.txt (688 Bytes)
Sgie2 config: config_infer_sgie2_ocr.txt (3.3 KB)

Problem:
With DS6.0: work fine
With DS6.3: Pgie1 and Sgie1 work fine but Sgie2 not good.
When check Inference classifier results from my custom NvDsInferClassiferParseCustomSoftmax they are not same between ds6.0 and ds6.3.

How can deal with this problem?

  • Engine input shape Sgie2: 1x3x48x128
  • Engine output shape Sgie2: 1x16x97
  • Check with same video.
  1. what the three models are used to do respectively?
  2. nvinfer plugin and low level are opensource. we suggest dumping and compare the preprcocessed data of Sgie2 by the method “dump_infer_input_to_file.patch.txt” in FAQ.
  3. if the preprcocessed data is the same, you can compare the inference results by the method "dump_dsinfer_raw_TRT_infer_outputs.txt " int FAQ .

Thank you for respond.

  1. Model1 and 2 use for detection, model3 use for optical character recognition
  2. I am not authorized to access the link you provided
  3. I am not authorized to access the link you provided

sorry. I updated.

1 Like

I will check and respond later. thank you

Sorry for the late reply, Is this still an DeepStream issue to support? Thanks!

yes still need support, where i can run bath file for deepstream 6.3

cat dump_infer_input_to_file.patch.txt | patch -p1
patching file Makefile
Hunk #1 succeeded at 31 with fuzz 2 (offset 2 lines).
Hunk #2 FAILED at 38.
1 out of 2 hunks FAILED -- saving rejects to file Makefile.rej
patching file nvdsinfer_context_impl.cpp
Hunk #2 succeeded at 1495 (offset 234 lines).
Hunk #3 succeeded at 1684 (offset 176 lines).
Hunk #4 succeeded at 1790 (offset 187 lines).
Hunk #5 succeeded at 2293 (offset 287 lines).
patching file nvdsinfer_context_impl.h
Hunk #1 FAILED at 69.
Hunk #2 succeeded at 458 (offset 18 lines).
1 out of 2 hunks FAILED -- saving rejects to file nvdsinfer_context_impl.h.rej
root@talprcore:/opt/nvidia/deepstream/deepstream-6.3/sources/libs/nvdsinfer# make
Makefile:13: *** "CUDA_VER is not set".  Stop.
root@talprcore:/opt/nvidia/deepstream/deepstream-6.3/sources/libs/nvdsinfer# CUDA_VER=11.4 make
g++ -c -o nvdsinfer_context_impl.o -fPIC -Wno-deprecated-declarations -std=c++14 -I /usr/local/cuda-11.4/include -I ../../includes -DNDEBUG -DDUMP_INPUT_TO_FILE nvdsinfer_context_impl.cpp
nvdsinfer_context_impl.cpp:26:10: fatal error: opencv2/imgcodecs.hpp: No such file or directory
   26 | #include <opencv2/imgcodecs.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:60: nvdsinfer_context_impl.o] Error 1
root@talprcore:/opt/nvidia/deepstream/deepstream-6.3/sources/libs/nvdsinfer# 

i run this patch in /opt/nvidia/deepstream/deepstream-6.3/sources/libs/nvdsinfe but has error

please execute apt-get install libopencv-dev

root@talprcore:/opt/nvidia/deepstream/deepstream-6.3/sources/libs/nvdsinfer# apt-get install libopencv-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libopencv-dev is already the newest version (4.5.4-8-g3e4c170df4).
libopencv-dev set to manually installed.
The following packages were automatically installed and are no longer required:
  apt-clone archdetect-deb bogl-bterm busybox-static cryptsetup-bin dctrl-tools dpkg-repack gdal-data gir1.2-timezonemap-1.0 gir1.2-xkl-1.0 grub-common libaec0 libarmadillo9 libarpack2 libavcodec-dev
  libavformat-dev libavresample-dev libavresample4 libavutil-dev libcfitsio8 libcharls2 libdap25 libdapclient6v5 libdc1394-22-dev libdebian-installer4 libepsilon1 libevent-core-2.1-7
  libevent-pthreads-2.1-7 libexif-dev libfreexl1 libfyba0 libgdal26 libgdcm-dev libgdcm3.0 libgeos-3.8.0 libgeos-c1v5 libgeotiff5 libgl2ps1.4 libgphoto2-dev libhdf4-0-alt libhdf5-103
  libhdf5-openmpi-103 libhwloc-plugins libhwloc15 libilmbase-dev libjbig-dev libjpeg-dev libjpeg-turbo8-dev libjpeg8-dev libjsoncpp1 libkmlbase1 libkmldom1 libkmlengine1 liblept5 liblzma-dev
  libnetcdf-c++4 libnetcdf15 libodbc1 libogdi4.1 libopencv-calib3d4.2 libopencv-contrib4.2 libopencv-dnn4.2 libopencv-features2d4.2 libopencv-flann4.2 libopencv-highgui4.2 libopencv-imgcodecs4.2
  libopencv-imgproc4.2 libopencv-ml4.2 libopencv-objdetect4.2 libopencv-photo4.2 libopencv-shape4.2 libopencv-stitching4.2 libopencv-superres4.2 libopencv-video4.2 libopencv-videoio4.2
  libopencv-videostab4.2 libopencv-viz4.2 libopencv4.2-java libopencv4.2-jni libopenexr-dev libopenmpi3 libpmix2 libpng-dev libpq5 libproj15 libqhull7 libraw1394-dev libsocket++1 libspatialite7
  libsuperlu5 libswresample-dev libswscale-dev libsz2 libtbb-dev libtesseract4 libtiff-dev libtiffxx5 libtimezonemap-data libtimezonemap1 liburiparser1 libvtk6.3 libxerces-c3.2 libxnvctrl0 odbcinst
  odbcinst1debian2 os-prober proj-data python3-icu python3-pam rdate tasksel tasksel-data
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 226 not upgraded.
root@talprcore:/opt/nvidia/deepstream/deepstream-6.3/sources/libs/nvdsinfer# CUDA_VER=11.4 make
g++ -c -o nvdsinfer_context_impl.o -fPIC -Wno-deprecated-declarations -std=c++14 -I /usr/local/cuda-11.4/include -I ../../includes -DNDEBUG -DDUMP_INPUT_TO_FILE nvdsinfer_context_impl.cpp
nvdsinfer_context_impl.cpp:26:10: fatal error: opencv2/imgcodecs.hpp: No such file or directory
   26 | #include <opencv2/imgcodecs.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:60: nvdsinfer_context_impl.o] Error 1
root@talprcore:/opt/nvidia/deepstream/deepstream-6.3/sources/libs/nvdsinfer# 

Is this batch can use for ds6.3 ?

yes. you need to modify make to add open head file and lib. please refer to dump_infer_input_to_file.patch.txt

  • With infer input: DS6.0 and DS6.3 are same, and same with my set.
  • With infer output: for file has been create with name
gie-1output-layer-index-1
gie-1output-layer-index-2
gie-1output-layer-index-3
gie-1output-layer-index-4

but they are binary file with no extension. how can i check it
image

Thank you. I was solve my problem.

Problem in convert model from onnx to trt.engine. Instead of using --fp16 I used --int8 so the model was not working well.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.