Config file efficientnet-b0

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU)
• DeepStream Version 5.1
• JetPack Version (valid for Jetson only)
• TensorRT Version
• NVIDIA GPU Driver Version (valid for GPU only) 470.63 cuda11.1
• Issue Type( questions, new requirements, bugs)
• 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 trained efficientnet-b0 using GitHub - lukemelas/EfficientNet-PyTorch: A PyTorch implementation of EfficientNet and EfficientNetV2 (coming soon!) and created tensorrt engine using tensorrtx/efficientnet at master · wang-xinyu/tensorrtx · GitHub. I have problems with config file for efficientnetb0. I want to take detected bounding boxes from gie-id=2 and classify. when I run, detector works fine but classification is not showing. Can you help to write proper classification config file?
As a example I took for config file from here: deepstream_python_apps/apps/deepstream-test2 at master · NVIDIA-AI-IOT/deepstream_python_apps · GitHub and below my config file

How to display on each bbox classifcation name?
How to take topk class?
how to compute net-scale factor and offsets for efficientnet-b0?

(python code)



Hi @snoop221 ,
The template is right. The problem is to set right value, but we are not sure what values of below parameters you used in the training.

  1. net-scale-factor=
  2. offsets=
  3. force-implicit-batch-dim= // is it fixed batch of your engine?
  4. model-color-format= // RGB input , not BGR input, right?
  5. operate-on-gie-id= // the “gie-unique-id” of detector is 2, right?

basically, for most of the properties, you need to check what you used in training and the model properties, and set the corresponding values in this config file. From the info you provided above, hard for us to find what you used.

And, you can check doc Gst-nvinfer — DeepStream 6.0 Release documentation about the meaning of these properties.

At last, you need to check if you need to implement the post-processor for your efficientnet-b0 model.

I used pretrained efficientnet-b0. Resized image to (3x224x224) and normalized(mean=[0.485, 0.456, 0.406],std=[0.229, 0.224, 0.225]). How to compute net scale factor and offsets?
3. Yes
4. Right.
5. Right. Classify bboxes from detector. How to chose proper process mode number for classifer and detector? What if I add one more classifier for bboxes from detector?

What about other properties? Did I choose operate-on-class-ids=1 correctly? What if I want classify all classes from detector? Also what about classifier-async-mode? how to use it? Im a bit confused with definition written in documentation

About post-processor for classifier, I normalize image and resize with the same parameters above. Then take top first class from softmax and show a label. I think deepstream has this kind of simple post-processor method for classifier and no need to write post-processor. I think output-blob-names=predictions/Softmax handles it. Correct me if I’m wrong.

y = net-scale-factor*(x-mean)
here, mean is the corresponding mean value, read either from the mean file or as offsets[c]
so, there is only one net-scale-factor, but can have three different mean which can be set by offsets,e.g. offsets=77.5;21.2;11.8

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