How to label training data for YOLO
In effect, the midpoint is contained in cell $2$. Cells $1,3,4$ will be shown at $P_c=0$ according to the YOLO algorithm, which only takes in count the cell that contains the midpoint and calculates the bounding box, as you mentioned, with $b_y b_x, b_y, b_h, b_w$. With the proposition of $Y = [1, 0.9, 0.1, 2, 2]$, I would think that if you take the point $(0,0)$ as the left-upper corner, $Y$ would be more likely to be $Y = [1,0.2,0.57,0.21,0.15]$, being calculated with a grid of $19 \times 19$.