I am trying to build a custom Object Detection model which can detect guns from a given image. The dataset is from here.
The dataset has a good number of images and each image has 4 coordinates of bounding boxes with it. I recently read about YOLO and the structure of its labels is as follows:
I need to get this label for every grid cell of the input image. The dataset which I have contains coordinates for the object and not a grid cell in the image.
Also, I can manage to get
bx, by, bh, bw
andc1 , c2 , c3
, but how do I extractpc
for training from the dataset?
I will like to build a YOLO model from scratch but I don't know how to transform the dataset so that I can train a YOLO on it.