Skip to content

Commit

Permalink
[Doc] Add Chinese Documentation (#666)
Browse files Browse the repository at this point in the history
* Add chinese doc base (#593)

* [Doc] Add Chinese doc for useful_tools_md (#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 <hejunjun@sjtu.edu.cn>

* [Doc] Add Chinese doc for get_started (#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 (#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 <hejunjun@sjtu.edu.cn>

* [Doc] Add Chinese doc for tutorials04_customized_models_md (#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 <hejunjun@sjtu.edu.cn>

* [Doc] Add Chinese doc for dataset_prepare_md (#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 <hejunjun@sjtu.edu.cn>

* [Doc] Add Chinese doc for tutorials05_training_tricks_md (#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 <hejunjun@sjtu.edu.cn>

* [Doc] Add Chinese doc for tutorials06_customized_runtime_md (#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 <hejunjun@sjtu.edu.cn>

* [Doc] Add Chinese doc for tutorials01_config_md (#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 <hejunjun@sjtu.edu.cn>

* [Doc] Add Chinese for modelzoo (#597)

* [Doc] Add Chinese for modelzoo

* add missing

* [Doc] Add Chinese doc for tutorial02_customized_dataset_md (#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 <hejunjun@sjtu.edu.cn>

* [Doc] Add Chinese doc for train.md (#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 <yuanzhang@yuanzhangdeMacBook-Pro.local>

* [Doc] Add Chinese doc for inference.md (#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 <hejunjun@sjtu.edu.cn>

* 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 <hejunjun@sjtu.edu.cn>

* fixed some dir

* fixed typo

Co-authored-by: MengzhangLI <mcmong@pku.edu.cn>
Co-authored-by: Junjun2016 <hejunjun@sjtu.edu.cn>
Co-authored-by: yuanzhang <yuanzhang@yuanzhangdeMacBook-Pro.local>
  • Loading branch information
4 people committed Jul 3, 2021
1 parent 9e2a9cb commit 0529952
Show file tree
Hide file tree
Showing 26 changed files with 2,578 additions and 9 deletions.
16 changes: 8 additions & 8 deletions README_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
<br />

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

文档: https://mmsegmentation.readthedocs.io/
文档: https://mmsegmentation.readthedocs.io/zh_CN/latest

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

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

## 基准测试和模型库

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

已支持的骨干网络:

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

## 安装

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

## 快速入门

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

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

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

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

我们会在 OpenMMLab 社区为大家
Expand Down
4 changes: 3 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# -- Project information -----------------------------------------------------

project = 'MMSegmentation'
copyright = '2020-2020, OpenMMLab'
copyright = '2020-2021, OpenMMLab'
author = 'MMSegmentation Authors'
version_file = '../mmseg/version.py'

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

language = 'zh_CN'


def builder_inited_handler(app):
subprocess.run(['./stat.py'])
Expand Down
5 changes: 5 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ Welcome to MMSegmenation's documentation!

changelog.md

.. toctree::
:caption: Switch Language

switch_language.md

.. toctree::
:caption: API Reference

Expand Down
3 changes: 3 additions & 0 deletions docs/switch_language.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## <a href='https://mmsegmentation.readthedocs.io/en/latest/'>English</a>

## <a href='https://mmsegmentation.readthedocs.io/zh_CN/latest/'>简体中文</a>
20 changes: 20 additions & 0 deletions docs_zh-CN/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
61 changes: 61 additions & 0 deletions docs_zh-CN/api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
API Reference
==============

mmseg.apis
--------------
.. automodule:: mmseg.apis
:members:

mmseg.core
--------------

seg
^^^^^^^^^^
.. automodule:: mmseg.core.seg
:members:

evaluation
^^^^^^^^^^
.. automodule:: mmseg.core.evaluation
:members:

utils
^^^^^^^^^^
.. automodule:: mmseg.core.utils
:members:

mmseg.datasets
--------------

datasets
^^^^^^^^^^
.. automodule:: mmseg.datasets
:members:

pipelines
^^^^^^^^^^
.. automodule:: mmseg.datasets.pipelines
:members:

mmseg.models
--------------

segmentors
^^^^^^^^^^
.. automodule:: mmseg.models.segmentors
:members:

backbones
^^^^^^^^^^
.. automodule:: mmseg.models.backbones
:members:

decode_heads
^^^^^^^^^^^^
.. automodule:: mmseg.models.decode_heads
:members:

losses
^^^^^^^^^^
.. automodule:: mmseg.models.losses
:members:
90 changes: 90 additions & 0 deletions docs_zh-CN/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Path setup --------------------------------------------------------------

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import subprocess
import sys

sys.path.insert(0, os.path.abspath('..'))

# -- Project information -----------------------------------------------------

project = 'MMSegmentation'
copyright = '2020-2021, OpenMMLab'
author = 'MMSegmentation Authors'
version_file = '../mmseg/version.py'


def get_version():
with open(version_file, 'r') as f:
exec(compile(f.read(), version_file, 'exec'))
return locals()['__version__']


# The full version, including alpha/beta/rc tags
release = get_version()

# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.napoleon',
'sphinx.ext.viewcode',
'recommonmark',
'sphinx_markdown_tables',
]

autodoc_mock_imports = ['matplotlib', 'pycocotools', 'mmseg.version']

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
source_suffix = {
'.rst': 'restructuredtext',
'.md': 'markdown',
}

# The master toctree document.
master_doc = 'index'

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']

# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']

language = 'zh_CN'


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


def setup(app):
app.connect('builder-inited', builder_inited_handler)
Loading

0 comments on commit 0529952

Please sign in to comment.