#(no.1)conv+bn+leakyrelu
#out_put_shape: 32 × 416 × 416 32\times416\times416 32×416×416
[convolutional]0
batch_normalize=1
filters=32
size=3
stride=1
pad=1
activation=leaky
#Downsample(stride=2)
#(no.2)conv+bn+leakyrelu
#out_put_shape: 64 × 208 × 208 64\times208\times208 64×208×208
[convolutional]1
batch_normalize=1
filters=64
size=3
stride=2
pad=1
activation=leaky
#(no.3)conv+bn+leaky
#out_put_shape: 32 × 208 × 208 32\times208\times208 32×208×208
[convolutional]2
batch_normalize=1
filters=32
size=1
stride=1
pad=1
activation=leaky
#(no.4)conv+bn+leaky
#out_put_shape: 64 × 208 × 208 64\times208\times208 64×208×208
[convolutional]3
batch_normalize=1
filters=64
size=3
stride=1
pad=1
activation=leaky
#(shortcut_1)上一卷积层(no.4( 64 × 208 × 208 64\times208\times208 64×208×208)与上三卷积层前(no.2( 64 × 208 × 208 64\times208\times208 64×208×208))的特征融合
#out_put_shape: 64 × 208 × 208 64\times208\times208 64×208×208
[shortcut]4
from=-3
activation=linear
#Downsample
#(no.5)conv+bn+leaky
#out_put_shape: 128 × 104 × 104 128\times104\times104 128×104×104
[convolutional]5
batch_normalize=1
filters=128
size=3
stride=2
pad=1
activation=leaky
#(no.6)conv+bn+leaky
#out_put_shape: 64 × 104 × 104 64\times104\times104 64×104×104
[convolutional]6
batch_normalize=1
filters=64
size=1
stride=1
pad=1
activation=leaky
#(no.7)conv+bn+leaky
#out_put_shape: 128 × 104 × 104 128\times104\times104 128×104×104
[convolutional]7
batch_normalize=1
filters=128
size=3
stride=1
pad=1
activation=leaky
#同理,out_put_shape: 128 × 104 × 104 128\times104\times104 128×104×104
[shortcut]8
from=-3
activation=linear
#(no.8)conv+bn+leaky
#out_put_shape: 64 × 104 × 104 64\times104\times104 64×104×104
[convolutional]9
batch_normalize=1
filters=64
size=1
stride=1
pad=1
activation=leaky
#(no.9)conv+bn+leaky
#out_put_shape: 128 × 104 × 104 128\times104\times104 128×104×104
[convolutional]10
batch_normalize=1
filters=128
size=3
stride=1
pad=1
activation=leaky
#同理,这次是和上一个shortcut输出连接,out_put_shape: 128 × 104 × 104 128\times104\times104 128×104×104
[shortcut]11
from=-3
activation=linear
至此,(128,104,104)特征图通过(降维——卷积——残差)的方式处理了2次。
#Downsample
#(no.10)conv+bn+leaky
#out_put_shape: 256 × 52 × 52 256\times52\times52 256×52×52
[convolutional]12
batch_normalize=1
filters=256
size=3
stride=2
pad=1
activation=leaky
#(no.11)conv+bn+leaky
#out_put_shape: 128 × 52 × 52 128\times52\times52 128×52×52
[convolutional]13
batch_normalize=1
filters=128
size=1
stride=1
pad=1
activation=leaky
#(no.12)conv+bn+leaky
#out_put_shape: 256 × 52 × 52 256\times52\times52 256×52×52
[convolutional]14
batch_normalize=1
filters=256
size=3
stride=1
pad=1
activation=leaky
#同理,no.12卷积层和no.10卷积层连接,out_put_shape: 256 × 52 × 52 256\times52\times52 256×52×52
[shortcut]15
from=-3
activation=linear
#(no.13)conv+bn+leaky
#out_put_shape: 128 × 52 × 52 128\times52\times52 128×52×52
[convolutional]16
batch_normalize=1
filters=128
size=1
stride=1
pad=1
activation=leaky
#(no.14)conv+bn+leaky
#out_put_shape: 256 × 52 × 52 256\times52\times52 256×52×52
[convolutional]17
batch_normalize=1
filters=256
size=3
stride=1
pad=1
activation=leaky
#同理,no.14卷积层和上一个shortcut连接,out_put_shape: 256 × 52 × 52 256\times52\times52 256×52×52
[shortcut]18
from=-3
activation=linear
#(no.15)conv+bn+leaky
#out_put_shape: 128 × 52 × 52 128\times52\times52 128×52×52
[convolutional]19
batch_normalize=1
filters=128
size=1
stride=1
pad=1
activation=leaky
#(no.16)conv+bn+leaky
#out_put_shape: 256 × 52 × 52 256\times52\times52 256×52×52
[convolutional]20
batch_normalize=1
filters=256
size=3
stride=1
pad=1
activation=leaky
#同理,no.16卷积层和上一个shortcut连接,out_put_shape: 256 × 52 × 52 256\times52\times52 256×52×52
[shortcut]21
from=-3
activation=linear
#(no.17)conv+bn+leaky
#out_put_shape: 128 × 52 × 52 128\times52\times52 128×52×52
[convolutional]22
batch_normalize=1
filters=128
size=1
stride=1
pad=1
activation=leaky
#(no.18)conv+bn+leaky
#out_put_shape: 256 × 52 × 52 256\times52\times52 256×52×52
[convolutional]23
batch_normalize=1
filters=256
size=3
stride=1
pad=1
activation=leaky
#同理,no.18卷积层和上一个shortcut连接,out_put_shape: 256 × 52 × 52 256\times52\times52 256×52×52
[shortcut]24
from=-3
activation=linear
#(no.19)conv+bn+leaky
#out_put_shape: 128 × 52 × 52 128\times52\times52 128×52×52
[convolutional]25
batch_normalize=1
filters=128
size=1
stride=1
pad=1
activation=leaky
#(no.20)conv+bn+leaky
#out_put_shape: 256 × 52 × 52 256\times52\times52 256×52×52
[convolutional]26
batch_normalize=1
filters=256
size=3
stride=1
pad=1
activation=leaky
#同理,no.20卷积层和上一个shortcut连接,out_put_shape: 256 × 52 × 52 256\times52\times52 256×52×52
[shortcut]27
from=-3
activation=linear
#(no.21)conv+bn+leaky
#out_put_shape: 128 × 52 × 52 128\times52\times52 128×52×52
[convolutional]28
batch_normalize=1
filters=128
size=1
stride=1
pad=1
activation=leaky
#(no.22)conv+bn+leaky
#out_put_shape: 256 × 52 × 52 256\times52\times52 256×52×52
[convolutional]29
batch_normalize=1
filters=256
size=3
stride=1
pad=1
activation=leaky
#同理,no.22卷积层和上一个shortcut连接,out_put_shape: 256 × 52 × 52 256\times52\times52 256×52×52
[shortcut]30
from=-3
activation=linear
#(no.23)conv+bn+leaky
#out_put_shape: 128 × 52 × 52 128\times52\times52 128×52×52
[convolutional]31
batch_normalize=1
filters=128
size=1
stride=1
pad=1
activation=leaky
#(no.24)conv+bn+leaky
#out_put_shape: 256 × 52 × 52 256\times52\times52 256×52×52
[convolutional]32
batch_normalize=1
filters=256
size=3
stride=1
pad=1
activation=leaky
#同理,no.24卷积层和上一个shortcut连接,out_put_shape: 256 × 52 × 52 256\times52\times52 256×52×52
[shortcut]33
from=-3
activation=linear
#(no.25)conv+bn+leaky
#out_put_shape: 128 × 52 × 52 128\times52\times52 128×52×52
[convolutional]34
batch_normalize=1
filters=128
size=1
stride=1
pad=1
activation=leaky
#(no.26)conv+bn+leaky
#out_put_shape: 256 × 52 × 52 256\times52\times52 256×52×52
[convolutional]35
batch_normalize=1
filters=256
size=3
stride=1
pad=1
activation=leaky
#同理,no.26卷积层和上一个shortcut连接,out_put_shape: 256 × 52 × 52 256\times52\times52 256×52×52
[shortcut]36
from=-3
activation=linear
至此(256,52,52)的特征图同样的方式(降维——卷积——残差)处理了8次。
#Downsample
#(no.27)conv+bn+leaky
#out_put_shape: 512 × 26 × 26 512\times26\times26 512×26×26
[convolutional]37
batch_normalize=1
filters=512
size=3
stride=2
pad=1
activation=leaky
#(no.28)conv+bn+leaky
#out_put_shape: 256 × 26 × 26 256\times26\times26 256×26×26
[convolutional]38
batch_normalize=1
filters=256
size=1
stride=1
pad=1
activation=leaky
#(no.29)conv+bn+leaky
#out_put_shape: 512 × 26 × 26 512\times26\times26 512×26×26
[convolutional]39
batch_normalize=1
filters=512
size=3
stride=1
pad=1
activation=leaky
#同理,no.29卷积层和no.27卷积层连接,out_put_shape: 512 × 26 × 26 512\times26\times26 512×26×26
[shortcut]40
from=-3
activation=linear
#(no.30)conv+bn+leaky
#out_put_shape: 256 × 26 × 26 256\times26\times26 256×26×26
[convolutional]41
batch_normalize=1
filters=256
size=1
stride=1
pad=1
activation=leaky
#(no.31)conv+bn+leaky
#out_put_shape: 512 × 26 × 26 512\times26\times26 512×26×26
[convolutional]42
batch_normalize=1
filters=512
size=3
stride=1
pad=1
activation=leaky
#同理,no.31卷积层和上一个shortcut层连接,out_put_shape: 512 × 26 × 26 512\times26\times26 512×26×26
[shortcut]43
from=-3
activation=linear
#(no.32)conv+bn+leaky
#out_put_shape: 256 × 26 × 26 256\times26\times26 256×26×26
[convolutional]44
batch_normalize=1
filters=256
size=1
stride=1
pad=1
activation=leaky
#(no.33)conv+bn+leaky
#out_put_shape: 512 × 26 × 26 512\times26\times26 512×26×26
[convolutional]45
batch_normalize=1
filters=512
size=3
stride=1
pad=1
activation=leaky
#同理,no.33卷积层和上一个shortcut层连接,out_put_shape: 512 × 26 × 26 512\times26\times26 512×26×26
[shortcut]46
from=-3
activation=linear
#(no.34)conv+bn+leaky
#out_put_shape: 256 × 26 × 26 256\times26\times26 256×26×26
[convolutional]47
batch_normalize=1
filters=256
size=1
stride=1
pad=1
activation=leaky
#(no.35)conv+bn+leaky
#out_put_shape: 512 × 26 × 26 512\times26\times26 512×26×26
[convolutional]48
batch_normalize=1
filters=512
size=3
stride=1
pad=1
activation=leaky
#同理,no.35卷积层和上一个shortcut层连接,out_put_shape: 512 × 26 × 26 512\times26\times26 512×26×26
[shortcut]49
from=-3
activation=linear
#(no.36)conv+bn+leaky
#out_put_shape: 256 × 26 × 26 256\times26\times26 256×26×26
[convolutional]50
batch_normalize=1
filters=256
size=1
stride=1
pad=1
activation=leaky
#(no.37)conv+bn+leaky
#out_put_shape: 512 × 26 × 26 512\times26\times26 512×26×26
[convolutional]51
batch_normalize=1
filters=512
size=3
stride=1
pad=1
activation=leaky
#同理,no.37卷积层和上一个shortcut层连接,out_put_shape: 512 × 26 × 26 512\times26\times26 512×26×26
[shortcut]52
from=-3
activation=linear
#(no.38)conv+bn+leaky
#out_put_shape: 256 × 26 × 26 256\times26\times26 256×26×26
[convolutional]53
batch_normalize=1
filters=256
size=1
stride=1
pad=1
activation=leaky
#(no.39)conv+bn+leaky
#out_put_shape: 512 × 26 × 26 512\times26\times26 512×26×26
[convolutional]54
batch_normalize=1
filters=512
size=3
stride=1
pad=1
activation=leaky
#同理,no.39卷积层和上一个shortcut层连接,out_put_shape: 512 × 26 × 26 512\times26\times26 512×26×26
[shortcut]55
from=-3
activation=linear
#(no.40)conv+bn+leaky
#out_put_shape: 256 × 26 × 26 256\times26\times26 256×26×26
[convolutional]56
batch_normalize=1
filters=256
size=1
stride=1
pad=1
activation=leaky
#(no.41)conv+bn+leaky
#out_put_shape: 512 × 26 × 26 512\times26\times26 512×26×26
[convolutional]57
batch_normalize=1
filters=512
size=3
stride=1
pad=1
activation=leaky
#同理,no.41卷积层和上一个shortcut层连接,out_put_shape: 512 × 26 × 26 512\times26\times26 512×26×26
[shortcut]58
from=-3
activation=linear
#(no.42)conv+bn+leaky
#out_put_shape: 256 × 26 × 26 256\times26\times26 256×26×26
[convolutional]59
batch_normalize=1
filters=256
size=1
stride=1
pad=1
activation=leaky
#(no.43)conv+bn+leaky
#out_put_shape: 512 × 26 × 26 512\times26\times26 512×26×26
[convolutional]60
batch_normalize=1
filters=512
size=3
stride=1
pad=1
activation=leaky
#同理,no.43卷积层和上一个shortcut层连接,out_put_shape: 512 × 26 × 26 512\times26\times26 512×26×26
[shortcut]61
from=-3
activation=linear
至此,(512,26,26)的特征图被同样的方式(降维——卷积——残差)处理了8次。
#Downsample
#(no.44)conv+bn+leaky
#out_put_shape: 1024 × 13 × 13 1024\times13\times13 1024×13×13
[convolutional]
batch_normalize=1
filters=1024
size=3
stride=2
pad=1
activation=leaky
#(no.45)conv+bn+leaky
#out_put_shape: 512 × 13 × 13 512\times13\times13 512×13×13
[convolutional]
batch_normalize=1
filters=512
size=1
stride=1
pad=1
activation=leaky
#(no.46)conv+bn+leaky
#out_put_shape: 1024 × 13 × 13 1024\times13\times13 1024×13×13
[convolutional]
batch_normalize=1
filters=1024
size=3
stride=1
pad=1
activation=leaky
#同理,no.46卷积层和no.44卷积层连接,out_put_shape: 1024 × 13 × 13 1024\times13\times13 1024×13×13
[shortcut]
from=-3
activation=linear
#(no.47)conv+bn+leaky
#out_put_shape: 512 × 13 × 13 512\times13\times13 512×13×13
[convolutional]
batch_normalize=1
filters=512
size=1
stride=1
pad=1
activation=leaky
#(no.48)conv+bn+leaky
#out_put_shape: 1024 × 13 × 13 1024\times13\times13 1024×13×13
[convolutional]
batch_normalize=1
filters=1024
size=3
stride=1
pad=1
activation=leaky
#同理,no.48卷积层和上一个shortcut层连接,out_put_shape: 1024 × 13 × 13 1024\times13\times13 1024×13×13
[shortcut]
from=-3
activation=linear
#(no.49)conv+bn+leaky
#out_put_shape: 512 × 13 × 13 512\times13\times13 512×13×13
[convolutional]
batch_normalize=1
filters=512
size=1
stride=1
pad=1
activation=leaky
#(no.50)conv+bn+leaky
#out_put_shape: 1024 × 13 × 13 1024\times13\times13 1024×13×13
[convolutional]
batch_normalize=1
filters=1024
size=3
stride=1
pad=1
activation=leaky
#同理,no.50卷积层和上一个shortcut层连接,out_put_shape: 1024 × 13 × 13 1024\times13\times13 1024×13×13
[shortcut]
from=-3
activation=linear
#(no.51)conv+bn+leaky
#out_put_shape: 512 × 13 × 13 512\times13\times13 512×13×13
[convolutional]
batch_normalize=1
filters=512
size=1
stride=1
pad=1
activation=leaky
#(no.52)conv+bn+leaky
#out_put_shape: 1024 × 13 × 13 1024\times13\times13 1024×13×13
[convolutional]
batch_normalize=1
filters=1024
size=3
stride=1
pad=1
activation=leaky
#同理,no.52卷积层和上一个shortcut层连接,out_put_shape: 1024 × 13 × 13 1024\times13\times13 1024×13×13
[shortcut]
from=-3
activation=linear
终于,(1024,13,13)四次处理之后,一堆井号意味着backbone结束了。
######################
#(no.53)conv+bn+leaky
#out_put_shape: 512 × 13 × 13 512\times13\times13 512×13×13
[convolutional]
batch_normalize=1
filters=512
size=1
stride=1
pad=1
activation=leaky
#(no.54)conv+bn+leaky
#out_put_shape: 1024 × 13 × 13 1024\times13\times13 1024×13×13
[convolutional]
batch_normalize=1
size=3
stride=1
pad=1
filters=1024
activation=leaky
#(no.55)conv+bn+leaky
#out_put_shape: 512 × 13 × 13 512\times13\times13 512×13×13
[convolutional]
batch_normalize=1
filters=512
size=1
stride=1
pad=1
activation=leaky
#(no.56)conv+bn+leaky
#out_put_shape: 1024 × 13 × 13 1024\times13\times13 1024×13×13
[convolutional]
batch_normalize=1
size=3
stride=1
pad=1
filters=1024
activation=leaky
#(no.57)conv+bn+leaky
#out_put_shape: 512 × 13 × 13 512\times13\times13 512×13×13
[convolutional]
batch_normalize=1
filters=512
size=1
stride=1
pad=1
activation=leaky
#(no.58)conv+bn+leaky
#out_put_shape: 1024 × 13 × 13 1024\times13\times13 1024×13×13
[convolutional]
batch_normalize=1
size=3
stride=1
pad=1
filters=1024
activation=leaky
#(no.59)conv+bn+leaky
#这是yolo层的前一个卷积层,要把特征图变成( a n c h o r × ( c l a s s + 5 ) , 13 , 13 anchor\times(class+5),13,13 anchor×(class+5),13,13)喂入yolo层
#out_put_shape: 255 × 13 × 13 255\times13\times13 255×13×13
[convolutional]
size=1
stride=1
pad=1
filters=255
activation=linear
#第一个yolo层
#mask=678意味着使用最后三个anchor,num=9意思是每个grid预测9个bbox,jitter数据抖动,产生更多数据(属于TTA,Test Time Augmentation),ignore指IOU的阈值大小,小尺度用0.7,大尺度用0.5。
#输出为(3,13,13,85)把255分为anchor和类别加位置信息等。
[yolo]
mask = 6,7,8
anchors = 10,13, 16,30, 33,23, 30,61, 62,45, 59,119, 116,90, 156,198, 373,326
classes=80
num=9
jitter=.3
ignore_thresh = .7
truth_thresh = 1
random=1
#route层,意思是提取当前倒数第四个层的输出,即no.57卷积层(512,13,13)。
[route]
layers = -4
#(no.60)conv+bn+leaky
#out_put_shape: 256 × 13 × 13 256\times13\times13 256×13×13
[convolutional]
batch_normalize=1
filters=256
size=1
stride=1
pad=1
activation=leaky
#上采样层,输出为(256,26,26)
[upsample]
stride=2
#route层(双参数):是指上一层即上采样层(256,26,26)和第61层(512,26,26)(也就是第四次下采样后残差处理过后的最终结果)按第一个维度相加得到(具体序号看[方括号]后的标号)往前找!
#所以,这一层的输出是(768,26,26)
[route]
layers = -1, 61
#(no.61)conv+bn+leaky
#out_put_shape: 256 × 26 × 26 256\times26\times26 256×26×26
[convolutional]
batch_normalize=1
filters=256
size=1
stride=1
pad=1
activation=leaky
#(no.62)conv+bn+leaky
#out_put_shape: 512 × 26 × 26 512\times26\times26 512×26×26
[convolutional]
batch_normalize=1
size=3
stride=1
pad=1
filters=512
activation=leaky
#(no.63)conv+bn+leaky
#out_put_shape: 256 × 26 × 26 256\times26\times26 256×26×26
[convolutional]
batch_normalize=1
filters=256
size=1
stride=1
pad=1
activation=leaky
#(no.64)conv+bn+leaky
#out_put_shape: 512 × 26 × 26 512\times26\times26 512×26×26
[convolutional]
batch_normalize=1
size=3
stride=1
pad=1
filters=512
activation=leaky
#(no.65)conv+bn+leaky
#out_put_shape: 256 × 26 × 26 256\times26\times26 256×26×26
[convolutional]
batch_normalize=1
filters=256
size=1
stride=1
pad=1
activation=leaky
#(no.66)conv+bn+leaky
#out_put_shape: 512 × 26 × 26 512\times26\times26 512×26×26
[convolutional]
batch_normalize=1
size=3
stride=1
pad=1
filters=512
activation=leaky
#(no.67)conv+bn+leaky
#out_put_shape: 255 × 26 × 26 255\times26\times26 255×26×26
[convolutional]
size=1
stride=1
pad=1
filters=255
activation=linear
#yolo层,解释见上。输出为(3,26,26,85)
[yolo]
mask = 3,4,5
anchors = 10,13, 16,30, 33,23, 30,61, 62,45, 59,119, 116,90, 156,198, 373,326
classes=80
num=9
jitter=.3
ignore_thresh = .7
truth_thresh = 1
random=1
#route层,提取当前倒数第四层特征,即no.65卷积层(256,26,26)
[route]
layers = -4
#(no.68)conv+bn+leaky
#out_put_shape: 128 × 26 × 26 128\times26\times26 128×26×26
[convolutional]
batch_normalize=1
filters=128
size=1
stride=1
pad=1
activation=leaky
#上采样层,输出(128,52,52)
[upsample]
stride=2
#route层(双参数):是指上一层即上采样层(128,52,52)和第36层(256,52,52)(也就是第四次下采样后残差处理过后的最终结果)按第一个维度相加得到(具体序号看[方括号]后的标号)往前找!
#此层输出为(384,52,52)
[route]
layers = -1, 36
#(no.69)conv+bn+leaky
#out_put_shape: 128 × 52 × 52 128\times52\times52 128×52×52
[convolutional]
batch_normalize=1
filters=128
size=1
stride=1
pad=1
activation=leaky
#(no.70)conv+bn+leaky
#out_put_shape: 256 × 52 × 52 256\times52\times52 256×52×52
[convolutional]
batch_normalize=1
size=3
stride=1
pad=1
filters=256
activation=leaky
#(no.71)conv+bn+leaky
#out_put_shape: 128 × 52 × 52 128\times52\times52 128×52×52
[convolutional]
batch_normalize=1
filters=128
size=1
stride=1
pad=1
activation=leaky
#(no.72)conv+bn+leaky
#out_put_shape: 256 × 52 × 52 256\times52\times52 256×52×52
[convolutional]
batch_normalize=1
size=3
stride=1
pad=1
filters=256
activation=leaky
#(no.73)conv+bn+leaky
#out_put_shape: 128 × 52 × 52 128\times52\times52 128×52×52
[convolutional]
batch_normalize=1
filters=128
size=1
stride=1
pad=1
activation=leaky
#(no.74)conv+bn+leaky
#out_put_shape: 256 × 52 × 52 256\times52\times52 256×52×52
[convolutional]
batch_normalize=1
size=3
stride=1
pad=1
filters=256
activation=leaky
#(no.75)conv+bn+leaky
#out_put_shape: 255 × 52 × 52 255\times52\times52 255×52×52
[convolutional]
size=1
stride=1
pad=1
filters=255
activation=linear
#yolo层,解释见上。输出为(3,52,52,85)
[yolo]
mask = 0,1,2
anchors = 10,13, 16,30, 33,23, 30,61, 62,45, 59,119, 116,90, 156,198, 373,326
classes=80
num=9
jitter=.3
ignore_thresh = .7
truth_thresh = 1
random=1
至此,yolov3.cfg解析完毕!!!撒花!