> ## Content Index
> Fetch the complete content index at: https://www.aveshneeiyer.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# How to use MS Custom VisionAI to train a model for objects in images
- URL: https://www.aveshneeiyer.com/object-detection/
- Published: 2021-06-27T12:17:13.000Z
- Updated: 2022-03-31T08:00:42.000Z
- Description: I used Microsoft Cognitive Services to detect objects in images through Microsoft Azure Custom Vision AI. The model gets trained to identify the number of cars in an aerial view of a parking lot.
- Author: Aveshnee iyer
- Tags: Object Detection, MS Custom Vision, microsoft ai

## I used Microsoft Cognitive Services to detect objects in images through Microsoft Azure Custom Vision AI. The model gets trained to identify the number of cars in an aerial view of a parking lot.

### Using MS Custom Vision you can train the model to identify any type of object within a dataset of images. Very adaptable and customisable use case for many industries to leverage.

![](https://storage.ghost.io/c/63/8c/638cc33b-5912-48b9-958c-94664f8e958a/content/images/2022/03/image-78.png)

![](https://storage.ghost.io/c/63/8c/638cc33b-5912-48b9-958c-94664f8e958a/content/images/2022/03/1_0eV7CAZDEASh4d0brXZkAQ@2x.jpeg)

**COMPUTER VISION:**

Computers can gain a high-level understanding by extracting information from digital images or video. Using digital images (from cameras & videos), deep learning models and machines can accurately identify & classify objects.  

**Object Detection:** Allows us to identify and locate objects in an image or video.

Object detection can be used to:

- count objects in an image
- determine/ identify their precise locations
- accurately label the objects.

****Azure Custom Vision is super cool and really easy to use —** enables you to build and improve your own image classifiers by training the model with your own labels by passing images through it. It has a user-friendly interface to develop and deploy your own models.

#### **How did I use MS Custom Vision AI to detect the number of cars from aerial images?**

#### A dataset was created by uploading a high number of images into [***customvision.ai***](https://www.customvision.ai/?ref=aveshneeiyer.com) in order to train the model.

Here is a sample of the aerial image used to train the model.

![](https://miro.medium.com/max/600/1*L5BONPMWKsZgML3Mzg64OQ@2x.jpeg)

### **Training Results:**

**Over 94,5% Performance as seen below.**

\[Precision (positive predictive value), Recall (sensitivity)\]

![](https://miro.medium.com/max/1400/1*pHkQPW6lXXivfta_ZYiT3w@2x.jpeg)

> ****Precision** returns Positive Prediction Accuracy for the label.  
>  
> ****Recall** returns the True Positive Rate of the label.

### **Prediction Results:**

The trained model was passed 2 new images from which to make predictions on (ie. new data that the model has not seen previously). 

****The prediction results were also very good 99,8%.**

![](https://miro.medium.com/max/1400/1*e4xjvUfbIB6SL-Bf9l70SQ@2x.jpeg)

![](https://miro.medium.com/max/1400/1*cBOPd034Ta0zK6Arptrt9g@2x.jpeg)

After the model has been successfully published, ****a “Published” label** will appear next to the iteration in the left-hand sidebar.

![](https://miro.medium.com/max/1400/1*AfniFDIhk1PJZXNIhUe48g@2x.jpeg)

### **Some key features with using [Custom Vision AI](https://www.customvision.ai/?ref=aveshneeiyer.com):**

> \- models can be customised based on what you want to predict  
>  
> \- you have the option to export a trained model to any device or container.  
>  
> \- moving it to a device decreases latency which is super cool.  
>  
> \- the model can be exported to be run offline.  
>  
> \- the exported classifier is embedded into an application run locally on a device for real-time classification.

### For more on AI Engineering leveraging Microsoft Custom Vision have a look at this link

[**https://azure.microsoft.com/en-us/services/cognitive-services/custom-vision-service/*](https://azure.microsoft.com/en-us/services/cognitive-services/custom-vision-service/?ref=aveshneeiyer.com)

For more Follow me on Medium [https://medium.com/@aveshnee7](https://medium.com/@aveshnee7?ref=aveshneeiyer.com)