Azure Cognitive Services Custom Vision Service Machine Learning Tensor Flow
Jared Rhodes  

Multiple TensorFlow Graphs from Cognitive Services – Custom Vision Service

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:

  1. Prepare the image
  2. Classify the image

Prepare an image for prediction

https://gist.github.com/QiMata/6ebb15a8e42450e57c3fe48b44e920cb

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.

https://gist.github.com/QiMata/b63c7d0699173067d4c60c9f06a63273

After the CustomVisionCategorizer is create, just call score and it will score with the labels in the map.

Leave A Comment