Skip to content

Commit 0529952

Browse files
xvjiaruiMengzhangLIJunjun2016yuanzhang
authored
[Doc] Add Chinese Documentation (open-mmlab#666)
* Add chinese doc base (open-mmlab#593) * [Doc] Add Chinese doc for useful_tools_md (open-mmlab#642) * get_started_docs_zh * inference_zh.md * train_zh.md * get_started_zh.md * train_zh.md * get_started_zh * fix nospace between ZH and ENG * change README_zh-CN link * checkout space again * checkout space again * checkout space again * pipeline * cus_model * cus_model * cus_model * runtime_md * dataset_prepare * useful_tools * refine * Update useful_tools.md * Update useful_tools.md Co-authored-by: Junjun2016 <[email protected]> * [Doc] Add Chinese doc for get_started (open-mmlab#615) * get_started_docs_zh * inference_zh.md * train_zh.md * get_started_zh.md * train_zh.md * get_started_zh * fix nospace between ZH and ENG * change README_zh-CN link * checkout space again * checkout space again * checkout space again * get_started_md * refine_get_started_md * [Doc] Add Chinese doc for tutorial03_tutorial_datapipeline_md (open-mmlab#629) * get_started_docs_zh * inference_zh.md * train_zh.md * get_started_zh.md * train_zh.md * get_started_zh * fix nospace between ZH and ENG * change README_zh-CN link * checkout space again * checkout space again * checkout space again * pipeline * refine * Update data_pipeline.md Co-authored-by: Junjun2016 <[email protected]> * [Doc] Add Chinese doc for tutorials04_customized_models_md (open-mmlab#630) * get_started_docs_zh * inference_zh.md * train_zh.md * get_started_zh.md * train_zh.md * get_started_zh * fix nospace between ZH and ENG * change README_zh-CN link * checkout space again * checkout space again * checkout space again * pipeline * cus_model * cus_model * cus_model * refine * refine * Update customize_models.md Co-authored-by: Junjun2016 <[email protected]> * [Doc] Add Chinese doc for dataset_prepare_md (open-mmlab#640) * get_started_docs_zh * inference_zh.md * train_zh.md * get_started_zh.md * train_zh.md * get_started_zh * fix nospace between ZH and ENG * change README_zh-CN link * checkout space again * checkout space again * checkout space again * pipeline * cus_model * cus_model * cus_model * runtime_md * dataset_prepare * Update dataset_prepare.md Co-authored-by: Junjun2016 <[email protected]> * [Doc] Add Chinese doc for tutorials05_training_tricks_md (open-mmlab#631) * get_started_docs_zh * inference_zh.md * train_zh.md * get_started_zh.md * train_zh.md * get_started_zh * fix nospace between ZH and ENG * change README_zh-CN link * checkout space again * checkout space again * checkout space again * pipeline * cus_model * cus_model * cus_model * traning tricks md * traning tricks md * refine * refine * refine * Update training_tricks.md Co-authored-by: Junjun2016 <[email protected]> * [Doc] Add Chinese doc for tutorials06_customized_runtime_md (open-mmlab#637) * get_started_docs_zh * inference_zh.md * train_zh.md * get_started_zh.md * train_zh.md * get_started_zh * fix nospace between ZH and ENG * change README_zh-CN link * checkout space again * checkout space again * checkout space again * pipeline * cus_model * cus_model * cus_model * runtime_md * Update customize_runtime.md Co-authored-by: Junjun2016 <[email protected]> * [Doc] Add Chinese doc for tutorials01_config_md (open-mmlab#628) * get_started_docs_zh * inference_zh.md * train_zh.md * get_started_zh.md * train_zh.md * get_started_zh * fix nospace between ZH and ENG * change README_zh-CN link * checkout space again * checkout space again * checkout space again * new_config_md * new_config_md1 * new_config_md1 * refine * refine * Update config.md Co-authored-by: Junjun2016 <[email protected]> * [Doc] Add Chinese for modelzoo (open-mmlab#597) * [Doc] Add Chinese for modelzoo * add missing * [Doc] Add Chinese doc for tutorial02_customized_dataset_md (open-mmlab#620) * get_started_docs_zh * inference_zh.md * train_zh.md * get_started_zh.md * train_zh.md * get_started_zh * fix nospace between ZH and ENG * change README_zh-CN link * checkout space again * checkout space again * checkout space again * tutorial_customized_dataset * refine * Update customize_datasets.md * fixconflict Co-authored-by: Junjun2016 <[email protected]> * [Doc] Add Chinese doc for train.md (open-mmlab#616) * get_started_docs_zh * inference_zh.md * train_zh.md * get_started_zh.md * train_zh.md * get_started_zh * fix nospace between ZH and ENG * change README_zh-CN link * checkout space again * checkout space again * checkout space again * train_md * refine * refine_last * refine_last * refine_last * refine_last * refine_last * temp * refine_last * qwe Co-authored-by: yuanzhang <[email protected]> * [Doc] Add Chinese doc for inference.md (open-mmlab#617) * get_started_docs_zh * inference_zh.md * train_zh.md * get_started_zh.md * train_zh.md * get_started_zh * fix nospace between ZH and ENG * change README_zh-CN link * checkout space again * checkout space again * checkout space again * inference_zh_md * Update docs_zh-CN/inference.md Directly delete this sentence? Co-authored-by: Junjun2016 <[email protected]> * qwe * temp * qw * Update docs_zh-CN/inference.md * Update docs_zh-CN/inference.md * Update docs_zh-CN/inference.md * Update docs_zh-CN/inference.md * Update docs_zh-CN/inference.md * Update inference.md Co-authored-by: Junjun2016 <[email protected]> * fixed some dir * fixed typo Co-authored-by: MengzhangLI <[email protected]> Co-authored-by: Junjun2016 <[email protected]> Co-authored-by: yuanzhang <[email protected]>
1 parent 9e2a9cb commit 0529952

26 files changed

+2578
-9
lines changed

README_zh-CN.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
<br />
55

66
[![PyPI](https://img.shields.io/pypi/v/mmsegmentation)](https://pypi.org/project/mmsegmentation)
7-
[![docs](https://img.shields.io/badge/docs-latest-blue)](https://mmsegmentation.readthedocs.io/en/latest/)
7+
[![docs](https://img.shields.io/badge/docs-latest-blue)](https://mmsegmentation.readthedocs.io/zh_CN/latest/)
88
[![badge](https://github.com/open-mmlab/mmsegmentation/workflows/build/badge.svg)](https://github.com/open-mmlab/mmsegmentation/actions)
99
[![codecov](https://codecov.io/gh/open-mmlab/mmsegmentation/branch/master/graph/badge.svg)](https://codecov.io/gh/open-mmlab/mmsegmentation)
1010
[![license](https://img.shields.io/github/license/open-mmlab/mmsegmentation.svg)](https://github.com/open-mmlab/mmsegmentation/blob/master/LICENSE)
1111
[![issue resolution](https://isitmaintained.com/badge/resolution/open-mmlab/mmsegmentation.svg)](https://github.com/open-mmlab/mmsegmentation/issues)
1212
[![open issues](https://isitmaintained.com/badge/open/open-mmlab/mmsegmentation.svg)](https://github.com/open-mmlab/mmsegmentation/issues)
1313

14-
文档: https://mmsegmentation.readthedocs.io/
14+
文档: https://mmsegmentation.readthedocs.io/zh_CN/latest
1515

1616
[English](README.md) | 简体中文
1717

@@ -52,7 +52,7 @@ MMSegmentation 是一个基于 PyTorch 的语义分割开源工具箱。它是 O
5252

5353
## 基准测试和模型库
5454

55-
测试结果和模型可以在[模型库](docs/model_zoo.md)中找到。
55+
测试结果和模型可以在[模型库](docs_zh-CN/model_zoo.md)中找到。
5656

5757
已支持的骨干网络:
5858

@@ -94,13 +94,13 @@ MMSegmentation 是一个基于 PyTorch 的语义分割开源工具箱。它是 O
9494

9595
## 安装
9696

97-
请参考[快速入门文档](docs/get_started.md#installation)进行安装和数据集准备。
97+
请参考[快速入门文档](docs_zh-CN/get_started.md#installation)进行安装和数据集准备。
9898

9999
## 快速入门
100100

101-
请参考[训练教程](docs/train.md)[测试教程](docs/inference.md)学习 MMSegmentation 的基本使用。
102-
我们也提供了一些进阶教程,内容覆盖了[增加自定义数据集](docs/tutorials/customize_datasets.md)[设计新的数据预处理流程](docs/tutorials/data_pipeline.md)[增加自定义模型](docs/tutorials/customize_models.md)[增加自定义的运行时配置](docs/tutorials/customize_runtime.md)
103-
除此之外,我们也提供了很多实用的[训练技巧说明](docs/tutorials/training_tricks.md)
101+
请参考[训练教程](docs_zh-CN/train.md)[测试教程](docs_zh-CN/inference.md)学习 MMSegmentation 的基本使用。
102+
我们也提供了一些进阶教程,内容覆盖了[增加自定义数据集](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)
103+
除此之外,我们也提供了很多实用的[训练技巧说明](docs_zh-CN/tutorials/training_tricks.md)
104104

105105
同时,我们提供了 Colab 教程。你可以在[这里](demo/MMSegmentation_Tutorial.ipynb)浏览教程,或者直接在 Colab 上[运行](https://colab.research.google.com/github/open-mmlab/mmsegmentation/blob/master/demo/MMSegmentation_Tutorial.ipynb)
106106

@@ -144,7 +144,7 @@ MMSegmentation 是一个由来自不同高校和企业的研发人员共同参
144144
扫描下方的二维码可关注 OpenMMLab 团队的 [知乎官方账号](https://www.zhihu.com/people/openmmlab),加入 OpenMMLab 团队的 [官方交流 QQ 群](https://jq.qq.com/?_wv=1027&k=aCvMxdr3)
145145

146146
<div align="center">
147-
<img src="docs/imgs/zhihu_qrcode.jpg" height="400" /> <img src="docs/imgs/qq_group_qrcode.jpg" height="400" />
147+
<img src="docs_zh-CN/imgs/zhihu_qrcode.jpg" height="400" /> <img src="docs_zh-CN/imgs/qq_group_qrcode.jpg" height="400" />
148148
</div>
149149

150150
我们会在 OpenMMLab 社区为大家

docs/conf.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# -- Project information -----------------------------------------------------
2020

2121
project = 'MMSegmentation'
22-
copyright = '2020-2020, OpenMMLab'
22+
copyright = '2020-2021, OpenMMLab'
2323
author = 'MMSegmentation Authors'
2424
version_file = '../mmseg/version.py'
2525

@@ -79,6 +79,8 @@ def get_version():
7979
# so a file named "default.css" will overwrite the builtin "default.css".
8080
html_static_path = ['_static']
8181

82+
language = 'zh_CN'
83+
8284

8385
def builder_inited_handler(app):
8486
subprocess.run(['./stat.py'])

docs/index.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ Welcome to MMSegmenation's documentation!
4545

4646
changelog.md
4747

48+
.. toctree::
49+
:caption: Switch Language
50+
51+
switch_language.md
52+
4853
.. toctree::
4954
:caption: API Reference
5055

docs/switch_language.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## <a href='https://mmsegmentation.readthedocs.io/en/latest/'>English</a>
2+
3+
## <a href='https://mmsegmentation.readthedocs.io/zh_CN/latest/'>简体中文</a>

docs_zh-CN/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = .
9+
BUILDDIR = _build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs_zh-CN/api.rst

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
API Reference
2+
==============
3+
4+
mmseg.apis
5+
--------------
6+
.. automodule:: mmseg.apis
7+
:members:
8+
9+
mmseg.core
10+
--------------
11+
12+
seg
13+
^^^^^^^^^^
14+
.. automodule:: mmseg.core.seg
15+
:members:
16+
17+
evaluation
18+
^^^^^^^^^^
19+
.. automodule:: mmseg.core.evaluation
20+
:members:
21+
22+
utils
23+
^^^^^^^^^^
24+
.. automodule:: mmseg.core.utils
25+
:members:
26+
27+
mmseg.datasets
28+
--------------
29+
30+
datasets
31+
^^^^^^^^^^
32+
.. automodule:: mmseg.datasets
33+
:members:
34+
35+
pipelines
36+
^^^^^^^^^^
37+
.. automodule:: mmseg.datasets.pipelines
38+
:members:
39+
40+
mmseg.models
41+
--------------
42+
43+
segmentors
44+
^^^^^^^^^^
45+
.. automodule:: mmseg.models.segmentors
46+
:members:
47+
48+
backbones
49+
^^^^^^^^^^
50+
.. automodule:: mmseg.models.backbones
51+
:members:
52+
53+
decode_heads
54+
^^^^^^^^^^^^
55+
.. automodule:: mmseg.models.decode_heads
56+
:members:
57+
58+
losses
59+
^^^^^^^^^^
60+
.. automodule:: mmseg.models.losses
61+
:members:

docs_zh-CN/conf.py

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# Configuration file for the Sphinx documentation builder.
2+
#
3+
# This file only contains a selection of the most common options. For a full
4+
# list see the documentation:
5+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
6+
7+
# -- Path setup --------------------------------------------------------------
8+
9+
# If extensions (or modules to document with autodoc) are in another directory,
10+
# add these directories to sys.path here. If the directory is relative to the
11+
# documentation root, use os.path.abspath to make it absolute, like shown here.
12+
#
13+
import os
14+
import subprocess
15+
import sys
16+
17+
sys.path.insert(0, os.path.abspath('..'))
18+
19+
# -- Project information -----------------------------------------------------
20+
21+
project = 'MMSegmentation'
22+
copyright = '2020-2021, OpenMMLab'
23+
author = 'MMSegmentation Authors'
24+
version_file = '../mmseg/version.py'
25+
26+
27+
def get_version():
28+
with open(version_file, 'r') as f:
29+
exec(compile(f.read(), version_file, 'exec'))
30+
return locals()['__version__']
31+
32+
33+
# The full version, including alpha/beta/rc tags
34+
release = get_version()
35+
36+
# -- General configuration ---------------------------------------------------
37+
38+
# Add any Sphinx extension module names here, as strings. They can be
39+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
40+
# ones.
41+
extensions = [
42+
'sphinx.ext.autodoc',
43+
'sphinx.ext.napoleon',
44+
'sphinx.ext.viewcode',
45+
'recommonmark',
46+
'sphinx_markdown_tables',
47+
]
48+
49+
autodoc_mock_imports = ['matplotlib', 'pycocotools', 'mmseg.version']
50+
51+
# Add any paths that contain templates here, relative to this directory.
52+
templates_path = ['_templates']
53+
54+
# The suffix(es) of source filenames.
55+
# You can specify multiple suffix as a list of string:
56+
#
57+
source_suffix = {
58+
'.rst': 'restructuredtext',
59+
'.md': 'markdown',
60+
}
61+
62+
# The master toctree document.
63+
master_doc = 'index'
64+
65+
# List of patterns, relative to source directory, that match files and
66+
# directories to ignore when looking for source files.
67+
# This pattern also affects html_static_path and html_extra_path.
68+
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
69+
70+
# -- Options for HTML output -------------------------------------------------
71+
72+
# The theme to use for HTML and HTML Help pages. See the documentation for
73+
# a list of builtin themes.
74+
#
75+
html_theme = 'sphinx_rtd_theme'
76+
77+
# Add any paths that contain custom static files (such as style sheets) here,
78+
# relative to this directory. They are copied after the builtin static files,
79+
# so a file named "default.css" will overwrite the builtin "default.css".
80+
html_static_path = ['_static']
81+
82+
language = 'zh_CN'
83+
84+
85+
def builder_inited_handler(app):
86+
subprocess.run(['./stat.py'])
87+
88+
89+
def setup(app):
90+
app.connect('builder-inited', builder_inited_handler)

0 commit comments

Comments
 (0)