Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.
6430 Discussions

TensorFlow SSD MobileNet V2 - head detector model conversion error

abhi_jci
Beginner
643 Views

I'm using openvino version 2021 2021.4 and tensorflow version 1.15.5 in my virtual env.

The model i was trying to convert is "HEAD_DETECTION_300x300_ssd_mobilenetv2.pb", which I'm attaching a link here to download the model:

https://github.com/Varat7v2/Human-Head-Detection/tree/master/models

 

I'm using this conversion command:
-------------------------------------------
python3 /opt/intel/openvino_2021/deployment_tools/model_optimizer/mo_tf.py \
--input_model=HEAD_DETECTION_300x300_ssd_mobilenetv2.pb \
--tensorflow_use_custom_operations_config ssd_v2_support.json \
--tensorflow_object_detection_api_pipeline_config pipeline.config \
--batch 1 \
--reverse_input_channels
-------------------------------------------

However, i'm getting error

[ ERROR ] Cannot infer shapes or values for node "Postprocessor/ToFloat".

 

Then i chnaged the "Postprocessor/Cast_1" to "Postprocessor/ToFloat" inside ssd_v2_support.json

 

However, i'm now getting a different error:

-------------------------------------------

[ ERROR ] Cannot infer shapes or values for node "BoxPredictor_0/ClassPredictor/BiasAdd/Reshape".
[ ERROR ] Number of elements in input [ 1 19 19 6] and output [1, 23, 91] of reshape node BoxPredictor_0/ClassPredictor/BiasAdd/Reshape mismatch
-------------------------------------------

Can i have some help regarding this problem please? Thank you very much.

 

 

 

 

0 Kudos
1 Solution
abhi_jci
Beginner
625 Views

Solved the issue by editing "pipeline.config" to have:
num_classes: 1

Thank you

View solution in original post

0 Kudos
2 Replies
abhi_jci
Beginner
626 Views

Solved the issue by editing "pipeline.config" to have:
num_classes: 1

Thank you

0 Kudos
Megat_Intel
Moderator
608 Views

Hi abhi_jci,

Thank you for sharing your solution with our Community. I'm glad to hear that. Hope everything is going well for you. This thread will no longer be monitored since this issue has been resolved. If you need any additional information from Intel, please submit a new question.

 

 

Regards,

Megat

 

0 Kudos
Reply