detectnet-camera: using custom trained model


I want to use my own custom trained model with code. Please provide me complete details on how to do this.

Currently the is by default referring to “SSD-Mobilenet-v2” network.

  1. How and where to change this to another model (for eg:- googlenet). In, if I change the below line to “googlenet” , still it is referring to “SSD-Mobilenet-v2”.
    net = jetson.inference.detectNet(“googlenet”, sys.argv, opt.threshold)

  2. I have created my customized training model of cat_dog and this has generated the “resnet18.onnx” .
    I need to use this as the training model in detectnet-camera instead of “SSD-Mobilenet-v2”. let me know how to do this?


Hi Shankar, googlenet and resnet18 are image classification networks and not object detection networks, so they should be used with imagenet-console/imagenet-camera.

See these commands for loading custom model with imagenet-console and imagenet-camera:

Hi Dusty,

Got it. The classification networks cannot be used for detection networks. Thank you.

If I need to use the different network model for object detection, How and where to change?

For custom detection network model: Should I use the below reference for generating custom detection network?

Please provide details for generating the custom detection networks and instructions on using it with


Hi Shankar, that post is a good starting point, and if you wanted to convert your re-trained SSD model to TensorRT, see some of the other resources listed in this post: