AlexeyAB / darknet

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

set max_batches in cfg file #3863

Open LifeIsSoSolong opened 5 years ago

LifeIsSoSolong commented 5 years ago

I want to trian a person detector, so my classes = 1, I set max_batches=2000. After training 2000 iterations, I find the loss could decrease, So I set max_batches=20000.

My question is how to set max_iterations according to following condition: (1)my detector only detect one class (2)train dataset about has 10w images (3)GPU storage is 8G, and the biggest batchsize I can set is 2 (batch=64, subdivision=32)

batch_size=2, so 2w iterations only use 4w images, however my dataset has 10w images...So I have to set max_batches=50000 and this means training 1epoch? I don't know my compresion is right or not. Who can give me some advice in setting max_batches? Thanks~

AlexeyAB commented 5 years ago

max_batches=2000xClasses but not less than 4000 The more - the better

LifeIsSoSolong commented 5 years ago

max_batches=2000xClasses but not less than 4000 The more - the better

Thanks, but I want to know whether my comprehsion is right or not : batch_size=2, so 2w iterations only use 4w images, however my dataset has 10w images...So setting max_batches=50000 means training 1epoch? :+1: