AlexeyAB / darknet

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

Training with other pre-trained models #389

Open ahsan856jalal opened 6 years ago

ahsan856jalal commented 6 years ago

Can I use darknet19.weights or extraction.weights etc instead of darknet19_448.conv.23 For example : ./darknet detector train cfg/own_data.data cfg/yolo_based_own_cfg.cfg darknet19.weights -gpus 0,1,2

AlexeyAB commented 6 years ago

So you should use pre-trained weights with the same first layers as in your cfg-file.

Also you can train without pre-trained weights, then initial weights will be random. ./darknet detector train cfg/own_data.data cfg/yolo_based_own_cfg.cfg -gpus 0,1,2

ahsan856jalal commented 6 years ago

Thank you sir, one last question. I tried to search in your github but couldn't get that sort of problem. When I was running training last week, everything was working fine and training ends on my desired iteration. But this week ehen I run training on the same dataset with same command , after ~3k iterations, my code stops with error Couldn't open file:/....../file1. Txt . . ............................. .. /file2.png But these files are present and obviously used in earlier iterations. Even when I restart training using weights. Backup, it stops after some thousand of iterations. Is this the problem with cudnn?

On 15 Feb 2018 6:22 pm, "Alexey" notifications@github.com wrote:

-

If your cfg-file based on yolo-voc.2.0.cfg, then you should use darknet19_448.conv.23 pre-trained weights

If your cfg-file based on tiny-yolo-voc.cfg, then you should use tiny-yolo-voc.conv.13 pre-trained weights, that you can get using command darknet.exe partial tiny-yolo-voc.cfg tiny-yolo-voc.weights tiny-yolo-voc.conv.13 13

So you should use pre-trained weights with the same first layers as in your cfg-file.

Also you can train without pre-trained weights, then initial weights will be random. ./darknet detector train cfg/own_data.data cfg/yolo_based_own_cfg.cfg -gpus 0,1,2

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/AlexeyAB/darknet/issues/389#issuecomment-365925496, or mute the thread https://github.com/notifications/unsubscribe-auth/AK9zjrDPPKhWrinF9guTsKrcgoXUroKxks5tVC-WgaJpZM4SE1fy .

LEXUSAPI commented 5 years ago

@AlexeyAB when i using this type(./darknet detector train cfg/own_data.data cfg/yolo_based_own_cfg.cfg .) to train VOC+07+12 in detection mode ,it is never get the good result ,even if train times more than 10000! ,but when using ./darknet detector train cfg/own_data.data cfg/yolo_based_own_cfg.cfg tiny-yolo-voc.conv.13 is all ok .

it is with random weights ? when using random weights ,the net can not get the direction to down?

and the per-train can get form a single classfier net to train ? like simple cifar10 minst ?