pjreddie / darknet

Convolutional Neural Networks
http://pjreddie.com/darknet/
Other
25.84k stars 21.33k forks source link

Unable to train the network with the pre-trained weights except for darknet19_448 #1678

Open prateekgupta891 opened 5 years ago

prateekgupta891 commented 5 years ago

I was trying to train a modified yolo network with some pre-trained weights for the given network only. But it's doesn't train and directly saves the weights. image

But if i give darknet19-448.conv.23 as the training weights (which surely are for different network configuration), it starts training. image

It even trains if i try grounds up training, without giving any pre-trained weights. image

Still if i try some other pre-trained weights like (Alexnet and Yolo) it doesn't train and directly saves the weights. image image

I hope somebody can tell me what am i doing wrong? Because the pre-trained weights for my custom network works well enough to detect the objects.

AlexeyAB commented 5 years ago

You reached maximum iterations, so training is stopped immediately..

Increase max_batches= in cfg-file or use flag -clear

joeljosephjin commented 4 years ago

I have same problem. upon typing - ./darknet detector train data/obj.data yolov2-obj.cfg yolov2.weights

Output - 30 conv 95 1 x 1/ 1 13 x 13 x1024 -> 13 x 13 x 95 0.033 BF 31 detection mask_scale: Using default '1.000000' Total BFLOPS 28.246 Loading weights from yolov2.weights... seen 32, trained: 32013 K-images (500 Kilo-batches_64) Done! Loaded 32 layers from weights-file Learning Rate: 0.001, Momentum: 0.9, Decay: 0.0005 Saving weights to backup//yolov2-obj_final.weights

joeljosephjin commented 4 years ago

My training set has 1700 images. 44kb 640x360pixels

from yolo-obj.cfg - [net]

Testing

batch=64 subdivisions=16

Training

batch=64

subdivisions=16

width=416 height=416 channels=3 momentum=0.9 decay=0.0005 angle=0 saturation = 1.5 exposure = 1.5 hue=.1

learning_rate=0.001 burn_in=1000 max_batches = 28000 policy=steps steps=22400,25200 scales=.1,.1

joeljosephjin commented 4 years ago

And when I gave the flag -clear, the process got killed.

30 conv 95 1 x 1/ 1 13 x 13 x1024 -> 13 x 13 x 95 0.033 BF 31 detection mask_scale: Using default '1.000000' Total BFLOPS 28.246 Loading weights from yolov2.weights... seen 32, trained: 32013 K-images (500 Kilo-batches_64) Done! Loaded 32 layers from weights-file Learning Rate: 0.001, Momentum: 0.9, Decay: 0.0005 Resizing, random_coef = 1.40 608 x 608 Loaded: 1.464145 seconds Killed