[DLS Course 4 W3] Question about class score calculation

I have a question about class score.
It looks redundant for me.
Why pc is needed?
Cannot model learn directly each class scores?
[bx, by, bh, bw, c1, c2, c3] is not enough?

Hi NobuhitoKurose,

As you can see in the YOLO algorithm lecture, pc serves to distinguish values of [bx, by, bh, bw, c1, c2, c3] that refer to an object from values of [bx, by, bh, bw, c1, c2, c3] that are just noise. The latter occurs when there is no object in the bounding box. During prediction, pc is a probability (i.e. it will unlikely be exactly 0 or 1). Thus, pc is the probability that the values of [bx, by, bh, bw, c1, c2, c3] are relevant and it indicates how relevant these values are, which is why you need a multiplication.

Now the chance of there being an object of type c1 is equal to P(object&c1) = P (object) * P(c1|object). If P(object) is small, this will be a small value which will be suppressed. In calculating P(object&c1) we can therefore take P(object)*P(c1) as the relevant value to be used, as P(c1) is only relevant when there is an object.

I hope this clarifies.

Thank you for your reply.
I still don’t fully understand why pc is required.
For example, can not model learn like when there is no object, output is [bx, by, bh, bw, 0, 0, 0], when there is c1 object, output is [bx, by, bh, bw, 1, 0, 0] ?
It means c1, c2, c3 are probability.
If so pc is not needed?

During prediction, the model calculates a probability whether there is an object. This is not 0 or 1, but some value in between. This value is relevant to calculate the chance that there is an object of a certain kind, which is calculated by multiplying the chance that there is an object times the chance that the object is of a certain kind.

How is c determined as a probability value? Also, for the training set, how does c1, c2 etc get assigned probabilities?