Skip to content

Commit

Permalink
[Update] Refactor Docs (open-mmlab#573)
Browse files Browse the repository at this point in the history
* update get_started

* update

* update

* update

* update

* update

* update

* fix

* fix

* refactor en

* update

* update

* update
  • Loading branch information
hhaAndroid authored Feb 21, 2023
1 parent 4e8baf8 commit 260509a
Show file tree
Hide file tree
Showing 96 changed files with 2,393 additions and 2,311 deletions.
116 changes: 87 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
[![issue resolution](https://isitmaintained.com/badge/resolution/open-mmlab/mmyolo.svg)](https://github.com/open-mmlab/mmyolo/issues)

[📘Documentation](https://mmyolo.readthedocs.io/en/latest/) |
[🛠️Installation](https://mmyolo.readthedocs.io/en/latest/get_started.html) |
[🛠️Installation](https://mmyolo.readthedocs.io/en/latest/get_started/installation.html) |
[👀Model Zoo](https://mmyolo.readthedocs.io/en/latest/model_zoo.html) |
[🆕Update News](https://mmyolo.readthedocs.io/en/latest/notes/changelog.html) |
[🤔Reporting Issues](https://github.com/open-mmlab/mmyolo/issues/new/choose)
Expand Down Expand Up @@ -129,13 +129,13 @@ The master branch works with **PyTorch 1.6+**.
<img src="https://user-images.githubusercontent.com/27466624/199999337-0544a4cb-3cbd-4f3e-be26-bcd9e74db7ff.jpg" alt="BaseModule-P5"/>
The figure above is contributed by RangeKing@GitHub, thank you very much!

And the figure of P6 model is in [model_design.md](docs/en/algorithm_descriptions/model_design.md).
And the figure of P6 model is in [model_design.md](docs/en/recommended_topics/model_design.md).

</details>

## 🛠️ Installation [🔝](#-table-of-contents)

MMYOLO relies on PyTorch, MMCV, MMEngine, and MMDetection. Below are quick steps for installation. Please refer to the [Install Guide](docs/en/get_started.md) for more detailed instructions.
MMYOLO relies on PyTorch, MMCV, MMEngine, and MMDetection. Below are quick steps for installation. Please refer to the [Install Guide](docs/en/get_started/installation.md) for more detailed instructions.

```shell
conda create -n open-mmlab python=3.8 pytorch==1.10.1 torchvision==0.11.2 cudatoolkit=11.3 -c pytorch -y
Expand All @@ -160,38 +160,96 @@ The usage of MMYOLO is almost identical to MMDetection and all tutorials are str

For different parts from MMDetection, we have also prepared user guides and advanced guides, please read our [documentation](https://mmyolo.readthedocs.io/zenh_CN/latest/).

- User Guides
<details>
<summary>Get Started</summary>

- [Train & Test](https://mmyolo.readthedocs.io/en/latest/user_guides/index.html#train-test)
- [Learn about Configs with YOLOv5](docs/en/user_guides/config.md)
- [From getting started to deployment](https://mmyolo.readthedocs.io/en/latest/user_guides/index.html#get-started-to-deployment)
- [Custom Dataset](docs/en/user_guides/custom_dataset.md)
- [From getting started to deployment with YOLOv5](docs/en/user_guides/yolov5_tutorial.md)
- [Useful Tools](https://mmdetection.readthedocs.io/en/latest/user_guides/index.html#useful-tools)
- [Visualization](docs/en/user_guides/visualization.md)
- [Useful Tools](docs/en/user_guides/useful_tools.md)
- [Overview](docs/en/get_started/overview.md)
- [Dependencies](docs/en/get_started/dependencies.md)
- [Installation](docs/en/get_started/installation.md)
- [15 minutes object detection](docs/en/get_started/15_minutes_object_detection.md)
- [15 minutes rotated object detection](docs/en/get_started/15_minutes_rotated_object_detection.md)
- [15 minutes instance segmentation](docs/en/get_started/15_minutes_instance_segmentation.md)
- [Resources summary](docs/en/get_started/article.md)

- Algorithm description
</details>

- [Essential Basics](https://mmyolo.readthedocs.io/en/latest/algorithm_descriptions/index.html#essential-basics)
- [Model design-related instructions](docs/en/algorithm_descriptions/model_design.md)
- [Algorithm principles and implementation](https://mmyolo.readthedocs.io/en/latest/algorithm_descriptions/index.html#algorithm-principles-and-implementation)
- [Algorithm principles and implementation with YOLOv5](docs/en/algorithm_descriptions/yolov5_description.md)
- [Algorithm principles and implementation with RTMDet](docs/en/algorithm_descriptions/rtmdet_description.md)
- [Algorithm principles and implementation with YOLOv8](docs/en/algorithm_descriptions/yolov8_description.md)
<details>
<summary>Recommended Topics</summary>

- [How to contribute code to MMYOLO](docs/en/recommended_topics/contributing.md)
- [MMYOLO model design](docs/en/recommended_topics/model_design.md)
- [Algorithm principles and implementation](docs/en/recommended_topics/algorithm_descriptions/)
- [Replace the backbone network](docs/en/recommended_topics/replace_backbone.md)
- [Annotation-to-deployment workflow for custom dataset](docs/en/recommended_topics/labeling_to_deployment_tutorials.md)
- [Visualization](docs/en/recommended_topics/visualization.md)
- [Model deployment](docs/en/recommended_topics/deploy/)
- [Troubleshooting steps](docs/en/recommended_topics/troubleshooting_steps.md)
- [MMYOLO industry examples](docs/en/recommended_topics/industry_examples.md)
- [MM series repo essential basics](docs/en/recommended_topics/mm_basics.md)
- [Dataset preparation and description](docs/en/recommended_topics/dataset_preparation.md)

- Deployment Guides
</details>

- [Basic Deployment Guide](https://mmyolo.readthedocs.io/en/latest/deploy/index.html#basic-deployment-guide)
- [Basic Deployment Guide](docs/en/deploy/basic_deployment_guide.md)
- [Deployment Tutorial](https://mmyolo.readthedocs.io/en/latest/deploy/index.html#deployment-tutorial)
- [YOLOv5 Deployment](docs/en/deploy/yolov5_deployment.md)
<details>
<summary>Common Usage</summary>

- [Resume training](docs/en/common_usage/resume_training.md)
- [Enabling and disabling SyncBatchNorm](docs/en/common_usage/syncbn.md)
- [Enabling AMP](docs/en/common_usage/amp_training.md)
- [Add plugins to the backbone network](docs/en/common_usage/plugins.md)
- [Freeze layers](docs/en/common_usage/common_usage/freeze_layers.md)
- [Output model predictions](docs/en/common_usage/output_predictions.md)
- [Set random seed](docs/en/common_usage/set_random_seed.md)
- [Module combination](docs/en/common_usage/module_combination.md)
- [Cross-library calls using mim](docs/en/common_usage/mim_usage.md)
- [Apply multiple Necks](docs/en/common_usage/multi_necks.md)
- [Specify specific device training or inference](docs/en/common_usage/specify_device.md)

- Advanced Guides
</details>

- [Data flow](docs/en/advanced_guides/data_flow.md)
- [How to](docs/en/advanced_guides/how_to.md)
- [Plugins](docs/en/advanced_guides/plugins.md)
<details>
<summary>Useful Tools</summary>

- [Browse coco json](docs/en/useful_tools/browse_coco_json.md)
- [Browse dataset](docs/en/useful_tools/browse_dataset.md)
- [Print config](docs/en/useful_tools/print_config.md)
- [Dataset analysis](docs/en/useful_tools/dataset_analysis.md)
- [Optimize anchors](docs/en/useful_tools/optimize_anchors.md)
- [Extract subcoco](docs/en/useful_tools/extract_subcoco.md)
- [Visualization scheduler](docs/en/useful_tools/vis_scheduler.md)
- [Dataset converters](docs/en/useful_tools/dataset_converters.md)
- [Download dataset](docs/en/useful_tools/download_dataset.md)
- [Log analysis](docs/en/useful_tools/log_analysis.md)
- [Model converters](docs/en/useful_tools/model_converters.md)

</details>

<details>
<summary>Basic Tutorials</summary>

- [Learn about configs with YOLOv5](docs/en/tutorials/config.md)
- [Data flow](docs/en/tutorials/data_flow.md)
- [Custom Installation](docs/en/tutorials/custom_installation.md)
- [FAQ](docs/en/tutorials/faq.md)

</details>

<details>
<summary>Advanced Tutorials</summary>

- [MMYOLO cross-library application](docs/en/advanced_guides/cross-library_application.md)

</details>

<details>
<summary>Descriptions</summary>

- [Changelog](docs/en/notes/changelog.md)
- [Compatibility](docs/en/notes/compatibility.md)
- [Conventions](docs/en/notes/conventions.md)
- [Code Style](docs/en/notes/code_style.md)

</details>

## 📊 Overview of Benchmark and Model Zoo [🔝](#-table-of-contents)

Expand Down Expand Up @@ -276,7 +334,7 @@ Results and models are available in the [model zoo](docs/en/model_zoo.md).

## ❓ FAQ [🔝](#-table-of-contents)

Please refer to the [FAQ](docs/en/notes/faq.md) for frequently asked questions.
Please refer to the [FAQ](docs/en/tutorials/faq.md) for frequently asked questions.

## 🙌 Contributing [🔝](#-table-of-contents)

Expand Down
36 changes: 19 additions & 17 deletions README_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ MMYOLO 是一个基于 PyTorch 和 MMDetection 的 YOLO 系列算法开源工具
<img src="https://user-images.githubusercontent.com/27466624/199999337-0544a4cb-3cbd-4f3e-be26-bcd9e74db7ff.jpg" alt="基类-P5"/>
图为 RangeKing@GitHub 提供,非常感谢!

P6 模型图详见 [model_design.md](docs/zh_cn/featured_topics/model_design.md)
P6 模型图详见 [model_design.md](docs/zh_cn/recommended_topics/model_design.md)

</details>

Expand Down Expand Up @@ -197,16 +197,17 @@ MMYOLO 用法和 MMDetection 几乎一致,所有教程都是通用的,你也
<details>
<summary>推荐专题</summary>

- [如何给 MMYOLO 贡献代码](docs/zh_cn/featured_topics/contributing.md)
- [MMYOLO 模型结构设计](docs/zh_cn/featured_topics/model_design.md)
- [MMYOLO 产业范例介绍](docs/zh_cn/featured_topics/industry_examples.md)
- [数据集准备和说明](docs/zh_cn/featured_topics/dataset_preparation.md)
- [原理和实现全解析](docs/zh_cn/featured_topics/algorithm_descriptions/)
- [轻松更换主干网络](docs/zh_cn/featured_topics/replace_backbone.md)
- [标注+训练+测试+部署全流程](docs/zh_cn/featured_topics/labeling_to_deployment_tutorials.md)
- [关于可视化的一切](docs/zh_cn/featured_topics/visualization.md)
- [模型部署流程](docs/zh_cn/featured_topics/deploy/)
- [常见错误排查步骤](docs/zh_cn/featured_topics/troubleshooting_steps.md)
- [如何给 MMYOLO 贡献代码](docs/zh_cn/recommended_topics/contributing.md)
- [MMYOLO 模型结构设计](docs/zh_cn/recommended_topics/model_design.md)
- [原理和实现全解析](docs/zh_cn/recommended_topics/algorithm_descriptions/)
- [轻松更换主干网络](docs/zh_cn/recommended_topics/replace_backbone.md)
- [标注+训练+测试+部署全流程](docs/zh_cn/recommended_topics/labeling_to_deployment_tutorials.md)
- [关于可视化的一切](docs/zh_cn/recommended_topics/visualization.md)
- [模型部署流程](docs/zh_cn/recommended_topics/deploy/)
- [常见错误排查步骤](docs/zh_cn/recommended_topics/troubleshooting_steps.md)
- [MMYOLO 产业范例介绍](docs/zh_cn/recommended_topics/industry_examples.md)
- [MM 系列 Repo 必备基础](docs/zh_cn/recommended_topics/mm_basics.md)
- [数据集准备和说明](docs/zh_cn/recommended_topics/dataset_preparation.md)

</details>

Expand All @@ -220,10 +221,10 @@ MMYOLO 用法和 MMDetection 几乎一致,所有教程都是通用的,你也
- [冻结指定网络层权重](docs/zh_cn/common_usage/common_usage/freeze_layers.md)
- [输出模型预测结果](docs/zh_cn/common_usage/output_predictions.md)
- [设置随机种子](docs/zh_cn/common_usage/set_random_seed.md)
- [算法组合替换教程](docs/zh_cn/common_usage/module_combination.md)
- [使用 mim 跨库调用其他 OpenMMLab 仓库的脚本](docs/zh_cn/common_usage/mim_usage.md)
- [应用多个 Neck](docs/zh_cn/common_usage/multi_necks.md)
- [指定特定设备训练或推理](docs/zh_cn/common_usage/specify_device.md)
- [算法组合替换教程](docs/zh_cn/common_usage/module_combination.md)

</details>

Expand All @@ -232,15 +233,15 @@ MMYOLO 用法和 MMDetection 几乎一致,所有教程都是通用的,你也

- [可视化 COCO 标签](docs/zh_cn/useful_tools/browse_coco_json.md)
- [可视化数据集](docs/zh_cn/useful_tools/browse_dataset.md)
- [打印完整配置文件](docs/zh_cn/useful_tools/print_config.md)
- [可视化数据集分析结果](docs/zh_cn/useful_tools/dataset_analysis.md)
- [优化锚框尺寸](docs/zh_cn/useful_tools/optimize_anchors.md)
- [提取 COCO 子集](docs/zh_cn/useful_tools/extract_subcoco.md)
- [可视化优化器参数策略](docs/zh_cn/useful_tools/vis_scheduler.md)
- [数据集转换](docs/zh_cn/useful_tools/dataset_converters.md)
- [数据集下载](docs/zh_cn/useful_tools/download_dataset.md)
- [提取 COCO 子集](docs/zh_cn/useful_tools/extract_subcoco.md)
- [日志分析](docs/zh_cn/useful_tools/log_analysis.md)
- [模型转换](docs/zh_cn/useful_tools/model_converters.md)
- [优化锚框尺寸](docs/zh_cn/useful_tools/optimize_anchors.md)
- [打印完整配置文件](docs/zh_cn/useful_tools/print_config.md)
- [可视化优化器参数策略](docs/zh_cn/useful_tools/vis_scheduler.md)

</details>

Expand All @@ -249,6 +250,7 @@ MMYOLO 用法和 MMDetection 几乎一致,所有教程都是通用的,你也

- [学习 YOLOv5 配置文件](docs/zh_cn/tutorials/config.md)
- [数据流](docs/zh_cn/tutorials/data_flow.md)
- [自定义安装](docs/zh_cn/tutorials/custom_installation.md)
- [常见问题](docs/zh_cn/tutorials/faq.md)

</details>
Expand Down Expand Up @@ -353,7 +355,7 @@ MMYOLO 用法和 MMDetection 几乎一致,所有教程都是通用的,你也

## ❓ 常见问题 [🔝](#-table-of-contents)

请参考 [FAQ](docs/zh_cn/featured_topics/faq.md) 了解其他用户的常见问题。
请参考 [FAQ](docs/zh_cn/tutorials/faq.md) 了解其他用户的常见问题。

## 🙌 贡献指南 [🔝](#-table-of-contents)

Expand Down
52 changes: 52 additions & 0 deletions configs/yolov5/yolov5_s-v61_fast_1xb12-40e_cat.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
_base_ = 'yolov5_s-v61_syncbn_fast_8xb16-300e_coco.py'

data_root = './data/cat/'
class_name = ('cat', )
num_classes = len(class_name)
metainfo = dict(classes=class_name, palette=[(20, 220, 60)])

anchors = [
[(68, 69), (154, 91), (143, 162)], # P3/8
[(242, 160), (189, 287), (391, 207)], # P4/16
[(353, 337), (539, 341), (443, 432)] # P5/32
]

max_epochs = 40
train_batch_size_per_gpu = 12
train_num_workers = 4

load_from = 'https://download.openmmlab.com/mmyolo/v0/yolov5/yolov5_s-v61_syncbn_fast_8xb16-300e_coco/yolov5_s-v61_syncbn_fast_8xb16-300e_coco_20220918_084700-86e02187.pth' # noqa

model = dict(
backbone=dict(frozen_stages=4),
bbox_head=dict(
head_module=dict(num_classes=num_classes),
prior_generator=dict(base_sizes=anchors)))

train_dataloader = dict(
batch_size=train_batch_size_per_gpu,
num_workers=train_num_workers,
dataset=dict(
data_root=data_root,
metainfo=metainfo,
ann_file='annotations/trainval.json',
data_prefix=dict(img='images/')))

val_dataloader = dict(
dataset=dict(
metainfo=metainfo,
data_root=data_root,
ann_file='annotations/trainval.json',
data_prefix=dict(img='images/')))

test_dataloader = val_dataloader

val_evaluator = dict(ann_file=data_root + 'annotations/trainval.json')
test_evaluator = val_evaluator

default_hooks = dict(
checkpoint=dict(interval=10, max_keep_ckpts=2, save_best='auto'),
param_scheduler=dict(max_epochs=max_epochs),
logger=dict(type='LoggerHook', interval=5))
train_cfg = dict(max_epochs=max_epochs, val_interval=10)
# visualizer = dict(vis_backends = [dict(type='LocalVisBackend'), dict(type='WandbVisBackend')]) # noqa
1 change: 1 addition & 0 deletions docs/en/advanced_guides/cross-library_application.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# MMYOLO cross-library application
Loading

0 comments on commit 260509a

Please sign in to comment.