Open xiaomage11 opened 6 years ago
It shoule be impossible. Now that you're training a new class, why not train three together?
@CBIR-LL I do not know how many classes in it in the frist time ,so i can not determine the classes of objects.I should add the new classes according to project needs.If i add new class,i should train all classes together,it well be so many jobs.
Check the previous data or configuration file to check the target category. If the previous data and the corresponding annotation information are still in, retrain, this will not take much time. At the same time, you can do other things...
The similar issue for me. I wonder that's possible if only pretrain just new one but having other classess which trained already? Thanks.
put stopbackward=1 after 2nd last convolution layer and change filters of the last convolution layer (before region layer) to 40 ([3+5]*5) and classes to 3 in region layer and run train
./darknet detector train data/obj.data cfg/yourcfg,cfg last_trained_weight_on_two_classes.backup
Make sure the new class has label '2' as previous two classes has labels '0 and 1' . stopbackward=1 in 2nd last layer will make sure that the weights before that layer won't change. This is called fine-tuning
Hi I tried to finetune the network but I failed. I used the yolov2.weights provided on the website as the initial parameter. Also, I active the flag stopbackward in the 22 conv layer (I just want to fine tune the last layer). Finally, I modified the .names, .data and the number of filters in the last layer. However, when I run the line to train the net, it just saves the yolov2.weights with the name I want to save my new weights. It doesn't report any error, but do not train anything.
Do you have any idea why this is hapenning? Thanks
I failed because you didn't remove the last layer so the yolov2.weights that you use already corresponds to a yolov2.final.weights. You need to remove the last layer using the partial command. Or if you want to not do that you need to use a yolov2.weights from a previous check point (not the final one). For example yolov2_1000.weights. Although I don't know what you are trying to train and if your dataset is similar to the one used for yolov2.weights.
@Serge3006 Your method is followed by the original weight. You need to modify the value of max_batches in the previously trained cfg file to be larger than the previous one. For example, the original max_batches=10000, please change it to 11000 to train.
@corentin87 Thanks for your answer, your answer to @Serge3006 question but not mine
@xiaomage11 you didn't manage to solve your problem?
@corentin87 I have already solved,thanks
I use darknet to train my own dataes ,I want to use the model after training to recognize kinds of objects,for example, I have two classes,and after training I got a model about this two classes,now I want to add another class in them ,and I do not want to train all three classes again,I want to only train the new class based on previous model.and I can get the new model include three classes.please tell me how to do about it.Thanks very much.