forked from meituan/YOLOv6
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update readme and config files for base model
- Loading branch information
Showing
13 changed files
with
541 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
## YOLOv6 base model | ||
|
||
English | [简体中文](./README_cn.md) | ||
|
||
### Features | ||
|
||
- Use only regular convolution and Relu activation functions. | ||
|
||
- Apply CSP (1/2 channel dim) blocks in the network structure, except for Nano base model. | ||
|
||
Advantage: | ||
- Adopt a unified network structure and configuration, and the accuracy loss of the PTQ 8-bit quantization model is negligible, about 0.4%. | ||
- Suitable for users who are just getting started or who need to apply, optimize and deploy an 8-bit quantization model quickly and frequently. | ||
|
||
Shortcoming: | ||
- The accuracy on COCO is slightly lower than the v2.0 released models. | ||
|
||
### Performance | ||
|
||
| Model | Size | mAP<sup>val<br/>0.5:0.95 | Speed<sup>T4<br/>trt fp16 b1 <br/>(fps) | Speed<sup>T4<br/>trt fp16 b32 <br/>(fps) | Params<br/><sup> (M) | FLOPs<br/><sup> (G) | | ||
| :----------------------------------------------------------- | -------- | :----------------------- | -------------------------------------- | --------------------------------------- | -------------------- | ------------------- | | ||
| [**YOLOv6-N-base**](https://github.com/meituan/YOLOv6/releases/download/0.2.1/yolov6n_base.pt) | 640 | 35.6<sup>400e | 832 | 1249 | 4.3 | 11.1 | | ||
| [**YOLOv6-S-base**](https://github.com/meituan/YOLOv6/releases/download/0.2.1/yolov6s_base.pt) | 640 | 43.8<sup>400e | 373 | 531 | 11.5 | 27.6 | | ||
| [**YOLOv6-M-base**](https://github.com/meituan/YOLOv6/releases/download/0.2.1/yolov6m_base.pt) | 640 | 48.8<sup>distill | 179 | 246 | 27.7 | 68.4 | | ||
| [**YOLOv6-L-base**](https://github.com/meituan/YOLOv6/releases/download/0.2.1/yolov6l_base.pt) | 640 | 51.0<sup>distill | 115 | 153 | 58.5 | 144.0 | | ||
|
||
- Speed is tested with TensorRT 7.2 on T4. | ||
- The processes of model training, evaluation, and inference are the same as the original ones. For details, please refer to [this README](https://github.com/meituan/YOLOv6#quick-start). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
## YOLOv6 基础版模型 | ||
|
||
简体中文 | [English](./README.md) | ||
|
||
### 模型特点 | ||
|
||
- 仅使用常规卷积和Relu激活函数 | ||
|
||
- 网络结构均采用CSP (1/2通道) block,Nano网络除外。 | ||
|
||
优势: | ||
- 采用统一的网络结构和配置,且 PTQ 8位量化模型精度损失(约0.4%)较小,适合刚入门或有快速迭代部署8位量化模型需求的用户。 | ||
|
||
不足: | ||
- COCO上精度对比2.0版本发布模型稍低。 | ||
|
||
### 模型指标 | ||
|
||
| 模型 | 输入尺寸 | mAP<sup>val<br/>0.5:0.95 | 速度<sup>T4<br/>trt fp16 b1 <br/>(fps) | 速度<sup>T4<br/>trt fp16 b32 <br/>(fps) | Params<br/><sup> (M) | FLOPs<br/><sup> (G) | | ||
| :----------------------------------------------------------- | -------- | :----------------------- | -------------------------------------- | --------------------------------------- | -------------------- | ------------------- | | ||
| [**YOLOv6-N-base**](https://github.com/meituan/YOLOv6/releases/download/0.2.1/yolov6n_base.pt) | 640 | 35.6<sup>400e | 832 | 1249 | 4.3 | 11.1 | | ||
| [**YOLOv6-S-base**](https://github.com/meituan/YOLOv6/releases/download/0.2.1/yolov6s_base.pt) | 640 | 43.8<sup>400e | 373 | 531 | 11.5 | 27.6 | | ||
| [**YOLOv6-M-base**](https://github.com/meituan/YOLOv6/releases/download/0.2.1/yolov6m_base.pt) | 640 | 48.8<sup>distill | 179 | 246 | 27.7 | 68.4 | | ||
| [**YOLOv6-L-base**](https://github.com/meituan/YOLOv6/releases/download/0.2.1/yolov6l_base.pt) | 640 | 51.0<sup>distill | 115 | 153 | 58.5 | 144.0 | | ||
|
||
- 速度是在 T4 上测试的,TensorRT 版本为 7.2; | ||
- 模型训练、评估、推理流程与原来保持一致,具体可参考 [首页 README 文档](https://github.com/meituan/YOLOv6/blob/main/README_cn.md#%E5%BF%AB%E9%80%9F%E5%BC%80%E5%A7%8B)。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# YOLOv6 large base model | ||
model = dict( | ||
type='YOLOv6l_base', | ||
depth_multiple=1.0, | ||
width_multiple=1.0, | ||
pretrained=None, | ||
backbone=dict( | ||
type='CSPBepBackbone', | ||
num_repeats=[1, 6, 12, 18, 6], | ||
out_channels=[64, 128, 256, 512, 1024], | ||
csp_e=float(1)/2, | ||
), | ||
neck=dict( | ||
type='CSPRepPANNeck', | ||
num_repeats=[12, 12, 12, 12], | ||
out_channels=[256, 128, 128, 256, 256, 512], | ||
csp_e=float(1)/2, | ||
), | ||
head=dict( | ||
type='EffiDeHead', | ||
in_channels=[128, 256, 512], | ||
num_layers=3, | ||
begin_indices=24, | ||
anchors=1, | ||
out_indices=[17, 20, 23], | ||
strides=[8, 16, 32], | ||
iou_type='giou', | ||
use_dfl=True, | ||
reg_max=16, #if use_dfl is False, please set reg_max to 0 | ||
distill_weight={ | ||
'class': 2.0, | ||
'dfl': 1.0, | ||
}, | ||
) | ||
) | ||
|
||
solver=dict( | ||
optim='SGD', | ||
lr_scheduler='Cosine', | ||
lr0=0.01, | ||
lrf=0.01, | ||
momentum=0.937, | ||
weight_decay=0.0005, | ||
warmup_epochs=3.0, | ||
warmup_momentum=0.8, | ||
warmup_bias_lr=0.1 | ||
) | ||
|
||
data_aug = dict( | ||
hsv_h=0.015, | ||
hsv_s=0.7, | ||
hsv_v=0.4, | ||
degrees=0.0, | ||
translate=0.1, | ||
scale=0.9, | ||
shear=0.0, | ||
flipud=0.0, | ||
fliplr=0.5, | ||
mosaic=1.0, | ||
mixup=0.1, | ||
) | ||
training_mode = "conv_relu" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# YOLOv6 large base model | ||
model = dict( | ||
type='YOLOv6l_base', | ||
depth_multiple=1.0, | ||
width_multiple=1.0, | ||
pretrained=None, | ||
backbone=dict( | ||
type='CSPBepBackbone', | ||
num_repeats=[1, 6, 12, 18, 6], | ||
out_channels=[64, 128, 256, 512, 1024], | ||
csp_e=float(1)/2, | ||
), | ||
neck=dict( | ||
type='CSPRepPANNeck', | ||
num_repeats=[12, 12, 12, 12], | ||
out_channels=[256, 128, 128, 256, 256, 512], | ||
csp_e=float(1)/2, | ||
), | ||
head=dict( | ||
type='EffiDeHead', | ||
in_channels=[128, 256, 512], | ||
num_layers=3, | ||
begin_indices=24, | ||
anchors=1, | ||
out_indices=[17, 20, 23], | ||
strides=[8, 16, 32], | ||
iou_type='giou', | ||
use_dfl=True, | ||
reg_max=16, #if use_dfl is False, please set reg_max to 0 | ||
distill_weight={ | ||
'class': 2.0, | ||
'dfl': 1.0, | ||
}, | ||
) | ||
) | ||
|
||
solver = dict( | ||
optim='SGD', | ||
lr_scheduler='Cosine', | ||
lr0=0.0032, | ||
lrf=0.12, | ||
momentum=0.843, | ||
weight_decay=0.00036, | ||
warmup_epochs=2.0, | ||
warmup_momentum=0.5, | ||
warmup_bias_lr=0.05 | ||
) | ||
|
||
data_aug = dict( | ||
hsv_h=0.0138, | ||
hsv_s=0.664, | ||
hsv_v=0.464, | ||
degrees=0.373, | ||
translate=0.245, | ||
scale=0.898, | ||
shear=0.602, | ||
flipud=0.00856, | ||
fliplr=0.5, | ||
mosaic=1.0, | ||
mixup=0.243, | ||
) | ||
training_mode = "conv_relu" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# YOLOv6 medium/large base model | ||
model = dict( | ||
type='YOLOv6m_base', | ||
depth_multiple=0.80, | ||
width_multiple=0.75, | ||
pretrained=None, | ||
backbone=dict( | ||
type='CSPBepBackbone', | ||
num_repeats=[1, 6, 12, 18, 6], | ||
out_channels=[64, 128, 256, 512, 1024], | ||
csp_e=float(1)/2, | ||
), | ||
neck=dict( | ||
type='CSPRepPANNeck', | ||
num_repeats=[12, 12, 12, 12], | ||
out_channels=[256, 128, 128, 256, 256, 512], | ||
csp_e=float(1)/2, | ||
), | ||
head=dict( | ||
type='EffiDeHead', | ||
in_channels=[128, 256, 512], | ||
num_layers=3, | ||
begin_indices=24, | ||
anchors=1, | ||
out_indices=[17, 20, 23], | ||
strides=[8, 16, 32], | ||
iou_type='giou', | ||
use_dfl=True, | ||
reg_max=16, #if use_dfl is False, please set reg_max to 0 | ||
distill_weight={ | ||
'class': 1.0, | ||
'dfl': 1.0, | ||
}, | ||
) | ||
) | ||
|
||
solver=dict( | ||
optim='SGD', | ||
lr_scheduler='Cosine', | ||
lr0=0.01, | ||
lrf=0.01, | ||
momentum=0.937, | ||
weight_decay=0.0005, | ||
warmup_epochs=3.0, | ||
warmup_momentum=0.8, | ||
warmup_bias_lr=0.1 | ||
) | ||
|
||
data_aug = dict( | ||
hsv_h=0.015, | ||
hsv_s=0.7, | ||
hsv_v=0.4, | ||
degrees=0.0, | ||
translate=0.1, | ||
scale=0.9, | ||
shear=0.0, | ||
flipud=0.0, | ||
fliplr=0.5, | ||
mosaic=1.0, | ||
mixup=0.1, | ||
) | ||
training_mode = "conv_relu" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# YOLOv6 medium/large base model | ||
model = dict( | ||
type='YOLOv6m_base', | ||
depth_multiple=0.80, | ||
width_multiple=0.75, | ||
pretrained=None, | ||
backbone=dict( | ||
type='CSPBepBackbone', | ||
num_repeats=[1, 6, 12, 18, 6], | ||
out_channels=[64, 128, 256, 512, 1024], | ||
csp_e=float(1)/2, | ||
), | ||
neck=dict( | ||
type='CSPRepPANNeck', | ||
num_repeats=[12, 12, 12, 12], | ||
out_channels=[256, 128, 128, 256, 256, 512], | ||
csp_e=float(1)/2, | ||
), | ||
head=dict( | ||
type='EffiDeHead', | ||
in_channels=[128, 256, 512], | ||
num_layers=3, | ||
begin_indices=24, | ||
anchors=1, | ||
out_indices=[17, 20, 23], | ||
strides=[8, 16, 32], | ||
iou_type='giou', | ||
use_dfl=True, | ||
reg_max=16, #if use_dfl is False, please set reg_max to 0 | ||
distill_weight={ | ||
'class': 1.0, | ||
'dfl': 1.0, | ||
}, | ||
) | ||
) | ||
|
||
solver = dict( | ||
optim='SGD', | ||
lr_scheduler='Cosine', | ||
lr0=0.0032, | ||
lrf=0.12, | ||
momentum=0.843, | ||
weight_decay=0.00036, | ||
warmup_epochs=2.0, | ||
warmup_momentum=0.5, | ||
warmup_bias_lr=0.05 | ||
) | ||
|
||
data_aug = dict( | ||
hsv_h=0.0138, | ||
hsv_s=0.664, | ||
hsv_v=0.464, | ||
degrees=0.373, | ||
translate=0.245, | ||
scale=0.898, | ||
shear=0.602, | ||
flipud=0.00856, | ||
fliplr=0.5, | ||
mosaic=1.0, | ||
mixup=0.243, | ||
) | ||
training_mode = "conv_relu" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# YOLOv6 nano base model | ||
model = dict( | ||
type='YOLOv6n_base', | ||
depth_multiple=0.33, | ||
width_multiple=0.25, | ||
pretrained=None, | ||
backbone=dict( | ||
type='EfficientRep', | ||
num_repeats=[1, 6, 12, 18, 6], | ||
out_channels=[64, 128, 256, 512, 1024], | ||
), | ||
neck=dict( | ||
type='RepPANNeck', | ||
num_repeats=[12, 12, 12, 12], | ||
out_channels=[256, 128, 128, 256, 256, 512], | ||
), | ||
head=dict( | ||
type='EffiDeHead', | ||
in_channels=[128, 256, 512], | ||
num_layers=3, | ||
begin_indices=24, | ||
anchors=1, | ||
out_indices=[17, 20, 23], | ||
strides=[8, 16, 32], | ||
iou_type='giou', | ||
use_dfl=False, | ||
reg_max=0 #if use_dfl is False, please set reg_max to 0 | ||
) | ||
) | ||
|
||
solver=dict( | ||
optim='SGD', | ||
lr_scheduler='Cosine', | ||
lr0=0.01, | ||
lrf=0.01, | ||
momentum=0.937, | ||
weight_decay=0.0005, | ||
warmup_epochs=3.0, | ||
warmup_momentum=0.8, | ||
warmup_bias_lr=0.1 | ||
) | ||
|
||
data_aug = dict( | ||
hsv_h=0.015, | ||
hsv_s=0.7, | ||
hsv_v=0.4, | ||
degrees=0.0, | ||
translate=0.1, | ||
scale=0.5, | ||
shear=0.0, | ||
flipud=0.0, | ||
fliplr=0.5, | ||
mosaic=1.0, | ||
mixup=0.0, | ||
) | ||
training_mode = "conv_relu" |
Oops, something went wrong.