A question about computing probability (Pc) of an object being in a grid cell

In course-4 week-3 lecture titled “non-max suppressions”, Andrew explains that probability (Pc) of an object is used to do determine the grid cell in which an object is centred. A couple of questions:

  1. First of all, how the probability is computed? I could not find the definition. I am sorry, if I missed it.
  2. What if two boxes have the highest probability and have a high (> 0.9) IoU? I think this can happen if the grid cells are small and two 2 cells very close to each other detect the same object.

Please help me understand. Thank you!

That probability isn’t ‘computed’ per se. In the ground truth data, p_c is either 0 (no object present) or 1 ( object present). No uncertainty. The predicted \hat{p}_c is derived directly from the numeric values output by the network. Training attempts to minimize the error between ground truth (either 0 or 1) and predicted - some floating point number 0. \le \hat{p}_c \le 1. But the computation behind \hat{p}_c is the activation function in the output layer, not what you learned in Statistics.

Your intuition about possible duplicates is entirely correct. High IOU is interpreted as ‘duplicate prediction’ so the prediction with the lower confidence, ie ‘not’ the ‘maximum’, is ‘suppressed’ by the appropriately named Non-max suppression algorithm.

Also, you write

That isn’t precisely correct. p_c is the prediction that an object is present or not, but the grid cell location is derived from a different mechanism. Maybe he just meant that if p_c is low for a given location, then we say there is no object centered there. While if p_c is high (ie above a threshold) for a given location we say there is an object centered there. It’s the mechanism for getting that ‘given location’ that is not part of the information of p_c itself.