First, you will need to go on this link to activate your Azure subscription as a student. After it, go on Azure portal. When you are on the portal, create a ressource named Custom Vision. You can find it like this When your ressource is created, go on Custom Vision Portal. On the portal, you can create a new project and select what correspond better to your idea( no idea, you can find datasets on ImageNet.
You will normally arrive on a project where there's no pictures so you will need to create your own dataset. Pay attention on pictures you select and don't forget to retrieve testing part inside the dataset. It's recommanded to have at least 50 pictures for each tags. When you have your dataset, you can begin to upload your pictures. When they are uploaded, you will need to tag them. Pay attention when you tag them because it's the most important part for your model ! When you have enough pictures uploaded and tagged, you will need to train your model. To train it, you will need to go inside the train part. For purpose, here we will only use quick training.
As you launch a quick training, the performance part will open and you will see the model beeing trainder. When it's over, you will receive the result of your model.
You can test it by clicking on quick test and put your image there. If the result are not quite good. You can add more picture and tag them and make another training. Do that until you have the result you want. After it, you can publish your model by clicking on publish inside the performance tab. You can choose the name used to publish it. After that, you can try it by using postman and making a request on it.
When your model is published, you can try to use it inside an angular app. You don't know Angular? No problem! You will see everything is needed here. First, you will open the folder CustomVisionTool inside VS Code and you will open the terminal inside it too. You will enter
npm install
When it's finished, you will go inside the terminal and you will create a service named Prediction like this:
After it, you will go inside the new file created and declare the httpClient inside the constructor to have acces to it:µ
You will need an httpHeaders too so you will do the same and declare it:
When it's done, you will just make http request to your publish model. You can make 4 types of requests on it. The first one is Predict Image. You will send a picture inside a blob container and it will read it like this:
If you don't want to have inside predictions tab inside your portal you predicted pictures and for GDPR problems, you can use th Predict Image with No Store:
Instead of using blob container and you have an url picture, you can use Predict Image Url:
If you want like Predict Image with no Store for url, it's possible and it's like this:
After this, you will need to go insde the Detector folder and detector.component.ts and add Predction service inside the constructor like this:
You will need to find the //PUT YOUR CODE HERE inside the same file, when you find it, you will need to add this code to declare the prediction:
When your Prediction is created, you will need to subscribe to it to get the result from the model API:
For each prediction upside of 60%, we want to show it so we need to draw it like this:
And now, you can put your prediction URL and your key from the portal there:
After this, you can put inside the terminal npm start and you can go on localhost:4200 to try your model!
Already finished? You can try to make an AI Solution Architecture from this Azure Getting Started.