For one project, there was a need for multiple models within the same Python application. These models were trained using the Cognitive Services: Custom Vision Service. There are two steps to using an exported model:
- Prepare the image
- Classify the image
Prepare an image for prediction
Classify the image
To run multiple models in Python was fairly simple. Simply call tf.reset_default_graph() after saving the loaded session into memory.
After the CustomVisionCategorizer is create, just call score and it will score with the labels in the map.