Same concept is used in YOLO v3, but instead of softmax activation for all classes, logistic regression is applied to each class (meaning there can be an object belonging to two classes)
So, at 1:49 we give the pc value to the 2nd anchor box because it had more IoU and not to the 1st. So to generalize, check if there's something worth in the grid; if there is, assign the associated pc value to anchor box with the highest IoU.
YOLO algorithm *CORRECTION* At time 5:00, for the slide titled "Outputting the non-max suppressed output" the text should read "For each grid cell" instead of "For each grid call".
@0:56 I think something is wrong. According to YOLO paper we have [S,S,(B * 5 + C)] which means each cell has C classes but here you said that each anchor box has C classes or [S,S,B*(5+C)].
[S,S,(B*5+C)] is YOLOv1. He is talking about YOLOv2. The two models are pretty different in input encoding and also in the definition of loss, if I understood correctly. fairyonice.github.io/Part_4_Object_Detection_with_Yolo_using_VOC_2012_data_loss.html
@@yumik4990 YOLOv1 predict 2 boxes for each grid cell. I saw that YOLOv1 doesn't predefine 2 anchor boxes but it predicts based on the grid cell. And YOLOv1 assign only 1 box to grid cell with object with the highest IoU in the training process. I don't know how we can do this in the training process. If we run 1-st epochs, box 1 can have higher IoU, but when we run 2-nd epoch, box 2 can have higher IoU.
This algorithm simplified the bounding box regression by having a 3x3 (or some other) grid output, right? What I didn't understand is how anchor boxes are used in this algorithm...
YOLO and faster R-CNN have something in common and that is anchor boxes which are used to simulate the famous commonly used image pyramids as we see in SVM classifiers conventional training. Regardless of why we use anchors, YOLO v2 uses 5 anchor boxes (instead of 9 , unlike Faster R-CNN) for each cell of the 3x3 grid here. Faster R-CNN uses 9 of them but not for each cell of the grid and slides them on conventional feature maps resulted from the intermediate layer of a CNN. As far as I understood, YOLO used 5 bounding boxes at each cell in the 13x13 output feature map and predicts 5 coordinates for each bounding box. Since they constrain the location prediction (by using grids that Faster R-CNN does not use) the parametrization is easier to learn and it makes the network more stable. Hope you got the point. ;)
Yeah I didn't get it too. It is just increasing the size of the output, instead of making one predictions per cell, now the algorithm makes two predictions per cell. I don't understand what is the purpose of predefined boxes here.
@@azharhussian4326 Did you get it in the end? Been through every post on the internet about anchor boxes and no one has come close to correctly explain how they are used in the process. Pretty frustrating.
I am not clear how will it's work at Inference time? How can I get model output BB into original image format? Kindly give me the mathematics how to compute it?
Bounding boxes are parameters to be learned/trained basically a continuous/regression output hence the bounding boxes change in size but not anchor boxes they are fixed in size
OK, so how many objects can one cell of YOLOv1 predict? The article says 'we only predict one set of class probabilities per grid cell regardless of the number of boxes'? It seems that the article skirts around the fact that the model can only predict at most 1 object/cell, but the wording above does not exclude, for example, the case when all B objects belong to the same class. So how many?
How is this grid cell segmentation actually encoded in the neural network? Is it encoded at all? If I understood correctly, the segmentation is only encoded into the training data, and the network is supposed to "learn" to output the y=3x3x16 that matches the locations of the objects relative to the grid cell on the training data. In other words, the network has no information about any image grid.
In the previous videos, its shown that the grid is actually the "cut down" version of the image after being through multiple convolution layers. That's the grid!
Let's say I have an object in 3 of the grid cells. Then, the outputs of all the 3 of the grid cells should be identical, with the same values of bx,by, bh,bw. Am I correct?
They often do, bh and bw ground truths are defined taking into account the size of the orignal image. Meaning that one object on a cell can have bh, and bw that go behind the boundaries of the cell. That's not a problem because you do regression towards these values. the cell serves only to mark where the object should be detected. If the center point of the object is one cell then, the target vector for that cell is the only one that will have bh bw x, y for that object.
Is someone else tell me training time we are using anchor box terminology become boundingbox in prediction time is that right?Prediction time acnhorbox not using only boundingbox right?
Yes you are correct.Anchor box is only used to see the IOU matching with the ground truth bounding box. If the value of IOU between anchorbox and ground truth box of particular object is greater than 0.5 then we will consider the anchor and for that classlabels are [object confidence as 1(object with which IOU>0.5),bounding box coordinates of that object,classlabel as 1 for that object and zero for remaining].
Thanks for the video, it brought me back to light:) I however still have a question: In the Yolo v1 paper it is described that the final convolutional output layer is a tensor of 7x7x1024 dimension (Darknet), then the detection follows, where grid cells dimension of 7x7 are defined. My assumption here is, since the dimension of the conv output the same as the grid cell's, can one say that one grid cell represents one pixel, hence the detection proceeds one 'pixel' at a time?
One grid cell represents a small 'crop' (e.g. 20x20 pixels) of the image, not necessarily a single pixel. Another thing to note: the algorithms processes all grid cells simultaneously in one shot. It doesn't process them sequentiall.
what happens when the expected training output was close to bounding box 1, but the output of the network was 2 and coordinates of the box on expected output were incorrectly marked close to 1 whereas they should have been close to 2
c1 c2 and c3 are the classification part of an algorithm. They basically mean 'if the bounding box intersects an object, what is its type'. During training, your data should be annotated, so each bbox should have position and class if applicable. When you train your nn, you check if a box is over some iou with an object, and if it is then you train c1 c2 c3 like any other classifier
I know I thought that too! Actually Andrew Ng is the founder of Deeplearning.ai so technically it isn't a reupload he must've just want to consolidate everything