Open mvanlierBCG opened 4 years ago
@mvanlierBCG If training from scratch (and having a suitable scale dataset), the standard way is loading Imagenet pretrained backbone and freeze the backbone part for several epochs (transfer stage) for basic convergence of the head part, and then free the whole network for forther fine tune. But from my experience on the darknet families, seems the .weights converted backbone weights are not well pretrained on Imagenet and may not fit for this process. I'm still not quite sure about the root cause and may try to retrain them by myself later. The COCO pretrained .weights for detection model could also be considered for preloading, but that may need more trick & experiments to transfer to custom datasets.
For tiny_yolo3_darknet
, you can refer #78
@david8862 Thanks for your comment on this. Is there any difference between those two approaches:
Loading the model weights (e.g. yolov3 COCO-trained) in yolo3_body()
, before theyolo3_predictions()
is created? I assume then only the backbone weights are loaded and not the head-weights.
Or loading model weights (e.g. yolov3 COCO-trained) in get_yolo3_train_model()
, after the whole model is constructed (when using different no. of classes that COCO, I can use skip weights)? In this case, I assume also the head weights are loaded.
Which one would you recommend, and why?
@mvanlierBCG
DarknetConv2D(num_anchors*(num_classes+5), (1,1))
), so there should be no big difference.
So for
'yolo3_darknet'
,'yolo4_darknet'
I have downloaded and converted with your tool the backbone weights:darknet53.conv.74.weight
s andcsdarknet53-omega_final.weights
. But there also existsyolov3.weights
andyolov4.weights
.I want to train the yolov3 and yolov4 models on a custom dataset with only one class. What would you suggest in that case:
get_yolo3_train_model()
), and then retrain with my custom dataset? If yes why? (should I also use then transfer training, and with which freezing option, and why?)get_yolo3_train_model()
, and then load the following weights/models from the converted: yolov3.weights and yolov4.weights withmodel.load_weights()
if yes why? and do I need then to do transfer training as well?get_yolo3_train_model()
and directly load the model yolov3, yolov4 from the .h5 file as follows:from tensorflow.keras.models import load_model
,model = load_model('model.h5')
? (output of yourconverter.py
tool) if yes why? and do I need then to do transfer training as well?Do you have further any tips for training models on a dataset with one class?
And what would you suggest for
'tiny_yolo3_darknet'
, since there are no backbone weights for that model?