AlexeyAB / darknet

YOLOv4 / Scaled-YOLOv4 / YOLO - Neural Networks for Object Detection (Windows and Linux version of Darknet )
http://pjreddie.com/darknet/
Other
21.59k stars 7.95k forks source link

How to use CmBN/self-adversarial mentioned in yolov4? #5377

Open yinruiying opened 4 years ago

ly0303521 commented 4 years ago

https://github.com/AlexeyAB/darknet/issues/5117# self-adversarial

vb123er951 commented 4 years ago

Does there have answer for "how to use CmBN?" I try to use CmBN on cspdarknet53 I change all the batch_normalize=1 in cfg file to batch_normalize=2, but the IOU and GIOU always 0, like this: 擷取

yinruiying commented 4 years ago

Does there have answer for "how to use CmBN?" I try to use CmBN on cspdarknet53 I change all the batch_normalize=1 in cfg file to batch_normalize=2, but the IOU and GIOU always 0, like this: 擷取

I try batch_normalize=2 in my cfg, and the training process is normal. image

vb123er951 commented 4 years ago

Does there have answer for "how to use CmBN?" I try to use CmBN on cspdarknet53 I change all the batch_normalize=1 in cfg file to batch_normalize=2, but the IOU and GIOU always 0, like this: 擷取

I try batch_normalize=2 in my cfg, and the training process is normal. image

Your log shows you are using ciou? Do you change any other settings? Can you tell me what pretrained weight you use and share your cfg with me? Thank you very much.

yinruiying commented 4 years ago

I use the pretrained weight trained on my own dataset many times. Just changing batchnorm=2, the best_map increase .8%. darknet53-yolov3_20200604.cfg.txt

yinruiying commented 4 years ago

5117

self-adversarial

Thanks!I'll try it.

kairavpatel commented 3 years ago

I use the pretrained weight trained on my own dataset many times. Just changing batchnorm=2, the best_map increase .8%. darknet53-yolov3_20200604.cfg.txt

Awesome result!! Anyone has an idea, how many previous iterations are considered to calculate current statistics, while using CmBN? @AlexeyAB

AlexeyAB commented 3 years ago

Anyone has an idea, how many previous iterations are considered to calculate current statistics, while using CmBN?

This number is subdivisions in cfg file.

previous mini_batches inside one batch.

kairavpatel commented 3 years ago

Anyone has an idea, how many previous iterations are considered to calculate current statistics, while using CmBN?

This number is subdivisions in cfg file.

previous mini_batches inside one batch. Ok..Thanks..