AlexeyAB / darknet

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

About pre-trained model for fine-tuning #3283

Open ChenCong7375 opened 5 years ago

ChenCong7375 commented 5 years ago

Dear Alexey, Now I want to fine-tune on my little dataset,but I designed my net by myself. So how should I get pre-trained model? Should I train my net on imagenet1k or VOC07+12 then partial the weight using command line? And where can I find [imagenet1k.train.list] and [imagenet1k.valid.list]?

AlexeyAB commented 5 years ago

@ChenCong7375 Hi,

I designed my net by myself.

You should create classification network that has the same first several layers as in your detection net. Then train this classification net on Imagenet. Then do partial for the same layers.

ChenCong7375 commented 5 years ago

@AlexeyAB Morning, Could you please tell me how long did you train your nets? About one week? I have a Titan Xp and i7-8700k.

ChenCong7375 commented 5 years ago

@AlexeyAB Moreover, How can I get [imagenet1k.train.list] and [imagenet1k.valid.list]? Should I create it? I downloaded the ILSVRC2012 but I am at a loss as to what to do.

AlexeyAB commented 5 years ago

About one week?

Yes, more or less.

If you already downloaded ILSVRC2012_img_train.tar then un-comment all lines except wget in this script and run it: https://github.com/AlexeyAB/darknet/blob/master/scripts/windows/windows_imagenet_train.sh

And train the classifier on ILSVRC2012: ./darknet classifier train cfg/imagenet1k.data cfg/darknet53_448_xnor.cfg darknet53_xnor.conv.74 -topk

lp-094 commented 5 years ago

Whether to need classification pre-training on imagenet after changing the network structure? thank you