15. Wildcard Week

For this wildcard week, I decided to train an artificial intelligence to be able to recognize among unicorns, dogs, cats, and everything else to be treated as background nothing.

Research

Artificial intelligence (AI) is a field of computer science focused on creating systems capable of performing tasks that typically require human intelligence. This includes visual perception, speech recognition, decision-making, and learning. Machine learning, on the other hand, is a discipline within AI that concentrates on developing algorithms and models that enable machines to learn and improve from data without explicit programming. In essence, while AI refers to the broader field of creating intelligent systems, machine learning is a key technique used within AI to enable systems to learn and adapt automatically based on experience.

In simple terms, machine learning is a branch of artificial intelligence that focuses on developing algorithms and models that enable computers to learn how to perform specific tasks without being explicitly programmed for each one.

Instead of following step-by-step instructions, as would be done in traditional programming, in machine learning, algorithms use data to learn patterns and make predictions or decisions. These algorithms are trained using input datasets, which consist of input examples and the expected output, and through iterations, they adjust their internal parameters to improve their performance on the specific task.

There are several types of machine learning, including supervised learning, where the algorithm is trained on a set of labeled data, unsupervised learning, where the algorithm finds patterns in unlabeled data, and reinforcement learning, where the algorithm learns through interaction with an environment and the feedback it receives.

What I'm going to try is an object classifier, and I used the Teachable Machine platform. You can try it by clicking on START.

Teachable Machine Image Model

Steps to create your machine learning model

  1. Open the Teachable Machine website. Select what type of learning you want to perform; this website gives you the option between images, sounds, and poses. In this case, I selected images; the website itself provides instructions.
  2. One of the steps you must take is to name each class what it will identify (it's not like the AI will know what it is, but at the moment of learning, it will understand that what it sees in the images is called that).
  3. After taking the videos or uploading the images, it should look like this. The more images the AI has, the better the result will be. Keep in mind that it's a good idea to include a class for "nothing" to represent the background, so the AI understands that you want to identify the object and not the background.
  4. Press the "Prepare Model" button so that the website can assist you in processing the images. It's important to mention that you should have rotated the objects in various directions for the AI to better understand. Also, keep in mind that all the data is being processed in the browser, so it might take some time, and you should keep that tab open during this process.
  5. Once finished, you can test with objects you haven't taught it to see if it has learned correctly or to verify if the ones you taught it work well.
  6. To place the representation in my documentation on this page, as you could see at the beginning, select the "Export Model" button.
  7. It will give you the following option, in which to include it in the documentation of this website, I selected the JavaScript option.
  8. The code provided, I pasted it into my documentation that I do in Visual Studio.

Problems and how I fixed them

As you can see, it doesn't detect what some of the images are, it can get confused, so the solution is to give it more images so it can learn better.

Data processing again.


Files

  • If you want to download the files to obtain this machine learning, you can do it through the following link.