When bodypostNet is from fp16 to int8, the effect is significantly worse

Please provide the following information when requesting support.

• Hardware (Jetson TX2 xavier NX JetPack 4.6)
• Network Type (bodypostNet)
• TLT Version (Please run “tlt info --verbose” and share “docker_tag” here)
• Training spec file(If have, please share here)
• How to reproduce the issue ? (This is for errors. Please share the command line and the detailed log here.)

GitHub - NVIDIA-AI-IOT/deepstream_tao_apps: Sample apps to demonstrate how to deploy models trained with TAO on DeepStream
vim bodypose2d_pgie_config.txt
network-mode=1

The effect is obviously worse
Int8 incorrect calibration or other reasons?

Please download below png file and verify as well. Thanks.
$wget https://developer-blogs.nvidia.com/wp-content/uploads/2021/06/original-image.png

fp16:
Uploading: body2d2out_fp16.jpg…
int8:



Thank you for your answer
as the picture shows:
Obviously int8 effect is much worse

Please share all the config files. Thanks.

bodypose2d_pgie_config.txt (3.0 KB)


network-mode=1
or
network-mode=2

I cannot reproduce your result. The int8 result is the same as fp32 model. I am testing in a machine with Geforce1080Ti.

You can comment below and retry.
#model-engine-file=…/…/models/bodypose2d/model.etlt_b32_gpu0_fp16.engine

BTW, my running command is :

./deepstream-bodypose2d-app 1 …/…/…/configs/bodypose2d_tao/sample_bodypose2d_model_config.txt file:///opt/nvidia/deepstream/deepstream-6.0/samples/configs/tao_pretrained_models/deepstream_tao_apps_6.0_ga/deepstream_tao_apps/apps/tao_others/deepstream-bodypose2d-app/original-image.png ./body2dout

Could you try a dgpu machine?
Or if possible, could you try to upgrade to Jetpack5.0 ?

Thanks for your answer, The int8 result is still as bad,
I am testing in a machine with Geforce1080Ti.

Do you mean you still get bad result in Geforce 1080Ti machine? Could you share below info in your Geforce 1080Ti machine?
$ dpkg -l |grep cuda
$ ls -rltsh models/bodypose2d/

NVIDIA GeForce RTX 3070
$ lspci | grep -i nvi
01:00.0 VGA compatible controller: NVIDIA Corporation GA104 [GeForce RTX 3070 Ti] (rev a1)
01:00.1 Audio device: NVIDIA Corporation GA104 High Definition Audio Controller (rev a1)

±----------------------------------------------------------------------------+
| NVIDIA-SMI 495.29.05 Driver Version: 495.29.05 CUDA Version: 11.5 |
|-------------------------------±---------------------±---------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 NVIDIA GeForce … On | 00000000:01:00.0 Off | N/A |
| 0% 50C P8 29W / 310W | 1MiB / 7982MiB | 0% Default |
| | | N/A |
±------------------------------±---------------------±---------------------+

How about
$ dpkg -l |grep cuda
$ ls -rltsh models/bodypose2d/

