当前位置:网站首页>[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
边栏推荐
- 【云原生 | Kubernetes篇】Ingress案例实战(十三)
- Is it difficult to apply for a job after graduation? "Hundreds of days and tens of millions" online recruitment activities to solve your problems
- SLAM 01. Modeling of human recognition Environment & path
- View all processes of multiple machines
- I used Kaitian platform to build an urban epidemic prevention policy inquiry system [Kaitian apaas battle]
- Unity xlua monoproxy mono proxy class
- SET XACT_ABORT ON
- 7 大主题、9 位技术大咖!龙蜥大讲堂7月硬核直播预告抢先看,明天见
- NFT 交易市场主要使用 ETH 本位进行交易的局面是如何形成的?
- 《增长黑客》阅读笔记
猜你喜欢
随机推荐
中非 钻石副石怎么镶嵌,才能既安全又好看?
[leetcode] wild card matching
Mysql统计技巧:ON DUPLICATE KEY UPDATE用法
阻止瀏覽器後退操作
Install esxi 6.0 interactively
pytorch-线性回归
MySQL statistical skills: on duplicate key update usage
Home office things community essay
pytorch-多层感知机MLP
Risc-v-qemu-virt in FreeRTOS_ Scheduling opportunity of GCC
程序员内卷和保持行业竞争力
爬虫(9) - Scrapy框架(1) | Scrapy 异步网络爬虫框架
紫光展锐全球首个5G R17 IoT NTN卫星物联网上星实测完成
go语言学习笔记-分析第一个程序
POJ 3176-Cow Bowling(DP||记忆化搜索)
12.(地图数据篇)cesium城市建筑物贴图
yolov5目标检测神经网络——损失函数计算原理
Open3D 网格(曲面)赋色
2048游戏逻辑
ibatis的动态sql









