Creating an Object Detection model with images and coordinates of bounding boxes
So, I found the answer myself. Basically, if the grid cell contains the centre of the bounding box then the grid cell will have a $p_c$ of 1 otherwise 0 if there is no object.