Tianxiaomo / pytorch-YOLOv4

PyTorch ,ONNX and TensorRT implementation of YOLOv4
Apache License 2.0
4.47k stars 1.49k forks source link

What is Cfg.boxes in cfg.py? #471

Closed TA-Robot closed 2 years ago

TA-Robot commented 3 years ago

https://github.com/Tianxiaomo/pytorch-YOLOv4/blob/4ccef0ec8fe984e059378813e33b3740929e0c19/cfg.py#L55

Thank you for giving the super excellent library! I love pytorch-YOLOv4 so much!

i have one point question at changing configuration of model.

There is "boxes" parameter at cfg.py and I can't find any explanation of what is this "boxes" parameter suggest.

I want explanation for each config file's parameters.

RicRicci22 commented 3 years ago

Cfg.boxes refers to the maximum number of ground truth bounding boxes to keep from each image. For example if Cfg.boxes = 1 for each image you will only keep one ground truth bounding box (for training). If your image has 5 ground truth bounding boxes, the algorithm will only select one of this five. I think is set for a matter of concatenation, but I'm not sure.. I suggest you not to set this parameter too low, especially if your images contain a lot of objects, or the training will slow down! Bye

TA-Robot commented 2 years ago

thank you for great answer!

now, i will set this value big!