Open 123liluky opened 6 years ago
darknet.exe detector map data/obj.data yolo-obj.cfg backup\yolo-obj_7000.weights
1、map for one anchor cfg:
map for five anchors cfg:
They are nearly the same.
2、detected examples for one anchor cfg:
and detected examples for five anchors cfg:
I am confused why results of one anchor cfg are also satisfying? I trained the two networks both without pretrained parameters.
Does it mean anchors amounts and values are not vital for detection in my application?
Yes.
Mybe it is because the vein is always rectangular, and the artery is always square.
Also because all images (in training and validation dataset) has the same size and the same aspect ratio. So it doesn't require different anchors.
And because you use relaxed data augmentation (jitter=0.2 random=0), so this model can detect well objects only on the images with the same size and the same aspect ratio.
Also you can try to train yolov3-tiny.cfg
(5.5 Gflops) instead of yolov2-tiny-voc.cfg
(6.9 Gflops), and compare mAP.
Train using command:
./darknet detector train data/obj.data yolov3-tiny_obj.cfg yolov3.conv.105
File yolov3.conv.105
you can get by using command: https://github.com/AlexeyAB/darknet/blob/24f563ce7165c2c44486fe8d0a2caea8d7c5a887/build/darknet/x64/partial.cmd#L21
mask = 0,1,2
https://github.com/AlexeyAB/darknet/blob/24f563ce7165c2c44486fe8d0a2caea8d7c5a887/cfg/yolov3-tiny.cfg#L175./darknet detector calc_anchors data/obj.data -num_of_clusters 6 -width 416 -height 416 -show
1、I use 5 anchors for detection in the beginning, the last convolutional and region is: [convolutional] size=1 stride=1 pad=1 filters=35 activation=linear
[region] anchors = 0.7,0.97, 2.22,3.58, 4.31,9.25, 6.12,4.15, 10.8,8.55 bias_match=1 classes=2 coords=4 num=5 softmax=1 jitter=.2 rescore=1
object_scale=5 noobject_scale=1 class_scale=1 coord_scale=1
absolute=1 thresh = .6 random=0 2、 Then, I try using only one anchor for detection like below: [convolutional] size=1 stride=1 pad=1 filters=7 activation=linear
[region] anchors = 3.09,2.72 bias_match=1 classes=2 coords=4 num=1 softmax=1 jitter=.2 rescore=1
object_scale=5 noobject_scale=1 class_scale=1 coord_scale=1
absolute=1 thresh = .6 random=0
I find detection results in both 1 and 2 are ok. Both squares and rectangles with different size are detected with high probability. Does it mean anchors amounts and values are not vital for detection in my application? Thank you.