Custom vision service is a part of the cloud based azure cognitive service API.While the traditional computer vision API is effective on generic images it performs poorly when we want the results for a particular use case or a domain. This is where Custom Vision API comes in. We can train the image recognition algorithm from our own labelled data set thus achieving higher accuracy.
Through this tutorial I aim to go through on how to make your image recognition simple through the custom vision API.
As the first step login to https://www.customvision.ai/projects using your Microsoft account.
Choose the domain that you prefer. The Food domain is best optimized to detect food items, Adult domain is best optimized to recognize Adult related content. If you are not sure on which domain to use it choose the general domain. The domains with an exclamation mark next to them can be exported and used somewhere else. I'll be using this service to identify tomato diseases.
Then you will have to upload your image set to the cloud service from your local device.When uploading first upload the related images first. For example in my data set I will first add the tomato blight data set. In the next step we have to add the labels for this data. This is the most important step that affects your accuracy. So please make sure to add the proper labels that describe your image here. In my data set i'll label it as tomato blight as i uploaded images with tomato blight disease.
After the image finishes uploading click Add images option again and add the other data set. I will be uploading the data set with healthy tomato leaves and giving it the relevant label.Make sure you upload at least 5 images per each tag.
Then click on the train button and wait for some time which will vary based on size of your data set.
Then using cross validation of the provided data set the precision and recall values are given.These values will differ based on the size of the data set and the labeling of the data.
Thereafter click on the quick test option to upload an image which is not in the dataset. Using this option we can test out whether our service works in the way that we intended.
This is the result that i got when i uploaded an image with tomato blight.It gave the prediction with an accuracy of 94% which is very reliable.
You can publish this as a web service and use it in connection with your app. Microsoft Azure has simplified the process of prediction for you and now all what you need is a data set with proper labels to create the next big image recognition app. Please post in the question board if you have any queries or contact me through firstname.lastname@example.org