Exception: jetson.inference -- detectNet failed to load network

I trained my own tensorflow model and converted the .pb file to .uff, I tried to put it in jetson inference but the result is like this, please help

`jetson.inference – detectNet loading network using argv command line params

detectNet – loading detection network model from:
– prototxt NULL
– model ssd-mobilenet-v2
– input_blob ‘data’
– output_cvg ‘coverage’
– output_bbox ‘bboxes’
– mean_pixel 0.000000
– mean_binary NULL
– class_labels NULL
– threshold 0.500000
– batch_size 1

[TRT] TensorRT version 5.1.6
[TRT] loading NVIDIA plugins…
[TRT] Plugin Creator registration succeeded - GridAnchor_TRT
[TRT] Plugin Creator registration succeeded - NMS_TRT
[TRT] Plugin Creator registration succeeded - Reorg_TRT
[TRT] Plugin Creator registration succeeded - Region_TRT
[TRT] Plugin Creator registration succeeded - Clip_TRT
[TRT] Plugin Creator registration succeeded - LReLU_TRT
[TRT] Plugin Creator registration succeeded - PriorBox_TRT
[TRT] Plugin Creator registration succeeded - Normalize_TRT
[TRT] Plugin Creator registration succeeded - RPROI_TRT
[TRT] Plugin Creator registration succeeded - BatchedNMS_TRT
[TRT] detected model format - custom (extension ‘.’)
[TRT] model format ‘custom’ not supported by jetson-inference
[TRT] detectNet – failed to initialize.
jetson.inference – detectNet failed to load network
Traceback (most recent call last):
File “detectnet-camera.py”, line 51, in
net = jetson.inference.detectNet(opt.network, sys.argv, opt.threshold)
Exception: jetson.inference – detectNet failed to load network
`

Is your model similar to SSD-Mobilenet or SSD-Inception? The jetson-inference detectNet pre/post-processing code for .UFF is compatible with these networks: https://github.com/AastaNV/TRT_object_detection

Also, to load a custom UFF model in detectNet, you would need to add it to the code here (where the other UFF models are loaded)

Alternatively, from your application you can directly call the overload of detectNet::Create() that is used for UFF models.