Resnet50 with imagenet dataset image classification using deepstream sdk

want to build real time image classification with resnet50 model pretrained with imagenet dataset(1000 classes) using deepstream sdk.
I’m having resnet50 tensorrt optimised engine file.

• Hardware Platform (Jetson / GPU) - jetson nano
• DeepStream Version- 6.0
• JetPack Version (valid for Jetson only) - 4.6
• TensorRT Version - 8.2
• NVIDIA GPU Driver Version (valid for GPU only)
• Issue Type( questions, new requirements, bugs) - questions
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description) - I want to build a real time object classification application using deepstream sdk. I’m using resnet50 tensorrt optimised model. I could not find any example. Anyone tried before, any sample application for real time object classification using deepstream sdk?. any leads will be highly appreciated…

Please check the sample C/C++ Sample Apps Source Details — DeepStream 6.1 Release documentation (, the corresponding source code locates at deepstream/sources/apps/sample_apps in your deepstream directory.

Hi @yingliu

Language using: Python
I have been referring to deepstream_test2 sample python application where classifier is used as secondary inference.

I want to build classifier as primary inference with the above said model. I couldn’t find any leads or sample app for this.

no this kind of sample, we usually use classifier model as sgie because it is strict to input source.
you can modify deepstream-test2, remove detector, use classification model as pgie, and add “is-classifier=1” to new pgie configuration file.

Hi @fanzh,

I have tried giving the required parameters in configuration file but classifier is not working. I want to know the steps we need to do in osd_callback function.

there is only a c sample, GitHub - nvqiezi/deepstream-classify-pgie-test: use classification model as pgie, input is a red car, model is color classification model, output is “red”, you can refer to the configure file and how to get the result.

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