Professional Documents
Culture Documents
Object Confidence Loss
Object Confidence Loss
The above loss is with respect to object confidence error. Here C is the actual
object confidence score, which is equal to one and \hat{C}C^ is the intersection
over union between predicted and ground truth box.
1_{noobj}1noobj is one when there is no object in the cell and zero otherwise.
The parameter \lambdaλ that you have seen in the dimension loss and in this
formula is used to differentially weigh the parts of loss function.
Keras
Keras API is built on top of TensorFlow.
It is more user friendly and easier to use when compared to TensorFlow.
For now, we will use only a few APIs of keras for Object detection.
You will learn more on keras in transfer learning.
Output Tensors
For the sake of computation, we rearrange the yolo out dimension as:
o box_confidence: tensor of shape (19 \times 19, 5, 1)
(19×19,5,1) containing p_cpc (confidence probability that there's some
object) for each of the 5 boxes predicted in each of the 19x19 cells.
o boxes: tensor of shape (19\times 19, 5, 4)(19×19,5,4) containing (b_x,
b_y, b_h, b_w)(bx,by,bh,bw) for each of the 5 boxes per cell.
o box_class_probs: tensor of shape (19 \times 19, 5, 80)
(19×19,5,80) containing the detection probabilities (c_1, c_2, ...
c_{80})(c1,c2,...c80) for each of the 80 classes for each of the 5 boxes
per cell.
4 of 10
Probability Score
Now in each grid cell for each of the five predicted anchor box we compute the
probability score that the box contains a certain class.
This is computed by multiplying the confidence score p_cpc of an anchor box
with its corresponding class probabilities.
This score is computed for each anchor box in entire 19 x 19 grid cells.