Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync master docs #1052

Merged
merged 138 commits into from
Sep 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
138 commits
Select commit Hold shift + click to select a range
9c8168f
make -install -> make install (#621)
DrRyanHuang Jun 20, 2022
f30eacf
[Fix] fix csharp api detector release result (#620)
irexyc Jun 21, 2022
0cac515
[Enhancement] Support two-stage rotated detector TensorRT. (#530)
Jun 23, 2022
ae47e9d
Reduce mmcls version dependency (#635)
Jun 27, 2022
fa034e0
fix shufflenetv2 with trt (#645)
RunningLeon Jun 27, 2022
49608b4
' -> " (#654)
DrRyanHuang Jun 27, 2022
7e8d6eb
' -> " (#655)
DrRyanHuang Jun 27, 2022
da8c02e
Support deployment of Segmenter (#587)
RunningLeon Jun 27, 2022
82a74d8
simplify `Expand` (#617)
lzhangzz Jun 27, 2022
05cafab
Fix typo (#625)
triple-Mu Jun 27, 2022
4d9e209
[Enhancement] Fix ncnn unittest (#626)
Jun 28, 2022
dc5f9c3
[Enhancement] TensorRT Anchor generator plugin (#646)
Jun 28, 2022
f568fe7
Add partition doc and sample code (#599)
RunningLeon Jun 28, 2022
5fce1e8
update docs (#624)
RunningLeon Jun 29, 2022
051e157
Add java apis and demos (#563)
hanrui1sensetime Jun 29, 2022
30d62e9
update the circleci config file by adding workflows both for linux, w…
lvhan028 Jun 29, 2022
0f0f676
Fixed tensorrt plugin not found in Windows (#672)
bgsuello Jun 29, 2022
b1f156a
update introduction.png (#674)
lvhan028 Jun 29, 2022
5858488
[Enhancement] Add fuse select assign pass (#589)
Jun 29, 2022
c792d06
fix export sdk info of input shape (#667)
irexyc Jun 29, 2022
3bc766e
Update get_started.md (#675)
zambranohally Jun 29, 2022
e49e8a1
Update get_started.md (#676)
zambranohally Jun 29, 2022
8f1508e
[Fix] fix clang build (#677)
lzhangzz Jun 29, 2022
efd3995
Deploy the Swin Transformer on TensorRT. (#652)
AllentDan Jun 30, 2022
5195ff9
bump version to 0.6.0 (#680)
RunningLeon Jun 30, 2022
17a7d60
pass img_metas while exporting to onnx (#681)
RunningLeon Jun 30, 2022
affc5ae
[Fix] fix ssd ncnn ut (#692)
hanrui1sensetime Jul 4, 2022
029ed69
fix passing img_metas to pytorch2onnx for mmedit (#700)
RunningLeon Jul 5, 2022
69c38b9
fix passing img_metas for mmdet3d (#707)
RunningLeon Jul 5, 2022
d57cf85
[Fix] Fix android build (#698)
hanrui1sensetime Jul 7, 2022
585e34b
fix wrong exit code in pipeline_manager (#715)
RunningLeon Jul 7, 2022
22733c2
fix passing wrong backend type (#719)
RunningLeon Jul 7, 2022
41ddcaf
Rename onnx2ncnn to mmdeploy_onnx2ncnn (#694)
tpoisonooo Jul 8, 2022
112b114
[Fix] Fix mmdet ort static shape bug (#687)
hanrui1sensetime Jul 8, 2022
8bdf1cf
fix c4 for torchscript (#724)
AllentDan Jul 11, 2022
14b2bfd
[Enhancement] Standardize C API (#634)
lzhangzz Jul 12, 2022
dace58e
[Enhancement] Support Slide Vertex TRT (#650)
Jul 13, 2022
71d085b
Fix get-started rendering issues in readthedocs (#740)
lvhan028 Jul 14, 2022
d216af8
[Fix] set default topk for dump info (#702)
hanrui1sensetime Jul 14, 2022
bc7de32
add version control (#754)
AllentDan Jul 18, 2022
394fb55
fix satrn for ORT (#753)
AllentDan Jul 19, 2022
252cabb
Add inference latency test tool (#665)
RunningLeon Jul 19, 2022
4842823
[Enhancement] Add CSE ONNX pass (#647)
Jul 19, 2022
8cc21f2
Test robot
tpoisonooo Jul 19, 2022
956ba2d
Update README.md
tpoisonooo Jul 19, 2022
ebba5ff
[Fix] fix yolox point_generator (#758)
AllentDan Jul 20, 2022
c498cd2
limit markdown version (#773)
lvhan028 Jul 20, 2022
0310c16
[Enhancement] Better index put ONNX export. (#704)
Jul 20, 2022
58b256a
Upgrade Dockerfile to use TensorRT==8.2.4.2 (#706)
nijkah Jul 20, 2022
c20bb80
[Fix] reduce log verbosity & improve error reporting (#755)
lzhangzz Jul 20, 2022
ab07c22
[Enhancement] Support latest ppl.nn & ppl.cv (#564)
lzhangzz Jul 21, 2022
01f3845
[Fix][P0] Fix for torch1.12 (#751)
Jul 21, 2022
6e58c3c
fix check env (#785)
AllentDan Jul 21, 2022
4b79124
[Fix] fix cascade mask rcnn (#787)
hanrui1sensetime Jul 22, 2022
36b3ca4
[Feature] Support RoITransRoIHead (#713)
nijkah Jul 22, 2022
36c35b6
[Fix] fix triu (#792)
AllentDan Jul 22, 2022
5b31d7a
[Enhancement] Install Optimizer by setuptools (#690)
Jul 25, 2022
0e1a3aa
[Feature] support MMRotate model with le135 (#788)
Jul 25, 2022
bfd46c1
[Fix] Support macOS build (#762)
lzhangzz Jul 26, 2022
c1d673e
add option to build & install examples (#822)
lzhangzz Jul 27, 2022
b763611
[Fix] Fix setup on non-linux-x64 (#811)
Jul 27, 2022
b6b22a1
[Feature] support build single sdk library (#806)
irexyc Jul 28, 2022
f80c90e
update document for building android sdk (#817)
dwSun Jul 28, 2022
2c18fbd
[Enhancement] support kwargs in SDK python bindings (#794)
lvhan028 Jul 29, 2022
f54da4e
improvement(sdk): add sdk code coverage (#808)
tpoisonooo Jul 29, 2022
f54854e
[Feature] Add C++ API for SDK (#831)
lzhangzz Jul 29, 2022
2968a18
feat(tools/deploy.py): support snpe (#789)
tpoisonooo Aug 1, 2022
1a3841f
Support setup on environment with no PyTorch (#843)
Aug 1, 2022
2cddae7
support test with multi batch (#829)
RunningLeon Aug 1, 2022
1d3ce15
import algorithm from buffer (#793)
lzhangzz Aug 1, 2022
a15365e
[Enhancement] build sdk python api in standard-alone manner (#810)
lvhan028 Aug 2, 2022
e12dfdd
Fix SDK backend (#844)
irexyc Aug 2, 2022
3ecee6f
fix mmpose python api (#852)
irexyc Aug 3, 2022
091bfc3
add prebuild package usage docs on windows (#816)
irexyc Aug 3, 2022
ef56036
fix typo (#862)
lzhangzz Aug 3, 2022
83b11bc
[Enhancement] Improve get_started documents and bump version to 0.7.0…
lvhan028 Aug 4, 2022
4001a06
improvement(dockerfile): use make -j$(nporc) when build ncnn (#840)
OldDreamInWind Aug 5, 2022
80d24fc
fix error when set device cpu && fix docs error (#866)
OldDreamInWind Aug 5, 2022
f957284
[Feature]support pointpillar nus version (#391)
VVsssssk Aug 5, 2022
5fb342e
Fix doc error of building C examples (#879)
liu-mengyang Aug 10, 2022
670a504
fix adaptive_avg_pool exporting to onnx (#857)
RunningLeon Aug 12, 2022
127125f
docs(project): sync en and zh docs (#842)
tpoisonooo Aug 15, 2022
91a060f
fix mmdeploy_pplnn_net build error when target device is cpu (#896)
lvhan028 Aug 15, 2022
3fa1582
docs(zh_cn): add architect (#882)
tpoisonooo Aug 15, 2022
9fbfdd2
add device backend check (#886)
AllentDan Aug 16, 2022
3e7e80b
support multi-batch test in profile tool (#868)
RunningLeon Aug 17, 2022
cad0092
[Fix] fix device error in dump-info (#912)
AllentDan Aug 17, 2022
a6e07da
improvement(cmake): simplify build option and doc (#832)
tpoisonooo Aug 19, 2022
1f8d889
set test_mode for mmdet (#920)
RunningLeon Aug 19, 2022
e1aabf5
[Doc] How to write a customized TensorRT plugin (#290)
AllentDan Aug 22, 2022
0111e1f
[Feature] add swin for cls (#911)
AllentDan Aug 23, 2022
21775ce
docs(mmdet3d): give detail model path (#940)
tpoisonooo Aug 24, 2022
b1e7579
add cflags explicitly in ci (#945)
RunningLeon Aug 25, 2022
4534598
improvement(installation): add script install mmdeploy (#919)
tpoisonooo Aug 26, 2022
c04dcd2
Support risc-v platform (#910)
irexyc Aug 26, 2022
6c2dde1
[Feature] TorchScript SDK backend (#890)
lzhangzz Aug 29, 2022
18321ee
[Bug] fix setitem with scalar or single element tensor (#941)
Aug 29, 2022
f7e0905
docs(convert_model): update description (#956)
tpoisonooo Aug 30, 2022
f4decda
[Enhancement] Support DETR (#924)
Aug 30, 2022
47d4e6f
fix ut failed (#951)
hanrui1sensetime Aug 30, 2022
13920ec
[Enhancement] Rewriter support pre-import function (#899)
Aug 30, 2022
638e33a
add_multi_label_postprocess (#950)
gy-7 Aug 30, 2022
eed69b1
fix ci (#964)
Aug 31, 2022
ac9db5b
[Fix] Close onnx optimizer for ncnn (#961)
hanrui1sensetime Aug 31, 2022
8a40f19
remove Release dir in mmdeploy package (#960)
irexyc Aug 31, 2022
38bcc43
CI(tools/scripts): add submodule init and update (#977)
tpoisonooo Sep 2, 2022
a6ed7ed
fix mmroate (#976)
RunningLeon Sep 2, 2022
71e6478
Fix mmseg pointrend (#903)
RunningLeon Sep 2, 2022
5874f10
Add CI to test full pipeline (#966)
RunningLeon Sep 2, 2022
cbedf1c
fix regression test (#958)
RunningLeon Sep 2, 2022
306616f
fix(CI): typo (#983)
tpoisonooo Sep 2, 2022
9b3db48
fix(CI): ort test all pipeline (#985)
tpoisonooo Sep 2, 2022
9918d29
add missing sqrt for PAAHead's score calculation (#984)
Groexhy Sep 2, 2022
966d737
Fix: skip tests for uninstalled codebases (#987)
RunningLeon Sep 3, 2022
792c27b
[Feature] Ascend backend (#747)
lzhangzz Sep 5, 2022
e21cad8
fix(backend): disable cublaslt for cu102 (#947)
tpoisonooo Sep 5, 2022
9541be9
TensorRT dot product attention ops (#949)
Sep 5, 2022
3d092bf
fix mmdet showresult (#999)
munhou Sep 5, 2022
a0fb3be
support coreml (#760)
irexyc Sep 5, 2022
ac3a120
fix mmdet ut (#1001)
RunningLeon Sep 5, 2022
6b01a2e
[Feature] Add option to fuse transform. (#741)
irexyc Sep 5, 2022
124635e
Add RKNN support. (#865)
AllentDan Sep 6, 2022
b602356
[Fix] Add isolated option for TorchScript SDK backend (#1002)
lzhangzz Sep 6, 2022
b310ba8
bump version to v0.8.0 (#1009)
lvhan028 Sep 7, 2022
8e9578c
fix(CI): update link checker (#1008)
tpoisonooo Sep 7, 2022
f2bc808
New issue template (#1007)
Sep 7, 2022
b87afb9
fix mmdeploy builder on windows (#1018)
irexyc Sep 9, 2022
e912e86
BUG P0 (#1044)
grimoire Sep 14, 2022
615668e
update api in doc (#1021)
AllentDan Sep 14, 2022
441d0e2
fix two stage batch dynamic (#1046)
AllentDan Sep 14, 2022
538c9cf
docs(scripts): update auto install desc (#1036)
tpoisonooo Sep 14, 2022
2f47262
Fix `RoIAlignFunction` error for CoreML backend (#1029)
Typiqally Sep 14, 2022
a1a19f0
Fixed typo for install commands for TensorRT runtime (#1025)
Sep 15, 2022
fc1e1a6
merge master@a1a19f0 documents to dev-1.x
lvhan028 Sep 15, 2022
9c086db
merge master@a1a19f0 documents to dev-1.x
lvhan028 Sep 15, 2022
9732220
Merge branch 'master' into sync-master-docs
lvhan028 Sep 15, 2022
2f5f31e
missed ubuntu_utils.py
lvhan028 Sep 16, 2022
a2bfabe
change benchmark reference in readme_zh-CN
lvhan028 Sep 16, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .codespell_ignore.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
cann
CANN
30 changes: 21 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,33 +55,45 @@ The currently supported codebases and models are as follows, and more will be in

Models can be exported and run in the following backends, and more will be compatible

| ONNX Runtime | TensorRT | ppl.nn | ncnn | OpenVINO | LibTorch | snpe | more |
| ------------ | -------- | ------ | ---- | -------- | -------- | ---- | ---------------------------------------------- |
| ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | [benchmark](docs/en/03-benchmark/benchmark.md) |
| ONNX Runtime | TensorRT | ppl.nn | ncnn | OpenVINO | LibTorch | snpe | Ascend | Core ML | RKNN | more |
| ------------ | -------- | ------ | ---- | -------- | -------- | ---- | ------ | ------- | ---- | ---------------------------------------------- |
| ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | [benchmark](docs/en/03-benchmark/benchmark.md) |

### Efficient and scalable C/C++ SDK Framework

All kinds of modules in the SDK can be extended, such as `Transform` for image processing, `Net` for Neural Network inference, `Module` for postprocessing and so on

## Get Started
## [Documentation](https://mmdeploy.readthedocs.io/en/latest/)

Please read [getting_started.md](docs/en/get_started.md) for the basic usage of MMDeploy. We also provide tutoials about:
Please read [getting_started](docs/en/get_started.md) for the basic usage of MMDeploy. We also provide tutoials about:

- [Build](docs/en/01-how-to-build/build_from_source.md)
- [Build from Docker](docs/en/01-how-to-build/build_from_docker.md)
- [Build from Script](docs/en/01-how-to-build/build_from_script.md)
- [Build for Linux](docs/en/01-how-to-build/linux-x86_64.md)
- [Build for macOS](docs/en/01-how-to-build/macos-arm64.md)
- [Build for Win10](docs/en/01-how-to-build/windows.md)
- [Build for Android](docs/en/01-how-to-build/android.md)
- [Build for Jetson](docs/en/01-how-to-build/jetsons.md)
- [Build for SNPE](docs/en/01-how-to-build/snpe.md)
- User Guide
- [How to convert model](docs/en/02-how-to-run/convert_model.md)
- [How to write config](docs/en/02-how-to-run/write_config.md)
- [How to evaluate deployed models](docs/en/02-how-to-run/how_to_evaluate_a_model.md)
- [How to measure performance of deployed models](docs/en/02-how-to-run/how_to_measure_performance_of_models.md)
- [How to profile model](docs/en/02-how-to-run/profile_model.md)
- [How to quantize model](docs/en/02-how-to-run/quantize_model.md)
- [Useful tools](docs/en/02-how-to-run/useful_tools.md)
- Developer Guide
- [How to support new models](docs/en/06-developer-guide/support_new_model.md)
- [How to support new backends](docs/en/06-developer-guide/support_new_backend.md)
- [Architecture](docs/en/07-developer-guide/architecture.md)
- [How to support new models](docs/en/07-developer-guide/support_new_model.md)
- [How to support new backends](docs/en/07-developer-guide/support_new_backend.md)
- [How to partition model](docs/en/07-developer-guide/partition_model.md)
- [How to test rewritten model](docs/en/07-developer-guide/test_rewritten_models.md)
- [How to test backend ops](docs/en/07-developer-guide/add_backend_ops_unittest.md)
- [How to do regression test](docs/en/07-developer-guide/regression_test.md)
- Custom Backend Ops
- [ncnn](docs/en/06-custom-ops/ncnn.md)
- [onnxruntime](docs/en/06-custom-ops/onnxruntime.md)
- [tensorrt](docs/en/06-custom-ops/tensorrt.md)
- [FAQ](docs/en/faq.md)
- [Contributing](.github/CONTRIBUTING.md)

Expand Down
33 changes: 24 additions & 9 deletions README_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,21 +53,24 @@ MMDeploy 是 [OpenMMLab](https://openmmlab.com/) 模型部署工具箱,**为

### 支持多种推理后端

| ONNX Runtime | TensorRT | ppl.nn | ncnn | OpenVINO | LibTorch | snpe | more |
| ------------ | -------- | ------ | ---- | -------- | -------- | ---- | ------------------------------------------------- |
| ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | [benchmark](docs/zh_cn/03-benchmark/benchmark.md) |
| ONNX Runtime | TensorRT | ppl.nn | ncnn | OpenVINO | LibTorch | snpe | Ascend | Core ML | RKNN | more |
| ------------ | -------- | ------ | ---- | -------- | -------- | ---- | ------ | ------- | ---- | ------------------------------------------------- |
| ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | [benchmark](docs/zh_cn/03-benchmark/benchmark.md) |

### SDK 可高度定制化

- Transform 数据预处理
- Net 推理
- Module 后处理

## [快速上手](docs/zh_cn/get_started.md)
## [中文文档](https://mmdeploy.readthedocs.io/zh_CN/latest/)

- [快速上手](docs/zh_cn/get_started.md)
- [编译](docs/zh_cn/01-how-to-build/build_from_source.md)
- [一键式脚本安装](docs/zh_cn/01-how-to-build/build_from_script.md)
- [Build from Docker](docs/zh_cn/01-how-to-build/build_from_docker.md)
- [Build for Linux](docs/zh_cn/01-how-to-build/linux-x86_64.md)
- [Build for macOS](docs/zh_cn/01-how-to-build/macos-arm64.md)
- [Build for Win10](docs/zh_cn/01-how-to-build/windows.md)
- [Build for Android](docs/zh_cn/01-how-to-build/android.md)
- [Build for Jetson](docs/en/01-how-to-build/jetsons.md)
Expand All @@ -77,17 +80,29 @@ MMDeploy 是 [OpenMMLab](https://openmmlab.com/) 模型部署工具箱,**为
- [配置转换参数](docs/zh_cn/02-how-to-run/write_config.md)
- [量化](docs/zh_cn/02-how-to-run/quantize_model.md)
- [测试转换完成的模型](docs/zh_cn/02-how-to-run/profile_model.md)
- [工具集介绍](docs/zh_cn/02-how-to-run/useful_tools.md)
- 开发指南
- [支持新模型](docs/zh_cn/04-developer-guide/support_new_model.md)
- [增加推理 Backend](docs/zh_cn/04-developer-guide/support_new_backend.md)
- [回归测试](docs/zh_cn/04-developer-guide/do_regression_test.md)
- [软件架构](docs/zh_cn/07-developer-guide/architecture.md)
- [支持新模型](docs/zh_cn/07-developer-guide/support_new_model.md)
- [增加推理 backend](docs/zh_cn/07-developer-guide/support_new_backend.md)
- [模型分块](docs/zh_cn/07-developer-guide/partition_model.md)
- [测试重写模型](docs/zh_cn/07-developer-guide/test_rewritten_models.md)
- [backend 算子测试](docs/zh_cn/07-developer-guide/add_backend_ops_unittest.md)
- [回归测试](docs/zh_cn/07-developer-guide/regression_test.md)
- 各 backend 自定义算子列表
- [ncnn](docs/zh_cn/06-custom-ops/ncnn.md)
- [onnxruntime](docs/zh_cn/06-custom-ops/onnxruntime.md)
- [tensorrt](docs/zh_cn/06-custom-ops/tensorrt.md)
- [FAQ](docs/zh_cn/faq.md)
- [贡献者手册](.github/CONTRIBUTING.md)

## 新人解说

- [01 术语解释、加载第一个模型](docs/zh_cn/05-tutorial/01_introduction_to_model_deployment.md)
- [02 转成 onnx](docs/zh_cn/05-tutorial/02_challenges.md)
- [01 术语解释、加载第一个模型](docs/zh_cn/tutorial/01_introduction_to_model_deployment.md)
- [02 部署常见问题](docs/zh_cn/tutorial/02_challenges.md)
- [03 torch转onnx](docs/zh_cn/tutorial/03_pytorch2onnx.md)
- [04 让torch支持更多onnx算子](docs/zh_cn/tutorial/04_onnx_custom_op.md)
- [05 调试onnx模型](docs/zh_cn/tutorial/05_onnx_model_editing.md)

## 基准与模型库

Expand Down
72 changes: 3 additions & 69 deletions docs/en/01-how-to-build/android.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Model converter is executed on linux platform, and SDK is executed on android pl

Here are two steps for android build.

1. Build model converter on linux, please refer to [How to build linux](./linux-x86_64.md)
1. Build model converter on linux, please refer to [How to build linux](linux-x86_64.md)

2. Build SDK using android toolchain on linux.

Expand Down Expand Up @@ -106,73 +106,6 @@ make -j$(nproc) install

### Build MMDeploy

#### Build Options Spec

<table>
<thead>
<tr>
<th>NAME</th>
<th>VALUE</th>
<th>DEFAULT</th>
<th>REMARK</th>
</tr>
</thead>
<tbody>
<tr>
<td>MMDEPLOY_BUILD_SDK</td>
<td>{ON, OFF}</td>
<td>OFF</td>
<td>Switch to build MMDeploy SDK</td>
</tr>
<tr>
<td>MMDEPLOY_BUILD_SDK_PYTHON_API</td>
<td>{ON, OFF}</td>
<td>OFF</td>
<td>switch to build MMDeploy SDK python package</td>
</tr>
<tr>
<td>MMDEPLOY_BUILD_SDK_JAVA_API</td>
<td>{ON, OFF}</td>
<td>OFF</td>
<td>switch to build MMDeploy SDK Java API</td>
</tr>
<tr>
<td>MMDEPLOY_BUILD_TEST</td>
<td>{ON, OFF}</td>
<td>OFF</td>
<td>Switch to build MMDeploy SDK unittest cases</td>
</tr>
<tr>
<td>MMDEPLOY_TARGET_DEVICES</td>
<td>{"cpu"}</td>
<td>cpu</td>
<td>Enable target device. <br>If you want use ncnn vulkan accelerate, you still fill <code>{"cpu"}</code> here. Because, vulkan accelerate is only for ncnn net. The other part of inference is still using cpu.</td>
</tr>
<tr>
<td>MMDEPLOY_TARGET_BACKENDS</td>
<td>{"ncnn"}</td>
<td>N/A</td>
<td>Enabling inference engine. <br><b>By default, no target inference engine is set, since it highly depends on the use case.</b><br> Only ncnn backend is supported for android platform now.<br>
After specifying the inference engine, it's package path has to be passed to cmake as follows, <br>
1. <b>ncnn</b>: ncnn. <code>ncnn_DIR</code> is needed.
<pre><code>-Dncnn_DIR=${NCNN_DIR}/build_${ANDROID_ABI}/install/lib/cmake/ncnn</code></pre>
</td>
</tr>
<tr>
<td>MMDEPLOY_CODEBASES</td>
<td>{"mmcls", "mmdet", "mmseg", "mmedit", "mmocr", "all"}</td>
<td>N/A</td>
<td>Enable codebase's postprocess modules. It MUST be set by a semicolon separated list of codebase names. The currently supported codebases are 'mmcls', 'mmdet', 'mmedit', 'mmseg', 'mmocr'. Instead of listing them one by one, you can also pass <code>all</code> to enable them all, i.e., <code>-DMMDEPLOY_CODEBASES=all</code>Please manually edit <code>csrc/mmdeploy/apis/java/native/CMakeLists.txt</code> to avoid compilation errors.</td>
</tr>
<tr>
<td>MMDEPLOY_SHARED_LIBS</td>
<td>{ON, OFF}</td>
<td>ON</td>
<td>Switch to build shared library or static library of MMDeploy SDK. Now you should build static library for android. Bug will be fixed soon.</td>
</tr>
</tbody>
</table>

#### Build SDK and Demos

MMDeploy provides a recipe as shown below for building SDK with ncnn as inference engine for android.
Expand All @@ -189,7 +122,6 @@ MMDeploy provides a recipe as shown below for building SDK with ncnn as inferenc
-DOpenCV_DIR=${OPENCV_ANDROID_SDK_DIR}/sdk/native/jni/abi-${ANDROID_ABI} \
-Dncnn_DIR=${NCNN_DIR}/build_${ANDROID_ABI}/install/lib/cmake/ncnn \
-DMMDEPLOY_TARGET_BACKENDS=ncnn \
-DMMDEPLOY_CODEBASES=all \
-DMMDEPLOY_SHARED_LIBS=ON \
-DCMAKE_TOOLCHAIN_FILE=${NDK_PATH}/build/cmake/android.toolchain.cmake \
-DANDROID_ABI=${ANDROID_ABI} \
Expand All @@ -198,3 +130,5 @@ MMDeploy provides a recipe as shown below for building SDK with ncnn as inferenc

make -j$(nproc) && make install
```

Please check [cmake build option spec](cmake_option.md)
2 changes: 1 addition & 1 deletion docs/en/01-how-to-build/build_from_docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ docker run --gpus all -it mmdeploy:master-gpu

As described [here](https://forums.developer.nvidia.com/t/cuda-error-the-provided-ptx-was-compiled-with-an-unsupported-toolchain/185754), update the GPU driver to the latest one for your GPU.

2. docker: Error response from daemon: could not select device driver "" with capabilities: \[\[gpu\]\].
2. docker: Error response from daemon: could not select device driver "" with capabilities: \[gpu\].

```
# Add the package repositories
Expand Down
45 changes: 45 additions & 0 deletions docs/en/01-how-to-build/build_from_script.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Build from Script

Through user investigation, we know that most users are already familiar with python and torch before using mmdeploy. Therefore we provide scripts to simplify mmdeploy installation.

Assuming you have a python ready (whether `conda` or `pyenv`), run this script to install mmdeploy + ncnn backend, `nproc` is not compulsory.

```bash
$ cd /path/to/mmdeploy
$ python3 tools/scripts/build_ubuntu_x64_ncnn.py $(nproc)
..
```

A sudo password may be required during this time, and the script will try its best to build and install mmdeploy SDK and demo:

- Detect host OS version, `make` job number, whether use `root` and try to fix `python3 -m pip`
- Find the necessary basic tools, such as g++-7, cmake, wget, etc.
- Compile necessary dependencies, such as pyncnn, protobuf

The script will also try to avoid affecting host environment:

- The dependencies of source code compilation are placed in the `mmdeploy-dep` directory at the same level as mmdeploy
- The script would not modify variables such as PATH, LD_LIBRARY_PATH, PYTHONPATH, etc.
- The environment variables that need to be modified will be printed, **please pay attention to the final output**

The script will eventually execute `python3 tools/check_env.py`, the successful installation should display the version number of the corresponding backend and `ops_is_available: True`, for example:

```bash
$ python3 tools/check_env.py
..
2022-09-13 14:49:13,767 - mmdeploy - INFO - **********Backend information**********
2022-09-13 14:49:14,116 - mmdeploy - INFO - onnxruntime: 1.8.0 ops_is_avaliable : True
2022-09-13 14:49:14,131 - mmdeploy - INFO - tensorrt: 8.4.1.5 ops_is_avaliable : True
2022-09-13 14:49:14,139 - mmdeploy - INFO - ncnn: 1.0.20220901 ops_is_avaliable : True
2022-09-13 14:49:14,150 - mmdeploy - INFO - pplnn_is_avaliable: True
..
```

Here is the verified installation script. If you want mmdeploy to support multiple backends at the same time, you can execute each script once:

| script | OS version |
| :-----------------------------: | :---------: |
| build_ubuntu_x64_ncnn.py | 18.04/20.04 |
| build_ubuntu_x64_ort.py | 18.04/20.04 |
| build_ubuntu_x64_pplnn.py | 18.04/20.04 |
| build_ubuntu_x64_torchscript.py | 18.04/20.04 |
3 changes: 2 additions & 1 deletion docs/en/01-how-to-build/build_from_source.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Build From Source
# Build from Source

## Download

Expand Down Expand Up @@ -38,3 +38,4 @@ Please visit the following links to find out how to build MMDeploy according to
- [Android-aarch64](android.md)
- [NVIDIA Jetson](jetsons.md)
- [SNPE](snpe.md)
- [RISC-V](riscv.md)
Loading