You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello @AlexeyAB,
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
let us consider that " custom_weights_file" is the output of my initial custom training
After finishing the training on custom dataset, additional images are prepared. The new images are added to the original prepared dataset. The images belog to the same classes.
I used partial to copy the weights of the selected layers from previous obtained weights file:
./darknet partial cfg_file selected_weights_file custom_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.
I need to launch the retraining process to enhance the accuracy using the updated dataset (new images + previously used images for training) while freezing the feature extraction layers.
I modified the cfg_file by adding "stopbackward=1" at layer 137.
I am using the following command :
./darknet detector train data_file cfg_file selected_weights_file -dont_show -map -clear
for sure the data_file is updated to the paths to the images/lables of the updated dataset.
I will repeat the same loop whenever new images are collected.
In this case, the images used in the previous training will pass through whole the network again. The weights of the feature extraction layers will not be changed as they are freezed. Thus the output of these layers for previously passed images is the same.
Is there a way to extract these features and then pass them directly to the detection layers (un freezed layers) to speed up the training?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello @AlexeyAB,
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
let us consider that " custom_weights_file" is the output of my initial custom training
After finishing the training on custom dataset, additional images are prepared. The new images are added to the original prepared dataset. The images belog to the same classes.
I used partial to copy the weights of the selected layers from previous obtained weights file:
./darknet partial cfg_file selected_weights_file custom_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.
I need to launch the retraining process to enhance the accuracy using the updated dataset (new images + previously used images for training) while freezing the feature extraction layers.
I modified the cfg_file by adding "stopbackward=1" at layer 137.
I am using the following command :
./darknet detector train data_file cfg_file selected_weights_file -dont_show -map -clear
for sure the data_file is updated to the paths to the images/lables of the updated dataset.
I will repeat the same loop whenever new images are collected.
In this case, the images used in the previous training will pass through whole the network again. The weights of the feature extraction layers will not be changed as they are freezed. Thus the output of these layers for previously passed images is the same.
Is there a way to extract these features and then pass them directly to the detection layers (un freezed layers) to speed up the training?
Thank you in advance
Mostafa
Beta Was this translation helpful? Give feedback.
All reactions