Introduction to AI

The goal of AI is to design systems capable of reproducing human behavior in its reasoning activities. The fields of application of artificial intelligence are numerous and very diverse. Among them are: the banking system, with systems for assessing risks related to obtaining credit, the army, with autonomous systems such as drones, video games, with bots, or medicine, with systems to aid diagnosis.

My project

As said, AI can be applied to any type of field, ethical or not. The application that I want to present you will be able to recognize any movie or series and will be able to save in the application the titles and names of the movies/series that are usually forgotten. This application will target all types of users, from moviegoers to novices. This idea came to me last week, I was watching an episode of The Simpsons that I really liked. While I wanted to share the episode with a friend, I couldn't give him the opportunity to watch it. The reason? The hundreds and hundreds of episodes of this series made me forget the name of the episode. With this application you just need to film the movie or series with your smartphone and it will automatically find the name of the movie or series.
This application can even be extended to the recognition of actors when a name doesn't come to mind with MobileNet: just take a picture of the actor on your computer screen or on your television.

This project requires a huge database because this application is based on supervised learning. This consists in "guiding" the algorithm on the learning path by providing it with examples that it considers convincing after having previously labeled them with the expected results. The margin of error is thus reduced as the training progresses, with the aim of being able to generalize its learning to new cases.

How ?

But then how does it work? In order to realize this project, we will use three essential things: ML5, MobileNet and p5.js.

  • ML5 is an open Source Machine Learning Library for the Web.
  • MobileNet is a real-time image recognition, but we will discuss it in more detail in the rest of the article.
  • And finally P5.js is a programming language for writing/creating images, animations and interaction.

ml5 logo ml5 logo

What is ML5 ?

ML5 is a form of artificial intelligence based on machine learning. ML5 has several applications, for our project we will focus on image classification. This is called MobileNet, it is a pre-trained model. It allows us to recognize the content of certain images. This is the basis of MobileNet, however we will go a little further and use another feature of this tool: video classification!
Visit ML5's official website for more information.

So, thanks to our application, you will just have to film your TV or computer screen to recognize your series or movie title!

Here some code to help you ! Click on the images to see the source of the code

Inside your index.html, please enter the following code first code
Then inside a sketch.js file, insert the following code second image

After all that, all you have to do is add the video!
third image fourth image