Section outline

    • In this tutorial, we’ll explore how to perform object detection and recognition in images. We will train an AI model able to identify what you want and draw a bounding box around it.

      Once trained, the model will be able to do this:

      Exemple de résultat

      So we will have a tool that is not only capable of locating something spatially but also of recognizing it.

      Model training

      To train an artificial intelligence model to recognize something, you need to provide it with images where the subject of interest has already been framed through human intervention. This is what we call an annotated image. A prerequisite for this training is therefore to have a large image database. The number of images the model needs is not fixed, so you can refer to this dedicated documentation: How Many Images Do You Need to Train a Model?

      The first step is to annotate these images. This involves manually framing what you want the model to learn on all the images in your database. This step is tedious but essential to train our model. It is possible that you may find pre-annotated databases online, but if your subject of interest is very niche, this remains unlikely.

                   

      Vocabulary Note

      The subjects of interest must have a name that designates their category, which we call a class. For example, you can have a "cat" class and a "dog" class, but you can also have a more specific class like "Australian Shepherd" or "Weimaraner". You can choose absolutely anything, whether it is very general or very specific.

      We will now frequently use the word "class," so it’s important to remember that this term simply refers to the categories of objects we want to detect.

             

      Another key point : once the model is trained on specific data, it will only perform well on data similar to the training data. For example, if your only class is "cat" and your training data only includes images of cats in the snow, the model may fail to recognize cats in a meadow for exemple. Make sure your dataset reflects what you need the model to detect.

      Chat Rouge Animal Domestique - Photo gratuite sur Pixabay - PixabayFonds d'ecran Chat domestique Neige Noir Patte Animaux télécharger photo