I have read the topic:
https://devtalk.nvidia.com/default/topic/1049802/jetson-nano/object-detection-with-mobilenet-ssd-slower-than-mentioned-speed/post/5327974/#5327974
In the sampleUffSSD_rect sample,there is a sample_unpruned_mobilenet_v2.uff.It worked well.
But when I use the command:
convert-to-uff --input-file frozen_inference_graph.pb -O NMS -p config.py
The new uff can not work,when I run ./sampleUffSSD_rect.The error is:
../data/ssd/sample_unpruned_mobilenet_v2.uff
Registering UFF model
Registered Input
Registered output NMS
Creating engine
Begin parsing model...
ERROR: Parameter check failed at: ../builder/Layers.h::setAxis::315, condition: axis>=0
End parsing model...
Begin building engine...
ERROR: Concatenate/concat: all concat input tensors must have the same dimensions except on the concatenation axis
ERROR: Could not compute dimensions for Concatenate/concat, because the network is not valid
Time lapsed to create an engine: 26.1773ms
INTERNAL_ERROR: sample_uff_ssd: Unable to create engine
sample_uff_ssd_rect: sampleUffSSD.cpp:585: int main(int, char**): Assertion `tmpEngine != nullptr' failed.
And I read the README.txt of sampleUffSSD_rect sample,it says:
Steps to generate UFF file:
0. Make sure you have the UFF converter installed. For installation instructions, see:
https://docs.nvidia.com/deeplearning/sdk/tensorrt-api/#python and click on the 'TensorRT Python API' link.
1. Get the pre-trained Tensorflow model (ssd_inception_v2_coco)
from:
http://download.tensorflow.org/models/object_detection/ssd_inception_v2_coco_2017_11_17.tar.gz
2. Call the UFF converter with the preprocessing flag set (-p [config_file]).
The config.py script specifies the preprocessing operations necessary for SSD TF graph.
It must be copied to the working directory for the file to be imported properly.
The plugin nodes and plugin parameters used in config.py should match the registered plugins
in TensorRT. Please read the plugins documentation for more details.
'convert-to-uff --input-file frozen_inference_graph.pb -O NMS -p config.py'
I think the config.py of sampleUffSSD_rect sample is not for ssd-mobilenetv2.It is for ssd_inception_v2_coco.
Can you tell me how to write config.py for ssd-mobilenetv2.