The ground truth bounding box labels are created completely independent of what algorithms and loss functions will be applied to them later. So you will likely need to do some work for whatever application you are using. For YOLO, first you have to compute the optimal number of and shape of the anchor boxes. Then, you have to compute where in the image the center of the ground truth label is, what grid cell it will fall into, and which anchor box has the highest IOU. You also need to convert the coordinates, and assign them to the correct grid cell + anchor box ‘detector’ location. I think I put a code fragment showing these steps into older threads you can find with search. Below are 2 that might be useful. HTH