Skip to content

Commit

Permalink
use pre-commit to remove blanks.
Browse files Browse the repository at this point in the history
  • Loading branch information
mtjhl committed May 9, 2023
1 parent 494f58f commit 5a67f6a
Show file tree
Hide file tree
Showing 67 changed files with 355 additions and 358 deletions.
13 changes: 8 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Implementation of paper:
- [2023.01.06] Release P6 models and enhance the performance of P5 models. ⭐️ [Benchmark](#Benchmark)
- [2022.11.04] Release [base models](configs/base/README.md) to simplify the training and deployment process.
- [2022.09.06] Customized quantization methods. 🚀 [Quantization Tutorial](./tools/qat/README.md)
- [2022.09.05] Release M/L models and update N/T/S models with enhanced performance.
- [2022.09.05] Release M/L models and update N/T/S models with enhanced performance.
- [2022.06.23] Release N/T/S models with excellent performance.

## Benchmark
Expand All @@ -49,7 +49,7 @@ Implementation of paper:
<details>
<summary>Table Notes</summary>

- All checkpoints are trained with self-distillation except for YOLOv6-N6/S6 models trained to 300 epochs without distillation.
- All checkpoints are trained with self-distillation except for YOLOv6-N6/S6 models trained to 300 epochs without distillation.
- Results of the mAP and speed are evaluated on [COCO val2017](https://cocodataset.org/#download) dataset with the input resolution of 640×640 for P5 models and 1280x1280 for P6 models.
- Speed is tested with TensorRT 7.2 on T4.
- Refer to [Test speed](./docs/Test_speed.md) tutorial to reproduce the speed results of YOLOv6.
Expand Down Expand Up @@ -96,7 +96,7 @@ Implementation of paper:
<details>
<summary>Table Notes</summary>

- From the perspective of model size and input image ratio, we have built a series of models on the mobile terminal to facilitate flexible applications in different scenarios.
- From the perspective of model size and input image ratio, we have built a series of models on the mobile terminal to facilitate flexible applications in different scenarios.
- All checkpoints are trained with 400 epochs without distillation.
- Results of the mAP and speed are evaluated on [COCO val2017](https://cocodataset.org/#download) dataset, and the input resolution is the Size in the table.
- Speed is tested on MNN 2.3.0 AArch64 with 2 threads by arm82 acceleration. The inference warm-up is performed 10 times, and the cycle is performed 100 times.
Expand Down Expand Up @@ -180,7 +180,7 @@ python tools/train.py --resume
# multi GPU training.
python -m torch.distributed.launch --nproc_per_node 8 tools/train.py --resume
```
Above command will automatically find the latest checkpoint in YOLOv6 directory, then resume the training process.
Above command will automatically find the latest checkpoint in YOLOv6 directory, then resume the training process.

Your can also specify a checkpoint path to `--resume` parameter by
```
Expand Down Expand Up @@ -246,7 +246,7 @@ python tools/infer.py --weights yolov6s6.pt --img 1280 1280 --webcam --webcam-ad
<details open>
<summary> Tutorials</summary>

* [User Guide(zh_CN)](https://yolov6-docs.readthedocs.io/zh_CN/latest/)
* [User Guide(zh_CN)](https://yolov6-docs.readthedocs.io/zh_CN/latest/)
* [Train COCO Dataset](./docs/Train_coco_data.md)
* [Train custom data](./docs/Train_custom_data.md)
* [Test speed](./docs/Test_speed.md)
Expand All @@ -266,7 +266,7 @@ python tools/infer.py --weights yolov6s6.pt --img 1280 1280 --webcam --webcam-ad

* [YOLOv6 web demo](https://huggingface.co/spaces/nateraw/yolov6) on [Huggingface Spaces](https://huggingface.co/spaces) with [Gradio](https://github.com/gradio-app/gradio). [![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/nateraw/yolov6)

* [Interactive demo](https://yolov6.dagshubusercontent.com/) on [DagsHub](https://dagshub.com) with [Streamlit](https://github.com/streamlit/streamlit)
* [Interactive demo](https://yolov6.dagshubusercontent.com/) on [DagsHub](https://dagshub.com) with [Streamlit](https://github.com/streamlit/streamlit)

* Tutorial: [How to train YOLOv6 on a custom dataset](https://blog.roboflow.com/how-to-train-yolov6-on-a-custom-dataset/) <a href="https://colab.research.google.com/drive/1YnbqOinBZV-c9I7fk_UL6acgnnmkXDMM"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a>

Expand Down
10 changes: 5 additions & 5 deletions README_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

## YOLOv6

官方论文:
官方论文:
- [YOLOv6 v3.0: A Full-Scale Reloading](https://arxiv.org/abs/2301.05586) 🔥
- [YOLOv6: A Single-Stage Object Detection Framework for Industrial Applications](https://arxiv.org/abs/2209.02976)

Expand All @@ -22,7 +22,7 @@
- [2023.01.06] 发布大分辨率 P6 模型以及对 P5 模型做了全面的升级 ⭐️ [模型指标](#模型指标)
- [2022.11.04] 发布 [基础版模型](configs/base/README_cn.md) 简化训练部署流程
- [2022.09.06] 定制化的模型量化加速方法 🚀 [量化教程](./tools/qat/README.md)
- [2022.09.05] 发布 M/L 模型,并且进一步提高了 N/T/S 模型的性能
- [2022.09.05] 发布 M/L 模型,并且进一步提高了 N/T/S 模型的性能
- [2022.06.23] 发布 N/T/S v1.0 版本模型

## 模型指标
Expand All @@ -41,7 +41,7 @@
<details>
<summary>表格笔记</summary>

- 除了 YOLOv6-N6/S6 模型是训练了300轮的结果,其余模型均为自蒸馏训练之后的结果;
- 除了 YOLOv6-N6/S6 模型是训练了300轮的结果,其余模型均为自蒸馏训练之后的结果;
- mAP 和速度指标是在 [COCO val2017](https://cocodataset.org/#download) 数据集上评估的,P5模型输入分辨率为 640×640,P6模型输入分辨率为 1280×1280;
- 速度是在 T4 上测试的,TensorRT 版本为 7.2;
- 复现 YOLOv6 的速度指标,请查看 [速度测试](./docs/Test_speed.md) 教程;
Expand Down Expand Up @@ -238,7 +238,7 @@ python tools/infer.py --weights yolov6s6.pt --img 1280 1280 --webcam --webcam-ad
<details open>
<summary> 教程 </summary>

* [用户手册(中文版)](https://yolov6-docs.readthedocs.io/zh_CN/latest/)
* [用户手册(中文版)](https://yolov6-docs.readthedocs.io/zh_CN/latest/)
* [训练 COCO 数据集](./docs/Train_coco_data.md)
* [训练自定义数据集](./docs/Train_custom_data.md)
* [测速](./docs/Test_speed.md)
Expand All @@ -263,4 +263,4 @@ python tools/infer.py --weights yolov6s6.pt --img 1280 1280 --webcam --webcam-ad
如果您有任何问题,欢迎加入我们的微信群一起讨论交流!
<p align="center">
<img src="assets/wechat_qrcode.png" align="middle" width = "1000" />
</p>
</p>
2 changes: 1 addition & 1 deletion configs/base/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ Advantage:
| [**YOLOv6-L-base**](https://github.com/meituan/YOLOv6/releases/download/0.3.0/yolov6l_base.pt) | 640 | 51.1<sup>distill | 116 | 157 | 196 | 288 | 59.61 | 150.89 |

- Speed is tested with TensorRT 8.2.4.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).
- 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).
16 changes: 8 additions & 8 deletions configs/base/yolov6l_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
model = dict(
type='YOLOv6l_base',
pretrained=None,
depth_multiple=1.0,
depth_multiple=1.0,
width_multiple=1.0,
backbone=dict(
type='CSPBepBackbone',
Expand All @@ -23,8 +23,8 @@
num_layers=3,
begin_indices=24,
anchors=3,
anchors_init=[[10,13, 19,19, 33,23],
[30,61, 59,59, 59,119],
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],
Expand All @@ -48,12 +48,12 @@
weight_decay=0.0005,
warmup_epochs=3.0,
warmup_momentum=0.8,
warmup_bias_lr=0.1
warmup_bias_lr=0.1
)

data_aug = dict(
hsv_h=0.015,
hsv_s=0.7,
hsv_h=0.015,
hsv_s=0.7,
hsv_v=0.4,
degrees=0.0,
translate=0.1,
Expand All @@ -64,4 +64,4 @@
mosaic=1.0,
mixup=0.1,
)
training_mode = "conv_relu"
training_mode = "conv_relu"
2 changes: 1 addition & 1 deletion configs/base/yolov6l_base_finetune.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@
mosaic=1.0,
mixup=0.243,
)
training_mode = "conv_relu"
training_mode = "conv_relu"
16 changes: 8 additions & 8 deletions configs/base/yolov6m_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
model = dict(
type='YOLOv6m_base',
pretrained=None,
depth_multiple=0.80,
depth_multiple=0.80,
width_multiple=0.75,
backbone=dict(
type='CSPBepBackbone',
Expand All @@ -23,8 +23,8 @@
num_layers=3,
begin_indices=24,
anchors=3,
anchors_init=[[10,13, 19,19, 33,23],
[30,61, 59,59, 59,119],
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],
Expand All @@ -48,12 +48,12 @@
weight_decay=0.0005,
warmup_epochs=3.0,
warmup_momentum=0.8,
warmup_bias_lr=0.1
warmup_bias_lr=0.1
)

data_aug = dict(
hsv_h=0.015,
hsv_s=0.7,
hsv_h=0.015,
hsv_s=0.7,
hsv_v=0.4,
degrees=0.0,
translate=0.1,
Expand All @@ -64,4 +64,4 @@
mosaic=1.0,
mixup=0.1,
)
training_mode = "conv_relu"
training_mode = "conv_relu"
6 changes: 3 additions & 3 deletions configs/base/yolov6m_base_finetune.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
model = dict(
type='YOLOv6m_base',
pretrained=None,
depth_multiple=0.80,
depth_multiple=0.80,
width_multiple=0.75,
backbone=dict(
type='CSPBepBackbone',
Expand All @@ -23,8 +23,8 @@
num_layers=3,
begin_indices=24,
anchors=3,
anchors_init=[[10,13, 19,19, 33,23],
[30,61, 59,59, 59,119],
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],
Expand Down
10 changes: 5 additions & 5 deletions configs/base/yolov6n_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@
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],
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, # set to True if you want to further train with distillation
use_dfl=True, # set to True if you want to further train with distillation
reg_max=16, # set to 16 if you want to further train with distillation
distill_weight={
'class': 1.0,
Expand Down Expand Up @@ -63,4 +63,4 @@
mosaic=1.0,
mixup=0.0,
)
training_mode = "conv_relu"
training_mode = "conv_relu"
8 changes: 4 additions & 4 deletions configs/base/yolov6n_base_finetune.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@
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],
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=False, # set to True if you want to further train with distillation
use_dfl=False, # set to True if you want to further train with distillation
reg_max=0, # set to 16 if you want to further train with distillation
distill_weight={
'class': 1.0,
Expand Down
6 changes: 3 additions & 3 deletions configs/base/yolov6s_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
num_layers=3,
begin_indices=24,
anchors=3,
anchors_init=[[10,13, 19,19, 33,23],
[30,61, 59,59, 59,119],
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, # set to True if you want to further train with distillation
use_dfl=True, # set to True if you want to further train with distillation
reg_max=16, # set to 16 if you want to further train with distillation
distill_weight={
'class': 1.0,
Expand Down
8 changes: 4 additions & 4 deletions configs/base/yolov6s_base_finetune.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
num_layers=3,
begin_indices=24,
anchors=3,
anchors_init=[[10,13, 19,19, 33,23],
[30,61, 59,59, 59,119],
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=False, # set to True if you want to further train with distillation
use_dfl=False, # set to True if you want to further train with distillation
reg_max=0, # set to 16 if you want to further train with distillation
distill_weight={
'class': 1.0,
Expand Down Expand Up @@ -65,4 +65,4 @@
mosaic=1.0,
mixup=0.243,
)
training_mode = "conv_relu"
training_mode = "conv_relu"
2 changes: 1 addition & 1 deletion configs/mbla/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ Advantage:
| [**YOLOv6-X-base**](https://github.com/meituan/YOLOv6/releases/download/0.4.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).
- 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).
16 changes: 8 additions & 8 deletions configs/mbla/yolov6l_mbla.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
model = dict(
type='YOLOv6l_mbla',
pretrained=None,
depth_multiple=0.5,
depth_multiple=0.5,
width_multiple=1.0,
backbone=dict(
type='CSPBepBackbone',
Expand All @@ -25,8 +25,8 @@
num_layers=3,
begin_indices=24,
anchors=3,
anchors_init=[[10,13, 19,19, 33,23],
[30,61, 59,59, 59,119],
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],
Expand All @@ -50,12 +50,12 @@
weight_decay=0.0005,
warmup_epochs=3.0,
warmup_momentum=0.8,
warmup_bias_lr=0.1
warmup_bias_lr=0.1
)

data_aug = dict(
hsv_h=0.015,
hsv_s=0.7,
hsv_h=0.015,
hsv_s=0.7,
hsv_v=0.4,
degrees=0.0,
translate=0.1,
Expand All @@ -67,4 +67,4 @@
mixup=0.1,
)

training_mode = "conv_silu"
training_mode = "conv_silu"
8 changes: 4 additions & 4 deletions configs/mbla/yolov6l_mbla_finetune.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
model = dict(
type='YOLOv6l_mbla',
pretrained=None,
depth_multiple=0.5,
depth_multiple=0.5,
width_multiple=1.0,
backbone=dict(
type='CSPBepBackbone',
Expand All @@ -25,8 +25,8 @@
num_layers=3,
begin_indices=24,
anchors=3,
anchors_init=[[10,13, 19,19, 33,23],
[30,61, 59,59, 59,119],
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],
Expand Down Expand Up @@ -67,4 +67,4 @@
mixup=0.243,
)

training_mode = "conv_silu"
training_mode = "conv_silu"
Loading

0 comments on commit 5a67f6a

Please sign in to comment.