Jumabek / darknet_scripts

Auxilary scripts to work with (YOLO) darknet deep learning famework. AKA -> How to generate YOLO anchors?
223 stars 96 forks source link

Calculating anchor on custom dataset #24

Open JesusRH97 opened 3 years ago

JesusRH97 commented 3 years ago

Hey. I have my own dataset labelled as .xml and .txt files and was I wondering how to use this repository to calculate best anchor boxes for YoloV2. Thanks in advances.

Jumabek commented 3 years ago

Hi @JesusRH97 you should provide width and height of the bounding boxes in np array format: You can do that by modifying main function in gen_anchors.py

Please make sure annotation_dims is width and height of bounding boxes for your custom dataset: https://github.com/Jumabek/darknet_scripts/blob/master/gen_anchors.py#L145