From 520ec8e12851bcf05e34beeaee7e58bc17346ae2 Mon Sep 17 00:00:00 2001 From: MengzhangLI Date: Thu, 16 Dec 2021 18:56:45 +0800 Subject: [PATCH] [Docs] Refactor the structure of documentation (#1128) * merge docs/ and docs_zh-CN/ * merge docs/ and docs_zh-CN/ * merge docs/ and docs_zh-CN/ * merge docs/ and docs_zh-CN/ * fix launch utility url * fix launch utility url * fix wrong pytorch doc url * remove wrong links docs// --- .github/workflows/build.yml | 1 - .gitignore | 3 +- README.md | 36 ++++++++--------- README_zh-CN.md | 38 +++++++++--------- demo/MMSegmentation_Tutorial.ipynb | 2 +- docs/{ => en}/Makefile | 0 docs/{ => en}/_static/css/readthedocs.css | 0 .../_static/images/mmsegmentation.png | Bin docs/{ => en}/api.rst | 0 docs/{ => en}/changelog.md | 0 docs/{ => en}/conf.py | 4 +- docs/{ => en}/dataset_prepare.md | 4 +- docs/{ => en}/get_started.md | 0 docs/{ => en}/index.rst | 0 docs/{ => en}/inference.md | 0 docs/{ => en}/make.bat | 0 docs/{ => en}/model_zoo.md | 0 docs/{ => en}/stat.py | 0 docs/{ => en}/switch_language.md | 0 docs/{ => en}/train.md | 2 +- docs/{ => en}/tutorials/config.md | 0 docs/{ => en}/tutorials/customize_datasets.md | 0 docs/{ => en}/tutorials/customize_models.md | 0 docs/{ => en}/tutorials/customize_runtime.md | 0 docs/{ => en}/tutorials/data_pipeline.md | 0 docs/{ => en}/tutorials/index.rst | 0 docs/{ => en}/tutorials/training_tricks.md | 0 docs/{ => en}/useful_tools.md | 2 +- {docs_zh-CN => docs/zh_cn}/Makefile | 0 .../zh_cn}/_static/css/readthedocs.css | 0 .../zh_cn}/_static/images/mmsegmentation.png | Bin {docs_zh-CN => docs/zh_cn}/api.rst | 0 {docs_zh-CN => docs/zh_cn}/conf.py | 4 +- {docs_zh-CN => docs/zh_cn}/dataset_prepare.md | 4 +- {docs_zh-CN => docs/zh_cn}/get_started.md | 0 .../zh_cn}/imgs/qq_group_qrcode.jpg | Bin .../zh_cn}/imgs/seggroup_qrcode.jpg | Bin .../zh_cn}/imgs/zhihu_qrcode.jpg | Bin {docs_zh-CN => docs/zh_cn}/index.rst | 0 {docs_zh-CN => docs/zh_cn}/inference.md | 0 {docs_zh-CN => docs/zh_cn}/make.bat | 0 {docs_zh-CN => docs/zh_cn}/model_zoo.md | 0 {docs_zh-CN => docs/zh_cn}/stat.py | 0 {docs_zh-CN => docs/zh_cn}/switch_language.md | 0 {docs_zh-CN => docs/zh_cn}/train.md | 2 +- .../zh_cn}/tutorials/config.md | 0 .../zh_cn}/tutorials/customize_datasets.md | 0 .../zh_cn}/tutorials/customize_models.md | 0 .../zh_cn}/tutorials/customize_runtime.md | 0 .../zh_cn}/tutorials/data_pipeline.md | 0 .../zh_cn}/tutorials/index.rst | 0 .../zh_cn}/tutorials/training_tricks.md | 0 {docs_zh-CN => docs/zh_cn}/useful_tools.md | 2 +- mmseg/datasets/custom.py | 2 +- 54 files changed, 53 insertions(+), 53 deletions(-) rename docs/{ => en}/Makefile (100%) rename docs/{ => en}/_static/css/readthedocs.css (100%) rename docs/{ => en}/_static/images/mmsegmentation.png (100%) rename docs/{ => en}/api.rst (100%) rename docs/{ => en}/changelog.md (100%) rename docs/{ => en}/conf.py (97%) rename docs/{ => en}/dataset_prepare.md (98%) rename docs/{ => en}/get_started.md (100%) rename docs/{ => en}/index.rst (100%) rename docs/{ => en}/inference.md (100%) rename docs/{ => en}/make.bat (100%) rename docs/{ => en}/model_zoo.md (100%) rename docs/{ => en}/stat.py (100%) rename docs/{ => en}/switch_language.md (100%) rename docs/{ => en}/train.md (99%) rename docs/{ => en}/tutorials/config.md (100%) rename docs/{ => en}/tutorials/customize_datasets.md (100%) rename docs/{ => en}/tutorials/customize_models.md (100%) rename docs/{ => en}/tutorials/customize_runtime.md (100%) rename docs/{ => en}/tutorials/data_pipeline.md (100%) rename docs/{ => en}/tutorials/index.rst (100%) rename docs/{ => en}/tutorials/training_tricks.md (100%) rename docs/{ => en}/useful_tools.md (98%) rename {docs_zh-CN => docs/zh_cn}/Makefile (100%) rename {docs_zh-CN => docs/zh_cn}/_static/css/readthedocs.css (100%) rename {docs_zh-CN => docs/zh_cn}/_static/images/mmsegmentation.png (100%) rename {docs_zh-CN => docs/zh_cn}/api.rst (100%) rename {docs_zh-CN => docs/zh_cn}/conf.py (97%) rename {docs_zh-CN => docs/zh_cn}/dataset_prepare.md (98%) rename {docs_zh-CN => docs/zh_cn}/get_started.md (100%) rename {docs_zh-CN => docs/zh_cn}/imgs/qq_group_qrcode.jpg (100%) rename {docs_zh-CN => docs/zh_cn}/imgs/seggroup_qrcode.jpg (100%) rename {docs_zh-CN => docs/zh_cn}/imgs/zhihu_qrcode.jpg (100%) rename {docs_zh-CN => docs/zh_cn}/index.rst (100%) rename {docs_zh-CN => docs/zh_cn}/inference.md (100%) rename {docs_zh-CN => docs/zh_cn}/make.bat (100%) rename {docs_zh-CN => docs/zh_cn}/model_zoo.md (100%) rename {docs_zh-CN => docs/zh_cn}/stat.py (100%) rename {docs_zh-CN => docs/zh_cn}/switch_language.md (100%) rename {docs_zh-CN => docs/zh_cn}/train.md (97%) rename {docs_zh-CN => docs/zh_cn}/tutorials/config.md (100%) rename {docs_zh-CN => docs/zh_cn}/tutorials/customize_datasets.md (100%) rename {docs_zh-CN => docs/zh_cn}/tutorials/customize_models.md (100%) rename {docs_zh-CN => docs/zh_cn}/tutorials/customize_runtime.md (100%) rename {docs_zh-CN => docs/zh_cn}/tutorials/data_pipeline.md (100%) rename {docs_zh-CN => docs/zh_cn}/tutorials/index.rst (100%) rename {docs_zh-CN => docs/zh_cn}/tutorials/training_tricks.md (100%) rename {docs_zh-CN => docs/zh_cn}/useful_tools.md (98%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 03c66331bd..628a9ca731 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,7 +16,6 @@ on: - 'docker/**' - 'tools/**' - 'docs/**' - - 'docs_zh-CN/**' - '**.md' concurrency: diff --git a/.gitignore b/.gitignore index 6bbdaec225..2c1ffb5b8d 100644 --- a/.gitignore +++ b/.gitignore @@ -64,7 +64,8 @@ instance/ .scrapy # Sphinx documentation -docs/_build/ +docs/en/_build/ +docs/zh_cn/_build/ # PyBuilder target/ diff --git a/README.md b/README.md index 641479bc78..ad3d1f699b 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ Please refer to [changelog.md](docs/changelog.md) for details and release histor ## Benchmark and model zoo -Results and models are available in the [model zoo](docs/model_zoo.md). +Results and models are available in the [model zoo](docs/en/model_zoo.md). Supported backbones: @@ -105,29 +105,29 @@ Supported methods: Supported datasets: -- [x] [Cityscapes](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/dataset_prepare.md#cityscapes) -- [x] [PASCAL VOC](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/dataset_prepare.md#pascal-voc) -- [x] [ADE20K](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/dataset_prepare.md#ade20k) -- [x] [Pascal Context](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/dataset_prepare.md#pascal-context) -- [x] [COCO-Stuff 10k](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/dataset_prepare.md#coco-stuff-10k) -- [x] [COCO-Stuff 164k](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/dataset_prepare.md#coco-stuff-164k) -- [x] [CHASE_DB1](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/dataset_prepare.md#chase-db1) -- [x] [DRIVE](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/dataset_prepare.md#drive) -- [x] [HRF](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/dataset_prepare.md#hrf) -- [x] [STARE](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/dataset_prepare.md#stare) -- [x] [Dark Zurich](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/dataset_prepare.md#dark-zurich) -- [x] [Nighttime Driving](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/dataset_prepare.md#nighttime-driving) -- [x] [LoveDA](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/dataset_prepare.md#loveda) +- [x] [Cityscapes](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/en/dataset_prepare.md#cityscapes) +- [x] [PASCAL VOC](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/en/dataset_prepare.md#pascal-voc) +- [x] [ADE20K](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/en/dataset_prepare.md#ade20k) +- [x] [Pascal Context](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/en/dataset_prepare.md#pascal-context) +- [x] [COCO-Stuff 10k](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/en/dataset_prepare.md#coco-stuff-10k) +- [x] [COCO-Stuff 164k](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/en/dataset_prepare.md#coco-stuff-164k) +- [x] [CHASE_DB1](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/en/dataset_prepare.md#chase-db1) +- [x] [DRIVE](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/en/dataset_prepare.md#drive) +- [x] [HRF](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/en/dataset_prepare.md#hrf) +- [x] [STARE](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/en/dataset_prepare.md#stare) +- [x] [Dark Zurich](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/en/dataset_prepare.md#dark-zurich) +- [x] [Nighttime Driving](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/en/dataset_prepare.md#nighttime-driving) +- [x] [LoveDA](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/en/dataset_prepare.md#loveda) ## Installation -Please refer to [get_started.md](docs/get_started.md#installation) for installation and [dataset_prepare.md](docs/dataset_prepare.md#prepare-datasets) for dataset preparation. +Please refer to [get_started.md](docs/en/get_started.md#installation) for installation and [dataset_prepare.md](docs/en/dataset_prepare.md#prepare-datasets) for dataset preparation. ## Get Started -Please see [train.md](docs/train.md) and [inference.md](docs/inference.md) for the basic usage of MMSegmentation. -There are also tutorials for [customizing dataset](docs/tutorials/customize_datasets.md), [designing data pipeline](docs/tutorials/data_pipeline.md), [customizing modules](docs/tutorials/customize_models.md), and [customizing runtime](docs/tutorials/customize_runtime.md). -We also provide many [training tricks](docs/tutorials/training_tricks.md) for better training and [useful tools](docs/useful_tools.md) for deployment. +Please see [train.md](docs/en/train.md) and [inference.md](docs/en/inference.md) for the basic usage of MMSegmentation. +There are also tutorials for [customizing dataset](docs/en/tutorials/customize_datasets.md), [designing data pipeline](docs/en/tutorials/data_pipeline.md), [customizing modules](docs/en/tutorials/customize_models.md), and [customizing runtime](docs/en/tutorials/customize_runtime.md). +We also provide many [training tricks](docs/en/tutorials/training_tricks.md) for better training and [useful tools](docs/en/useful_tools.md) for deployment. A Colab tutorial is also provided. You may preview the notebook [here](demo/MMSegmentation_Tutorial.ipynb) or directly [run](https://colab.research.google.com/github/open-mmlab/mmsegmentation/blob/master/demo/MMSegmentation_Tutorial.ipynb) on Colab. diff --git a/README_zh-CN.md b/README_zh-CN.md index 4c0d86315a..ce02499578 100644 --- a/README_zh-CN.md +++ b/README_zh-CN.md @@ -53,7 +53,7 @@ MMSegmentation 是一个基于 PyTorch 的语义分割开源工具箱。它是 O ## 基准测试和模型库 -测试结果和模型可以在[模型库](docs_zh-CN/model_zoo.md)中找到。 +测试结果和模型可以在[模型库](docs/zh_cn/model_zoo.md)中找到。 已支持的骨干网络: @@ -104,29 +104,29 @@ MMSegmentation 是一个基于 PyTorch 的语义分割开源工具箱。它是 O 已支持的数据集: -- [x] [Cityscapes](https://github.com/open-mmlab/mmsegmentation/blob/master/docs_zh-CN/dataset_prepare.md#cityscapes) -- [x] [PASCAL VOC](https://github.com/open-mmlab/mmsegmentation/blob/master/docs_zh-CN/dataset_prepare.md#pascal-voc) -- [x] [ADE20K](https://github.com/open-mmlab/mmsegmentation/blob/master/docs_zh-CN/dataset_prepare.md#ade20k) -- [x] [Pascal Context](https://github.com/open-mmlab/mmsegmentation/blob/master/docs_zh-CN/dataset_prepare.md#pascal-context) -- [x] [COCO-Stuff 10k](https://github.com/open-mmlab/mmsegmentation/blob/master/docs_zh-CN/dataset_prepare.md#coco-stuff-10k) -- [x] [COCO-Stuff 164k](https://github.com/open-mmlab/mmsegmentation/blob/master/docs_zh-CN/dataset_prepare.md#coco-stuff-164k) -- [x] [CHASE_DB1](https://github.com/open-mmlab/mmsegmentation/blob/master/docs_zh-CN/dataset_prepare.md#chase-db1) -- [x] [DRIVE](https://github.com/open-mmlab/mmsegmentation/blob/master/docs_zh-CN/dataset_prepare.md#drive) -- [x] [HRF](https://github.com/open-mmlab/mmsegmentation/blob/master/docs_zh-CN/dataset_prepare.md#hrf) -- [x] [STARE](https://github.com/open-mmlab/mmsegmentation/blob/master/docs_zh-CN/dataset_prepare.md#stare) -- [x] [Dark Zurich](https://github.com/open-mmlab/mmsegmentation/blob/master/docs_zh-CN/dataset_prepare.md#dark-zurich) -- [x] [Nighttime Driving](https://github.com/open-mmlab/mmsegmentation/blob/master/docs_zh-CN/dataset_prepare.md#nighttime-driving) -- [x] [LoveDA](https://github.com/open-mmlab/mmsegmentation/blob/master/docs_zh-CN/dataset_prepare.md#loveda) +- [x] [Cityscapes](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/zh_cn/dataset_prepare.md#cityscapes) +- [x] [PASCAL VOC](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/zh_cn/dataset_prepare.md#pascal-voc) +- [x] [ADE20K](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/zh_cn/dataset_prepare.md#ade20k) +- [x] [Pascal Context](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/zh_cn/dataset_prepare.md#pascal-context) +- [x] [COCO-Stuff 10k](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/zh_cn/dataset_prepare.md#coco-stuff-10k) +- [x] [COCO-Stuff 164k](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/zh_cn/dataset_prepare.md#coco-stuff-164k) +- [x] [CHASE_DB1](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/zh_cn/dataset_prepare.md#chase-db1) +- [x] [DRIVE](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/zh_cn/dataset_prepare.md#drive) +- [x] [HRF](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/zh_cn/dataset_prepare.md#hrf) +- [x] [STARE](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/zh_cn/dataset_prepare.md#stare) +- [x] [Dark Zurich](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/zh_cn/dataset_prepare.md#dark-zurich) +- [x] [Nighttime Driving](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/zh_cn/dataset_prepare.md#nighttime-driving) +- [x] [LoveDA](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/zh_cn/dataset_prepare.md#loveda) ## 安装 -请参考[快速入门文档](docs_zh-CN/get_started.md#installation)进行安装,参考[数据集准备](docs_zh-CN/dataset_prepare.md)处理数据。 +请参考[快速入门文档](docs/zh_cn/get_started.md#installation)进行安装,参考[数据集准备](docs/zh_cn/dataset_prepare.md)处理数据。 ## 快速入门 -请参考[训练教程](docs_zh-CN/train.md)和[测试教程](docs_zh-CN/inference.md)学习 MMSegmentation 的基本使用。 -我们也提供了一些进阶教程,内容覆盖了[增加自定义数据集](docs_zh-CN/tutorials/customize_datasets.md),[设计新的数据预处理流程](docs_zh-CN/tutorials/data_pipeline.md),[增加自定义模型](docs_zh-CN/tutorials/customize_models.md),[增加自定义的运行时配置](docs_zh-CN/tutorials/customize_runtime.md)。 -除此之外,我们也提供了很多实用的[训练技巧说明](docs_zh-CN/tutorials/training_tricks.md)和模型部署相关的[有用的工具](docs_zh-CN/useful_tools.md)。 +请参考[训练教程](docs/zh_cn/train.md)和[测试教程](docs/zh_cn/inference.md)学习 MMSegmentation 的基本使用。 +我们也提供了一些进阶教程,内容覆盖了[增加自定义数据集](docs/zh_cn/tutorials/customize_datasets.md),[设计新的数据预处理流程](docs/zh_cn/tutorials/data_pipeline.md),[增加自定义模型](docs/zh_cn/tutorials/customize_models.md),[增加自定义的运行时配置](docs/zh_cn/tutorials/customize_runtime.md)。 +除此之外,我们也提供了很多实用的[训练技巧说明](docs/zh_cn/tutorials/training_tricks.md)和模型部署相关的[有用的工具](docs/zh_cn/useful_tools.md)。 同时,我们提供了 Colab 教程。你可以在[这里](demo/MMSegmentation_Tutorial.ipynb)浏览教程,或者直接在 Colab 上[运行](https://colab.research.google.com/github/open-mmlab/mmsegmentation/blob/master/demo/MMSegmentation_Tutorial.ipynb)。 @@ -173,7 +173,7 @@ MMSegmentation 是一个由来自不同高校和企业的研发人员共同参 扫描下方的二维码可关注 OpenMMLab 团队的 [知乎官方账号](https://www.zhihu.com/people/openmmlab),加入 [OpenMMLab 团队](https://jq.qq.com/?_wv=1027&k=aCvMxdr3) 以及 [MMSegmentation](https://jq.qq.com/?_wv=1027&k=ukevz6Ie) 的 QQ 群。
- +
我们会在 OpenMMLab 社区为大家 diff --git a/demo/MMSegmentation_Tutorial.ipynb b/demo/MMSegmentation_Tutorial.ipynb index b428fc9431..4bff9ad371 100644 --- a/demo/MMSegmentation_Tutorial.ipynb +++ b/demo/MMSegmentation_Tutorial.ipynb @@ -230,7 +230,7 @@ "\n", "Datasets in MMSegmentation require image and semantic segmentation maps to be placed in folders with the same perfix. To support a new dataset, we may need to modify the original file structure. \n", "\n", - "In this tutorial, we give an example of converting the dataset. You may refer to [docs](https://github.com/open-mmlab/mmsegmentation/docs/tutorials/new_dataset.md) for details about dataset reorganization. \n", + "In this tutorial, we give an example of converting the dataset. You may refer to [docs](https://github.com/open-mmlab/mmsegmentation/docs/en/tutorials/new_dataset.md) for details about dataset reorganization. \n", "\n", "We use [Standord Background Dataset](http://dags.stanford.edu/projects/scenedataset.html) as an example. The dataset contains 715 images chosen from existing public datasets [LabelMe](http://labelme.csail.mit.edu), [MSRC](http://research.microsoft.com/en-us/projects/objectclassrecognition), [PASCAL VOC](http://pascallin.ecs.soton.ac.uk/challenges/VOC) and [Geometric Context](http://www.cs.illinois.edu/homes/dhoiem/). Images from these datasets are mainly outdoor scenes, each containing approximately 320-by-240 pixels. \n", "In this tutorial, we use the region annotations as labels. There are 8 classes in total, i.e. sky, tree, road, grass, water, building, mountain, and foreground object. " diff --git a/docs/Makefile b/docs/en/Makefile similarity index 100% rename from docs/Makefile rename to docs/en/Makefile diff --git a/docs/_static/css/readthedocs.css b/docs/en/_static/css/readthedocs.css similarity index 100% rename from docs/_static/css/readthedocs.css rename to docs/en/_static/css/readthedocs.css diff --git a/docs/_static/images/mmsegmentation.png b/docs/en/_static/images/mmsegmentation.png similarity index 100% rename from docs/_static/images/mmsegmentation.png rename to docs/en/_static/images/mmsegmentation.png diff --git a/docs/api.rst b/docs/en/api.rst similarity index 100% rename from docs/api.rst rename to docs/en/api.rst diff --git a/docs/changelog.md b/docs/en/changelog.md similarity index 100% rename from docs/changelog.md rename to docs/en/changelog.md diff --git a/docs/conf.py b/docs/en/conf.py similarity index 97% rename from docs/conf.py rename to docs/en/conf.py index 2d84a9620d..87b16f2667 100644 --- a/docs/conf.py +++ b/docs/en/conf.py @@ -17,14 +17,14 @@ import pytorch_sphinx_theme -sys.path.insert(0, os.path.abspath('..')) +sys.path.insert(0, os.path.abspath('../../')) # -- Project information ----------------------------------------------------- project = 'MMSegmentation' copyright = '2020-2021, OpenMMLab' author = 'MMSegmentation Authors' -version_file = '../mmseg/version.py' +version_file = '../../mmseg/version.py' def get_version(): diff --git a/docs/dataset_prepare.md b/docs/en/dataset_prepare.md similarity index 98% rename from docs/dataset_prepare.md rename to docs/en/dataset_prepare.md index 70ab9b3f38..8e89f156ca 100644 --- a/docs/dataset_prepare.md +++ b/docs/en/dataset_prepare.md @@ -143,7 +143,7 @@ If you would like to use augmented VOC dataset, please run following command to python tools/convert_datasets/voc_aug.py data/VOCdevkit data/VOCdevkit/VOCaug --nproc 8 ``` -Please refer to [concat dataset](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/tutorials/customize_datasets.md#concatenate-dataset) for details about how to concatenate them and train them together. +Please refer to [concat dataset](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/en/tutorials/customize_datasets.md#concatenate-dataset) for details about how to concatenate them and train them together. ### ADE20K @@ -283,6 +283,6 @@ For LoveDA dataset, please run the following command to download and re-organize python tools/convert_datasets/loveda.py /path/to/loveDA ``` -Using trained model to predict test set of LoveDA and submit it to server can be found [here](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/inference.md). +Using trained model to predict test set of LoveDA and submit it to server can be found [here](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/en/inference.md). More details about LoveDA can be found [here](https://github.com/Junjue-Wang/LoveDA). diff --git a/docs/get_started.md b/docs/en/get_started.md similarity index 100% rename from docs/get_started.md rename to docs/en/get_started.md diff --git a/docs/index.rst b/docs/en/index.rst similarity index 100% rename from docs/index.rst rename to docs/en/index.rst diff --git a/docs/inference.md b/docs/en/inference.md similarity index 100% rename from docs/inference.md rename to docs/en/inference.md diff --git a/docs/make.bat b/docs/en/make.bat similarity index 100% rename from docs/make.bat rename to docs/en/make.bat diff --git a/docs/model_zoo.md b/docs/en/model_zoo.md similarity index 100% rename from docs/model_zoo.md rename to docs/en/model_zoo.md diff --git a/docs/stat.py b/docs/en/stat.py similarity index 100% rename from docs/stat.py rename to docs/en/stat.py diff --git a/docs/switch_language.md b/docs/en/switch_language.md similarity index 100% rename from docs/switch_language.md rename to docs/en/switch_language.md diff --git a/docs/train.md b/docs/en/train.md similarity index 99% rename from docs/train.md rename to docs/en/train.md index b4527601a2..673b996407 100644 --- a/docs/train.md +++ b/docs/en/train.md @@ -68,7 +68,7 @@ GPUS=16 ./tools/slurm_train.sh dev pspr50 configs/pspnet/pspnet_r50-d8_512x1024_ You can check [slurm_train.sh](../tools/slurm_train.sh) for full arguments and environment variables. If you have just multiple machines connected with ethernet, you can refer to -PyTorch [launch utility](https://pytorch.org/docs/stable/distributed_deprecated.html#launch-utility). +PyTorch [launch utility](https://pytorch.org/docs/stable/distributed.html#launch-utility). Usually it is slow if you do not have high speed networking like InfiniBand. ### Launch multiple jobs on a single machine diff --git a/docs/tutorials/config.md b/docs/en/tutorials/config.md similarity index 100% rename from docs/tutorials/config.md rename to docs/en/tutorials/config.md diff --git a/docs/tutorials/customize_datasets.md b/docs/en/tutorials/customize_datasets.md similarity index 100% rename from docs/tutorials/customize_datasets.md rename to docs/en/tutorials/customize_datasets.md diff --git a/docs/tutorials/customize_models.md b/docs/en/tutorials/customize_models.md similarity index 100% rename from docs/tutorials/customize_models.md rename to docs/en/tutorials/customize_models.md diff --git a/docs/tutorials/customize_runtime.md b/docs/en/tutorials/customize_runtime.md similarity index 100% rename from docs/tutorials/customize_runtime.md rename to docs/en/tutorials/customize_runtime.md diff --git a/docs/tutorials/data_pipeline.md b/docs/en/tutorials/data_pipeline.md similarity index 100% rename from docs/tutorials/data_pipeline.md rename to docs/en/tutorials/data_pipeline.md diff --git a/docs/tutorials/index.rst b/docs/en/tutorials/index.rst similarity index 100% rename from docs/tutorials/index.rst rename to docs/en/tutorials/index.rst diff --git a/docs/tutorials/training_tricks.md b/docs/en/tutorials/training_tricks.md similarity index 100% rename from docs/tutorials/training_tricks.md rename to docs/en/tutorials/training_tricks.md diff --git a/docs/useful_tools.md b/docs/en/useful_tools.md similarity index 98% rename from docs/useful_tools.md rename to docs/en/useful_tools.md index bd3cfc66a7..cd2324ea30 100644 --- a/docs/useful_tools.md +++ b/docs/en/useful_tools.md @@ -189,7 +189,7 @@ A script to convert [ONNX](https://github.com/onnx/onnx) model to [TensorRT](htt Prerequisite -- install `mmcv-full` with ONNXRuntime custom ops and TensorRT plugins follow [ONNXRuntime in mmcv](https://mmcv.readthedocs.io/en/latest/onnxruntime_op.html) and [TensorRT plugin in mmcv](https://github.com/open-mmlab/mmcv/blob/master/docs/tensorrt_plugin.md). +- install `mmcv-full` with ONNXRuntime custom ops and TensorRT plugins follow [ONNXRuntime in mmcv](https://mmcv.readthedocs.io/en/latest/deployment/onnxruntime_op.html) and [TensorRT plugin in mmcv](https://github.com/open-mmlab/mmcv/blob/master/docs/en/deployment/tensorrt_plugin.md). - Use [pytorch2onnx](#convert-to-onnx-experimental) to convert the model from PyTorch to ONNX. Usage diff --git a/docs_zh-CN/Makefile b/docs/zh_cn/Makefile similarity index 100% rename from docs_zh-CN/Makefile rename to docs/zh_cn/Makefile diff --git a/docs_zh-CN/_static/css/readthedocs.css b/docs/zh_cn/_static/css/readthedocs.css similarity index 100% rename from docs_zh-CN/_static/css/readthedocs.css rename to docs/zh_cn/_static/css/readthedocs.css diff --git a/docs_zh-CN/_static/images/mmsegmentation.png b/docs/zh_cn/_static/images/mmsegmentation.png similarity index 100% rename from docs_zh-CN/_static/images/mmsegmentation.png rename to docs/zh_cn/_static/images/mmsegmentation.png diff --git a/docs_zh-CN/api.rst b/docs/zh_cn/api.rst similarity index 100% rename from docs_zh-CN/api.rst rename to docs/zh_cn/api.rst diff --git a/docs_zh-CN/conf.py b/docs/zh_cn/conf.py similarity index 97% rename from docs_zh-CN/conf.py rename to docs/zh_cn/conf.py index d551c9aee9..353b0bc725 100644 --- a/docs_zh-CN/conf.py +++ b/docs/zh_cn/conf.py @@ -17,14 +17,14 @@ import pytorch_sphinx_theme -sys.path.insert(0, os.path.abspath('..')) +sys.path.insert(0, os.path.abspath('../../')) # -- Project information ----------------------------------------------------- project = 'MMSegmentation' copyright = '2020-2021, OpenMMLab' author = 'MMSegmentation Authors' -version_file = '../mmseg/version.py' +version_file = '../../mmseg/version.py' def get_version(): diff --git a/docs_zh-CN/dataset_prepare.md b/docs/zh_cn/dataset_prepare.md similarity index 98% rename from docs_zh-CN/dataset_prepare.md rename to docs/zh_cn/dataset_prepare.md index da50febeb0..bffc3d1da5 100644 --- a/docs_zh-CN/dataset_prepare.md +++ b/docs/zh_cn/dataset_prepare.md @@ -125,7 +125,7 @@ Pascal VOC 2012 可以在 [这里](http://host.robots.ox.ac.uk/pascal/VOC/voc201 python tools/convert_datasets/voc_aug.py data/VOCdevkit data/VOCdevkit/VOCaug --nproc 8 ``` -关于如何拼接数据集 (concatenate) 并一起训练它们,更多细节请参考 [拼接连接数据集](https://github.com/open-mmlab/mmsegmentation/blob/master/docs_zh-CN/tutorials/customize_datasets.md#%E6%8B%BC%E6%8E%A5%E6%95%B0%E6%8D%AE%E9%9B%86) 。 +关于如何拼接数据集 (concatenate) 并一起训练它们,更多细节请参考 [拼接连接数据集](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/zh_cn/tutorials/customize_datasets.md#%E6%8B%BC%E6%8E%A5%E6%95%B0%E6%8D%AE%E9%9B%86) 。 ### ADE20K @@ -225,6 +225,6 @@ wget https://zenodo.org/record/5706578/files/Test.zip python tools/convert_datasets/loveda.py /path/to/loveDA ``` -请参照 [这里](https://github.com/open-mmlab/mmsegmentation/blob/master/docs_zh-CN/inference.md) 来使用训练好的模型去预测 LoveDA 测试集并且提交到官网。 +请参照 [这里](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/zh_cn/inference.md) 来使用训练好的模型去预测 LoveDA 测试集并且提交到官网。 关于 LoveDA 的更多细节可以在[这里](https://github.com/Junjue-Wang/LoveDA) 找到。 diff --git a/docs_zh-CN/get_started.md b/docs/zh_cn/get_started.md similarity index 100% rename from docs_zh-CN/get_started.md rename to docs/zh_cn/get_started.md diff --git a/docs_zh-CN/imgs/qq_group_qrcode.jpg b/docs/zh_cn/imgs/qq_group_qrcode.jpg similarity index 100% rename from docs_zh-CN/imgs/qq_group_qrcode.jpg rename to docs/zh_cn/imgs/qq_group_qrcode.jpg diff --git a/docs_zh-CN/imgs/seggroup_qrcode.jpg b/docs/zh_cn/imgs/seggroup_qrcode.jpg similarity index 100% rename from docs_zh-CN/imgs/seggroup_qrcode.jpg rename to docs/zh_cn/imgs/seggroup_qrcode.jpg diff --git a/docs_zh-CN/imgs/zhihu_qrcode.jpg b/docs/zh_cn/imgs/zhihu_qrcode.jpg similarity index 100% rename from docs_zh-CN/imgs/zhihu_qrcode.jpg rename to docs/zh_cn/imgs/zhihu_qrcode.jpg diff --git a/docs_zh-CN/index.rst b/docs/zh_cn/index.rst similarity index 100% rename from docs_zh-CN/index.rst rename to docs/zh_cn/index.rst diff --git a/docs_zh-CN/inference.md b/docs/zh_cn/inference.md similarity index 100% rename from docs_zh-CN/inference.md rename to docs/zh_cn/inference.md diff --git a/docs_zh-CN/make.bat b/docs/zh_cn/make.bat similarity index 100% rename from docs_zh-CN/make.bat rename to docs/zh_cn/make.bat diff --git a/docs_zh-CN/model_zoo.md b/docs/zh_cn/model_zoo.md similarity index 100% rename from docs_zh-CN/model_zoo.md rename to docs/zh_cn/model_zoo.md diff --git a/docs_zh-CN/stat.py b/docs/zh_cn/stat.py similarity index 100% rename from docs_zh-CN/stat.py rename to docs/zh_cn/stat.py diff --git a/docs_zh-CN/switch_language.md b/docs/zh_cn/switch_language.md similarity index 100% rename from docs_zh-CN/switch_language.md rename to docs/zh_cn/switch_language.md diff --git a/docs_zh-CN/train.md b/docs/zh_cn/train.md similarity index 97% rename from docs_zh-CN/train.md rename to docs/zh_cn/train.md index 7ac42284cf..520739dbe2 100644 --- a/docs_zh-CN/train.md +++ b/docs/zh_cn/train.md @@ -59,7 +59,7 @@ GPUS=16 ./tools/slurm_train.sh dev pspr50 configs/pspnet/pspnet_r50-d8_512x1024_ 您可以查看 [slurm_train.sh](../tools/slurm_train.sh) 以熟悉全部的参数与环境变量。 如果您多个机器已经有以太网连接, 您可以参考 PyTorch -[launch utility](https://pytorch.org/docs/stable/distributed_deprecated.html#launch-utility) 。 +[launch utility](https://pytorch.org/docs/stable/distributed.html#launch-utility) 。 若您没有像 InfiniBand 这样高速的网络连接,多机器训练通常会比较慢。 ### 在单个机器上启动多个任务 diff --git a/docs_zh-CN/tutorials/config.md b/docs/zh_cn/tutorials/config.md similarity index 100% rename from docs_zh-CN/tutorials/config.md rename to docs/zh_cn/tutorials/config.md diff --git a/docs_zh-CN/tutorials/customize_datasets.md b/docs/zh_cn/tutorials/customize_datasets.md similarity index 100% rename from docs_zh-CN/tutorials/customize_datasets.md rename to docs/zh_cn/tutorials/customize_datasets.md diff --git a/docs_zh-CN/tutorials/customize_models.md b/docs/zh_cn/tutorials/customize_models.md similarity index 100% rename from docs_zh-CN/tutorials/customize_models.md rename to docs/zh_cn/tutorials/customize_models.md diff --git a/docs_zh-CN/tutorials/customize_runtime.md b/docs/zh_cn/tutorials/customize_runtime.md similarity index 100% rename from docs_zh-CN/tutorials/customize_runtime.md rename to docs/zh_cn/tutorials/customize_runtime.md diff --git a/docs_zh-CN/tutorials/data_pipeline.md b/docs/zh_cn/tutorials/data_pipeline.md similarity index 100% rename from docs_zh-CN/tutorials/data_pipeline.md rename to docs/zh_cn/tutorials/data_pipeline.md diff --git a/docs_zh-CN/tutorials/index.rst b/docs/zh_cn/tutorials/index.rst similarity index 100% rename from docs_zh-CN/tutorials/index.rst rename to docs/zh_cn/tutorials/index.rst diff --git a/docs_zh-CN/tutorials/training_tricks.md b/docs/zh_cn/tutorials/training_tricks.md similarity index 100% rename from docs_zh-CN/tutorials/training_tricks.md rename to docs/zh_cn/tutorials/training_tricks.md diff --git a/docs_zh-CN/useful_tools.md b/docs/zh_cn/useful_tools.md similarity index 98% rename from docs_zh-CN/useful_tools.md rename to docs/zh_cn/useful_tools.md index 1f95d71f9b..b410342ec5 100644 --- a/docs_zh-CN/useful_tools.md +++ b/docs/zh_cn/useful_tools.md @@ -184,7 +184,7 @@ python tools/pytorch2torchscript.py \ 先决条件 -- 按照 [ONNXRuntime in mmcv](https://mmcv.readthedocs.io/en/latest/onnxruntime_op.html) 和 [TensorRT plugin in mmcv](https://github.com/open-mmlab/mmcv/blob/master/docs/tensorrt_plugin.md) ,用 ONNXRuntime 自定义运算 (custom ops) 和 TensorRT 插件安装 `mmcv-full` +- 按照 [ONNXRuntime in mmcv](https://mmcv.readthedocs.io/en/latest/deployment/onnxruntime_op.html) 和 [TensorRT plugin in mmcv](https://github.com/open-mmlab/mmcv/blob/master/docs/en/deployment/tensorrt_plugin.md) ,用 ONNXRuntime 自定义运算 (custom ops) 和 TensorRT 插件安装 `mmcv-full` - 使用 [pytorch2onnx](#convert-to-onnx-experimental) 将模型从 PyTorch 转成 ONNX 使用方法 diff --git a/mmseg/datasets/custom.py b/mmseg/datasets/custom.py index 872b2b8448..3eeb0dda80 100644 --- a/mmseg/datasets/custom.py +++ b/mmseg/datasets/custom.py @@ -42,7 +42,7 @@ class CustomDataset(Dataset): ``xxx{img_suffix}`` and ``xxx{seg_map_suffix}`` (extension is also included in the suffix). If split is given, then ``xxx`` is specified in txt file. Otherwise, all files in ``img_dir/``and ``ann_dir`` will be loaded. - Please refer to ``docs/tutorials/new_dataset.md`` for more details. + Please refer to ``docs/en/tutorials/new_dataset.md`` for more details. Args: