pjreddie / darknet

Convolutional Neural Networks
http://pjreddie.com/darknet/
Other
25.75k stars 21.33k forks source link

Why the computed anchor box size would be larger than 13, since the size of the final feature map is 13x13(in yolo-voc.2.0.cfg, anchors = 16.62,10.52) #433

Open Duankaiwen opened 6 years ago

Duankaiwen commented 6 years ago

@pjreddie Hi, thanks for your amazing contribution! Why the computed anchor box size would be larger than 13, since the size of the final feature map is 13x13 (in yolo-voc.2.0.cfg, anchors = 16.62,10.52) @Broham @daokouer @lilohuang @tjluyao

wsyzzz commented 6 years ago

@Duankaiwwen Hi, how do you use yolo-voc.2.0.cfg to test? Could you give me an example?

Duankaiwen commented 6 years ago

@wsyzzz sorry,I don't known how to run the code, I just noticed the anchors

Li-Lai commented 6 years ago

@wsyzzz https://pjreddie.com/darknet/yolo/

wsyzzz commented 6 years ago

@CBIR-LL Thanks for your response. I used ./darknet detector test cfg/voc.data cfg/yolo-voc.cfg yolo-voc.weights data/dog.jpg and get the result. The strange thing is that i can't obtain any labels when i use ./darknet detector test cfg/voc.data cfg/yolo-voc.2.0.cfg yolo-voc.weights data/dog.jpg -i 0. And i refer to https://github.com/pjreddie/darknet/issues/257 and https://github.com/AlexeyAB/darknet/issues/235#issuecomment-338380948, it seems that i needn't worry about this. Is it true?

Back to the original question : ). Sorry to @Duankaiwwen. Anchors like 16.62,10.52 represent the real weights and heights, and they are calculated as: w=relative_widthinput_width/downsamples h=relative_heightinput_height/downsamples The relative_width and height are clusterred by k-means. And the final feature map like 13 as you said, is just input_width/downsamples(416/32). The size of feature map won't restrict the anchor boxed. This part you should consult Section 2 "Better" https://pjreddie.com/media/files/papers/YOLO9000.pdf. And Figure 3 can explain your question.

Li-Lai commented 6 years ago

The network architechture is different between yolo-voc.cfg with yolo-voc.2.0.cfg. You got nothing because weights file is not match with cfg file.

wsyzzz commented 6 years ago

@CBIR-LL Get√. Thanks!

Duankaiwen commented 6 years ago

@wsyzzz Thanks!