OlafenwaMoses / ImageAI

A python library built to empower developers to build applications and systems with self-contained Computer Vision capabilities
https://www.genxr.co/#products
MIT License
8.5k stars 2.19k forks source link

How to pick the best model after tarining? #214

Closed rsoltani1 closed 5 years ago

rsoltani1 commented 5 years ago

I have trained ImageAI to predict a custom object. I ran 4 experiments (ResNet), so I have 4 models at the end stored as h5 files. The output of training tells me which one has the best accuracy. How can I tell python to pick the one with the highest accuracy? Instead of looking at the accuracies, is there a way that I can get the accuracy for each model in a vector or something, so find the one with max accuracy, and then tell the predictor to look at the model with the highest accuracy?

OlafenwaMoses commented 5 years ago

We are currently working on a new version of ImageAI that will save only the best models as it trains. For now, you can look at the file name of the saved model file. The part of the file name that starts with acc such as in acc-0.651714.h5 signifies the accuracy of the model. When choosing the best model, chose the one with the highest value after the acc

rsoltani1 commented 5 years ago

Thank you! It was helpful.