divamgupta / image-segmentation-keras

Implementation of Segnet, FCN, UNet , PSPNet and other models in Keras.
https://divamgupta.com/image-segmentation/2019/06/06/deep-learning-semantic-segmentation-keras.html
MIT License
2.89k stars 1.16k forks source link

Regarding Best Model Storing #253

Closed Ankit-Vohra closed 3 years ago

Ankit-Vohra commented 3 years ago

First of all I would like to appreciate the work done by @divamgupta , Amazing repo, definitely helpful for those who started working on Image Segmentaion. I would request you to please guide me on the following:

  1. Is there any way where we can pass any attribute to store only the best model based on highest val IoU or accuracy metrics
  2. Can you please add the metrics of all the models which are supported on any common dataset just like it's done for Classification task
  3. If I want to load any specific epoch, is there any way to pass it to the checkpoint attribute while doing evaluation. Thanks is Advance
Ankit-Vohra commented 3 years ago

Sorry forgot to add another point, it would be really helpful if there's any kind of support to pass the weight file of the CNN backbone. This will be really useful for people using this repo in kaggle competitions where Internet usage is not allowed and also to those who are working with bad internet bandwidth

divamgupta commented 3 years ago

Thanks for the suggestions. I will keep them in mind while pushing more updates.

Ankit-Vohra commented 3 years ago

@divamgupta urgent help required Can you please share code snippet on how to Save a trained model and load it again for inference

divamgupta commented 3 years ago

Model is saved while training. You can use model_from_checkpoint_path function to load the model. Or you can use Keras save_weights and load_weights function.