Modifying the DetectNet model on Jetson Nano


I am using the pretrained ‘ssd-mobilenet-v2’ on the Jetson Nano (4GB) to detect cars on a video.

I would like to only detect cars, and not the other classes the model is trained on, like people or boats, etc…

I saw that this is possible by retraining the model on part of the MS COCO dataset, using Transfer Learning.

But currently, I don’t have access to enough memory or time on my hands to retrain the model in such a way.

Is there a way to limit the detectnet model to detect only some object classes ? I could not find any way to do so in the documentation.

Even if the model does compute for all classes, a way to delete those unwanted detections from the detection list, before they appear on the image, would be much appreciated.

Thanks in advance,


1 Like

Hi @rose.louis.mail, you can disable certain object classes without retraining the model by setting those class names to void in the label file. In the case of ssd-mobilenet-v2, that file is found at:


So you would change every line in that file to void except for the line that says car

1 Like

It works perfectly, thanks!

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