Open sarmientoj24 opened 4 years ago
I guess objects in your dataset are very small.
change anchors
to same as your previous cfg file.
and your batch setting is wrong, please change
batch=32
subdivisions=64
to
batch=64
subdivisions=16 # 32 or 64 if OOM
I am using YOLOv4 (yolov4.cfg) and pretrained yolov4weights.
[net] batch=32 subdivisions=64
I have trained the same exact dataset on YOLOv3 and I am getting around mAP 0.38 while I'm getting around 0.18 right now
You must train 6000 - 12 000 iterations: https://github.com/AlexeyAB/darknet#how-to-train-to-detect-your-custom-objects And stop when mAP doesn't increase: https://github.com/AlexeyAB/darknet#when-should-i-stop-training
show screenshot that you get 0.18 AP50
show chart.png with Loss and mAP for yolov4 training
show chart.png with Loss and mAP for yolov3 training
Attach yolov3.cfg file that you used
check your dataset - run training with flag -show_imgs
i.e. ./darknet detector train ... -show_imgs
and look at the aug_...jpg
images, do you see correct truth bounded boxes?
show content of generated files bad.list
and bad_label.list
if they exist
show such screenshot with info
./darknet detector test cfg/coco.data cfg/yolov4.cfg yolov4.weights data/dog.jpg
CUDA-version: 10000 (10000), cuDNN: 7.4.2, CUDNN_HALF=1, GPU count: 1
CUDNN_HALF=1
OpenCV version: 4.2.0
0 : compute_capability = 750, cudnn_half = 1, GPU: GeForce RTX 2070
net.optimized_memory = 0
mini_batch = 1, batch = 8, time_steps = 1, train = 0
layer filters size/strd(dil) input output
How many iterations did you train both Yolov3 and Yolov4 networks?
What batch= width= height= did you use in both Yolov3 and Yolov4?
Read FAQ: https://github.com/AlexeyAB/darknet/wiki/FAQ---frequently-asked-questions
Also download the latest Darknet version.
You must use yolov4.conv.137 instead of yolov4.weights based on manual: I have a question here. Is this one pretrained on anything?
Also download the latest Darknet version. You mean the latest repo?
I have a question here. Is this one pretrained on anything?
Yes.
You mean the latest repo?
Yes.
Where is yolov4.conv.137? Imagenet or COCO?
COCO
can i know what -clear means? does this remove the previous "pretraining" the model had and trains it from scratch?
no, it just remove some record information for resume training.
if (clear) {
(*net->seen) = 0;
(*net->cur_iteration) = 0;
}
Just one more question. I used the pretrained yolov4.conv.137 to Dataset A with 9 classes of 412x412. Then the resulting weights/model is used for another different Dataset B with five classes of 900x600 (with somewhat very few training images). Is this a valid action?
The cfg width is 512x512. Config changes for Dataset B training because of less classes.
Then the resulting weights/model is used for another different Dataset B with five classes of 900x600 (with somewhat very few training images). Is this a valid action?
No.
You should always use pre-trained weight file yolov4.conv.137
and train from the begining.
Is there an explanation why? I would like to compare actually the results of two models on Dataset B
(1) one pretrained on Dataset A vs (2) not pre-trained on Dataset A
Because when you change number of classes in [yolo] layer-139, you also change number of filters in previous [convolutional] layer-138, so if you will use previous weights-file, all weights after layer-138 will be shifted - and it can be worse than random weights.
I see. But isnt that what we do when we use yolov.conv.137 because we also reduce the classes?
No, yolov.conv.137
contains only 137 layers. 137 less than 138
Sorry if I dont understand it completely. I am still using yolov4.conv.137 not sure what 138 means so basically
yolov4.conv.137 -----------------------------> model1 ------------------------> model 2
dataset A (9 classes) datasetB (5 classes)
I am using YOLOv4 (yolov4.cfg) and pretrained yolov4weights. I have around 233 training images and 60 validation set. I have trained the same exact dataset on YOLOv3 and I am getting around mAP 0.38 while I'm getting around 0.18 right now
Here is YOLOV4 cfg
Also, what is the difference of the current pre-trained model from the github repo for YOLOv4. What is the backbone of this? Also what is the difference of this from yolov4.conv.137?