@ai:~/src/deepstream_tao_apps$ dpkg -l |grep cuda
ii cuda 11.5.1-1 amd64 CUDA meta-package
ii cuda-11-5 11.5.2-1 amd64 CUDA 11.5 meta-package
ii cuda-cccl-11-5 11.5.62-1 amd64 CUDA CCCL
ii cuda-command-line-tools-11-5 11.5.2-1 amd64 CUDA command-line tools
ii cuda-compiler-11-5 11.5.2-1 amd64 CUDA compiler
ii cuda-cudart-11-5 11.5.117-1 amd64 CUDA Runtime native Libraries
ii cuda-cudart-dev-11-5 11.5.117-1 amd64 CUDA Runtime native dev links, headers
ii cuda-cuobjdump-11-5 11.5.119-1 amd64 CUDA cuobjdump
ii cuda-cupti-11-5 11.5.114-1 amd64 CUDA profiling tools runtime libs.
ii cuda-cupti-dev-11-5 11.5.114-1 amd64 CUDA profiling tools interface.
ii cuda-cuxxfilt-11-5 11.5.119-1 amd64 CUDA cuxxfilt
ii cuda-demo-suite-11-5 11.5.50-1 amd64 Demo suite for CUDA
ii cuda-documentation-11-5 11.5.114-1 amd64 CUDA documentation
ii cuda-driver-dev-11-5 11.5.117-1 amd64 CUDA Driver native dev stub library
ii cuda-drivers 495.29.05-1 amd64 CUDA Driver meta-package, branch-agnostic
ii cuda-drivers-495 495.29.05-1 amd64 CUDA Driver meta-package, branch-specific
ii cuda-gdb-11-5 11.5.114-1 amd64 CUDA-GDB
ii cuda-libraries-11-5 11.5.2-1 amd64 CUDA Libraries 11.5 meta-package
ii cuda-libraries-dev-11-5 11.5.2-1 amd64 CUDA Libraries 11.5 development meta-package
ii cuda-memcheck-11-5 11.5.114-1 amd64 CUDA-MEMCHECK
ii cuda-nsight-11-5 11.5.114-1 amd64 CUDA nsight
ii cuda-nsight-compute-11-5 11.5.2-1 amd64 NVIDIA Nsight Compute
ii cuda-nsight-systems-11-5 11.5.2-1 amd64 NVIDIA Nsight Systems
ii cuda-nvcc-11-5 11.5.119-1 amd64 CUDA nvcc
ii cuda-nvdisasm-11-5 11.5.119-1 amd64 CUDA disassembler
ii cuda-nvml-dev-11-5 11.5.50-1 amd64 NVML native dev links, headers
ii cuda-nvprof-11-5 11.5.114-1 amd64 CUDA Profiler tools
ii cuda-nvprune-11-5 11.5.119-1 amd64 CUDA nvprune
ii cuda-nvrtc-11-5 11.5.119-1 amd64 NVRTC native runtime libraries
ii cuda-nvrtc-dev-11-5 11.5.119-1 amd64 NVRTC native dev links, headers
ii cuda-nvtx-11-5 11.5.114-1 amd64 NVIDIA Tools Extension
ii cuda-nvvp-11-5 11.5.126-1 amd64 CUDA Profiler tools
ii cuda-runtime-11-5 11.5.2-1 amd64 CUDA Runtime 11.5 meta-package
ii cuda-samples-11-5 11.5.56-1 amd64 CUDA example applications
ii cuda-sanitizer-11-5 11.5.114-1 amd64 CUDA Sanitizer
rc cuda-toolkit-11-4-config-common 11.4.148-1 all Common config package for CUDA Toolkit 11.4.
ii cuda-toolkit-11-5 11.5.2-1 amd64 CUDA Toolkit 11.5 meta-package
ii cuda-toolkit-11-5-config-common 11.5.117-1 all Common config package for CUDA Toolkit 11.5.
ii cuda-toolkit-11-config-common 11.6.55-1 all Common config package for CUDA Toolkit 11.
ii cuda-toolkit-config-common 11.6.55-1 all Common config package for CUDA Toolkit.
ii cuda-tools-11-5 11.5.2-1 amd64 CUDA Tools meta-package
ii cuda-visual-tools-11-5 11.5.2-1 amd64 CUDA visual tools
ii nv-tensorrt-repo-ubuntu2004-cuda11.4-trt8.2.1.8-ga-20211117 1-1 amd64 nv-tensorrt repository configuration files

@ai:~/src/deepstream_tao_apps$ ls -rltsh models/bodypose2d/
total 65M
65M -rw-rw-r-- 1 laokc laokc 65M Jun 24 10:27 model.etlt
4.0K -rw-rw-r-- 1 laokc laokc 1.0K Jun 24 10:27 labels.txt
4.0K -rw-rw-r-- 1 laokc laokc 2.3K Jun 24 10:27 int8_calibration_320_448.txt
4.0K -rw-rw-r-- 1 laokc laokc 2.3K Jun 24 10:27 int8_calibration_288_384.txt
4.0K -rw-rw-r-- 1 laokc laokc 2.3K Jun 24 10:27 int8_calibration_224_320.txt

Please update Tensorrt to 8.4 version and retry.

ok

Hello @yezhouyin Kindly let us know if the topic can be closed or not.

Thank you for your attention, it can be closed