Unverified Commit 92d5a87e authored by Tai-Wang's avatar Tai-Wang Committed by GitHub
Browse files

[Fix] Fix figure links and pdf documentation compilation (#1132)

* Fix figure links (also to fix pdf compilation)

* Hack pdf doc compilation

* Hack pdf doc compilation

* Set the priority of figure formats when building html, add png format fig to fix pdf compilation
parent 13f002d7
...@@ -16,6 +16,7 @@ import subprocess ...@@ -16,6 +16,7 @@ import subprocess
import sys import sys
from m2r import MdInclude from m2r import MdInclude
from recommonmark.transform import AutoStructify from recommonmark.transform import AutoStructify
from sphinx.builders.html import StandaloneHTMLBuilder
sys.path.insert(0, os.path.abspath('../../')) sys.path.insert(0, os.path.abspath('../../'))
...@@ -130,6 +131,10 @@ latex_documents = [ ...@@ -130,6 +131,10 @@ latex_documents = [
'manual'), 'manual'),
] ]
# set priority when building html
StandaloneHTMLBuilder.supported_image_types = [
'image/svg+xml', 'image/gif', 'image/png', 'image/jpeg'
]
# -- Extension configuration ------------------------------------------------- # -- Extension configuration -------------------------------------------------
# Ignore >>> when copying code # Ignore >>> when copying code
copybutton_prompt_text = r'>>> |\.\.\. ' copybutton_prompt_text = r'>>> |\.\.\. '
......
...@@ -15,7 +15,7 @@ defines how to process the annotations and a data pipeline defines all the steps ...@@ -15,7 +15,7 @@ defines how to process the annotations and a data pipeline defines all the steps
A pipeline consists of a sequence of operations. Each operation takes a dict as input and also output a dict for the next transform. A pipeline consists of a sequence of operations. Each operation takes a dict as input and also output a dict for the next transform.
We present a classical pipeline in the following figure. The blue blocks are pipeline operations. With the pipeline going on, each operator can add new keys (marked as green) to the result dict or update the existing keys (marked as orange). We present a classical pipeline in the following figure. The blue blocks are pipeline operations. With the pipeline going on, each operator can add new keys (marked as green) to the result dict or update the existing keys (marked as orange).
![](https://github.com/open-mmlab/mmdetection3d/blob/master/resources/data_pipeline.png) ![](../../../resources/data_pipeline.png)
The operations are categorized into data loading, pre-processing, formatting and test-time augmentation. The operations are categorized into data loading, pre-processing, formatting and test-time augmentation.
......
...@@ -4,7 +4,7 @@ We provide lots of useful tools under `tools/` directory. ...@@ -4,7 +4,7 @@ We provide lots of useful tools under `tools/` directory.
You can plot loss/mAP curves given a training log file. Run `pip install seaborn` first to install the dependency. You can plot loss/mAP curves given a training log file. Run `pip install seaborn` first to install the dependency.
![loss curve image](../resources/loss_curve.png) ![loss curve image](../../resources/loss_curve.png)
```shell ```shell
python tools/analysis_tools/analyze_logs.py plot_curve [--keys ${KEYS}] [--title ${TITLE}] [--legend ${LEGEND}] [--backend ${BACKEND}] [--style ${STYLE}] [--out ${OUT_FILE}] [--mode ${MODE}] [--interval ${INTERVAL}] python tools/analysis_tools/analyze_logs.py plot_curve [--keys ${KEYS}] [--title ${TITLE}] [--legend ${LEGEND}] [--backend ${BACKEND}] [--style ${STYLE}] [--out ${OUT_FILE}] [--mode ${MODE}] [--interval ${INTERVAL}]
...@@ -80,7 +80,7 @@ To visualize the results with `Open3D` backend, you can run the following comman ...@@ -80,7 +80,7 @@ To visualize the results with `Open3D` backend, you can run the following comman
python tools/misc/visualize_results.py ${CONFIG_FILE} --result ${RESULTS_PATH} --show-dir ${SHOW_DIR} python tools/misc/visualize_results.py ${CONFIG_FILE} --result ${RESULTS_PATH} --show-dir ${SHOW_DIR}
``` ```
![](../resources/open3d_visual.gif) ![](../../resources/open3d_visual.*)
Or you can use 3D visualization software such as the [MeshLab](http://www.meshlab.net/) to open these files under `${SHOW_DIR}` to see the 3D detection output. Specifically, open `***_points.obj` to see the input point cloud and open `***_pred.obj` to see the predicted 3D bounding boxes. This allows the inference and results generation to be done in remote server and the users can open them on their host with GUI. Or you can use 3D visualization software such as the [MeshLab](http://www.meshlab.net/) to open these files under `${SHOW_DIR}` to see the 3D detection output. Specifically, open `***_points.obj` to see the input point cloud and open `***_pred.obj` to see the predicted 3D bounding boxes. This allows the inference and results generation to be done in remote server and the users can open them on their host with GUI.
...@@ -102,7 +102,7 @@ If you also want to show 2D images with 3D bounding boxes projected onto them, y ...@@ -102,7 +102,7 @@ If you also want to show 2D images with 3D bounding boxes projected onto them, y
python tools/misc/browse_dataset.py configs/mvxnet/dv_mvx-fpn_second_secfpn_adamw_2x8_80e_kitti-3d-3class.py --task multi_modality-det --output-dir ${OUTPUT_DIR} --online python tools/misc/browse_dataset.py configs/mvxnet/dv_mvx-fpn_second_secfpn_adamw_2x8_80e_kitti-3d-3class.py --task multi_modality-det --output-dir ${OUTPUT_DIR} --online
``` ```
![](../resources/browse_dataset_multi_modality.png) ![](../../resources/browse_dataset_multi_modality.png)
You can simply browse different datasets using different configs, e.g. visualizing the ScanNet dataset in 3D semantic segmentation task You can simply browse different datasets using different configs, e.g. visualizing the ScanNet dataset in 3D semantic segmentation task
...@@ -110,7 +110,7 @@ You can simply browse different datasets using different configs, e.g. visualizi ...@@ -110,7 +110,7 @@ You can simply browse different datasets using different configs, e.g. visualizi
python tools/misc/browse_dataset.py configs/_base_/datasets/scannet_seg-3d-20class.py --task seg --output-dir ${OUTPUT_DIR} --online python tools/misc/browse_dataset.py configs/_base_/datasets/scannet_seg-3d-20class.py --task seg --output-dir ${OUTPUT_DIR} --online
``` ```
![](../resources/browse_dataset_seg.png) ![](../../resources/browse_dataset_seg.png)
And browsing the nuScenes dataset in monocular 3D detection task And browsing the nuScenes dataset in monocular 3D detection task
...@@ -118,7 +118,7 @@ And browsing the nuScenes dataset in monocular 3D detection task ...@@ -118,7 +118,7 @@ And browsing the nuScenes dataset in monocular 3D detection task
python tools/misc/browse_dataset.py configs/_base_/datasets/nus-mono3d.py --task mono-det --output-dir ${OUTPUT_DIR} --online python tools/misc/browse_dataset.py configs/_base_/datasets/nus-mono3d.py --task mono-det --output-dir ${OUTPUT_DIR} --online
``` ```
![](../resources/browse_dataset_mono.png) ![](../../resources/browse_dataset_mono.png)
   
......
...@@ -16,6 +16,7 @@ import subprocess ...@@ -16,6 +16,7 @@ import subprocess
import sys import sys
from m2r import MdInclude from m2r import MdInclude
from recommonmark.transform import AutoStructify from recommonmark.transform import AutoStructify
from sphinx.builders.html import StandaloneHTMLBuilder
sys.path.insert(0, os.path.abspath('../../')) sys.path.insert(0, os.path.abspath('../../'))
...@@ -130,6 +131,10 @@ latex_documents = [ ...@@ -130,6 +131,10 @@ latex_documents = [
'manual'), 'manual'),
] ]
# set priority when building html
StandaloneHTMLBuilder.supported_image_types = [
'image/svg+xml', 'image/gif', 'image/png', 'image/jpeg'
]
# -- Extension configuration ------------------------------------------------- # -- Extension configuration -------------------------------------------------
# Ignore >>> when copying code # Ignore >>> when copying code
copybutton_prompt_text = r'>>> |\.\.\. ' copybutton_prompt_text = r'>>> |\.\.\. '
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
数据预处理流程和数据集之间是互相分离的两个部分,通常数据集定义了如何处理标注信息,而数据预处理流程定义了准备数据项字典的所有步骤。数据集预处理流程包含一系列的操作,每个操作将一个字典作为输入,并输出应用于下一个转换的一个新的字典。 数据预处理流程和数据集之间是互相分离的两个部分,通常数据集定义了如何处理标注信息,而数据预处理流程定义了准备数据项字典的所有步骤。数据集预处理流程包含一系列的操作,每个操作将一个字典作为输入,并输出应用于下一个转换的一个新的字典。
我们将在下图中展示一个最经典的数据集预处理流程,其中蓝色框表示预处理流程中的各项操作。随着预处理的进行,每一个操作都会添加新的键值(图中标记为绿色)到输出字典中,或者更新当前存在的键值(图中标记为橙色)。 我们将在下图中展示一个最经典的数据集预处理流程,其中蓝色框表示预处理流程中的各项操作。随着预处理的进行,每一个操作都会添加新的键值(图中标记为绿色)到输出字典中,或者更新当前存在的键值(图中标记为橙色)。
![](https://github.com/open-mmlab/mmdetection3d/blob/master/resources/data_pipeline.png) ![](../../../resources/data_pipeline.png)
预处理流程中的各项操作主要分为数据加载、预处理、格式化、测试时的数据增强。 预处理流程中的各项操作主要分为数据加载、预处理、格式化、测试时的数据增强。
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
给定一个训练的日志文件,您可以绘制出 loss/mAP 曲线。首先需要运行 `pip install seaborn` 安装依赖包。 给定一个训练的日志文件,您可以绘制出 loss/mAP 曲线。首先需要运行 `pip install seaborn` 安装依赖包。
![loss曲线图](../resources/loss_curve.png) ![loss曲线图](../../resources/loss_curve.png)
```shell ```shell
python tools/analysis_tools/analyze_logs.py plot_curve [--keys ${KEYS}] [--title ${TITLE}] [--legend ${LEGEND}] [--backend ${BACKEND}] [--style ${STYLE}] [--out ${OUT_FILE}] [--mode ${MODE}] [--interval ${INTERVAL}] python tools/analysis_tools/analyze_logs.py plot_curve [--keys ${KEYS}] [--title ${TITLE}] [--legend ${LEGEND}] [--backend ${BACKEND}] [--style ${STYLE}] [--out ${OUT_FILE}] [--mode ${MODE}] [--interval ${INTERVAL}]
...@@ -81,7 +81,7 @@ python tools/misc/visualize_results.py ${CONFIG_FILE} --result ${RESULTS_PATH} - ...@@ -81,7 +81,7 @@ python tools/misc/visualize_results.py ${CONFIG_FILE} --result ${RESULTS_PATH} -
``` ```
![](../resources/open3d_visual.gif) ![](../../resources/open3d_visual.*)
或者您可以使用 3D 可视化软件,例如 [MeshLab](http://www.meshlab.net/) 来打开这些在 `${SHOW_DIR}` 目录下的文件,从而查看 3D 检测输出。具体来说,打开 `***_points.obj` 查看输入点云,打开 `***_pred.obj` 查看预测的 3D 边界框。这允许推理和结果生成在远程服务器中完成,用户可以使用 GUI 在他们的主机上打开它们。 或者您可以使用 3D 可视化软件,例如 [MeshLab](http://www.meshlab.net/) 来打开这些在 `${SHOW_DIR}` 目录下的文件,从而查看 3D 检测输出。具体来说,打开 `***_points.obj` 查看输入点云,打开 `***_pred.obj` 查看预测的 3D 边界框。这允许推理和结果生成在远程服务器中完成,用户可以使用 GUI 在他们的主机上打开它们。
...@@ -103,7 +103,7 @@ python tools/misc/browse_dataset.py configs/_base_/datasets/kitti-3d-3class.py - ...@@ -103,7 +103,7 @@ python tools/misc/browse_dataset.py configs/_base_/datasets/kitti-3d-3class.py -
python tools/misc/browse_dataset.py configs/mvxnet/dv_mvx-fpn_second_secfpn_adamw_2x8_80e_kitti-3d-3class.py --task multi_modality-det --output-dir ${OUTPUT_DIR} --online python tools/misc/browse_dataset.py configs/mvxnet/dv_mvx-fpn_second_secfpn_adamw_2x8_80e_kitti-3d-3class.py --task multi_modality-det --output-dir ${OUTPUT_DIR} --online
``` ```
![](../resources/browse_dataset_multi_modality.png) ![](../../resources/browse_dataset_multi_modality.png)
您可以简单的使用不同的配置文件,浏览不同的数据集,例如:在 3D 语义分割任务中可视化 ScanNet 数据集 您可以简单的使用不同的配置文件,浏览不同的数据集,例如:在 3D 语义分割任务中可视化 ScanNet 数据集
...@@ -111,7 +111,7 @@ python tools/misc/browse_dataset.py configs/mvxnet/dv_mvx-fpn_second_secfpn_adam ...@@ -111,7 +111,7 @@ python tools/misc/browse_dataset.py configs/mvxnet/dv_mvx-fpn_second_secfpn_adam
python tools/misc/browse_dataset.py configs/_base_/datasets/scannet_seg-3d-20class.py --task seg --output-dir ${OUTPUT_DIR} --online python tools/misc/browse_dataset.py configs/_base_/datasets/scannet_seg-3d-20class.py --task seg --output-dir ${OUTPUT_DIR} --online
``` ```
![](../resources/browse_dataset_seg.png) ![](../../resources/browse_dataset_seg.png)
在单目 3D 检测任务中浏览 nuScenes 数据集 在单目 3D 检测任务中浏览 nuScenes 数据集
...@@ -119,7 +119,7 @@ python tools/misc/browse_dataset.py configs/_base_/datasets/scannet_seg-3d-20cla ...@@ -119,7 +119,7 @@ python tools/misc/browse_dataset.py configs/_base_/datasets/scannet_seg-3d-20cla
python tools/misc/browse_dataset.py configs/_base_/datasets/nus-mono3d.py --task mono-det --output-dir ${OUTPUT_DIR} --online python tools/misc/browse_dataset.py configs/_base_/datasets/nus-mono3d.py --task mono-det --output-dir ${OUTPUT_DIR} --online
``` ```
![](../resources/browse_dataset_mono.png) ![](../../resources/browse_dataset_mono.png)
   
......
...@@ -8,6 +8,6 @@ line_length = 79 ...@@ -8,6 +8,6 @@ line_length = 79
multi_line_output = 0 multi_line_output = 0
known_standard_library = setuptools known_standard_library = setuptools
known_first_party = mmdet,mmseg,mmdet3d 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,pytorch_sphinx_theme,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,sphinx,tensorflow,terminaltables,torch,trimesh,waymo_open_dataset
no_lines_before = STDLIB,LOCALFOLDER no_lines_before = STDLIB,LOCALFOLDER
default_section = THIRDPARTY default_section = THIRDPARTY
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