Fix get-started rendering issues in readthedocs (#740)
* fix mermaid markdown rendering issue in readthedocs * fix error in C++ example * fix error in c++ example in zh_cn get_started docpull/754/head
parent
dace58e844
commit
71d085b1a6
docs
zh_cn
requirements
|
@ -55,6 +55,7 @@ extensions = [
|
|||
'sphinx_markdown_tables',
|
||||
'myst_parser',
|
||||
'sphinx_copybutton',
|
||||
'sphinxcontrib.mermaid'
|
||||
] # yapf: disable
|
||||
|
||||
autodoc_mock_imports = ['tensorrt']
|
||||
|
|
|
@ -244,7 +244,7 @@ cv2.imwrite('output_detection.png', img)
|
|||
You can find more examples from [here](https://github.com/open-mmlab/mmdeploy/tree/master/demo/python).
|
||||
|
||||
```{note}
|
||||
If you build MMDeploy from the source, please add ${MMDEPLOY_DIR}/build/lib to the environment variable PYTHONPATH.
|
||||
If you build MMDeploy from source, please add ${MMDEPLOY_DIR}/build/lib to the environment variable PYTHONPATH.
|
||||
Otherwise, you will run into an error like ’ModuleNotFoundError: No module named 'mmdeploy_python'
|
||||
```
|
||||
|
||||
|
@ -252,7 +252,7 @@ Otherwise, you will run into an error like ’ModuleNotFoundError: No module nam
|
|||
|
||||
Using SDK C API should follow next pattern,
|
||||
|
||||
```mermaid
|
||||
```{mermaid}
|
||||
graph LR
|
||||
A[create inference handle] --> B(read image)
|
||||
B --> C(apply handle)
|
||||
|
@ -304,7 +304,7 @@ int main() {
|
|||
cv::Point{(int)box.right, (int)box.bottom}, cv::Scalar{0, 255, 0});
|
||||
}
|
||||
|
||||
cv::imwrite('output_detection.png', img);
|
||||
cv::imwrite("output_detection.png", img);
|
||||
|
||||
// destroy result buffer
|
||||
mmdeploy_detector_release_result(bboxes, res_count, 1);
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
以 ncnn backend 为例,完整的工作流如下:
|
||||
|
||||
```mermaid
|
||||
```{mermaid}
|
||||
flowchart TD;
|
||||
torch模型-->非标准onnx;
|
||||
非标准onnx-->ncnn-fp32;
|
||||
|
|
|
@ -56,6 +56,7 @@ extensions = [
|
|||
'sphinx_markdown_tables',
|
||||
'myst_parser',
|
||||
'sphinx_copybutton',
|
||||
'sphinxcontrib.mermaid'
|
||||
] # yapf: disable
|
||||
|
||||
autodoc_mock_imports = ['tensorrt']
|
||||
|
|
|
@ -251,7 +251,7 @@ cv2.imwrite('output_detection.png', img)
|
|||
|
||||
使用 C API 进行模型推理的流程符合下面的模式:
|
||||
|
||||
```mermaid
|
||||
```{mermaid}
|
||||
graph LR
|
||||
A[创建推理句柄] --> B(读取图像)
|
||||
B --> C(应用句柄进行推理)
|
||||
|
@ -303,7 +303,7 @@ int main() {
|
|||
cv::Point{(int)box.right, (int)box.bottom}, cv::Scalar{0, 255, 0});
|
||||
}
|
||||
|
||||
cv::imwrite('output_detection.png', img);
|
||||
cv::imwrite("output_detection.png", img);
|
||||
|
||||
// 销毁结果
|
||||
mmdeploy_detector_release_result(bboxes, res_count, 1);
|
||||
|
|
|
@ -7,3 +7,4 @@ recommonmark
|
|||
sphinx==4.0.2
|
||||
sphinx-copybutton
|
||||
sphinx_markdown_tables
|
||||
sphinxcontrib-mermaid
|
||||
|
|
|
@ -2,4 +2,5 @@ h5py
|
|||
mmcv
|
||||
onnx>=1.8.0
|
||||
opencv-python==4.5.4.60
|
||||
sphinxcontrib-mermaid
|
||||
torch
|
||||
|
|
Loading…
Reference in New Issue