diff --git a/README.md b/README.md index f6a1872934..b52f8d9c75 100644 --- a/README.md +++ b/README.md @@ -271,7 +271,7 @@ We will keep up with the latest progress of the community, and support more popu ## Contributing -We appreciate all contributions to improve MMPose. Please refer to [CONTRIBUTING.md](https://mmpose.readthedocs.io/en/1.x/notes/contribution_guide.html) for the contributing guideline. +We appreciate all contributions to improve MMPose. Please refer to [CONTRIBUTING.md](https://mmpose.readthedocs.io/en/1.x/contribution_guide.html) for the contributing guideline. ## Acknowledgement diff --git a/README_CN.md b/README_CN.md index d45ee2c899..30fa2f3434 100644 --- a/README_CN.md +++ b/README_CN.md @@ -268,7 +268,7 @@ mim install "mmdet>=3.0.0rc6" ## 参与贡献 -我们非常欢迎用户对于 MMPose 做出的任何贡献,可以参考 [贡献指南](https://mmpose.readthedocs.io/zh_CN/1.x/notes/contribution_guide.html) 文件了解更多细节。 +我们非常欢迎用户对于 MMPose 做出的任何贡献,可以参考 [贡献指南](https://mmpose.readthedocs.io/zh_CN/1.x/contribution_guide.html) 文件了解更多细节。 ## 致谢 diff --git a/docs/en/collect_projects.py b/docs/en/collect_projects.py new file mode 100644 index 0000000000..29c0449862 --- /dev/null +++ b/docs/en/collect_projects.py @@ -0,0 +1,116 @@ +#!/usr/bin/env python +# Copyright (c) OpenMMLab. All rights reserved. +import os +import os.path as osp +import re +from glob import glob + + +def _get_project_docs(): + """Get all project document files. + + Returns: + list[str]: file paths + """ + project_root = osp.join('..', '..', 'projects') + pattern = osp.sep.join(['*'] * 2) + '.md' + docs = glob(osp.join(project_root, pattern)) + docs = [ + doc for doc in docs + if 'example_project' not in doc and '_CN' not in doc + ] + return docs + + +def _parse_project_doc_path(fn): + """Get project name and banner from a project reference file. + + Returns: + tuple: + - project_name (str) + - project_banner (str) + """ + project_banner, project_name = None, None + with open(fn, 'r', encoding='utf-8') as f: + for line in f.readlines(): + if re.match('^( )*', ' ' + banner, '', '
', '' + ] + + project_intro_doc = _get_project_intro_doc() + faq_doc = _get_faq_doc() + + with open( + osp.join('projects', 'community_projects.md'), 'w', + encoding='utf-8') as f: + f.write('# Projects from Community Contributors\n') + f.write(''.join(project_intro_doc)) + f.write('\n'.join(project_lines)) + f.write(''.join(faq_doc)) + + +if __name__ == '__main__': + print('collect project documents') + main() diff --git a/docs/en/conf.py b/docs/en/conf.py index 1c777699b6..30ed8357b8 100644 --- a/docs/en/conf.py +++ b/docs/en/conf.py @@ -102,6 +102,7 @@ def get_version(): def builder_inited_handler(app): subprocess.run(['python', './collect_modelzoo.py']) + subprocess.run(['python', './collect_projects.py']) subprocess.run(['sh', './merge_docs.sh']) subprocess.run(['python', './stats.py']) diff --git a/docs/en/guide_to_framework.md b/docs/en/guide_to_framework.md index e6def1bfcd..1bfe7d3b59 100644 --- a/docs/en/guide_to_framework.md +++ b/docs/en/guide_to_framework.md @@ -1,4 +1,4 @@ -# A 20 Minute Guide to MMPose Framework +# A 20-minute Tour to MMPose MMPose 1.0 is built upon a brand-new framework. For developers with basic knowledge of deep learning, this tutorial provides a overview of MMPose 1.0 framework design. Whether you are **a user of the previous version of MMPose**, or **a beginner of MMPose wishing to start with v1.0**, this tutorial will show you how to build a project based on MMPose 1.0. diff --git a/docs/en/index.rst b/docs/en/index.rst index fbf1503db1..754d070899 100644 --- a/docs/en/index.rst +++ b/docs/en/index.rst @@ -80,6 +80,13 @@ You can change the documentation language at the lower-left corner of the page. dataset_zoo/3d_hand_keypoint.md dataset_zoo/dataset_tools.md +.. toctree:: + :maxdepth: 1 + :caption: Projects + + projects/community_projects.md + projects/projects.md + .. toctree:: :maxdepth: 1 :caption: Notes diff --git a/docs/en/installation.md b/docs/en/installation.md index dc70953a95..9c1af6d2eb 100644 --- a/docs/en/installation.md +++ b/docs/en/installation.md @@ -1,18 +1,21 @@ # Installation +We recommend that users follow our best practices to install MMPose. However, the whole process is highly customizable. See [Customize Installation](#customize-installation) section for more information. + - [Installation](#installation) - [Prerequisites](#prerequisites) - - [Install MMPose](#install-mmpose) - - [Best Practices](#best-practices) - - [Verify the installation](#verify-the-installation) - - [Customize Installation](#customize-installation) - - [CUDA versions](#cuda-versions) - - [Install MMEngine without MIM](#install-mmengine-without-mim) - - [Install MMCV without MIM](#install-mmcv-without-mim) - - [Install on CPU-only platforms](#install-on-cpu-only-platforms) - - [Install on Google Colab](#install-on-google-colab) - - [Using MMPose with Docker](#using-mmpose-with-docker) - - [Trouble shooting](#trouble-shooting) + - [Best Practices](#best-practices) + - [Build MMPose from source](#build-mmpose-from-source) + - [Install as a Python package](#install-as-a-python-package) + - [Customize Installation](#customize-installation) + - [CUDA versions](#cuda-versions) + - [Install MMEngine without MIM](#install-mmengine-without-mim) + - [Install MMCV without MIM](#install-mmcv-without-mim) + - [Install on CPU-only platforms](#install-on-cpu-only-platforms) + - [Install on Google Colab](#install-on-google-colab) + - [Using MMPose with Docker](#using-mmpose-with-docker) + - [Verify the installation](#verify-the-installation) + - [Trouble shooting](#trouble-shooting) @@ -51,13 +54,7 @@ On CPU platforms: conda install pytorch torchvision cpuonly -c pytorch ``` -## Install MMPose - -We recommend that users follow our best practices to install MMPose. However, the whole process is highly customizable. See [Customize Installation](#customize-installation) section for more information. - -### Best Practices - -**Step 0.** Install [MMEngine](https://github.com/open-mmlab/mmengine) and [MMCV](https://github.com/open-mmlab/mmcv/tree/2.x) using [MIM](https://github.com/open-mmlab/mim). +**Step 3.** Install [MMEngine](https://github.com/open-mmlab/mmengine) and [MMCV](https://github.com/open-mmlab/mmcv/tree/2.x) using [MIM](https://github.com/open-mmlab/mim). ```shell pip install -U openmim @@ -71,9 +68,11 @@ Note that some of the demo scripts in MMPose require [MMDetection](https://githu mim install "mmdet>=3.0.0rc6" ``` -**Step 1.** Install MMPose. +## Best Practices -Case A: To develop and run mmpose directly, install it from source: +### Build MMPose from source + +To develop and run mmpose directly, install it from source: ```shell git clone https://github.com/open-mmlab/mmpose.git -b 1.x @@ -86,13 +85,15 @@ pip install -v -e . # thus any local modifications made to the code will take effect without reinstallation. ``` -Case B: To use mmpose as a dependency or third-party package, install it with pip: +### Install as a Python package + +To use mmpose as a dependency or third-party package, install it with pip: ```shell mim install "mmpose>=1.0.0rc1" ``` -### Verify the installation +## Verify the installation To verify that MMPose is installed correctly, you can run an inference demo with the following steps. @@ -141,9 +142,9 @@ The `demo.jpg` can be downloaded from [Github](https://raw.githubusercontent.com The inference results will be a list of `PoseDataSample`, and the predictions are in the `pred_instances`, indicating the detected keypoint locations and scores. -### Customize Installation +## Customize Installation -#### CUDA versions +### CUDA versions When installing PyTorch, you need to specify the version of CUDA. If you are not clear on which to choose, follow our recommendations: @@ -154,7 +155,7 @@ Please make sure the GPU driver satisfies the minimum version requirements. See Installing CUDA runtime libraries is enough if you follow our best practices, because no CUDA code will be compiled locally. However if you hope to compile MMCV from source or develop other CUDA operators, you need to install the complete CUDA toolkit from NVIDIA's [website](https://developer.nvidia.com/cuda-downloads), and its version should match the CUDA version of PyTorch. i.e., the specified version of cudatoolkit in `conda install` command. -#### Install MMEngine without MIM +### Install MMEngine without MIM To install MMEngine with pip instead of MIM, please follow [MMEngine installation guides](https://mmengine.readthedocs.io/zh_CN/latest/get_started/installation.html). @@ -164,7 +165,7 @@ For example, you can install MMEngine by the following command. pip install mmengine ``` -#### Install MMCV without MIM +### Install MMCV without MIM MMCV contains C++ and CUDA extensions, thus depending on PyTorch in a complex way. MIM solves such dependencies automatically and makes the installation easier. However, it is not a must. @@ -176,13 +177,13 @@ For example, the following command install mmcv built for PyTorch 1.10.x and CUD pip install 'mmcv>=2.0.0rc1' -f https://download.openmmlab.com/mmcv/dist/cu113/torch1.10/index.html ``` -#### Install on CPU-only platforms +### Install on CPU-only platforms MMPose can be built for CPU only environment. In CPU mode you can train, test or inference a model. However, some functionalities are missing in this mode, usually GPU-compiled ops like `Deformable Convolution`. Most models in MMPose don't depend on these ops, but if you try to train/test/infer a model containing these ops, an error will be raised. -#### Install on Google Colab +### Install on Google Colab [Google Colab](https://colab.research.google.com/) usually has PyTorch installed, thus we only need to install MMEngine, MMCV and MMPose with the following commands. @@ -215,7 +216,7 @@ print(mmpose.__version__) Note that within Jupyter, the exclamation mark `!` is used to call external executables and `%cd` is a [magic command](https://ipython.readthedocs.io/en/stable/interactive/magics.html#magic-cd) to change the current working directory of Python. ``` -#### Using MMPose with Docker +### Using MMPose with Docker We provide a [Dockerfile](https://github.com/open-mmlab/mmpose/blob/master/docker/Dockerfile) to build an image. Ensure that your [docker version](https://docs.docker.com/engine/install/) >=19.03. @@ -239,7 +240,7 @@ docker run --gpus all --shm-size=8g -it -v {DATA_DIR}:/mmpose/data mmpose If you encounter the error message like `permission denied`, please add `sudo` at the start of the command and try it again. ``` -### Trouble shooting +## Trouble shooting -If you have some issues during the installation, please first view the [FAQ](./notes/faq.md) page. +If you have some issues during the installation, please first view the [FAQ](./faq.md) page. You may [open an issue](https://github.com/open-mmlab/mmpose/issues/new/choose) on GitHub if no solution is found. diff --git a/docs/en/merge_docs.sh b/docs/en/merge_docs.sh index b44b265bbc..a3b55f3e84 100644 --- a/docs/en/merge_docs.sh +++ b/docs/en/merge_docs.sh @@ -2,7 +2,7 @@ # Copyright (c) OpenMMLab. All rights reserved. sed -i '$a\\n' ../../demo/docs/*_demo.md -cat ../../demo/docs/*_demo.md | sed "s/#/#&/" | sed "s/md###t/html#t/g" | sed '1i\# Demo' | sed 's=](/docs/en/=](/=g' | sed 's=](/=](https://github.com/open-mmlab/mmpose/tree/1.x/=g' >demo.md +cat ../../demo/docs/*_demo.md | sed "s/^## 2D\(.*\)Demo/##\1Estimation/" | sed "s/md###t/html#t/g" | sed '1i\# Demos\n' | sed 's=](/docs/en/=](/=g' | sed 's=](/=](https://github.com/open-mmlab/mmpose/tree/1.x/=g' >demos.md # remove /docs/ for link used in doc site sed -i 's=](/docs/en/=](=g' overview.md @@ -15,6 +15,7 @@ sed -i 's=](/docs/en/=](=g' ./user_guides/*.md sed -i 's=](/docs/en/=](=g' ./advanced_guides/*.md sed -i 's=](/docs/en/=](=g' ./dataset_zoo/*.md sed -i 's=](/docs/en/=](=g' ./notes/*.md +sed -i 's=](/docs/en/=](=g' ./projects/*.md sed -i 's=](/=](https://github.com/open-mmlab/mmpose/tree/1.x/=g' overview.md @@ -27,3 +28,4 @@ sed -i 's=](/=](https://github.com/open-mmlab/mmpose/tree/1.x/=g' ./model_zoo_pa sed -i 's=](/=](https://github.com/open-mmlab/mmpose/tree/1.x/=g' ./user_guides/*.md sed -i 's=](/=](https://github.com/open-mmlab/mmpose/tree/1.x/=g' ./dataset_zoo/*.md sed -i 's=](/=](https://github.com/open-mmlab/mmpose/tree/1.x/=g' ./notes/*.md +sed -i 's=](/=](https://github.com/open-mmlab/mmpose/tree/1.x/=g' ./projects/*.md diff --git a/docs/en/overview.md b/docs/en/overview.md index 9c5fef6e04..90f0521ee6 100644 --- a/docs/en/overview.md +++ b/docs/en/overview.md @@ -46,6 +46,6 @@ We have prepared detailed guidelines for all types of users: 4. For developers who wish to develop based on MMPose: - [Migration Guide](./migration.md) 5. For researchers and developers who are willing to contribute to MMPose: - - [Contribution Guide](./notes/contribution_guide.md) + - [Contribution Guide](./contribution_guide.md) 6. For some common issues, we provide a FAQ list: - - [FAQ](./notes/faq.md) + - [FAQ](./faq.md) diff --git a/docs/en/projects.md b/docs/en/projects/projects.md similarity index 100% rename from docs/en/projects.md rename to docs/en/projects/projects.md diff --git a/docs/zh_cn/collect_projects.py b/docs/zh_cn/collect_projects.py new file mode 100644 index 0000000000..93562cb4b2 --- /dev/null +++ b/docs/zh_cn/collect_projects.py @@ -0,0 +1,119 @@ +#!/usr/bin/env python +# Copyright (c) OpenMMLab. All rights reserved. +import os +import os.path as osp +import re +from glob import glob + + +def _get_project_docs(): + """Get all project document files. + + Returns: + list[str]: file paths + """ + project_root = osp.join('..', '..', 'projects') + pattern = osp.sep.join(['*'] * 2) + '.md' + docs = glob(osp.join(project_root, pattern)) + docs = [ + doc for doc in docs + if 'example_project' not in doc and '_CN' not in doc + ] + return docs + + +def _parse_project_doc_path(fn): + """Get project name and banner from a project reference file. + + Returns: + tuple: + - project_name (str) + - project_banner (str) + """ + project_banner, project_name = None, None + with open(fn, 'r', encoding='utf-8') as f: + for line in f.readlines(): + if re.match('^( )*#', line) + faq_doc.append(line) + return faq_doc + + +def main(): + + # Build output folders + os.makedirs('projects', exist_ok=True) + + # Collect all document contents + project_doc_list = _get_project_docs() + + project_lines = [] + for path in project_doc_list: + name, banner = _parse_project_doc_path(path) + _path = path.split(osp.sep) + _rel_path = _path[_path.index('projects'):-1] + url = 'https://github.com/open-mmlab/mmpose/blob/dev-1.x/' + '/'.join( + _rel_path) + _name = name.split(':', 1) + name, description = _name[0], '' if len( + _name) < 2 else f': {_name[-1]}' + project_lines += [ + f'- **{name}**{description} [\\[github\\]]({url})', '', + '
', ' ' + banner, '
', '
', '' + ] + + project_intro_doc = _get_project_intro_doc() + faq_doc = _get_faq_doc() + + with open( + osp.join('projects', 'community_projects.md'), 'w', + encoding='utf-8') as f: + f.write('# Projects of MMPose from Community Contributors\n') + f.write(''.join(project_intro_doc)) + f.write('\n'.join(project_lines)) + f.write(''.join(faq_doc)) + + +if __name__ == '__main__': + print('collect project documents') + main() diff --git a/docs/zh_cn/conf.py b/docs/zh_cn/conf.py index c21209a61a..c82b9edc04 100644 --- a/docs/zh_cn/conf.py +++ b/docs/zh_cn/conf.py @@ -99,6 +99,7 @@ def get_version(): def builder_inited_handler(app): subprocess.run(['python', './collect_modelzoo.py']) + subprocess.run(['python', './collect_projects.py']) subprocess.run(['sh', './merge_docs.sh']) subprocess.run(['python', './stats.py']) diff --git a/docs/zh_cn/index.rst b/docs/zh_cn/index.rst index a57150cad7..c786092b38 100644 --- a/docs/zh_cn/index.rst +++ b/docs/zh_cn/index.rst @@ -80,6 +80,12 @@ You can change the documentation language at the lower-left corner of the page. dataset_zoo/3d_hand_keypoint.md dataset_zoo/dataset_tools.md +.. toctree:: + :maxdepth: 1 + :caption: 相关项目 + + projects/community_projects.md + .. toctree:: :maxdepth: 1 :caption: 其他说明 diff --git a/docs/zh_cn/installation.md b/docs/zh_cn/installation.md index 1a14a10746..1c566b9f53 100644 --- a/docs/zh_cn/installation.md +++ b/docs/zh_cn/installation.md @@ -1,18 +1,21 @@ # 安装 +我们推荐用户按照我们的最佳实践来安装 MMPose。但除此之外,如果您想根据 +您的习惯完成安装流程,也可以参见 [自定义安装](#自定义安装) 一节来获取更多信息。 + - [安装](#安装) - [依赖环境](#依赖环境) - - [安装 MMPose](#安装-mmpose) - - [最佳实践](#最佳实践) - - [验证安装](#验证安装) - - [自定义安装](#自定义安装) - - [CUDA 版本](#cuda-版本) - - [不使用 MIM 安装 MMEngine](#不使用-mim-安装-mmengine) - - [不使用 MIM 安装 MMCV](#不使用-mim-安装-mmcv) - - [在 CPU 环境中安装](#在-cpu-环境中安装) - - [在 Google Colab 中安装](#在-google-colab-中安装) - - [通过 Docker 使用 MMPose](#通过-docker-使用-mmpose) - - [故障解决](#故障解决) + - [最佳实践](#最佳实践) + - [从源码安装 MMPose](#从源码安装-mmpose) + - [作为 Python 包安装](#作为-python-包安装) + - [验证安装](#验证安装) + - [自定义安装](#自定义安装) + - [CUDA 版本](#cuda-版本) + - [不使用 MIM 安装 MMEngine](#不使用-mim-安装-mmengine) + - [在 CPU 环境中安装](#在-cpu-环境中安装) + - [在 Google Colab 中安装](#在-google-colab-中安装) + - [通过 Docker 使用 MMPose](#通过-docker-使用-mmpose) + - [故障解决](#故障解决) ## 依赖环境 @@ -49,14 +52,7 @@ conda install pytorch torchvision -c pytorch conda install pytorch torchvision cpuonly -c pytorch ``` -## 安装 MMPose - -我们推荐用户按照我们的最佳实践来安装 MMPose。但除此之外,如果您想根据 -您的习惯完成安装流程,也可以参见 [自定义安装](#自定义安装) 一节来获取更多信息。 - -### 最佳实践 - -**第 1 步** 使用 [MIM](https://github.com/open-mmlab/mim) 安装 [MMEngine](https://github.com/open-mmlab/mmengine) 和 [MMCV](https://github.com/open-mmlab/mmcv/tree/2.x) +**第 4 步** 使用 [MIM](https://github.com/open-mmlab/mim) 安装 [MMEngine](https://github.com/open-mmlab/mmengine) 和 [MMCV](https://github.com/open-mmlab/mmcv/tree/2.x) ```shell pip install -U openmim @@ -70,13 +66,13 @@ mim install "mmcv>=2.0.0rc1" mim install "mmdet>=3.0.0rc0" ``` -**第 2 步** 安装 MMPose +## 最佳实践 根据具体需求,我们支持两种安装模式: 从源码安装(推荐)和作为 Python 包安装 -方式 1: **从源码安装(推荐)**:如果基于 MMPose 框架开发自己的任务,需要添加新的功能,比如新的模型或是数据集,或者使用我们提供的各种工具。 +### 从源码安装(推荐) -这种情况下,从源码按如下方式安装 mmpose: +如果基于 MMPose 框架开发自己的任务,需要添加新的功能,比如新的模型或是数据集,或者使用我们提供的各种工具。从源码按如下方式安装 mmpose: ```shell git clone https://github.com/open-mmlab/mmpose.git -b 1.x @@ -88,15 +84,15 @@ pip install -v -e . # "-e" 表示以可编辑形式安装,这样可以在不重新安装的情况下,让本地修改直接生效 ``` -方式 2:**作为 Python 包安装**:只是希望调用 MMPose 的接口,或者在自己的项目中导入 MMPose 中的模块。 +### 作为 Python 包安装 -直接使用 mim 安装即可。 +如果只是希望调用 MMPose 的接口,或者在自己的项目中导入 MMPose 中的模块。直接使用 mim 安装即可。 ```shell mim install "mmpose>=1.0.0rc0" ``` -### 验证安装 +## 验证安装 为了验证 MMPose 是否安装正确,您可以通过以下步骤运行模型推理。 @@ -146,9 +142,9 @@ results = inference_topdown(model, 'demo.jpg') 示例图片 `demo.jpg` 可以从 [Github](https://raw.githubusercontent.com/open-mmlab/mmpose/1.x/tests/data/coco/000000000785.jpg) 下载。 推理结果是一个 `PoseDataSample` 列表,预测结果将会保存在 `pred_instances` 中,包括检测到的关键点位置和置信度。 -### 自定义安装 +## 自定义安装 -#### CUDA 版本 +### CUDA 版本 安装 PyTorch 时,需要指定 CUDA 版本。如果您不清楚选择哪个,请遵循我们的建议: @@ -164,7 +160,7 @@ results = inference_topdown(model, 'demo.jpg') 的配置相匹配(如用 `conda install` 安装 PyTorch 时指定的 cudatoolkit 版本)。 ``` -#### 不使用 MIM 安装 MMEngine +### 不使用 MIM 安装 MMEngine 若不使用 mim 安装 MMEngine,请遵循 [ MMEngine 安装指南](https://mmengine.readthedocs.io/zh_CN/latest/get_started/installation.html). @@ -174,7 +170,7 @@ results = inference_topdown(model, 'demo.jpg') pip install mmengine ``` -#### 不使用 MIM 安装 MMCV +### 不使用 MIM 安装 MMCV MMCV 包含 C++ 和 CUDA 扩展,因此其对 PyTorch 的依赖比较复杂。MIM 会自动解析这些 依赖,选择合适的 MMCV 预编译包,使安装更简单,但它并不是必需的。 @@ -188,13 +184,13 @@ MMCV 包含 C++ 和 CUDA 扩展,因此其对 PyTorch 的依赖比较复杂。M pip install 'mmcv>=2.0.0rc1' -f https://download.openmmlab.com/mmcv/dist/cu113/torch1.10/index.html ``` -#### 在 CPU 环境中安装 +### 在 CPU 环境中安装 MMPose 可以仅在 CPU 环境中安装,在 CPU 模式下,您可以完成训练、测试和模型推理等所有操作。 在 CPU 模式下,MMCV 的部分功能将不可用,通常是一些 GPU 编译的算子,如 `Deformable Convolution`。MMPose 中大部分的模型都不会依赖这些算子,但是如果您尝试使用包含这些算子的模型来运行训练、测试或推理,将会报错。 -#### 在 Google Colab 中安装 +### 在 Google Colab 中安装 [Google Colab](https://colab.research.google.com/) 通常已经包含了 PyTorch 环境,因此我们只需要安装 MMEngine, MMCV 和 MMPose 即可,命令如下: @@ -226,7 +222,7 @@ print(mmpose.__version__) 在 Jupyter 中,感叹号 `!` 用于执行外部命令,而 `%cd` 是一个[魔术命令](https://ipython.readthedocs.io/en/stable/interactive/magics.html#magic-cd),用于切换 Python 的工作路径。 ``` -#### 通过 Docker 使用 MMPose +### 通过 Docker 使用 MMPose MMPose 提供 [Dockerfile](https://github.com/open-mmlab/mmpose/blob/master/docker/Dockerfile) 用于构建镜像。请确保您的 [Docker 版本](https://docs.docker.com/engine/install/) >=19.03。 @@ -247,7 +243,7 @@ docker run --gpus all --shm-size=8g -it -v {DATA_DIR}:/mmpose/data mmpose `{DATA_DIR}` 是您本地存放用于 MMPose 训练、测试、推理等流程的数据目录。 -### 故障解决 +## 故障解决 如果您在安装过程中遇到了什么问题,请先查阅[常见问题](faq.md)。如果没有找到解决方法,可以在 GitHub 上[提出 issue](https://github.com/open-mmlab/mmpose/issues/new/choose)。 diff --git a/docs/zh_cn/merge_docs.sh b/docs/zh_cn/merge_docs.sh index b44b265bbc..45a9b594bd 100644 --- a/docs/zh_cn/merge_docs.sh +++ b/docs/zh_cn/merge_docs.sh @@ -2,19 +2,20 @@ # Copyright (c) OpenMMLab. All rights reserved. sed -i '$a\\n' ../../demo/docs/*_demo.md -cat ../../demo/docs/*_demo.md | sed "s/#/#&/" | sed "s/md###t/html#t/g" | sed '1i\# Demo' | sed 's=](/docs/en/=](/=g' | sed 's=](/=](https://github.com/open-mmlab/mmpose/tree/1.x/=g' >demo.md +cat ../../demo/docs/*_demo.md | sed "s/^## 2D\(.*\)Demo/##\1Estimation/" | sed "s/md###t/html#t/g" | sed '1i\# Demos\n' | sed 's=](/docs/en/=](/=g' | sed 's=](/=](https://github.com/open-mmlab/mmpose/tree/1.x/=g' >demos.md # remove /docs/ for link used in doc site -sed -i 's=](/docs/en/=](=g' overview.md -sed -i 's=](/docs/en/=](=g' installation.md -sed -i 's=](/docs/en/=](=g' quick_run.md -sed -i 's=](/docs/en/=](=g' migration.md -sed -i 's=](/docs/en/=](=g' ./model_zoo/*.md -sed -i 's=](/docs/en/=](=g' ./model_zoo_papers/*.md -sed -i 's=](/docs/en/=](=g' ./user_guides/*.md -sed -i 's=](/docs/en/=](=g' ./advanced_guides/*.md -sed -i 's=](/docs/en/=](=g' ./dataset_zoo/*.md -sed -i 's=](/docs/en/=](=g' ./notes/*.md +sed -i 's=](/docs/zh_cn/=](=g' overview.md +sed -i 's=](/docs/zh_cn/=](=g' installation.md +sed -i 's=](/docs/zh_cn/=](=g' quick_run.md +sed -i 's=](/docs/zh_cn/=](=g' migration.md +sed -i 's=](/docs/zh_cn/=](=g' ./model_zoo/*.md +sed -i 's=](/docs/zh_cn/=](=g' ./model_zoo_papers/*.md +sed -i 's=](/docs/zh_cn/=](=g' ./user_guides/*.md +sed -i 's=](/docs/zh_cn/=](=g' ./advanced_guides/*.md +sed -i 's=](/docs/zh_cn/=](=g' ./dataset_zoo/*.md +sed -i 's=](/docs/zh_cn/=](=g' ./notes/*.md +sed -i 's=](/docs/zh_cn/=](=g' ./projects/*.md sed -i 's=](/=](https://github.com/open-mmlab/mmpose/tree/1.x/=g' overview.md @@ -27,3 +28,4 @@ sed -i 's=](/=](https://github.com/open-mmlab/mmpose/tree/1.x/=g' ./model_zoo_pa sed -i 's=](/=](https://github.com/open-mmlab/mmpose/tree/1.x/=g' ./user_guides/*.md sed -i 's=](/=](https://github.com/open-mmlab/mmpose/tree/1.x/=g' ./dataset_zoo/*.md sed -i 's=](/=](https://github.com/open-mmlab/mmpose/tree/1.x/=g' ./notes/*.md +sed -i 's=](/=](https://github.com/open-mmlab/mmpose/tree/1.x/=g' ./projects/*.md diff --git a/docs/zh_cn/overview.md b/docs/zh_cn/overview.md index 05c2b4e6b3..c41edd82a4 100644 --- a/docs/zh_cn/overview.md +++ b/docs/zh_cn/overview.md @@ -65,8 +65,8 @@ MMPose 由 **8** 个主要部分组成,apis、structures、datasets、codecs 5. 对于希望加入开源社区,向 MMPose 贡献代码的研究者和开发者: - - [参与贡献代码](./notes/contribution_guide.md) + - [参与贡献代码](./contribution_guide.md) 6. 对于使用过程中的常见问题: - - [FAQ](./notes/faq.md) + - [FAQ](./faq.md) diff --git a/projects/README.md b/projects/README.md index 162dc9aad6..e882e8b0b9 100644 --- a/projects/README.md +++ b/projects/README.md @@ -16,11 +16,11 @@ If you're not sure where to start, check out our [example project](./example_pro We also provide some documentation listed below to help you get started: -- [New Model Guide](https://mmpose.readthedocs.io/en/1.x/migration.html#step3-model) +- [New Model Guide](https://mmpose.readthedocs.io/en/1.x/guide_to_framework.html#step3-model) A guide to help you add new models to MMPose. -- [Contribution Guide](https://mmpose.readthedocs.io/en/1.x/notes/contribution_guide.html) +- [Contribution Guide](https://mmpose.readthedocs.io/en/1.x/contribution_guide.html) A guide for new contributors on how to add their projects to MMPose. diff --git a/projects/faq.md b/projects/faq.md index fc53d1b5ee..3f62e14ec5 100644 --- a/projects/faq.md +++ b/projects/faq.md @@ -16,7 +16,7 @@ Reaching the first milestone means that this project suffices the minimum requir ## Q4: Compared to other models in the core packages, why do the model implementations in projects have different training/testing commands? -Projects are organized independently from the core package, and therefore their modules cannot be directly imported by train.py and test.py. Each model implementation in projects should either use `mim` for training/testing as suggested in the example project or provide a custom train.py/test.py. +Projects are organized independently from the core package, and therefore their modules cannot be directly imported by `train.py` and `test.py`. Each model implementation in projects should either use `mim` for training/testing as suggested in the example project or provide a custom `train.py`/`test.py`. ## Q5: How to debug a project with a debugger?