AlexeyAB / darknet

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

The weighting file obtained from the first training is used as the pre-training weight file for the second training. #4251

Open yehaizi1995 opened 4 years ago

yehaizi1995 commented 4 years ago

Hello, I intend to use the weight file obtained by the first training as the weight file for the second training, but in the second training process, the system automatically stops training after reading the weight file, and the weight file is as the weight obtained after the training is over. Why is this problem happening? I hope to get your answer.

AlexeyAB commented 4 years ago

Train with flag -clear

Or use partial command to get the first several layers (identical layers): https://github.com/AlexeyAB/darknet/blob/master/build/darknet/x64/partial.cmd

yehaizi1995 commented 4 years ago

Train with flag -clear

Or use partial command to get the first several layers (identical layers): https://github.com/AlexeyAB/darknet/blob/master/build/darknet/x64/partial.cmd

Hello, thank you for your answer, but you may have misunderstood my question. I am currently training my yolo v3 with my own data (max_batches=2000). After the training, I tested the model and found that mAP is not ideal. Therefore, I train yolo v3 with data similar to the features of the object I am detecting (the max_batches=10000), and the weight file will be obtained after the training. I now intend to use the obtained weight file as a pre-training weight file, and use the data I want to detect to train the model (use the max_batches=2000), but the training just reads the weight file and stops automatically.At the same time, the model saves this pre-training weight file as the final result of this training in the corresponding folder.I am a beginner and I hope to get your help. If you can reply, I will be grateful.

AlexeyAB commented 4 years ago

I now intend to use the obtained weight file as a pre-training weight file, and use the data I want to detect to train the model (use the max_batches=2000), but the training just reads the weight file and stops automatically.

Did you try to use -clear flag at the end of traiing command?

yehaizi1995 commented 4 years ago

I now intend to use the obtained weight file as a pre-training weight file, and use the data I want to detect to train the model (use the max_batches=2000), but the training just reads the weight file and stops automatically.

Did you try to use -clear flag at the end of traiing command?

Hello, thank you again for your answer. I am using the cmd window for training under win10. Can you tell the specific location of the -clear flag?

yehaizi1995 commented 4 years ago

I now intend to use the obtained weight file as a pre-training weight file, and use the data I want to detect to train the model (use the max_batches=2000), but the training just reads the weight file and stops automatically.

Did you try to use -clear flag at the end of traiing command?

Hello, Is this way using -clear flage? for example like this: darknet.exe detector train .\data\voc.data yolov3-voc.cfg .\weights_pr\darknet53.conv.74 .\results_mine -clear

yehaizi1995 commented 4 years ago

I now intend to use the obtained weight file as a pre-training weight file, and use the data I want to detect to train the model (use the max_batches=2000), but the training just reads the weight file and stops automatically.

Did you try to use -clear flag at the end of traiing command?

Hello, Is this way using -clear flage? for example like this: darknet.exe detector train .\data\voc.data yolov3-voc.cfg .\weights_pr\darknet53.conv.74 .\results_mine -clear

Thank you for your help I have used the -clear flag and it has worked. thank you very much for your help.

myounus96 commented 4 years ago

Train with flag -clear

Or use partial command to get the first several layers (identical layers): https://github.com/AlexeyAB/darknet/blob/master/build/darknet/x64/partial.cmd

I have the same issue and resolved with -clear ,can you please what does -clear do,thanks @AlexeyAB