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 network for lightweight models on mobile or CPU * simplify eval input parameters * update * update yolov6lite README.md * fix bug * fix resume loss&mAP bug * update README --------- Co-authored-by: gengyifei <[email protected]> Co-authored-by: YIF <[email protected]>
- Loading branch information
1 parent
d9c0491
commit 867c60a
Showing
39 changed files
with
3,247 additions
and
280 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 mbla model | ||
|
||
English | [简体中文](./README_cn.md) | ||
|
||
### Features | ||
|
||
- Apply MBLABlock(Multi Branch Layer Aggregation Block) blocks in the network structure. | ||
|
||
Advantage: | ||
- Adopt a unified network structure and configuration. | ||
|
||
- Better performance for Small model comparing to yolov6 3.0 release. | ||
|
||
- Better performance comparing to yolov6 3.0 base. | ||
|
||
|
||
|
||
### 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-S-mbla**](https://github.com/meituan/YOLOv6/releases/download/0.3.0/yolov6s_mbla.pt) | 640 | 47.0<sup>distill | 300 | 424 | 11.6 | 29.8 | | ||
| [**YOLOv6-M-mbla**](https://github.com/meituan/YOLOv6/releases/download/0.3.0/yolov6m_mbla.pt) | 640 | 50.3<sup>distill | 168 | 216 | 26.1 | 66.7 | | ||
| [**YOLOv6-L-mbla**](https://github.com/meituan/YOLOv6/releases/download/0.3.0/yolov6l_base.pt) | 640 | 52.0<sup>distill | 129 | 154 | 46.3 | 118.2 | | ||
| [**YOLOv6-X-base**](https://github.com/meituan/YOLOv6/releases/download/0.3.0/yolov6x_base.pt) | 640 | 53.5<sup>distill | 78 | 94 | 78.8 | 199.0 | | ||
|
||
- Speed is tested with TensorRT 8.4.2.4 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,26 @@ | ||
## YOLOv6 MBLA版模型 | ||
|
||
简体中文 | [English](./README.md) | ||
|
||
### 模型特点 | ||
|
||
- 网络主体结构均采用MBLABlock(Multi Branch Layer Aggregation Block) | ||
|
||
优势: | ||
- 采用统一的网络结构和配置 | ||
|
||
- 相比3.0版本在s尺度效果提升,相比3.0base版本各尺度效果提升 | ||
|
||
|
||
|
||
### 模型指标 | ||
|
||
| 模型 | 输入尺寸 | 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-S-mbla**](https://github.com/meituan/YOLOv6/releases/download/0.3.0/yolov6s_mbla.pt) | 640 | 47.0<sup>distill | 300 | 424 | 11.6 | 29.8 | | ||
| [**YOLOv6-M-mbla**](https://github.com/meituan/YOLOv6/releases/download/0.3.0/yolov6m_mbla.pt) | 640 | 50.3<sup>distill | 168 | 216 | 26.1 | 66.7 | | ||
| [**YOLOv6-L-mbla**](https://github.com/meituan/YOLOv6/releases/download/0.3.0/yolov6l_base.pt) | 640 | 52.0<sup>distill | 129 | 154 | 46.3 | 118.2 | | ||
| [**YOLOv6-X-base**](https://github.com/meituan/YOLOv6/releases/download/0.3.0/yolov6x_base.pt) | 640 | 53.5<sup>distill | 78 | 94 | 78.8 | 199.0 | | ||
|
||
- 速度是在 T4 上测试的,TensorRT 版本为 8.4.2.4; | ||
- 模型训练、评估、推理流程与原来保持一致,具体可参考 [首页 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,70 @@ | ||
# YOLOv6l model | ||
model = dict( | ||
type='YOLOv6l_mbla', | ||
pretrained=None, | ||
depth_multiple=0.5, | ||
width_multiple=1.0, | ||
backbone=dict( | ||
type='CSPBepBackbone', | ||
num_repeats=[1, 4, 8, 8, 4], | ||
out_channels=[64, 128, 256, 512, 1024], | ||
csp_e=float(1)/2, | ||
fuse_P2=True, | ||
stage_block_type="MBLABlock", | ||
), | ||
neck=dict( | ||
type='CSPRepBiFPANNeck', | ||
num_repeats=[8, 8, 8, 8], | ||
out_channels=[256, 128, 128, 256, 256, 512], | ||
csp_e=float(1)/2, | ||
stage_block_type="MBLABlock", | ||
), | ||
head=dict( | ||
type='EffiDeHead', | ||
in_channels=[128, 256, 512], | ||
num_layers=3, | ||
begin_indices=24, | ||
anchors=3, | ||
anchors_init=[[10,13, 19,19, 33,23], | ||
[30,61, 59,59, 59,119], | ||
[116,90, 185,185, 373,326]], | ||
out_indices=[17, 20, 23], | ||
strides=[8, 16, 32], | ||
atss_warmup_epoch=0, | ||
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_silu" |
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,70 @@ | ||
# YOLOv6l model | ||
model = dict( | ||
type='YOLOv6l_mbla', | ||
pretrained=None, | ||
depth_multiple=0.5, | ||
width_multiple=1.0, | ||
backbone=dict( | ||
type='CSPBepBackbone', | ||
num_repeats=[1, 4, 8, 8, 4], | ||
out_channels=[64, 128, 256, 512, 1024], | ||
csp_e=float(1)/2, | ||
fuse_P2=True, | ||
stage_block_type="MBLABlock", | ||
), | ||
neck=dict( | ||
type='CSPRepBiFPANNeck', | ||
num_repeats=[8, 8, 8, 8], | ||
out_channels=[256, 128, 128, 256, 256, 512], | ||
csp_e=float(1)/2, | ||
stage_block_type="MBLABlock", | ||
), | ||
head=dict( | ||
type='EffiDeHead', | ||
in_channels=[128, 256, 512], | ||
num_layers=3, | ||
begin_indices=24, | ||
anchors=3, | ||
anchors_init=[[10,13, 19,19, 33,23], | ||
[30,61, 59,59, 59,119], | ||
[116,90, 185,185, 373,326]], | ||
out_indices=[17, 20, 23], | ||
strides=[8, 16, 32], | ||
atss_warmup_epoch=0, | ||
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_silu" |
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,70 @@ | ||
# YOLOv6l model | ||
model = dict( | ||
type='YOLOv6m_mbla', | ||
pretrained=None, | ||
depth_multiple=0.5, | ||
width_multiple=0.75, | ||
backbone=dict( | ||
type='CSPBepBackbone', | ||
num_repeats=[1, 4, 8, 8, 4], | ||
out_channels=[64, 128, 256, 512, 1024], | ||
csp_e=float(1)/2, | ||
fuse_P2=True, | ||
stage_block_type="MBLABlock", | ||
), | ||
neck=dict( | ||
type='CSPRepBiFPANNeck', | ||
num_repeats=[8, 8, 8, 8], | ||
out_channels=[256, 128, 128, 256, 256, 512], | ||
csp_e=float(1)/2, | ||
stage_block_type="MBLABlock", | ||
), | ||
head=dict( | ||
type='EffiDeHead', | ||
in_channels=[128, 256, 512], | ||
num_layers=3, | ||
begin_indices=24, | ||
anchors=3, | ||
anchors_init=[[10,13, 19,19, 33,23], | ||
[30,61, 59,59, 59,119], | ||
[116,90, 185,185, 373,326]], | ||
out_indices=[17, 20, 23], | ||
strides=[8, 16, 32], | ||
atss_warmup_epoch=0, | ||
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_silu" |
Oops, something went wrong.