TAO 5.0 Classification (PyTorch) deploy error

Sorry, I found that the previous one was indeed unrecognizable. Could you please help me try this video? This video may not be recognized correctly, but the image can be recognized correctly when placed in Notebook.

I also dump the images from this new video and run with above-mentioned way which runs inference in tao-deploy docker. It works. All are classified to dogs.

I know, I have also used tao deploy reasoning to obtain the correct results. But it couldn’t recognize the video correctly when I used the deepstream-app to load it. I want to know where the problem lies.

Will check later. You can also try to debug by yourself based on the source code https://github.com/NVIDIA/tao_deploy/blob/main/nvidia_tao_deploy/cv/classification_pyt/scripts/inference.py#L66C40-L67 and https://github.com/NVIDIA/tao_deploy/blob/main/nvidia_tao_deploy/cv/classification_pyt/hydra_config/default_config.py#L26-L27. Seems that the preprocessing in the deepstream config file is needed to modify.

Based on https://github.com/NVIDIA/tao_deploy/blob/main/nvidia_tao_deploy/cv/classification_pyt/scripts/inference.py, here is a standalone inference script.
classification_pyt_standalone.py (6.3 KB)

For deepstream config file, please set as below according to Deploying to DeepStream for Classification TF1/TF2/PyTorch - NVIDIA Docs

  • preprocessing_mode: "torch":
net-scale-factor=0.017507
offsets=123.675;116.280;103.53
model-color-format=0
1 Like

I do not have a Python environment locally, I am currently installing it. I also made modifications to the deepstream configuration file according to your settings. It may have played a role, only three dog videos were identified as cats, but other dog videos did not provide identification tags.

You can run with tao-deploy docker.

yeah, I have tried. Using the python script you provided can correctly classify the images.

I would like to know how to write a configuration file to enable the deepstream-app to correctly recognize videos. If you have any other help documents, could you please let me know.

Thank you

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