代码为 https://github.com/Peterisfar/YOLOV3.git
神经网络输入尺寸 input_size
img.size()
torch.Size([1, 3, 544, 544])
从darknet53中获取特征
x_s, x_m, x_l = self.__backnone(x)
x_s.size()
torch.Size([1, 256, 68, 68])
x_m.size()
torch.Size([1, 512, 34, 34])
x_l.size()
torch.Size([1, 1024, 17, 17])
68=544/8 小尺寸
34=544/16 中尺寸
17=544/32 大尺寸
这里的8/16/32就是stride
MODEL = {"ANCHORS":[[(1.25, 1.625), (2.0, 3.75), (4.125, 2.875)], # Anchors for small obj
[(1.875, 3.8125), (3.875, 2.8125), (3.6875, 7.4375)], # Anchors for medium obj
[(3.625, 2.8125), (4.875, 6.1875), (11.65625, 10.1875)]] ,# Anchors for big obj
"STRIDES":[8, 16, 32],
"ANCHORS_PER_SCLAE":3
}
x_s, x_m, x_l = self.__fpn(x_l, x_m, x_s)
x_s.size()
torch.Size([1, 75, 68, 68])
x_m.size()
torch.Size