![]() ![]() The biggest limitation is that YOLO predicts a single class per grid cell and will not work well if multiple objects of different kinds are present in the same cell. This is done by computing the intersection over union (IOU see Figure 4-7) between all ground truth boxes and all predicted boxes within a grid cell, and selecting the pairings where the IOU is the highest. But pairing these predictions with ground truth boxes requires more care. If you look back to Figure 4-5, you can see that it’s easy enough for each grid cell to predict 10 or 15 ( x, y, w, h, C) coordinates instead of 5 and generate 2 or 3 detection boxes instead of 1. However in the YOLO architecture, the number of detection boxes per grid cell is a parameter. A ground truth box and a predicted box are paired if they are centered in the same grid cell (see Figure 4-4 for easier understanding). ![]() In the YOLO architecture, if each grid cell predicts a single box, this is straightforward. The first step, though, is to correctly pair ground truth boxes with predicted boxes so that they can be compared. During training the network predicts detection boxes, and it has to take into account errors in the boxes’ locations and dimensions as well as misclassification errors, and also penalize detections of objects where there aren’t any. ![]() In object detection, as in any supervised learning setting, the correct answers are provided in the training data: ground truth boxes and their classes. The authors of the YOLO paper argue that the fully connected layer actually adds to the accuracy of the system. You can then reshape the 420 values into a 7x5x12 grid, and apply the appropriate activations as in Figure 4-5. However, there is an easier way: flatten whatever feature map the convolutional backbone is returning and feed it through a fully connected layer with exactly that number of outputs. If you control the convolutional stack, you could try to tune it to get exactly 7 * 5 * 12 (420) outputs at the end. Then, for each grid cell, five values are needed to predict a box ( x, y, w, h, C), and seven additional values are needed because, in this example, we want to classify arthropods into seven categories (Coleoptera, Aranea, Hemiptera, Diptera, Lepidoptera, Hymenoptera, Odonata). The 7 * 5 is because we chose a 7x5 YOLO grid. In the example from Figure 4-4, it must contain exactly 7 * 5 * (5 + 7) values. Tanh outputs values in the range, while the sigmoid function outputs them in the range.Īn interesting practical question is how to obtain a feature map of exactly the right dimensions. The tanh and sigmoid activation functions. Some examples are shown in Figure 4-3.įigure 4-6. ![]() The dataset contains seven categories-Coleoptera (beetles), Aranea (spiders), Hemiptera (true bugs), Diptera (flies), Lepidoptera (butterflies), Hymenoptera (bees, wasps, and ants), and Odonata (dragonflies)-as well as bounding boxes. In this section, we will be using the Arthropod Taxonomy Orders Object Detection dataset (Arthropods for short), which is freely available on. To extract it, we will build more complex architectures called feature pyramid networks (FPNs) and illustrate their use with RetinaNet. However, a lot of important information is also contained at intermediate levels in the convolutional backbone. That’s the YOLO (You Only Look Once) approach, and we will start there. The simplest approach is to add something to the end of a convolutional backbone to predict bounding boxes around detected objects. On the contrary, for object detection, we will add elements to the convolutional stack to extract and refine the location information and train the network to do so with maximum accuracy. A picture of a butterfly is classified as such wherever the butterfly appears in the image. They are trained on an objective where location does not matter. But in classification problems, the networks make no use of this information. The convolutional backbones from Chapter 3 already extract some location information. In fact, convolutional layers do identify and locate the things they detect. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |