Open tuteming opened 4 years ago
I see, but no answer.
I think you are correct. mask should be 0,1,2 and 3,4,5 instead of 1,2,3 and 3,4,5. The first anchor will never be used and the third in both yolo layers. See yolov4.cfg for reference.
I agree with @fsaxen , in yolov3-tiny.cfg masks are 0,1,2 and 3,4,5. Why this should be different in yolov4-tiny.cfg ?
Anchors are definitely wrong. Correcting mask from 1,2,3 in second yolo layer to 0,1,2 improved map +25%
@AlexeyAB
Anchors are definitely wrong. Correcting mask from 1,2,3 in second yolo layer to 0,1,2 improved map +25%
What dataset do you use? Show mAP results for both cases.
I believe @alexanderfrey is right. I used my own data (only has one class) to train by using 1,2,3 set and 0,1,2 set, the 0,1,2 version is much better than the other. Then I tested the same dataset by using yolov3-tiny, and yolov3-tiny is also much better than 1,2,3 version.
I reproduced similar results. I trained my model with 30k iterations and had about 80% mAP. I changed the mask from 1, 2, 3
to 0, 1, 2
and trained the model with the same data and just used the weights from my previous training. I received a mAP of 97.45% after 2k iterations.
Great find!
WARNING: If you want to use the config and weights with OpenCV 4.4, you need to use 1, 2, 3
and not 0, 1, 2
for the mask otherwise an assertion will fail.
I reproduced similar results. I trained my model with 30k iterations and had about 80% mAP. I changed the mask from
1, 2, 3
to0, 1, 2
and trained the model with the same data and just used the weights from my previous training. I received a mAP of 97.45% after 2k iterations.
@not-matthias Hi, you mean you got +17%mAP when change anchor index from 1,2,3 to 0,1,2. Are there many small objects in your dataset?
in yolov4-tiny.cfg, there are mask = 3,4,5 and mask = 1,2,3 common anchors = 10,14, 23,27, 37,58, 81,82, 135,169, 344,319 why 6 anchors? is not 5 anchors? if darknet.exe detector calc_anchors data/obj.data -num_of_clusters 6 -width 416 -height 416 what common anchors for mask = 3,4,5 , what for mask = 1,2,3? thanks.