yolov5s网络结构
时间: 2023-09-15 13:23:10 浏览: 72
yolov5s.pt权重
Yolov5s是基于PyTorch实现的目标检测模型,它的网络结构如下:
```
----------------------------------------------------------------
Layer (type) Output Shape Param #
================================================================
Focus-1 [-1, 80, 80, 80] 0
ConvBlock-2 [-1, 160, 40, 40] 11,840
C3-3 [-1, 320, 40, 40] 155,680
ConvBlock-4 [-1, 640, 20, 20] 161,280
C3-5 [-1, 1280, 20, 20] 621,440
ConvBlock-6 [-1, 640, 20, 20] 819,840
C3-7 [-1, 1280, 20, 20] 2,483,200
ConvBlock-8 [-1, 640, 20, 20] 1,638,400
C3-9 [-1, 1280, 20, 20] 4,966,400
SPP-10 [-1, 1280, 20, 20] 0
ConvBlock-11 [-1, 640, 20, 20] 8,194,560
C3-12 [-1, 1280, 20, 20] 19,865,600
DetectionBlock-13 [[-1, 80, 80, 20], [-1, 40, 40, 20], [-1, 20, 20, 20]] 0
C3-14 [-1, 512, 40, 40] 6,386,688
ConvBlock-15 [-1, 256, 40, 40] 1,318,144
Upsample-16 [-1, 256, 80, 80] 0
C3-17 [-1, 256, 80, 80] 1,596,544
DetectionBlock-18 [[-1, 80, 80, 20], [-1, 40, 40, 20], [-1, 20, 20, 20]] 0
================================================================
Total params: 47,107,776
Trainable params: 47,107,776
Non-trainable params: 0
----------------------------------------------------------------
Input size (MB): 1.88
Forward/backward pass size (MB): 466.06
Params size (MB): 179.54
Estimated Total Size (MB): 647.49
----------------------------------------------------------------
```
其中,`Focus`模块是YOLOv5中新增的模块,它将输入的特征图进行通道和空间的压缩,以减少模型的计算量。`C3`模块是YOLOv5中的核心模块,它由三层卷积组成,并且引入了残差结构和SPP结构。`DetectionBlock`模块是YOLOv5中的检测模块,它用于生成检测框和预测类别。`Upsample`模块是YOLOv5中新增的模块,用于将特征图进行上采样。
阅读全文