How can you train computers to interpret and understand the visual world at ease without any prior experience in artificial intelligence?
In this blogpost I will show you how to do just that through a demo creating a classification model to unmask superheroes a.k.a. vigilantes using Custom Vision API!
The following example will include 2 characters from Marvel.
Custom Vision API
Custom Vision API is a service that makes it easy to build, deploy and improve custom image classifiers using a couple of labeled images with the ability to even export models for offline use.
To start things up, visit customvision.ai and sign-in with your Azure account.
Click on “New Project” under the “Projects” section.
Give your project a name and a description.
Create a “Resource Group” by clicking “create new” then fill in the details and click “Create resource”.
Wait for it to create, then fill in the rest of the details that will appear, in my case I specifically chose “General (compact)” from the “Domain” list just so I can export my model whenever I want to.
Click “Add images” to start adding images to the project.
Give your set of images a label which in my case is “Jessica Jones”then click “Upload n files” button.
Click “Done” after they finish uploading.
Then do the same process again but with another set of images and different label which in my case is “Patsy” then click “Upload n files” button.
If you have other labels and images to add you’ll need to repeat the previous process for every set of new images associated with a new label.
After you are done uploading and labeling images, just click “Train” button.
Choose “Fast Training” for now to get going.
After it finishes training, click “Quick Test” button.
Then upload any image of Jessica or Patsy!
If you want to go above and beyond, here are some resources to help you out!
- Free Azure Subscription
- Custom Vision
- Custom Vision Documentation
- azure-custom-vision-datasets on GitHub
The results are perfect for the fact that we used just 16 labeled images for each superhero, imagine what else could be done using such a service with such accuracy and ease!