diff --git a/docs/_static/css/readthedocs.css b/docs/_static/css/readthedocs.css new file mode 100644 index 0000000000..cc61ab82ab --- /dev/null +++ b/docs/_static/css/readthedocs.css @@ -0,0 +1,6 @@ +.header-logo { + background-image: url("../image/mmdet3d-logo.png"); + background-size: 182.5px 40px; + height: 40px; + width: 182.5px; +} diff --git a/docs/_static/image/mmdet3d-logo.png b/docs/_static/image/mmdet3d-logo.png new file mode 100644 index 0000000000..f4076bd162 Binary files /dev/null and b/docs/_static/image/mmdet3d-logo.png differ diff --git a/docs/api.rst b/docs/api.rst index 16e6c9bacd..00153b9151 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -1,6 +1,3 @@ -API Documentation -================= - mmdet3d.core -------------- diff --git a/docs/compatibility.md b/docs/compatibility.md index 06d9d1d616..5cc8dcf84a 100644 --- a/docs/compatibility.md +++ b/docs/compatibility.md @@ -1,8 +1,4 @@ -# Compatibility with Previous Versions of MMDetection3D - -This document provides detailed descriptions of the BC-breaking changes in MMDetection3D. - -## MMDetection3D 0.16.0 +## 0.16.0 ### Returned values of `QueryAndGroup` operation @@ -26,7 +22,7 @@ We adopt a new pre-processing procedure for the ScanNet dataset in order to supp Please refer to the ScanNet [README.md](https://github.com/open-mmlab/mmdetection3d/blob/master/data/scannet/README.md/) for more details. -## MMDetection3D 0.15.0 +## 0.15.0 ### MMCV Version @@ -45,7 +41,7 @@ We modified the dataset augmentation function `BackgroundPointsFilter`([here](ht We enhance the pipeline function `IndoorPatchPointSample` used in point cloud segmentation task by adding more choices for patch selection. Also, we plan to remove the unused parameter `sample_rate` in the future. Please modify the code as well as the config files accordingly if you use this transform. -## MMDetection3D 0.14.0 +## 0.14.0 ### Dataset class for 3D segmentation task @@ -65,7 +61,7 @@ We adopt new pre-processing and conversion steps of ScanNet dataset. In previous We have trained a [VoteNet](https://github.com/open-mmlab/mmdetection3d/blob/master/configs/votenet/votenet_8x8_scannet-3d-18class.py) model on the newly processed ScanNet dataset and get similar benchmark results. In order to prepare ScanNet data for both detection and segmentation tasks, please re-run the new pre-processing scripts following the ScanNet [README.md](https://github.com/open-mmlab/mmdetection3d/blob/master/data/scannet/README.md/). -## MMDetection3D 0.12.0 +## 0.12.0 ### SUNRGBD dataset for ImVoteNet @@ -77,7 +73,7 @@ We adopt a new pre-processing procedure for the SUNRGBD dataset in order to supp Please refer to the SUNRGBD [README.md](https://github.com/open-mmlab/mmdetection3d/blob/master/data/sunrgbd/README.md/) for more details. -## MMDetection3D 0.6.0 +## 0.6.0 ### VoteNet model structure update diff --git a/docs/conf.py b/docs/conf.py index 77d1f9548a..ead91b03db 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -11,6 +11,7 @@ # documentation root, use os.path.abspath to make it absolute, like shown here. # import os +import pytorch_sphinx_theme import subprocess import sys from m2r import MdInclude @@ -48,6 +49,7 @@ def get_version(): 'recommonmark', 'sphinx_markdown_tables', 'sphinx.ext.autosectionlabel', + 'sphinx_copybutton', ] autodoc_mock_imports = [ @@ -80,12 +82,103 @@ def get_version(): # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_theme = 'sphinx_rtd_theme' +# html_theme = 'sphinx_rtd_theme' +html_theme = 'pytorch_sphinx_theme' +html_theme_path = [pytorch_sphinx_theme.get_html_theme_path()] + +html_theme_options = { + # 'logo_url': 'https://mmocr.readthedocs.io/en/latest/', + 'menu': [ + { + 'name': 'GitHub', + 'url': 'https://github.com/open-mmlab/mmdetection3d' + }, + { + 'name': + 'Projects', + 'children': [ + { + 'name': 'MMAction2', + 'url': 'https://github.com/open-mmlab/mmaction2', + }, + { + 'name': 'MMClassification', + 'url': 'https://github.com/open-mmlab/mmclassification', + }, + { + 'name': 'MMCV', + 'url': 'https://github.com/open-mmlab/mmmmcv', + }, + { + 'name': 'MMDetection', + 'url': 'https://github.com/open-mmlab/mmdetection', + }, + { + 'name': 'MMEditing', + 'url': 'https://github.com/open-mmlab/mmediting', + }, + { + 'name': 'MMGeneration', + 'url': 'https://github.com/open-mmlab/mmgeneration', + }, + { + 'name': 'MMOCR', + 'url': 'https://github.com/open-mmlab/mmocr', + }, + { + 'name': 'MMPose', + 'url': 'https://github.com/open-mmlab/mmpose', + }, + { + 'name': 'MMSegmentation', + 'url': 'https://github.com/open-mmlab/mmsegmentation', + }, + { + 'name': 'MMTracking', + 'url': 'https://github.com/open-mmlab/mmtracking', + }, + ] + }, + { + 'name': + 'OpenMMLab', + 'children': [ + { + 'name': 'Homepage', + 'url': 'https://openmmlab.com/' + }, + { + 'name': 'GitHub', + 'url': 'https://github.com/open-mmlab/' + }, + { + 'name': 'Twitter', + 'url': 'https://twitter.com/OpenMMLab' + }, + { + 'name': 'Zhihu', + 'url': 'https://zhihu.com/people/openmmlab' + }, + ] + }, + ] +} # 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'] +html_css_files = ['css/readthedocs.css'] + +latex_documents = [ + (master_doc, 'mmcv.tex', 'mmcv Documentation', 'MMCV Contributors', + 'manual'), +] + +# -- Extension configuration ------------------------------------------------- +# Ignore >>> when copying code +copybutton_prompt_text = r'>>> |\.\.\. ' +copybutton_prompt_is_regexp = True def builder_inited_handler(app): diff --git a/docs/index.rst b/docs/index.rst index dff69a5eed..0d21d0beed 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -2,59 +2,91 @@ Welcome to MMDetection3D's documentation! ========================================== .. toctree:: - :maxdepth: 2 + :maxdepth: 1 :caption: Get Started getting_started.md + +.. toctree:: + :maxdepth: 1 + :caption: Demo + demo.md + +.. toctree:: + :maxdepth: 1 + :caption: Model Zoo + model_zoo.md + +.. toctree:: + :maxdepth: 1 + :caption: Data Preparation + data_preparation.md .. toctree:: - :maxdepth: 2 - :caption: Quick Run + :maxdepth: 1 + :caption: Exist Data and Model 1_exist_data_model.md + +.. toctree:: + :maxdepth: 1 + :caption: New Data and Model + 2_new_data_model.md .. toctree:: - :maxdepth: 2 + :maxdepth: 1 :caption: Supported Tasks supported_tasks/index.rst .. toctree:: - :maxdepth: 2 + :maxdepth: 1 :caption: Datasets datasets/index.rst .. toctree:: - :maxdepth: 2 + :maxdepth: 1 :caption: Tutorials tutorials/index.rst .. toctree:: - :maxdepth: 2 + :maxdepth: 1 :caption: Useful Tools and Scripts useful_tools.md .. toctree:: - :maxdepth: 2 + :maxdepth: 1 :caption: Notes benchmarks.md + +.. toctree:: + :maxdepth: 1 + :caption: FAQ + faq.md + +.. toctree:: + :maxdepth: 1 + :caption: Compatibility + compatibility.md .. toctree:: + :maxdepth: 1 :caption: API Reference api.rst .. toctree:: + :maxdepth: 1 :caption: Switch Language switch_language.md diff --git a/docs_zh-CN/1_exist_data_model.md b/docs_zh-CN/1_exist_data_model.md index 52b1f7e076..faae576c92 100644 --- a/docs_zh-CN/1_exist_data_model.md +++ b/docs_zh-CN/1_exist_data_model.md @@ -1,4 +1,4 @@ -# 1:使用已有模型在标准数据集上进行推理和训练 +# 1: 使用已有模型在标准数据集上进行推理和训练 ## 使用已有模型进行推理 diff --git a/docs_zh-CN/_static/css/readthedocs.css b/docs_zh-CN/_static/css/readthedocs.css new file mode 100644 index 0000000000..cc61ab82ab --- /dev/null +++ b/docs_zh-CN/_static/css/readthedocs.css @@ -0,0 +1,6 @@ +.header-logo { + background-image: url("../image/mmdet3d-logo.png"); + background-size: 182.5px 40px; + height: 40px; + width: 182.5px; +} diff --git a/docs_zh-CN/_static/image/mmdet3d-logo.png b/docs_zh-CN/_static/image/mmdet3d-logo.png new file mode 100644 index 0000000000..f4076bd162 Binary files /dev/null and b/docs_zh-CN/_static/image/mmdet3d-logo.png differ diff --git a/docs_zh-CN/api.rst b/docs_zh-CN/api.rst index 16e6c9bacd..00153b9151 100644 --- a/docs_zh-CN/api.rst +++ b/docs_zh-CN/api.rst @@ -1,6 +1,3 @@ -API Documentation -================= - mmdet3d.core -------------- diff --git a/docs_zh-CN/compatibility.md b/docs_zh-CN/compatibility.md index bcf6f1c845..3b34d36b5c 100644 --- a/docs_zh-CN/compatibility.md +++ b/docs_zh-CN/compatibility.md @@ -1 +1 @@ -# 和过去版本的 MMDetection3D 的兼容性 \ No newline at end of file +## 0.16.0 diff --git a/docs_zh-CN/conf.py b/docs_zh-CN/conf.py index 77d1f9548a..601c1d7170 100644 --- a/docs_zh-CN/conf.py +++ b/docs_zh-CN/conf.py @@ -11,6 +11,7 @@ # documentation root, use os.path.abspath to make it absolute, like shown here. # import os +import pytorch_sphinx_theme import subprocess import sys from m2r import MdInclude @@ -48,6 +49,7 @@ def get_version(): 'recommonmark', 'sphinx_markdown_tables', 'sphinx.ext.autosectionlabel', + 'sphinx_copybutton', ] autodoc_mock_imports = [ @@ -80,12 +82,103 @@ def get_version(): # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_theme = 'sphinx_rtd_theme' +# html_theme = 'sphinx_rtd_theme' +html_theme = 'pytorch_sphinx_theme' +html_theme_path = [pytorch_sphinx_theme.get_html_theme_path()] + +html_theme_options = { + # 'logo_url': 'https://mmocr.readthedocs.io/en/latest/', + 'menu': [ + { + 'name': 'GitHub', + 'url': 'https://github.com/open-mmlab/mmdetection3d' + }, + { + 'name': + '算法库', + 'children': [ + { + 'name': 'MMAction2', + 'url': 'https://github.com/open-mmlab/mmaction2', + }, + { + 'name': 'MMClassification', + 'url': 'https://github.com/open-mmlab/mmclassification', + }, + { + 'name': 'MMCV', + 'url': 'https://github.com/open-mmlab/mmmmcv', + }, + { + 'name': 'MMDetection', + 'url': 'https://github.com/open-mmlab/mmdetection', + }, + { + 'name': 'MMEditing', + 'url': 'https://github.com/open-mmlab/mmediting', + }, + { + 'name': 'MMGeneration', + 'url': 'https://github.com/open-mmlab/mmgeneration', + }, + { + 'name': 'MMOCR', + 'url': 'https://github.com/open-mmlab/mmocr', + }, + { + 'name': 'MMPose', + 'url': 'https://github.com/open-mmlab/mmpose', + }, + { + 'name': 'MMSegmentation', + 'url': 'https://github.com/open-mmlab/mmsegmentation', + }, + { + 'name': 'MMTracking', + 'url': 'https://github.com/open-mmlab/mmtracking', + }, + ] + }, + { + 'name': + 'OpenMMLab', + 'children': [ + { + 'name': '官网', + 'url': 'https://openmmlab.com/' + }, + { + 'name': 'GitHub', + 'url': 'https://github.com/open-mmlab/' + }, + { + 'name': '推特', + 'url': 'https://twitter.com/OpenMMLab' + }, + { + 'name': '知乎', + 'url': 'https://zhihu.com/people/openmmlab' + }, + ] + }, + ] +} # 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'] +html_css_files = ['css/readthedocs.css'] + +latex_documents = [ + (master_doc, 'mmcv.tex', 'mmcv Documentation', 'MMCV Contributors', + 'manual'), +] + +# -- Extension configuration ------------------------------------------------- +# Ignore >>> when copying code +copybutton_prompt_text = r'>>> |\.\.\. ' +copybutton_prompt_is_regexp = True def builder_inited_handler(app): diff --git a/docs_zh-CN/index.rst b/docs_zh-CN/index.rst index 0a4718b944..b2ae80dd8d 100644 --- a/docs_zh-CN/index.rst +++ b/docs_zh-CN/index.rst @@ -2,59 +2,91 @@ Welcome to MMDetection3D's documentation! ========================================== .. toctree:: - :maxdepth: 2 + :maxdepth: 1 :caption: 开始你的第一步 getting_started.md + +.. toctree:: + :maxdepth: 1 + :caption: 演示 + demo.md + +.. toctree:: + :maxdepth: 1 + :caption: 模型库 + model_zoo.md + +.. toctree:: + :maxdepth: 1 + :caption: 数据预处理 + data_preparation.md .. toctree:: - :maxdepth: 2 - :caption: 快速启动 + :maxdepth: 1 + :caption: 使用现有数据及模型 1_exist_data_model.md + +.. toctree:: + :maxdepth: 1 + :caption: 创建新的数据与模型 + 2_new_data_model.md .. toctree:: - :maxdepth: 2 + :maxdepth: 1 :caption: 支持的任务 supported_tasks/index.rst .. toctree:: - :maxdepth: 2 + :maxdepth: 1 :caption: 数据集介绍 datasets/index.rst .. toctree:: - :maxdepth: 2 + :maxdepth: 1 :caption: 教程 tutorials/index.rst .. toctree:: - :maxdepth: 2 + :maxdepth: 1 :caption: 实用工具与脚本 useful_tools.md .. toctree:: - :maxdepth: 2 + :maxdepth: 1 :caption: 说明 benchmarks.md + +.. toctree:: + :maxdepth: 1 + :caption: 常见问题 + faq.md + +.. toctree:: + :maxdepth: 1 + :caption: 兼容性 + compatibility.md .. toctree:: + :maxdepth: 1 :caption: 接口文档(英文) api.rst .. toctree:: + :maxdepth: 1 :caption: 语言切换 switch_language.md diff --git a/docs_zh-CN/tutorials/customize_runtime.md b/docs_zh-CN/tutorials/customize_runtime.md index d7dea39d0e..fc07d4bd43 100644 --- a/docs_zh-CN/tutorials/customize_runtime.md +++ b/docs_zh-CN/tutorials/customize_runtime.md @@ -1,4 +1,4 @@ -# 教程 5:自定义运行时配置 +# 教程 5: 自定义运行时配置 ## 自定义优化器设置 diff --git a/requirements/docs.txt b/requirements/docs.txt index 40f8c9ff25..988b5ead21 100644 --- a/requirements/docs.txt +++ b/requirements/docs.txt @@ -2,7 +2,8 @@ docutils==0.16.0 m2r myst-parser opencv-python +-e git+https://github.com/open-mmlab/pytorch_sphinx_theme.git#egg=pytorch_sphinx_theme sphinx==4.0.2 +sphinx-copybutton sphinx_markdown_tables -sphinx_rtd_theme==0.5.2 torch diff --git a/setup.cfg b/setup.cfg index 8b615d27cf..59d03be6de 100644 --- a/setup.cfg +++ b/setup.cfg @@ -8,6 +8,6 @@ line_length = 79 multi_line_output = 0 known_standard_library = setuptools known_first_party = mmdet,mmseg,mmdet3d -known_third_party = cv2,imageio,indoor3d_util,load_scannet_data,lyft_dataset_sdk,m2r,matplotlib,mmcv,nuimages,numba,numpy,nuscenes,pandas,plyfile,pycocotools,pyquaternion,pytest,recommonmark,scannet_utils,scipy,seaborn,shapely,skimage,tensorflow,terminaltables,torch,trimesh,waymo_open_dataset +known_third_party = cv2,imageio,indoor3d_util,load_scannet_data,lyft_dataset_sdk,m2r,matplotlib,mmcv,nuimages,numba,numpy,nuscenes,pandas,plyfile,pycocotools,pyquaternion,pytest,pytorch_sphinx_theme,recommonmark,scannet_utils,scipy,seaborn,shapely,skimage,tensorflow,terminaltables,torch,trimesh,waymo_open_dataset no_lines_before = STDLIB,LOCALFOLDER default_section = THIRDPARTY