WongKinYiu / PyTorch_YOLOv4

PyTorch implementation of YOLOv4
1.86k stars 585 forks source link

Puzzle Issue for Genetic Algorithm #43

Open Alan-D-Chen opened 3 years ago

Alan-D-Chen commented 3 years ago

Dear Profess Bochkovskiy, Profess Wang, Profess Liao, I read your paper with respect, YOLOv4: Optimal Speed and Accuracy of Object Detection. And I have an issue about

We select optimal hyper-parameters while applying genetic algorithms in your paper. Does it mean that we select optimal hyper-parameters for YOLO v4 with the help of genetic algorithms? AND could you do me a favor? What are your hyper-parameters? (learning rate? batch size?) How do you design Fitness function? Is the Fitness function mAP or AP?How do you design Fitness function? Is the Fitness function mAP or AP? I mean that GA is just like a self-learning system and the fitness function give feedback for combinations of different hyperparameters(or gene).Time of calculation for mAP or AP is huge and then taking mAP or AP(the result of YOLO v4) as the fitness function is unrealistic.

I am looking forward to your answer (English,Traditional Chinese and Simplified Chinese are available.)

Alan D.Chen Tongji University

WongKinYiu commented 3 years ago

Fitness function: weighted sum of Recall and AP50. Hyper-parameters: lr0, iou_t, momentum, weight_decay, hsv_s, hsv_v, translate, scale, fl_gamma more details

Alan-D-Chen commented 3 years ago

Thanks a lot for your help! @WongKinYiu

Octadeshays commented 3 years ago

HI! I have a question about this. Is the GA only implemented in the Pytorch version of Yolov4 or is it also implemented in Darknet? I am working on Darknet and I would like to know if this GA is being used in my trainning.

@WongKinYiu

I thank you in advance for your time!

Octavio, National University of Cuyo.

WongKinYiu commented 3 years ago

GA training is original implemented in the Pytorch version yolov3 and be also used in here. GA results can be used no matter for Pytorch or Darknet.

the hyperparameter of yolov4 is searched by GA. https://github.com/AlexeyAB/darknet/blob/master/cfg/yolov4.cfg#L1140-L1158