1
$\begingroup$

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:

YOLO labels

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 and c1 , c2 , c3, but how do I extract pc 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.

$\endgroup$
0
$\begingroup$

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.

|improve this answer|||||
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.