Replies: 7 comments 2 replies
-
Use flag |
Beta Was this translation helpful? Give feedback.
-
@DrMRizk can you tell whether we can start training with just 100 images Would be helpful if you resolve my doubt the training does not seem to start for yolo v4 tiny model in my case. |
Beta Was this translation helpful? Give feedback.
-
It depends on how many boxes you have per image, the lr you use, the
complexity and variation in the dataset ! It's rule of thumb that we use 2k
per class, but sometimes the network may take long even to overfit for a
small set of images.
…On Tue, Sep 14, 2021, 10:29 rishishounak ***@***.***> wrote:
@DrMRizk <https://github.com/DrMRizk> can you tell whether we can start
training with just 100 images Would be helpful if you resolve my doubt
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#7869 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAX4O367PU3KMOX2NFLZMOTUB3JE3ANCNFSM475I7HTQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Beta Was this translation helpful? Give feedback.
-
@DrMRizk |
Beta Was this translation helpful? Give feedback.
-
@AlexeyAB The difference between Transfer learning and Fine tuning - |
Beta Was this translation helpful? Give feedback.
-
In general - yes. Just if you train for the same number of classes, you can train using
You should use
No.
The more the better, there is no specific amount. In total, preferably not less than 200 - 2000 images for
|
Beta Was this translation helpful? Give feedback.
-
@AlexeyAB |
Beta Was this translation helpful? Give feedback.
-
I trained a network targeting a custom dataset including C classes. I need to train the network with additional images in order to increase the accuracy. I do not need to increase the number of classes.
I aim to re-train the network on edge devices taking into consideration low computational resources and power consumption.
I prepared the dataset including several images of all classes.
Then, I train the network using the custom training command:
./darknet detector train data_file cfg_file yolo4.conv.137 -dont_show -map
for sure the data_file includes the paths to the images/lables for training datset and validation dataset in addition to the path to save the new weights file and the classes names
also, the cfg_file is edited according to the number of classes by changing the max_batches and filters for layers the comes before the yolo layers
After finishing the training on custom dataset, additional images are prepared.
I need to launch the retraining process to enhance the accuracy;
using the following command does nothing:
./darknet detector train data_file cfg_file custom_weights_file -dont_show -map
even when adding stopbackward=1
where custom_weights_file is the output of my initial custom training
I checked the discussions on this Repository:
I guess I am dealing with issue of fine tuning as I am using pre-trained weights file from same task. The following is suggested:
1- use partial to copy the weights of the selected layers from previous obtained weights file.
2- train starting from a pre-trained weight
in my case, I have to use the following command:
./darknet partial cfg_file selected_weights_file weights_file 137
to select the copy the weights of the first 137 layers from the obtained custom_weights_file from my initial custom training.
then I have to use the weight file including the copied weights (selected_weights_file) to launch the retraining process. I shall use this command:
./darknet detector train data_file cfg_file selected_weights_file
a- is up listed procedure correct?
b- shall I use only the new images (not used before in training) or I have to use all images (add the new images to the old image set) in the re-traing process
c- if the new images belong to the same class. would I have degradation because of over-fitting?
d- what is the minimal number of new images should be added?
e- shall I add stopbackward=1 to the cfg_file and what is its affect in my case?
@AlexeyAB
@WongKinYiu
additional image
Beta Was this translation helpful? Give feedback.
All reactions