- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Team,
Request to help in converting my Tensorflow 2 SavedModel to IR Format
I have custom trained the model and did transfer learning and used Intel Devcloud to convert the Tensorflow 2 SavedModel format to IR
Model used: Tensorflow 2 Faster R-CNN ResNet101 V1 640x640
I tried running the command mo_tf.py --saved_model_dir saved_model and got the error attached in the log
I also tried specificying the input shape as [1,3,640,640] (not sure if is the correct shape) and still got the same error
Request to help resolve this
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Anisha,
I am moving this topic to DevCloud for Edge forum for further assistance.
For future DevCloud for Edge related questions, I would suggest you post in the DevCloud for Edge forum.
Link : https://community.intel.com/t5/Intel-DevCloud-for-Edge/bd-p/devcloud-edge
Regards,
Munesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Anishauday,
Can you share your model with me so I can take a look? Please feel free to send it to me via private message so you don't have to share it publicly.
Thanks
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Chris, Thanks very much for the help! Inboxed you the lite weight model file since the actual model file is >70 MB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Could you give us a link to the model you used for training? You mentioned faster rcnn but the zip is ssd which is a different model architecture. Also, it would be good to know what tensorflow version you used to train?
Additionally, please try and convert using these parameters: mo.py --saved_model_dir <model_dir>/saved_model/ --transformations extensions/front/tf/ssd_support_api_v2.4.json --tensorflow_object_detection_api <model_dir>/pipeline.config
Please also PM me the pipeline.config file
Thanks
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Used the model from : https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/tf2_detection_zoo.md for transfer learning.
The model I shared is SSD mobilenet V2 320*320
If you down load the .tar file then you will be able to get the .config file.
I will also try converting using the command you mentioned.
Thanks very much
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the clarification, please let me know your results on that conversion.
Thanks
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did you have any success converting that model?
Thanks
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for following up! I'm still unsuccessful with model optimization.
I tried freezing the TF2 Object detection model- Faster RCNN res101 640*640 from custom trained from TF2 model zoo.
mo_tf.py --input_model frozen_model.pb --output_dir out_model/ --reverse_input_channels --input_shape=[1,640,640,3] --input=input_tensor --output=detection_scores,detection_boxes,num_detections --transformations_config=/opt/intel/openvino_2021.4.582/deployment_tools/model_optimizer/extensions/front/tf/faster_rcnn_support.json --tensorflow_object_detection_api_pipeline_config=/home/u80089/aj/pipeline.config
and we got the error
[ ERROR ] Exception occurred during running replacer "REPLACEMENT_ID" (<CLASS>): Nonode with name num_detections</CLASS>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for getting back to me, I am still investigating, will get back to you shortly.
Thanks
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Instead of using the support.json, you should use the api version that corresponds with the version of tensor flow that you used. Which by the way, which version did you use? If that doesn't work I would also need copy of the frozen_model.pb and pipline.config.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Chris, Thanks a lot.. I have inboxed you the pipeline.config file but couldn't attach the frozen file for FasterRCNN since its really huge. Also I tried with 2.4.json file still no luck.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Anishauday
I have moved your case over to the OpenVino team. I have been in contact with them and they are already working on it. I am moving the case into their community for tracking purposes.
Thansk
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks very much Chris!
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page