Please provide complete information as applicable to your setup.
• Hardware Platform (Jetson / GPU)
GPU
• DeepStream Version
nvcr.io/nvidia/deepstream:9.0-triton-multiarch
• JetPack Version (valid for Jetson only)
N/A
• TensorRT Version
nvcr.io/nvidia/deepstream:9.0-triton-multiarch
• NVIDIA GPU Driver Version (valid for GPU only)
590.48.01
• Issue Type( questions, new requirements, bugs)
question/bug?
• 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)
Full repo to reproduce is here:
I am trying to train a classifier for use inside deepstream. My real dataset is much bigger but I can’t share it so I have made the smaller example.
My workflow is:
- Train classifier in TAO based on GPU-optimized AI, Machine Learning, & HPC Software | NVIDIA NGC | NVIDIA NGC
Train script is here: deepstream-classification-min-example/train/train.sh at main · thebruce87m/deepstream-classification-min-example · GitHub
and settings here: deepstream-classification-min-example/train/train.yaml at main · thebruce87m/deepstream-classification-min-example · GitHub
- Export onnx.
I do onnx since the options listed here: Deploying to DeepStream for Classification TF1/TF2/PyTorch — Tao Toolkit are either deprecated (.etlt or TAO Convertor) or suggest using TAO Deploy which ends up with a tensorrt version mismatch when you try to run the .engine in the deepstream docker. So none of the official options actually work.
The export script is here: deepstream-classification-min-example/train/export-onnx.sh at main · thebruce87m/deepstream-classification-min-example · GitHub
and settings here: deepstream-classification-min-example/train/export.yaml at main · thebruce87m/deepstream-classification-min-example · GitHub
- Attempt to use classifier in the deepstream app
As you can see in the repo I have modified the deepstream_test2_app from the python examples.
I use the people/vehicle object detector as the PGIE. My dataset was taken from the crops it produced so these should be similar to what is being sent to the SGIE.
Basically I can’t get the classifier to work properly in deepstream. I believe I am following an “official path” that should just work but obviously I am doing something wrong.
I train a simple model with three classes and the validation looks good after training but in deepstream they all classify as the same class (red). I see this in my large dataset too. If I use the python model directly from the TAO training in a python script it works and everything classifies correctly but somewhere along the line converting to onnx, .engine or maybe the parameters in the deepstream config are wrong and the deepstream performance doesn’t match.
How do I use the classifier in deepstream?