I am trying to reproduce the ssd_inception_v2 model frozen graph as given in models zoo.
These are the exact steps I am following:
- Training ssd_inception_v2 model with the following command:
PIPELINE_CONFIG_PATH={path to pipeline config file}
MODEL_DIR={path to model directory}
NUM_TRAIN_STEPS=50000
SAMPLE_1_OF_N_EVAL_EXAMPLES=1
python object_detection/model_main.py \
--pipeline_config_path=${PIPELINE_CONFIG_PATH} \
--model_dir=${MODEL_DIR} \
--num_train_steps=${NUM_TRAIN_STEPS} \
--sample_1_of_n_eval_examples=$SAMPLE_1_OF_N_EVAL_EXAMPLES \
--alsologtostderr
INPUT_TYPE=image_tensor
PIPELINE_CONFIG_PATH={path to pipeline config file}
TRAINED_CKPT_PREFIX={path to model.ckpt}
EXPORT_DIR={path to folder that will be used for export}
python object_detection/export_inference_graph.py \
--input_type=${INPUT_TYPE} \
--pipeline_config_path=${PIPELINE_CONFIG_PATH} \
--trained_checkpoint_prefix=${TRAINED_CKPT_PREFIX} \
--output_directory=${EXPORT_DIR}
The above command generates the frozen graph format of the exported model. The issue is - The custom_ssd_inception is way different from what is given in the ssd_inception_v2_coco_2018_01_28 file in model zoo of object detection when visualized using tensorboard.
Link to files:
Custom_ssd_inception (pb): https://down.uploadfiles.io/get/uvg4m
Original_ssd_inception (pb): http://download.tensorflow.org/models/object_detection/ssd_inception_v2_coco_2018_01_28.tar.gz
When continued to convert the frozen graph to UFF using convert_to_uff.py, the output log files are as follows:
For the original model, given in model zoo: http://txt.do/dw3z6
For custom model: http://txt.do/dw3zj
When I plugged in the UFF model exported from the custom model(the model which I trained), I get the following error:
ERROR: UFFParser: Parser error: BoxPredictor_0/Reshape: Reshape: -1 dimension specified more than 1 time
ERROR: sample_uff_ssd: Fail to parse
Check the entire log here: http://txt.do/dw8b5
How do I fix this issue?