First of all, if you want to understand what the Artificial Intelligence used behind the "Guess the Pet" system does, you need to understand what classification is.
The Cambridge English Dictionnary defines classification as: "the act or the process of dividing things into groups according to their types." There are many types of classification, from the chemical one to the very simple act of reorganizing a house. We are here talking about biological classification or taxonomy. Taxonomy is the science of classifying species, according to their characteristics. No doubt you already saw in high school the little boxes that were nested together, where for example crocodiles and birds were from the same family but were finally separated because of the wings and the feathers. The human mind has an inherent need to classify as it is a way to better understand their environment. Indeed, by finding common patterns between the animals, one can know, thanks to the typology created, what they are and if they are a danger to man.
Classification is thought to be almost as ancient or even older as the first instance of writing in human history.
However, the first one who we know with absolute certainty used taxonomy is the Greek Philosopher Aristotle in his book "Physics". There, he tries to understand how the animal reign is organized and rules itself. His second book "Metaphysics" (litterally "After Physics" in Greek) tries to go in depth about the immaterial aspect of this organization.
If the Medieval times combined Aristotle's method with a more abstract way of considering the chain of nature (with mankind at the top), it is only during the 18th century that taxonomy evolves to its modern form.
The botanist Carl Linnaeus designed a organized way to envision the natural kingdom as opposed to the sort of melting pot you could find before. Even today, new classifications are invented and the kingdoms of nature are extended:
It is not certain how many species there are left to discover but scientists estimate the number is about 8.7 millions (source:Museum of Natural History of Virginia). It sounds enormous and it is even more important to know that when one can remember we've only recorded about 1.2 million species.
The AI analyses the picture you give it and takes out several patterns on the picture that matches characteristics of the animals that the AI has in its database. Then, the AI matches these characteristics with tags of more or less certainty.
Having an AI that can tell you with a certain degree of probability what is the animal you took on camera gives you the opportunity to find out also the animals the machine cannot find in its database. If you are not sure whether the animal on your photo exists on scientifical records, the Classifier is your solution!
You might be wondering how do you concretely use this AI and where you can find it. Here is a sort of tutorial for those who would like to code it themselves.
On the ml5 Classifier web page that you can find just here : they give you the code to a quickstart with the AI, helping you get the identification of the animal:First of all, you need to define the id in you html where you want the result to appear. I called mine "animals". You create also a link with Classifier through Mobile Net:
Then you code the AI so that you ask for a prediction to be made - For example, the prediction that "this animal is a cat":
Afterwards, you programm it so that with the results, the probability of these results is displayed too:
You ask the results to be displayed on the screen after the programm has been run
You can also add a function for drag and dropping your images:
That's it, you've just programmed a successful Artificial Intelligence !
There are a lot of ressources on the magic world of Internet that can help in your exploration of taxonomy and Artificial Intelligence.
If you are brave and dedicated, you can try reading Darwin's On the Origin of Species where you might find a better understanding of the proces of evolution and how taxonomy and the study of animals' characteristics helped the quest for our own identity (but careful not to simplify Darwin's thesis with our 21st century brains and a posteriori ways of thinking)
On the matter of Artificial Intelligence, I truly recommend listening to David Schiffman's tutorials that helped me understand the whole process of attributing a tag to an image: David Shiffman, Our Lord and Savior
And here's a link to the ml5 Library for future projects ! ml5 Friendly Machine Learning for the WebSince there are still species to discover, you should also check out the list of existing animals and the number of animals left to discover: How many species are there left to be discovered?