Does re-training an Object-Detection SSD Network give a different 'format' of model?

Hello,

I am trying to re-train an object detection model for a project. The end goal is for me to convert the ‘saved_model.pb’ model into another format through an SDK provided.

I have no problem at all converting the pre-trained object-detection SavedModels provided by TensorFlow on TensorFlow Hub. However, when I retrain from a checkpoint of one of the models, following every step in the TensorFlow Object Detection API training tutorial, eventually I start to get errors when I try to convert my re-trained result.

Does re-training cause anything significant in the format or components of the saved_model.pb to change? What can I do to simply re-train but not change anything important?

I would really appreciate any help with this, please.

Thanks,
Ahmad

Hi,

When you follow those tutorials, as far as I know, they don’t change the model structure, they will only change weights to be customized to your data.

what’s the error?

1 Like

Hello Gus,

Yes that’s exactly what I though too, that’s why I’m not sure I’m facing issues.

The error I am getting is that the conversion tool that I am using to convert to the proprietary framework that I want to use goes through the whole network and just gives the following warning for every layer: “Layer … was not consumed by converter.” And then says ‘After pruning, model is empty’ when it’s done going through the whole model, so the conversion fails.

I’m pretty sure it is some compatibility issue between the SDK and the TensorFlow version I used to train (I used GPU training with TF 2.5). Is it possible to know what TF version the models in TF2 Zoo were trained with? That would help me narrow the cause of the issue.

Update: I ended up figuring it out! I re-trained models and tested with many different TF versions until I found one that was compatible! Thank you.

1 Like

Thats great!

It would be nice to post on their github repo about this and let them know and maybe get them to update to TF 2.5 or at least document this somewhere.

1 Like

I will definitely work on doing that as soon as I can! I’ve been trying to work through this issue for about a week now so I’m sure it would be helpful for others. Thank you for your time and help!

1 Like