WHAT'S HIS NAME ?
An AI project by Avi JAOUI
You have this actor's name on the tip of your tongue ?
Here, let
me help you out with that !
Before I can help you finding the name of the actor you desperately want
to know because you told your friends : "I swear it's this guy ! He plays
in... sh*t I can't find it but I swear it's him !", let's talk about
Artificial Intelligence, or AI. Artificial Intelligence is a something many people, many
companies and many governments have been working on for years, and it is
thought to be of great help for everyone.
One of the many tasks AI is linked to is
machine learning, which is the concept of a program learning autonomously thanks to the
databases it has been given access to. For example, it is possible to have
an AI recognize images, by a process called
deep learning.
If you provide a program with a wide range of pictures of the same item,
let's say a teapot, the program will be able, after processing the data,
to recognize a teapot when it is shown another picture of one.
So how does it work ? Each time we give the AI
an image, the program learns and stocks the image. When the AI is given a
new picture, the program will run an alorithm which will allow it to
analyse the pictures that are already in stock and the new picture. The
more we show the AI pictures, the more its ability to recognize items is
accurate.
Many tools can be used to learn how to implement AI into a web page, like
MobileNetsand Ml5.js. The first one are programs which are trained to identify and recognize
items in pictures, and the second one is a database providing access to
algorithms.
We have here an example of code which is written in order to use Ml5.js
and MobileNets.
What is this actor's name ?
Imagine you are with your friends at home for a movie night, and you
chose to watch an old movie, Firstborn, from 1984. You recognize actors like Terri Garr or Peter Weller, but
you can't put your fingers on the name of the actor playing that
teenager. Well, this is a job for Artificial Intelligence.
First, so as to obtain an AI program capable of identifying the name of
an actor from a screenshot of a movie, whatever the year, you need to
feed the program a great amount of pictures of this actor.
Here are a few pictures :
|
|
|
All these pictures are used to create an image database. Then, when you
use MobileNets, the program will try to identify the new picture by
giving it a degree of resemblance, calculated with a percentage of
confidence which is based on the classification made into the database.
Let's input the screenshot of the actor into the program.
MobileNet is 73.42% sure this is Robert Downey Jr.
Here, the Ai is confident at 73.42%, which means the program needs more
pictures of Robert Downey Jr, from all of his movies, so as to create
database powerful enough to be 100% accurate when recognizing the actor.
Now, we will try with a picture of Robert Downey Jr. starring in
Chaplin, where he plays Charlie Chaplin and has to look like him.
MobileNet is 39.86% sure this Robert Downey Jr.
In this case, the AI truly unsure about the answer. This is because in
this picture, Robert Downey Jr. looks a lot like the real Charlie
Chaplin and not so much like the other pictures of him. If the AI also
has pictures of Charlie Chaplin in its databse, as its goal is to
identify any actor, then there could have been a mix-up between both
actors.
Think of this AI next time you watch a movie, and try to learn as your
machine does !