The Cognitive services are always a great topic to consider writing, especially when there is a mix of Machine Learning. If you are totally new to the Cognitive services, consider reading my posts wouldn’t be a bad idea. Here in this article, we are going to use the Microsoft Custom Vision AI, which is a cognitive AI service. With the help of Custom Vision AI, we can easily do the below things.
- Upload image
- Tag the images
- Train the model
- Evaluate the result
The Custom Vision service uses the machine learning to classify the images we are uploading. The only thing we are required to do is, just specifying the correct tag for each image, you can also tag thousands of images at a time. The AI algorithm is super powerful to give us better accuracy and once the model is trained, use the same to classify new images according to the needs of your app. Let’s skip the introduction and start doing some amazing things. Let’s just start then.
You can always read this article on my blog here.
I have a habit of writing article about the things I learn, though I had worked with Cognitive Services before, recently I had a chance to work with Custom Vision AI service, so thought of building something with that. Here in this article, we are going to create an Azure Custom Vision AI which can,
- Scan for real objects
- Identify whether the object is a car or not
- If that is a car, then check which is the car manufacturer
We will be creating a Custom Vision AI model, which we will train with thousands of images. I hope it helps.
To do the wonderful things, we always need some prerequisites.
- Account with Custom Vision AI, you can either use the free subscription or your Azure account
- A database of images for training the model, the same can be downloaded from here
- Good internet connection, as you will have to upload thousands of images
- I have already collected a large dataset, which is more than enough to get started, you can download it from OneDrive here
Creating Your Custom Vision AI Model
I assume that you had already gone through the Prerequisites and followed the instructions. If not, please check again.
To get started here, please go to the https://customvision.ai/ and,
- Log in with your credentials
- Creating your project
- Add as many relevant images possible and tag them appropriately
- Once you tag them properly, you can train your model, if everything goes well, you should see an output as below.
Please make sure that you are checking the precision, if it is a good number, then you are good to go. As many images you upload and train them with the correct tag, the precision value get increased. So feel free to add images and see the output yourself. Below is the count of the images which I trained to my model.
When you train again with the new data, you can see that a new iteration is getting created which is really handy if you need to go back to the previous state, if the precision value is getting decreased.
You can also do a quick test with the UI provided. Please click on the Quick test button and upload an image, let’s upload an image of a bedroom.
Well, that was easy. Now let’s upload an image of a Porsche car.
Have you noticed the values returned? The custom vision API is saying that the image is 99.8% is a car and 99.3% is a Porsche car, which is really impressive. Now, what about BMW?
As our Custom Vision AI is working as expected, now we can go ahead and grab our keys which are needed when you create an application to use this Custom Vision AI. Please click on the setting symbol on the right side of the page, and note down your project id and prediction key. You will also need a prediction URL, which you can get from the Performance tab.
The possibilities of cognitive services and machine learning are limitless, you can think of using this in many of our real-life scenarios. If possible, please share me your thoughts on where are all the places we can use this Custom Vision AI service. In this article, we have learned,
- What is Custom Vision AI Service
- How to work with Custom Vision AI service
- How to train and test our Custom Vision AI model
Is that all? No, in the next article we will create an application which can be used to test it in real time.
You can always follow me here on Medium and Twitter.
Sibeesh Venu - Medium
Read writing from Sibeesh Venu on Medium. An #Engineer by profession and #Writer by passion. Microsoft MVP…
Sibeesh Venu (@SibeeshVenu) | Twitter
The latest Tweets from Sibeesh Venu (@SibeeshVenu). https://t.co/qgUFdZS3Zb, Microsoft MVP @MVPAward, @CsharpCorner…
Your turn. What do you think?
Thanks a lot for reading. Did I miss anything that you may think which is needed in this article? Could you find this post as useful? Kindly do not forget to share me your feedback. What are you waiting for? create your model and train.