Megvii-BaseDetection / YOLOX

YOLOX is a high-performance anchor-free YOLO, exceeding yolov3~v5 with MegEngine, ONNX, TensorRT, ncnn, and OpenVINO supported. Documentation: https://yolox.readthedocs.io/
Apache License 2.0
9.31k stars 2.19k forks source link

Tips for training model on tiny objects with area size 8 - 32 pix. #1043

Open Michelvl92 opened 2 years ago

Michelvl92 commented 2 years ago

Hi, do you have some tips for optimized training a model that should detect tiny objects, such as the tiny person?

When training a yolox-x (your coco pre-trained model) for 300 epochs with standard settings, I am getting an AP of 60. While training yolov5x for 300 epochs with fine-tune hyperparameters, I am getting an AP of almost 80.

What could be a huge difference? Since at an IoU setting of 25 for evaluation, I achieved higher AP scores, so I expected that an anchorless would therefore perform better.

frandoLin commented 2 years ago

Hi, Michael. I am using yolox-s but suffering the APs I've currently gotten. Could you share a bit how you made the fine-tune hyperparameters to boost the model? In terms of setting a lower IoU to get a higher AP, that just make very sense to me. Is that only thing you changed to gain better results?

BowieHsu commented 2 years ago

@Michelvl92 @frandoLin Hi, I trained a lot of model based on yolov5 and yolox, in my option, you should print the variable "num_fg_img" calculate in the SimOTA, this variable is the anchor number learned by yolox from the datasets, if you want the performance from yolox the same as yolov5, after a few epochs, the "num_fg_img" should be 8~9, because the yolov5's anchor number is 3 * 3 = 9,you can check this first