How to create a camera reconizer based on ml5 ?


Like me, you're a camera lover ? and sometimes you would like to clearly identify a camera when you see one in the street ? This website will give you some advices and sources to code it !



About AI and ML (machine learning)

First thing first, what is AI ? You probably already eard about AI but what do you really know about it ?


"Artificial intelligence (AI) is wide-ranging branch of computer science concerned with building smart machines capable of performing tasks that typically require human intelligence. AI is an interdisciplinary science with multiple approaches, but advancements in machine learning and deep learning are creating a paradigm shift in virtually every sector of the tech industry."


Machine Learning is a powerfull way allowing great things, if you want to know more just click here!

What do we need ?

ML5 will be your best friend ! It's JS library aiming to make ML (machine learning) approchable for non-expert coders ! By the way, you can easily access machine learning algorithms directly from your browser ! Thanks to this approchable tool you can classify the content of images with pretrained models, and that's the exact function we need to use for creating our camera reconizer !

How do we code our Camera reconizer website ?

The idea of this website is to take (discreetly ;-) ) a picture of the camera you want to identify, upload it and let the power of AI gives you a result. ml5 analyses the image and give back three resluts, where the number 0 is the most probable
First of all, you have to past this line of code at the end of your HTML file, in order to use ML5:

Then go to your js file and create 2 variables and two functions:
- the picture of the camera that you want to analyse
- a classifier to call the ml5 image classifier using the MobileNet model.
- a function to predict the brand of the camera
- and a function to display the result !

You can also add a drag and drop area in order to ease the process ;) !

Bellow you can see an example of the function made by the makerslab :

You're now ready to create you're own camera analizer !
If you want to learn more about ml5, check this channel on YouTube ;)