May 8, 2025
Trending News

Train your first AI model – free and no code!

  • April 7, 2023
  • 0

Training an AI model sounds like a really complicated thing, right? Make no mistake, this is usually a complex activity that requires knowledge of programming, mathematics, statistics, etc.

Train your first AI model – free and no code!

Training an AI model sounds like a really complicated thing, right? Make no mistake, this is usually a complex activity that requires knowledge of programming, mathematics, statistics, etc. We will also need a good dataset with the necessary digital assets for both training and model validation. And of course we also need to have an extensive set of tools and the necessary hardware to use them. That said, unless you’re a professional in the field, everything sounds too complicated for mere mortals.

Cloud services help reduce this list of requirements, or rather allow you to move part of them to the cloud (for a small price, of course). Amazon AWS, Microsoft Azure, and Google Cloud offer toolkits and resources that make things a little easier. However, what is still needed is a broad knowledge base, as well as the necessary budget to cover the costs of using the aforementioned cloud services. We are not talking about a high bill if we limit ourselves to conducting personal tests, but as a rule, it is not free.

However, there are some services that allow us to take the first steps in this area, some of which are free and there are also options zero code, that means we won’t have to write a single line of code to use them. Of course, this will not give us detailed information about how the model works, but it will give us a first contact, which can be the most rewarding. If you want to go through that first experience, then We’ll tell you how to train your first AI model without using code and completely free.

Train your first AI model with Teachable Machine

As I said before, we will be using a free service from Google to train the model using supervised learning (if you don’t know what that means, you can see it here). The Teachable Machine is a model designed to distinguish and classify images, sounds and posture, and we can use datasets or our own webcam for training.

In this example we will do a very common exercise, cat and dog classifier. Therefore, we need a good dataset with images of both types of pets. But don’t worry, you won’t have to spend hours searching for the images you need, because we can find many datasets already prepared and ready for download on the Internet. For this example, we’ll use Arsh Anwar’s Cat & Dogs dataset, which you can download for free from Kaggle. Once the file is downloaded, unzip it and you will see that it consists of several folders with many pictures of cats and dogs:

Train your first AI model - free and no code!

Now go to Teachable Machine through this link and on the page that opens, click on the “Getting Started” button. This will take you to a page where you will need to select the type of content you want the model to know how to classify. In this case, you will need to select “Image Project” and then “Standard Image Model”. This will take you to the model settings:

Train your first AI model - free and no code!

Classes are, as you can deduce, different classification options, in this case “cat” and “dog”. Although this won’t affect how the model works, you can rename them to better identify them and make the AI ​​output clearer once it’s up and running. To do this, click on the pencil icon that appears to the right of each name and insert Cats into one and Dogs into the other.

The next thing is, you can imagine, to start uploading images for training. Now, at this point, you need to consider that the Teachable Machine will be using your PC’s resources to process the training. What does it mean? If you upload thousands of images, the process can take forever. For the first test, you can start by using a hundred or two hundred images from each category. If you verify that your system will process them in a reasonable amount of time, you can repeat the process with more images of each type. It is obvious that the more images you use in training, the higher the success rate of the model will be.

Cleared, let’s get to the pictures. Click the “Upload” button on the first of the two classes and drag the required images from the dataset/training_set/cats folder (if you put the kittens first, otherwise you’ll have to go to the dogs subfolder of course). Then repeat this process with the second class and the images that correspond to it. The result should be something like this:

Train your first AI model - free and no code!

In this example, we only use two classes to keep things simple, but as you can see, you can add more if you want the AI ​​model to be able to distinguish between multiple types of features. So, with everything set up, it’s time to get the model to learn from the labeled data in the dataset. To do this, click the “Prepare Model” button, keep this tab open and do not use the computer for any other purpose during the process.

During the process, you will more than likely see this browser message:

Train your first AI model - free and no code!

If you press wait it will reappear soon so the best thing to do is leave it there as it will disappear after the preparation phase is over. Of course, do not change the bookmark or the browser window in the operating system and do not click “Exit page” in any case. In a few minutes (the time will depend on the number of images you have selected and the technical specifications of your PC) the training will start and you will be able to monitor its progress along with the time spent so far. After the process is complete, the page will look like this:

Train your first AI model - free and no code!

So now comes the moment you’ve been waiting for, let’s test your model! In the section on the right, make sure the input selector is activated, click the arrow that appears to the right of the webcam and select “File”. After that, the webcam image field will change to show a file upload section that you can use in the same way as the image upload section for different classes. It uses the cats and dogs subfolders of the “Test_sets” directory for this test. We use different folders to avoid using the same images in the training and validation process.

When you upload an image, it will appear in this section and below it you will be able to see the percentage of the image for each of the defined classes, for example

Train your first AI model - free and no code!

Repeat this process as many times as you want to verify that the model is working correctly, or if you find errors, you can retrain it with a larger set of images.

!! Congratulations!! You have now trained your first AI model. As you can see above, you can export the model you just created. And what can you do about it? We will tell you about that soon, in one of the future articles.

Source: Muy Computer

Leave a Reply

Your email address will not be published. Required fields are marked *