当前位置:网站首页>[yolov5.yaml parsing]
[yolov5.yaml parsing]
2022-07-05 11:42:00 【Network starry sky (LUOC)】
You can start with yolov5s.yaml You can see the structure of each layer in
# parameters
nc: 20 # number of classes
depth_multiple: 0.33 # model depth multiple Controls the depth of the model (BottleneckCSP Number )
width_multiple: 0.50 # layer channel multiple control Conv passageway channel Number ( Number of convolution nuclei )
# depth_multiple Express BottleneckCSP Scaling factor of the module , Will all BottleneckCSP Modular Bottleneck Multiply this parameter to get the final number .
# width_multiple Represents the scaling factor of the convolution channel , Is to configure backbone and head Partly Conv Channel settings , Multiply all by this factor .
# Through these two parameters, the model design with different complexity can be realized .
# anchors
anchors:
- [10,13, 16,30, 33,23] # P3/8 wh stride=8
- [30,61, 62,45, 59,119] # P4/16
- [116,90, 156,198, 373,326] # P5/32
# YOLOv5 backbone
backbone:
# [from, number, module, args]
# from Indicates that the input of the current module comes from the output of that layer ,-1 Represents the output from the upper layer
# number Indicates the number of repetitions of this module ,1 Means there is only one ,3 It means repetition 3 Time
# module: Module name
# args:
[[-1, 1, Focus, [64, 3]], # 0-P1/2
[-1, 1, Conv, [128, 3, 2]], # 1-P2/4 128 individual 3x3 Convolution kernel stride=2
[-1, 3, C3, [128]], # CSP Bottleneck with 3 convolutions
[-1, 1, Conv, [256, 3, 2]], # 3-P3/8
[-1, 9, C3, [256]],
[-1, 1, Conv, [512, 3, 2]], # 5-P4/16
[-1, 9, C3, [512]],
[-1, 1, Conv, [1024, 3, 2]], # 7-P5/32
[-1, 1, SPP, [1024, [5, 9, 13]]],
[-1, 3, C3, [1024, False]], # 9
]
# YOLOv5 head
# No distinction between authors neck modular , therefore head Part contains PANet+Detect part
head:
[[-1, 1, Conv, [512, 1, 1]],
[-1, 1, nn.Upsample, [None, 2, 'nearest']],
[[-1, 6], 1, Concat, [1]], # cat backbone P4
[-1, 3, C3, [512, False]], # 13
[-1, 1, Conv, [256, 1, 1]],
[-1, 1, nn.Upsample, [None, 2, 'nearest']],
[[-1, 4], 1, Concat, [1]], # cat backbone P3
[-1, 3, C3, [256, False]], # 17 (P3/8-small)
[-1, 1, Conv, [256, 3, 2]],
[[-1, 14], 1, Concat, [1]], # cat head P4
[-1, 3, C3, [512, False]], # 20 (P4/16-medium)
[-1, 1, Conv, [512, 3, 2]],
[[-1, 10], 1, Concat, [1]], # cat head P5
[-1, 3, C3, [1024, False]], # 23 (P5/32-large)
[[17, 20, 23], 1, Detect, [nc, anchors]], # Detect(P3, P4, P5)
]
Or use named output :
YOLOv5 2021-6-29 torch 1.7.0+cpu CPU
from n params module arguments
0 -1 1 3520 models.common.Focus [3, 32, 3]
1 -1 1 18560 models.common.Conv [32, 64, 3, 2]
2 -1 1 18816 models.common.C3 [64, 64, 1]
3 -1 1 73984 models.common.Conv [64, 128, 3, 2]
4 -1 1 156928 models.common.C3 [128, 128, 3]
5 -1 1 295424 models.common.Conv [128, 256, 3, 2]
6 -1 1 625152 models.common.C3 [256, 256, 3]
7 -1 1 1180672 models.common.Conv [256, 512, 3, 2]
8 -1 1 656896 models.common.SPP [512, 512, [5, 9, 13]]
9 -1 1 1182720 models.common.C3 [512, 512, 1, False]
10 -1 1 131584 models.common.Conv [512, 256, 1, 1]
11 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest']
12 [-1, 6] 1 0 models.common.Concat [1]
13 -1 1 361984 models.common.C3 [512, 256, 1, False]
14 -1 1 33024 models.common.Conv [256, 128, 1, 1]
15 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest']
16 [-1, 4] 1 0 models.common.Concat [1]
17 -1 1 90880 models.common.C3 [256, 128, 1, False]
18 -1 1 147712 models.common.Conv [128, 128, 3, 2]
19 [-1, 14] 1 0 models.common.Concat [1]
20 -1 1 296448 models.common.C3 [256, 256, 1, False]
21 -1 1 590336 models.common.Conv [256, 256, 3, 2]
22 [-1, 10] 1 0 models.common.Concat [1]
23 -1 1 1182720 models.common.C3 [512, 512, 1, False]
24 [17, 20, 23] 1 67425 Detect [20, [[10, 13, 16, 30, 33, 23], [30, 61, 62, 45, 59, 119], [116, 90, 156, 198, 373, 326]], [128, 256, 512]]
Model Summary: 283 layers, 7114785 parameters, 7114785 gradients, 16.5 GFLOPs
边栏推荐
- 2048游戏逻辑
- Project summary notes series wstax kt session2 code analysis
- 15 methods in "understand series after reading" teach you to play with strings
- Oneforall installation and use
- Shell script file traversal STR to array string splicing
- Go language learning notes - first acquaintance with go language
- 871. Minimum Number of Refueling Stops
- POJ 3176 cow bowling (DP | memory search)
- 【pytorch 修改预训练模型:实测加载预训练模型与模型随机初始化差别不大】
- PHP中Array的hash函数实现
猜你喜欢
Pytorch training process was interrupted
网络五连鞭
COMSOL--建立几何模型---二维图形的建立
How did the situation that NFT trading market mainly uses eth standard for trading come into being?
【 YOLOv3中Loss部分计算】
pytorch-权重衰退(weight decay)和丢弃法(dropout)
Mongodb replica set
11.(地图数据篇)OSM数据如何下载使用
12.(地图数据篇)cesium城市建筑物贴图
AUTOCAD——遮罩命令、如何使用CAD对图纸进行局部放大
随机推荐
1个插件搞定网页中的广告
POJ 3176-Cow Bowling(DP||记忆化搜索)
Technology sharing | common interface protocol analysis
紫光展锐全球首个5G R17 IoT NTN卫星物联网上星实测完成
SET XACT_ABORT ON
2048游戏逻辑
【L1、L2、smooth L1三类损失函数】
Oneforall installation and use
Crawler (9) - scrape framework (1) | scrape asynchronous web crawler framework
【SingleShotMultiBoxDetector(SSD,单步多框目标检测)】
AUTOCAD——遮罩命令、如何使用CAD对图纸进行局部放大
AutoCAD -- mask command, how to use CAD to locally enlarge drawings
COMSOL -- 3D casual painting -- sweeping
7.2 daily study 4
Question and answer 45: application of performance probe monitoring principle node JS probe
Startup process of uboot:
Evolution of multi-objective sorting model for classified tab commodity flow
Web API configuration custom route
ACID事务理论
Manage multiple instagram accounts and share anti Association tips