Unverified Commit 63bdad98 authored by Wenwei Zhang's avatar Wenwei Zhang Committed by GitHub
Browse files

add chinese doc (#629)

* add chinese doc

* update
parent 54538ad2
......@@ -42,6 +42,10 @@ Welcome to MMDetection3D's documentation!
api.rst
.. toctree::
:caption: 语言切换
switch_language.md
Indices and tables
==================
......
# 0: 演示
\ No newline at end of file
# 1: 使用已有模型在标准数据集上进行推理
# 2: 在自定义数据集上进行训练
# 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)
API Documentation
=================
mmdet3d.core
--------------
anchor
^^^^^^^^^^
.. automodule:: mmdet3d.core.anchor
:members:
bbox
^^^^^^^^^^
.. automodule:: mmdet3d.core.bbox
:members:
evaluation
^^^^^^^^^^
.. automodule:: mmdet3d.core.evaluation
:members:
visualizer
^^^^^^^^^^^^^^^
.. automodule:: mmdet3d.core.visualizer
:members:
voxel
^^^^^^^^^^^^^^^
.. automodule:: mmdet3d.core.voxel
:members:
post_processing
^^^^^^^^^^^^^^^
.. automodule:: mmdet3d.core.post_processing
:members:
mmdet3d.datasets
----------------
.. automodule:: mmdet3d.datasets
:members:
mmdet3d.models
--------------
detectors
^^^^^^^^^^
.. automodule:: mmdet3d.models.detectors
:members:
backbones
^^^^^^^^^^
.. automodule:: mmdet3d.models.backbones
:members:
necks
^^^^^^^^^^
.. automodule:: mmdet3d.models.necks
:members:
dense_heads
^^^^^^^^^^^^
.. automodule:: mmdet3d.models.dense_heads
:members:
roi_heads
^^^^^^^^^^
.. automodule:: mmdet3d.models.roi_heads
:members:
fusion_layers
^^^^^^^^^^^^^
.. automodule:: mmdet3d.models.fusion_layers
:members:
losses
^^^^^^^^^^
.. automodule:: mmdet3d.models.losses
:members:
middle_encoders
^^^^^^^^^^^^^^^
.. automodule:: mmdet3d.models.middle_encoders
:members:
model_utils
^^^^^^^^^^^^^
.. automodule:: mmdet3d.models.model_utils
:members:
# 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
from m2r import MdInclude
from recommonmark.transform import AutoStructify
sys.path.insert(0, os.path.abspath('..'))
# -- Project information -----------------------------------------------------
project = 'MMDetection3D'
copyright = '2020-2023, OpenMMLab'
author = 'MMDetection3D Authors'
version_file = '../mmdet3d/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',
'sphinx.ext.autosectionlabel',
]
autodoc_mock_imports = [
'cv2', 'matplotlib', 'nuscenes', 'PIL', 'pycocotools', 'pyquaternion',
'terminaltables', 'mmcv', 'mmdet', 'mmdet3d.version', 'mmdet3d.ops'
]
autosectionlabel_prefix_document = True
# 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']
def builder_inited_handler(app):
subprocess.run(['./stat.py'])
def setup(app):
app.connect('builder-inited', builder_inited_handler)
app.add_config_value('no_underscore_emphasis', False, 'env')
app.add_config_value('m2r_parse_relative_links', False, 'env')
app.add_config_value('m2r_anonymous_references', False, 'env')
app.add_config_value('m2r_disable_inline_math', False, 'env')
app.add_directive('mdinclude', MdInclude)
app.add_config_value('recommonmark_config', {
'auto_toc_tree_section': 'Contents',
'enable_eval_rst': True,
}, True)
app.add_transform(AutoStructify)
# 常见问题解答
# 依赖
- Linux or macOS (Windows is not currently officially supported)
- Python 3.6+
- PyTorch 1.3+
- CUDA 9.2+ (If you build PyTorch from source, CUDA 9.0 is also compatible)
- GCC 5+
- [MMCV](https://mmcv.readthedocs.io/en/latest/#installation)
| MMDetection3D version | MMDetection version | MMSegmentation version | MMCV version |
|:-------------------:|:-------------------:|:-------------------:|:-------------------:|
| master | mmdet>=2.10.0, <=2.11.0| mmseg>=0.13.0 | mmcv-full>=1.3.1, <=1.4|
| 0.14.0 | mmdet>=2.10.0, <=2.11.0| mmseg>=0.13.0 | mmcv-full>=1.3.1, <=1.4|
| 0.13.0 | mmdet>=2.10.0, <=2.11.0| Not required | mmcv-full>=1.2.4, <=1.4|
| 0.12.0 | mmdet>=2.5.0, <=2.11.0 | Not required | mmcv-full>=1.2.4, <=1.4|
| 0.11.0 | mmdet>=2.5.0, <=2.11.0 | Not required | mmcv-full>=1.2.4, <=1.4|
| 0.10.0 | mmdet>=2.5.0, <=2.11.0 | Not required | mmcv-full>=1.2.4, <=1.4|
| 0.9.0 | mmdet>=2.5.0, <=2.11.0 | Not required | mmcv-full>=1.2.4, <=1.4|
| 0.8.0 | mmdet>=2.5.0, <=2.11.0 | Not required | mmcv-full>=1.1.5, <=1.4|
| 0.7.0 | mmdet>=2.5.0, <=2.11.0 | Not required | mmcv-full>=1.1.5, <=1.4|
| 0.6.0 | mmdet>=2.4.0, <=2.11.0 | Not required | mmcv-full>=1.1.3, <=1.2|
| 0.5.0 | 2.3.0 | Not required | mmcv-full==1.0.5|
# 安装
Welcome to MMDetection3D's documentation!
==========================================
.. toctree::
:maxdepth: 2
:caption: 开始你的第一步
getting_started.md
model_zoo.md
data_preparation.md
.. toctree::
:maxdepth: 2
:caption: 快速启动
0_demo.md
1_exist_data_model.md
2_new_data_model.md
.. toctree::
:maxdepth: 2
:caption: 教程
tutorials/index.rst
.. toctree::
:maxdepth: 2
:caption: 实用工具与脚本
useful_tools.md
.. toctree::
:maxdepth: 2
:caption: 说明
faq.md
.. toctree::
:caption: 语言切换
switch_language.md
.. toctree::
:caption: 接口文档(英文)
api.rst
Indices and tables
==================
* :ref:`genindex`
* :ref:`search`
@ECHO OFF
pushd %~dp0
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=_build
if "%1" == "" goto help
%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end
:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
:end
popd
#!/usr/bin/env python
import functools as func
import glob
import numpy as np
import re
from os import path as osp
url_prefix = 'https://github.com/open-mmlab/mmdetection3d/blob/master/'
files = sorted(glob.glob('../configs/*/README.md'))
stats = []
titles = []
num_ckpts = 0
for f in files:
url = osp.dirname(f.replace('../', url_prefix))
with open(f, 'r') as content_file:
content = content_file.read()
title = content.split('\n')[0].replace('#', '').strip()
ckpts = set(x.lower().strip()
for x in re.findall(r'https?://download.*\.pth', content)
if 'mmdetection3d' in x)
if len(ckpts) == 0:
continue
_papertype = [x for x in re.findall(r'<!-- \[([A-Z]+)\] -->', content)]
assert len(_papertype) > 0
papertype = _papertype[0]
paper = set([(papertype, title)])
titles.append(title)
num_ckpts += len(ckpts)
statsmsg = f"""
\t* [{papertype}] [{title}]({url}) ({len(ckpts)} ckpts)
"""
stats.append((paper, ckpts, statsmsg))
allpapers = func.reduce(lambda a, b: a.union(b), [p for p, _, _ in stats])
msglist = '\n'.join(x for _, _, x in stats)
papertypes, papercounts = np.unique([t for t, _ in allpapers],
return_counts=True)
countstr = '\n'.join(
[f' - {t}: {c}' for t, c in zip(papertypes, papercounts)])
modelzoo = f"""
\n## Model Zoo Statistics
* Number of papers: {len(set(titles))}
{countstr}
* Number of checkpoints: {num_ckpts}
{msglist}
"""
with open('model_zoo.md', 'a') as f:
f.write(modelzoo)
# 教程 1: 配置文件
# 教程 2: 自定义数据集
\ No newline at end of file
# 教程 5: 自定义训练配置
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment