What is the breed of this cat ?

Do you ever wonder which breed was a cat ? Personaly it happens every time I run into a cute kitten. This is a daily problem for me since I love cats. People don't know cat breeds but they often know various dog breeds so this project also aims to reduce this inequality.
I will use machine learning to recognize cat breeds in this project


How does it work ?

This project uses ml5.js which is a JavaScript library. The idea is to give an image of a cat which would be analysed by an artificial intelligence to define the cat breed. Previoulsy, the AI analysed millions of cat images. Thanks to a machine learning process, the AI is know able to match a cat image with a cat breed because it recognizes seleval details.

To have a better understanding of machine learning I advise you this video which is quite explicite and simple to understand:

I'm going to describe each step you need to follow in order to succeed in this important project.

Step 1

First we need to copy this link in our index.html to use the ml5.js and call ml5 functions:

We also need to copy this link in our index.html to use p5 because some functions might help us:


Step 2

Now, we have to create a .js file to include the code for ml5.
Thanks to a specific function named MobileNet, the Artificial Intelligence will be able to recognize the content of images.

Step 3

We have to use the imageClassifier() function and create a callback function in order to use the specific function mobilenet.predict which actually predicts cat breeds.

Example

This is what you are supposed to see at the end:






This is a Siamois.


Ressources

If you want more information about cat breeds you should click here.

If you are really interrested in image recognition I really recommand you this video which goes deeper in this subjet.