rafaelpadilla / darknet

Useful functionalities added on the original darknet public repository.
Other
36 stars 17 forks source link

bounding boxes cordinates help urgent #2

Closed nikhiljaiswal closed 6 years ago

nikhiljaiswal commented 6 years ago

the bounding box file which is created contain 5 cordinates instead of 4 apart from the id. what does they represent? as u mentioned : The values representing a bounding box are: id relative_center_x relative_center_y relative_width relative height.

but there are 5 instead of 4. 0 0.806619 0.345010 0.666073 0.062282 0.051545

what does they represent. I want to crop the image from the detected region. How can I do this?? Please help

rafaelpadilla commented 6 years ago

Dear @nikhiljaiswal,

Sorry for not answering you before. Somehow I am not receiving this open issues alerts.

The values on the output _dets.txt files are: class id, confidence, relative center x, relative center y, relative width, relative height.

I corrected the documentation, so it is also explained :smiley:

In order to crop the image, you will need the last 4 values (relative center x, relative center y, relative width, relative height). As these values are relative bounding boxes, use this python deconvert function to obtain the absolute bounding boxes values.

Thanks for your feedback!