tyagi-iiitv / PointPillars

GNU General Public License v3.0
105 stars 47 forks source link

Upload a pretrained model #8

Closed tyagi-iiitv closed 3 years ago

tyagi-iiitv commented 3 years ago

We can upload a saved model.h5 file after training for around 150+ epochs for a direct usage when someone wants to try out this model on their data.

zq07075335 commented 3 years ago

can you upload a example codeof h5 to pb or model.pb ? I convert the h5 to pb,but the results of prediction were different. thx

tyagi-iiitv commented 3 years ago

That's actually a good point, we can directly save the model to .pb format instead of the older .h5 format. The code to be modified should be inside the point_pillars_training_run.py file. I'll update this issue once I finish working on it. In case you are able to make it work, please send a PR. Thanks!

omarhassan91 commented 3 years ago

How did you convert the .h5 to a .pb model? I tried using pillar_net.save('point_pillars') but that resulted in an unfrozen .pb model that I couldn't figure out how to freeze correctly...

Thanks!

tyagi-iiitv commented 3 years ago

We never actually changed the code to save the model as a .pb file. As of now, the model is still saved as a .h5 file which can be loaded directly (for example in the point_pillars_prediction.py file). Also, the model is automatically saved based on the best loss value in the training script, so I'm not sure why would you need to save the model separately. Do you have any specific scenario here?

omarhassan91 commented 3 years ago

I'm just trying to extract the .pb model to see if it's possible to do any sort of optimizations with it...are the steps that I followed with adding 'pillar_net.save('point_pillars') wrong to get these files (checkpoint, .index, .meta and .data)?

tyagi-iiitv commented 3 years ago

I updated the readme with the instructions. Closing this for now.