Kamel BOUYACOUB
Kamel BOUYACOUB

Reputation: 647

How Yolo calculate P(Object) in the YOLO 9000

Currently I am testing the yolo 9000 model for object detection and in the Paper I understand that the image is splited in 13X13 boxes and in each boxes we calculate P(Object), but How can we calculate that ? how can the model know if there is an object in this boxe or not, please I need help to understand that

I am using tensorflow

Thanks,

Upvotes: 8

Views: 2292

Answers (4)

fetulhak abdurahman
fetulhak abdurahman

Reputation: 58

During test time the YOLO network gets the IOU from the default setted value. That is 0.5.

Upvotes: 0

SamShady
SamShady

Reputation: 466

There are 13x13 grid cells, true, but P(object) is calculated for each of 5x13x13 anchor boxes. From the YOLO9000 paper:

When we move to anchor boxes we also decouple the class prediction mechanism from the spatial location and instead predict class and objectness for every anchor box.

I can't comment yet because I'm new here, but if you're wondering about test time, it works kind of like an RPN. At each grid cell, the 5 anchor boxes each predict a bounding box, which can be larger than the grid cell, and then non-maximum suppression is used to pick the top few boxes to do classification on.

P(object) is just a probability, the network doesn't "know" if there is really an object in there or not.

You can also look at the source code for the forward_region_layer method in region_layer.c and trace how the losses are calculated, if you're interested.

Upvotes: 0

Tejus Gupta
Tejus Gupta

Reputation: 165

They train for the confidence score = P(object) * IOU. For the ground truth box they take P(object)=1 and for rest of the grid pixels the ground truth P(object) is zero. You are training your network to tell you if some object in that grid location i.e. output 0 if not object, output IOU if partial object and output 1 if object is present. So at test time, your model has become capable of telling if there is an object at that location.

Upvotes: 4

Shamane Siriwardhana
Shamane Siriwardhana

Reputation: 4201

As they mentioned in the paper(2nd page section 2) confident score is = P(object) * IOU. But in that paragraph they have mentioned that if there's an object then confident score will be IOU otherwise zero. So it's just a guide line.

Upvotes: 0

Related Questions