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

fix mmdet ONNXRuntime cuda test bug #438

Merged
merged 1 commit into from
May 7, 2022
Merged

fix mmdet ONNXRuntime cuda test bug #438

merged 1 commit into from
May 7, 2022

Conversation

NagatoYuki0943
Copy link
Contributor

Thanks for your contribution and we appreciate it a lot. The following instructions would make your pull request more healthy and more easily receiving feedbacks. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers.

Motivation

Fix mmdet ONNXRuntime cuda test bug.
Some error happended when I test the yolox speed.

python tools/test.py \
    configs/mmdet/detection/detection_onnxruntime_dynamic.py \
    ../mmdetection/configs/yolox/yolox_s_8x8_300e_coco.py \
    --model work_dir/det/yolox-s-ort-dynamic/end2end.onnx \
    --speed-test \
    --log2file work_dir/det/yolox-s-ort-dynamic/logs-cuda.txt \
    --device cuda:0

error

Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu!

Modification

Under the line https://github.com/open-mmlab/mmdeploy/blob/master/mmdeploy/codebase/mmdet/deploy/object_detection_model.py#L210 add this code could solve the question.

dets = dets.to(device=torch.device(self.device))

Checklist

  1. Pre-commit or other linting tools are used to fix the potential lint issues.
  2. The modification is covered by complete unit tests. If not, please add more unit tests to ensure the correctness.
  3. If the modification has a dependency on downstream projects of a newer version, this PR should be tested with all supported versions of downstream projects.
  4. The documentation has been modified accordingly, like docstring or example tutorials.

@lvhan028 lvhan028 requested review from grimoire and irexyc May 6, 2022 02:13
@lvhan028
Copy link
Collaborator

lvhan028 commented May 6, 2022

@NagatoYuki0943, I think there are probably similar issues in other codebase modules in mmdeploy/codebase/*. Could you help check it?

@grimoire should we take where-the-tensor-is into consideration in our new API design?

@NagatoYuki0943
Copy link
Contributor Author

@lvhan028

I test the mmcls mmseg and mmocr onnxruntime-gpu speed.
mmcls and mmseg test OK but the mmocr‘s speed is very slow.
I will test other codebases if I have time.

mmcls convnext-tiny

python tools/test.py \
>     configs/mmcls/classification_onnxruntime_dynamic.py \
>     ../mmclassification/configs/convnext/convnext-tiny_32xb128_in1k_self.py \
>     --model work_dir/self/convnext-tiny/end2end.onnx \
>     --speed-test \
>     --log2file work_dir/self/convnext-tiny/logs-cuda.txt \
>     --device cuda:1
[2022-05-06 13:45:23.697] [mmdeploy] [info] [model.cpp:95] Register 'DirectoryModel'
2022-05-06 13:45:24,213 - mmdeploy - INFO - Sorting the dataset by 'height' and 'width' is not possible.
2022-05-06 13:45:24,215 - mmdeploy - INFO - Successfully loaded onnxruntime custom ops from             /home/ubuntu/Program/mm/mmdeploy/build/lib/libmmdeploy_onnxruntime_ops.so
[>                                                 ] 109/3000, 39.0 task/s, elapsed: 3s, ETA:    74s2022-05-06 13:45:29,746 - test - INFO - [__ort_execute]-110 times per count: 14.96 ms, 66.82 FPS
[>>>                                               ] 209/3000, 48.0 task/s, elapsed: 4s, ETA:    58s2022-05-06 13:45:31,301 - test - INFO - [__ort_execute]-210 times per count: 15.08 ms, 66.31 FPS
[>>>>>                                             ] 309/3000, 52.4 task/s, elapsed: 6s, ETA:    51s2022-05-06 13:45:32,849 - test - INFO - [__ort_execute]-310 times per count: 15.12 ms, 66.15 FPS
[>>>>>>                                            ] 409/3000, 54.7 task/s, elapsed: 7s, ETA:    47s2022-05-06 13:45:34,433 - test - INFO - [__ort_execute]-410 times per count: 15.22 ms, 65.68 FPS
[>>>>>>>>                                          ] 509/3000, 56.2 task/s, elapsed: 9s, ETA:    44s2022-05-06 13:45:36,013 - test - INFO - [__ort_execute]-510 times per count: 15.28 ms, 65.44 FPS
[>>>>>>>>>>                                        ] 609/3000, 56.9 task/s, elapsed: 11s, ETA:    42s2022-05-06 13:45:37,645 - test - INFO - [__ort_execute]-610 times per count: 15.40 ms, 64.92 FPS
[>>>>>>>>>>>                                       ] 709/3000, 57.6 task/s, elapsed: 12s, ETA:    40s2022-05-06 13:45:39,260 - test - INFO - [__ort_execute]-710 times per count: 15.47 ms, 64.65 FPS
[>>>>>>>>>>>>>                                     ] 809/3000, 57.9 task/s, elapsed: 14s, ETA:    38s2022-05-06 13:45:40,914 - test - INFO - [__ort_execute]-810 times per count: 15.57 ms, 64.24 FPS
[>>>>>>>>>>>>>>>                                   ] 909/3000, 58.1 task/s, elapsed: 16s, ETA:    36s2022-05-06 13:45:42,621 - test - INFO - [__ort_execute]-910 times per count: 15.68 ms, 63.76 FPS
[>>>>>>>>>>>>>>>>                                  ] 1009/3000, 58.1 task/s, elapsed: 17s, ETA:    34s2022-05-06 13:45:44,311 - test - INFO - [__ort_execute]-1010 times per count: 15.77 ms, 63.42 FPS
[>>>>>>>>>>>>>>>>>>                                ] 1109/3000, 58.1 task/s, elapsed: 19s, ETA:    33s2022-05-06 13:45:46,023 - test - INFO - [__ort_execute]-1110 times per count: 15.86 ms, 63.05 FPS
[>>>>>>>>>>>>>>>>>>>>                              ] 1209/3000, 58.2 task/s, elapsed: 21s, ETA:    31s2022-05-06 13:45:47,706 - test - INFO - [__ort_execute]-1210 times per count: 15.91 ms, 62.84 FPS
[>>>>>>>>>>>>>>>>>>>>>                             ] 1309/3000, 58.3 task/s, elapsed: 22s, ETA:    29s2022-05-06 13:45:49,417 - test - INFO - [__ort_execute]-1310 times per count: 15.98 ms, 62.58 FPS
[>>>>>>>>>>>>>>>>>>>>>>>                           ] 1409/3000, 58.3 task/s, elapsed: 24s, ETA:    27s2022-05-06 13:45:51,135 - test - INFO - [__ort_execute]-1410 times per count: 16.04 ms, 62.34 FPS
[>>>>>>>>>>>>>>>>>>>>>>>>>                         ] 1509/3000, 58.3 task/s, elapsed: 26s, ETA:    26s2022-05-06 13:45:52,835 - test - INFO - [__ort_execute]-1510 times per count: 16.08 ms, 62.19 FPS
[>>>>>>>>>>>>>>>>>>>>>>>>>>                        ] 1609/3000, 58.3 task/s, elapsed: 28s, ETA:    24s2022-05-06 13:45:54,565 - test - INFO - [__ort_execute]-1610 times per count: 16.13 ms, 61.98 FPS
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>                      ] 1709/3000, 58.3 task/s, elapsed: 29s, ETA:    22s2022-05-06 13:45:56,281 - test - INFO - [__ort_execute]-1710 times per count: 16.18 ms, 61.82 FPS
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>                    ] 1809/3000, 58.3 task/s, elapsed: 31s, ETA:    20s2022-05-06 13:45:57,987 - test - INFO - [__ort_execute]-1810 times per count: 16.21 ms, 61.70 FPS
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>                   ] 1909/3000, 58.3 task/s, elapsed: 33s, ETA:    19s2022-05-06 13:45:59,720 - test - INFO - [__ort_execute]-1910 times per count: 16.25 ms, 61.54 FPS
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>                 ] 2009/3000, 58.2 task/s, elapsed: 35s, ETA:    17s2022-05-06 13:46:01,466 - test - INFO - [__ort_execute]-2010 times per count: 16.30 ms, 61.36 FPS
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>               ] 2109/3000, 58.1 task/s, elapsed: 36s, ETA:    15s2022-05-06 13:46:03,255 - test - INFO - [__ort_execute]-2110 times per count: 16.36 ms, 61.13 FPS
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>              ] 2209/3000, 58.0 task/s, elapsed: 38s, ETA:    14s2022-05-06 13:46:05,034 - test - INFO - [__ort_execute]-2210 times per count: 16.41 ms, 60.95 FPS
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>            ] 2309/3000, 57.9 task/s, elapsed: 40s, ETA:    12s2022-05-06 13:46:06,803 - test - INFO - [__ort_execute]-2310 times per count: 16.45 ms, 60.79 FPS
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>          ] 2409/3000, 57.9 task/s, elapsed: 42s, ETA:    10s2022-05-06 13:46:08,567 - test - INFO - [__ort_execute]-2410 times per count: 16.48 ms, 60.67 FPS
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>         ] 2509/3000, 57.8 task/s, elapsed: 43s, ETA:     8s2022-05-06 13:46:10,356 - test - INFO - [__ort_execute]-2510 times per count: 16.52 ms, 60.51 FPS
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>       ] 2609/3000, 57.7 task/s, elapsed: 45s, ETA:     7s2022-05-06 13:46:12,141 - test - INFO - [__ort_execute]-2610 times per count: 16.56 ms, 60.38 FPS
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>     ] 2709/3000, 57.7 task/s, elapsed: 47s, ETA:     5s2022-05-06 13:46:13,917 - test - INFO - [__ort_execute]-2710 times per count: 16.59 ms, 60.26 FPS
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>    ] 2809/3000, 57.6 task/s, elapsed: 49s, ETA:     3s2022-05-06 13:46:15,680 - test - INFO - [__ort_execute]-2810 times per count: 16.62 ms, 60.17 FPS
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>  ] 2909/3000, 57.6 task/s, elapsed: 51s, ETA:     2s2022-05-06 13:46:17,486 - test - INFO - [__ort_execute]-2910 times per count: 16.66 ms, 60.04 FPS
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] 3000/3000, 57.5 task/s, elapsed: 52s, ETA:     0s/home/ubuntu/Program/mm/mmdeploy/mmdeploy/codebase/mmcls/deploy/classification.py:242: UserWarning: Evaluation metrics are not specified.
  warnings.warn('Evaluation metrics are not specified.')
2022-05-06 13:46:19,099 - test - INFO - the predicted result for the first element is pred_score = 0.56, pred_label = 0 and pred_class = buildings. Specify --out to save all results to files.

mmseg segformer_b2

python tools/test.py \
>     configs/mmseg/segmentation_onnxruntime_dynamic.py \
>     ../mmsegmentation/configs/segformer/segformer_mit-b2_512x512_20k_voc12_self.py \
>     --model work_dir/self/segformer_b2-ort-dynamic/end2end.onnx \
>     --speed-test \
>     --log-interval 20 \
>     --log2file work_dir/self/segformer_b2-ort-dynamic/logs-cuda.txt \
>     --device cuda:1
[2022-05-06 14:07:33.221] [mmdeploy] [info] [model.cpp:95] Register 'DirectoryModel'
2022-05-06 14:07:33,299 - mmseg - INFO - Loaded 281 images
2022-05-06 14:07:33,299 - mmdeploy - INFO - Sorting the dataset by 'height' and 'width' is not possible.
2022-05-06 14:07:33,331 - mmdeploy - INFO - Successfully loaded onnxruntime custom ops from             /home/ubuntu/Program/mm/mmdeploy/build/lib/libmmdeploy_onnxruntime_ops.so
[>>>>>                                             ] 29/281, 4.8 task/s, elapsed: 6s, ETA:    53s2022-05-06 14:07:42,722 - test - INFO - [__ort_execute]-30 times per count: 62.58 ms, 15.98 FPS
[>>>>>>>>                                          ] 49/281, 5.8 task/s, elapsed: 8s, ETA:    40s2022-05-06 14:07:45,074 - test - INFO - [__ort_execute]-50 times per count: 61.30 ms, 16.31 FPS
[>>>>>>>>>>>>                                      ] 69/281, 6.5 task/s, elapsed: 11s, ETA:    33s2022-05-06 14:07:47,344 - test - INFO - [__ort_execute]-70 times per count: 60.91 ms, 16.42 FPS
[>>>>>>>>>>>>>>>                                   ] 89/281, 6.9 task/s, elapsed: 13s, ETA:    28s2022-05-06 14:07:49,616 - test - INFO - [__ort_execute]-90 times per count: 60.74 ms, 16.46 FPS
[>>>>>>>>>>>>>>>>>>>                               ] 109/281, 7.1 task/s, elapsed: 15s, ETA:    24s2022-05-06 14:07:51,913 - test - INFO - [__ort_execute]-110 times per count: 61.10 ms, 16.37 FPS
[>>>>>>>>>>>>>>>>>>>>>>                            ] 129/281, 7.4 task/s, elapsed: 18s, ETA:    21s2022-05-06 14:07:54,181 - test - INFO - [__ort_execute]-130 times per count: 61.12 ms, 16.36 FPS
[>>>>>>>>>>>>>>>>>>>>>>>>>>                        ] 149/281, 7.5 task/s, elapsed: 20s, ETA:    18s2022-05-06 14:07:56,443 - test - INFO - [__ort_execute]-150 times per count: 61.18 ms, 16.35 FPS
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>                    ] 169/281, 7.7 task/s, elapsed: 22s, ETA:    15s2022-05-06 14:07:58,736 - test - INFO - [__ort_execute]-170 times per count: 61.43 ms, 16.28 FPS
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>                 ] 189/281, 7.8 task/s, elapsed: 24s, ETA:    12s2022-05-06 14:08:00,987 - test - INFO - [__ort_execute]-190 times per count: 61.45 ms, 16.27 FPS
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>             ] 209/281, 7.9 task/s, elapsed: 27s, ETA:     9s2022-05-06 14:08:03,235 - test - INFO - [__ort_execute]-210 times per count: 61.44 ms, 16.28 FPS
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>          ] 229/281, 8.0 task/s, elapsed: 29s, ETA:     7s2022-05-06 14:08:05,466 - test - INFO - [__ort_execute]-230 times per count: 61.35 ms, 16.30 FPS
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>      ] 249/281, 8.0 task/s, elapsed: 31s, ETA:     4s2022-05-06 14:08:07,690 - test - INFO - [__ort_execute]-250 times per count: 61.27 ms, 16.32 FPS
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>   ] 269/281, 8.1 task/s, elapsed: 33s, ETA:     1s2022-05-06 14:08:10,056 - test - INFO - [__ort_execute]-270 times per count: 61.25 ms, 16.33 FPS
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] 281/281, 8.1 task/s, elapsed: 35s, ETA:     0s(mm) 

mmocr dbnet very slow

python tools/test.py \
> configs/mmocr/text-detection/text-detection_onnxruntime_dynamic.py \
>     ../mmocr/configs/textdet/dbnet/dbnet_r50dcnv2_fpnc_1200e_icdar2015.py \
>     --model work_dir/ocr/dbnet-ort-dynamic/end2end.onnx \
>     --speed-test \
>     --log2file work_dir/ocr/dbnet-ort-dynamic/logs-cuda.txt \
>     --device cuda:1
[2022-05-06 15:16:23.556] [mmdeploy] [info] [model.cpp:95] Register 'DirectoryModel'
loading annotations into memory...
Done (t=0.01s)
creating index...
index created!
2022-05-06 15:16:28,232 - mmdeploy - INFO - Sorting the dataset by 'height' and 'width' is not possible.
2022-05-06 15:16:28,264 - mmdeploy - INFO - Successfully loaded onnxruntime custom ops from             /home/ubuntu/Program/mm/mmdeploy/build/lib/libmmdeploy_onnxruntime_ops.so
[>                                                 ] 12/500, 0.0 task/s, elapsed: 2004s, ETA: 81510s

@lvhan028
Copy link
Collaborator

lvhan028 commented May 7, 2022

Thank you very much, @NagatoYuki0943.
So it seems this issue only happens in mmdet onnxruntime cuda test and no other codebase suffers.

@lvhan028
Copy link
Collaborator

lvhan028 commented May 7, 2022

ci will be fixed in PR #441

@lvhan028 lvhan028 merged commit 5231e65 into open-mmlab:master May 7, 2022
lvhan028 pushed a commit to lvhan028/mmdeploy that referenced this pull request Jun 7, 2022
lvhan028 added a commit that referenced this pull request Jun 8, 2022
* fix pose demo and windows build (#307)

* add postprocessing_masks gpu version (#276)

* add postprocessing_masks gpu version

* default device cpu

* pre-commit fix

Co-authored-by: hadoop-basecv <[email protected]>

* fixed a bug causes text-recognizer to fail when (non-NULL) empty bboxes list is passed (#310)

* [Fix] include missing <type_traits> for formatter.h (#313)

* fix formatter

* relax GCC version requirement

* [Fix] MMEditing cannot save results when testing (#336)

* fix show

* lint

* remove redundant codes

* resolve comment

* type hint

* docs(build): fix typo (#352)

* docs(build): add missing build option

* docs(build): add onnx install

* style(doc): trim whitespace

* docs(build): revert install onnx

* docs(build): add ncnn LD_LIBRARY_PATH

* docs(build): fix path error

* fix openvino export tmp model, add binary flag (#353)

* init circleci (#348)

* fix wrong input mat type (#362)

* fix wrong input mat type

* fix lint

* fix(docs): remove redundant doc tree (#360)

* fix missing ncnn_DIR & InferenceEngine_DIR (#364)

* Fix mmdet openvino dynamic 300x300 cfg base (#372)

* Fix: add onnxruntime building option in gpu dockerfile (#366)

* Tutorial 03: torch2onnx (#365)

* upload doc

* add images

* resolve comments

* update translation

* [Docs] fix ncnn docs (#378)

* fix ncnn docs`

* update 0216

* typo-fix (#397)

* add CUDA_TOOKIT_ROOT_DIR as tensorrt detect dir (#357)

* add CUDA_TOOKIT_ROOT_DIR as tensorrt detect dir

* Update FindTENSORRT.cmake

* Fix docs (#398)

* ort_net ONNX_TENSOR_ELEMENT_DATA_TYPE_BOOL (#383)

* fix wrong buffer which will case onnxruntime-gpu crash with segmentaion (#363)

* fix wrong buffer which will case onnxruntime-gpu crash with segmentaion

* fix check

* fix build error

* remove unused header

* fix benchmark (#411)

* Add `sm_53` in cuda.cmake for Jetson Nano which will cashe when process sdk predict. (#407)

* [Fix] fix feature test for `std::source_location` (#416)

* fix feature test for `std::source_location`

* suppress msvc warnings

* fix consistency

* fix format string (#417)

* [Fix] Fix seg name (#394)

* fix seg name

* use default name

Co-authored-by: dongchunyu.vendor <[email protected]>

* 【Docs】Add ipython notebook tutorial (#234)

* add ipynb file

* rename file

* add open in colab tag

* fix lint and add img show

* fix open in colab link

* fix comments

* fix pre-commit config

* fix mmpose api (#396)

* fix mmpose api

* use fmt::format instead

* fix potential nullptr access

* [Fix] support latest spdlog (#423)

* support formatting `PixelFormat` & `DataType`

* format enum for legacy spdlog

* fix format

* fix pillarencode (#331)

* fix ONNXRuntime cuda test bug (#438)

* Fix ci in master branch (#441)

* [Doc] Improve Jetson tutorial install doc (#381)

* Improve Jetson build doc

* add torchvision in the doc

* Fix lint

* Fix lint

* Fix lint

* Fix arg bug

* remove incorrect process

* Improve doc

* Add more detail on `Conda`

* Add python version detail

* Install `onnx` instead of `onnxruntime`

* Fix gramma

* Fix gramma

* Update Installation detail and fix some doc detail

* Update how_to_install_mmdeploy_on_jetsons.md

* Fix tensorrt and cudnn path

* Improve FAQ

* Improve FAQs

* pplcv not switch branch since the `sm_53` missing

* Update how_to_install_mmdeploy_on_jetsons.md

* Update how_to_install_mmdeploy_on_jetsons.md

* Update how_to_install_mmdeploy_on_jetsons.md

* Update how_to_install_mmdeploy_on_jetsons.md

* Improve doc

* Update how_to_install_mmdeploy_on_jetsons.md

* export `TENSORRT_DIR`

* Using pre-build cmake to update

* Improve sentence and add jetpack version

* Improve sentence

* move TENSORRT_DIR in the `Make TensorRT env` step

* Improve CUDA detail

* Update how_to_install_mmdeploy_on_jetsons.md

* Update how_to_install_mmdeploy_on_jetsons.md

* Improve conda installation

* Improve TensorRT installation

* Fix lint

* Add pip crash detail and FAQ

* Improve pip crash

* refine the jetson installation guide

* Improve python version

* Improve doc, added some detail

* Fix lint

* Add detail for `Runtime` problem

* Fix word

* Update how_to_install_mmdeploy_on_jetsons.md

Co-authored-by: lvhan028 <[email protected]>

* Version comments added, torch install steps added. (#449)

* [Docs] Fix API documentation (#443)

* [Docs] Fix API documentation

* add onnx dependency in readthedocs.txt

* fix dependencies

* [Fix] Fix display bugs for windows (#451)

* fix issue 330 for windows

* fix code

* fix lint

* fix all platform

* [Docs] Minor fixes and translation of installation tutorial for Jetson (#415)

* minor fixes

* add Jetson installation

* updated zh_cn based on new en version

* If a cuda launch error occurs, verify if cuda device requires top_k t… (#479)

* If a cuda launch error occurs, verify if cuda device requires top_k to be reduced.

* Fixed lint

* Clang format

* Fixed lint, clang-format

* [Fix] set optional arg a default value (#483)

* optional default value

* resolve comments

Co-authored-by: dongchunyu.vendor <[email protected]>

* Update: Optimize document (#484)

* Update: Optimize document

- Minor fixes in styling and grammar
- Add support for Jetson Xavier NX (Tested and worked)
- Add hardware recommendation
- Change JetPack installation guide URL from jp5.0 to jp4.6.1
- Add a note to select "Jetson SDK Components" when using NVIDIA SDK Manager
- Change PyTorch wheel save location
- Add more dependencies needed for torchvision installation. Otherwise installation error
- Simplify torchvision git cloning branch
- Add installation times for torchvision, MMCV, versioned-hdf5, ppl.cv, model converter, SDK libraries
- Delete "snap" from cmake removal as "apt-get purge" is enough
- Add a note on which scenarios you need to append cu da path and libraries to PATH and LD_LIBRARY_PATH
- Simplify MMCV git cloning branch
- Delete "skip if you don't need MMDeploy C/C++ Inference SDK", because that is the only available inference SDK at the moment
- Add more details to object detection demo using C/C++ Inference SDK such as installing MMDetection and converting a model
- Add image of inference result
- Delete "set env for pip" in troubleshooting because this is already mentioned under "installing Archiconda"

Signed-off-by: Lakshantha Dissanayake <[email protected]>

* Fix: note style on doc

* Fix: Trim trailing whitespaces

* Update: add source image before inference

* fix: bbox_nms not onnxizing if batch size > 1 (#501)

A typo prevents nms from onnxizing correctly if batch size is static and greater than 1.

* change seperator of function marker (#499)

* [docs] Fix typo in tutorial (#509)

* Fix docstring format (#495)

* Fix doc common

* Fix bugs

* Tutorial 04: onnx custom op (#508)

* Add tutorial04

* lint

* add image

* resolve comment

* fix mmseg twice resize (#480)

* fix mmseg twich resize

* remove comment

* Fix mask test with mismatched device (#511)

* align mask output to cpu device

* align ncnn ssd output to torch.Tensor type

* --amend

* compat mmpose v0.26 (#518)

* [Docs] adding new backends when using MMDeploy as a third package (#482)

* update doc

* refine expression

* cn doc

* Tutorial 05: ONNX Model Editing (#517)

* tutorial 05

* Upload image

* resolve comments

* resolve comment

* fix pspnet torchscript conversion (#538)

* fix pspnet torchscript conversion

* resolve comment

* add IR to rewrite

* changing the onnxwrapper script for gpu issue (#532)

* changing the onnxwrapper script

* gpu_issue

* Update wrapper.py

* Update wrapper.py

* Update runtime.txt

* Update runtime.txt

* Update wrapper.py

Co-authored-by: Chen Xin <[email protected]>
Co-authored-by: Shengxi Li <[email protected]>
Co-authored-by: hadoop-basecv <[email protected]>
Co-authored-by: lzhangzz <[email protected]>
Co-authored-by: Yifan Zhou <[email protected]>
Co-authored-by: tpoisonooo <[email protected]>
Co-authored-by: HinGwenWoong <[email protected]>
Co-authored-by: Junjie <[email protected]>
Co-authored-by: hanrui1sensetime <[email protected]>
Co-authored-by: q.yao <[email protected]>
Co-authored-by: Song Lin <[email protected]>
Co-authored-by: zly19540609 <[email protected]>
Co-authored-by: RunningLeon <[email protected]>
Co-authored-by: HinGwenWoong <[email protected]>
Co-authored-by: AllentDan <[email protected]>
Co-authored-by: dongchunyu.vendor <[email protected]>
Co-authored-by: VVsssssk <[email protected]>
Co-authored-by: NagatoYuki0943 <[email protected]>
Co-authored-by: Johannes L <[email protected]>
Co-authored-by: Zaida Zhou <[email protected]>
Co-authored-by: chaoqun <[email protected]>
Co-authored-by: Lakshantha Dissanayake <[email protected]>
Co-authored-by: Yifan Gu <[email protected]>
Co-authored-by: Zhiqiang Wang <[email protected]>
Co-authored-by: sanjaypavo <[email protected]>
lvhan028 added a commit that referenced this pull request Jun 8, 2022
* fix pose demo and windows build (#307)

* add postprocessing_masks gpu version (#276)

* add postprocessing_masks gpu version

* default device cpu

* pre-commit fix

Co-authored-by: hadoop-basecv <[email protected]>

* fixed a bug causes text-recognizer to fail when (non-NULL) empty bboxes list is passed (#310)

* [Fix] include missing <type_traits> for formatter.h (#313)

* fix formatter

* relax GCC version requirement

* [Fix] MMEditing cannot save results when testing (#336)

* fix show

* lint

* remove redundant codes

* resolve comment

* type hint

* docs(build): fix typo (#352)

* docs(build): add missing build option

* docs(build): add onnx install

* style(doc): trim whitespace

* docs(build): revert install onnx

* docs(build): add ncnn LD_LIBRARY_PATH

* docs(build): fix path error

* fix openvino export tmp model, add binary flag (#353)

* init circleci (#348)

* fix wrong input mat type (#362)

* fix wrong input mat type

* fix lint

* fix(docs): remove redundant doc tree (#360)

* fix missing ncnn_DIR & InferenceEngine_DIR (#364)

* Fix mmdet openvino dynamic 300x300 cfg base (#372)

* Fix: add onnxruntime building option in gpu dockerfile (#366)

* Tutorial 03: torch2onnx (#365)

* upload doc

* add images

* resolve comments

* update translation

* [Docs] fix ncnn docs (#378)

* fix ncnn docs`

* update 0216

* typo-fix (#397)

* add CUDA_TOOKIT_ROOT_DIR as tensorrt detect dir (#357)

* add CUDA_TOOKIT_ROOT_DIR as tensorrt detect dir

* Update FindTENSORRT.cmake

* Fix docs (#398)

* ort_net ONNX_TENSOR_ELEMENT_DATA_TYPE_BOOL (#383)

* fix wrong buffer which will case onnxruntime-gpu crash with segmentaion (#363)

* fix wrong buffer which will case onnxruntime-gpu crash with segmentaion

* fix check

* fix build error

* remove unused header

* fix benchmark (#411)

* Add `sm_53` in cuda.cmake for Jetson Nano which will cashe when process sdk predict. (#407)

* [Fix] fix feature test for `std::source_location` (#416)

* fix feature test for `std::source_location`

* suppress msvc warnings

* fix consistency

* fix format string (#417)

* [Fix] Fix seg name (#394)

* fix seg name

* use default name

Co-authored-by: dongchunyu.vendor <[email protected]>

* 【Docs】Add ipython notebook tutorial (#234)

* add ipynb file

* rename file

* add open in colab tag

* fix lint and add img show

* fix open in colab link

* fix comments

* fix pre-commit config

* fix mmpose api (#396)

* fix mmpose api

* use fmt::format instead

* fix potential nullptr access

* [Fix] support latest spdlog (#423)

* support formatting `PixelFormat` & `DataType`

* format enum for legacy spdlog

* fix format

* fix pillarencode (#331)

* fix ONNXRuntime cuda test bug (#438)

* Fix ci in master branch (#441)

* [Doc] Improve Jetson tutorial install doc (#381)

* Improve Jetson build doc

* add torchvision in the doc

* Fix lint

* Fix lint

* Fix lint

* Fix arg bug

* remove incorrect process

* Improve doc

* Add more detail on `Conda`

* Add python version detail

* Install `onnx` instead of `onnxruntime`

* Fix gramma

* Fix gramma

* Update Installation detail and fix some doc detail

* Update how_to_install_mmdeploy_on_jetsons.md

* Fix tensorrt and cudnn path

* Improve FAQ

* Improve FAQs

* pplcv not switch branch since the `sm_53` missing

* Update how_to_install_mmdeploy_on_jetsons.md

* Update how_to_install_mmdeploy_on_jetsons.md

* Update how_to_install_mmdeploy_on_jetsons.md

* Update how_to_install_mmdeploy_on_jetsons.md

* Improve doc

* Update how_to_install_mmdeploy_on_jetsons.md

* export `TENSORRT_DIR`

* Using pre-build cmake to update

* Improve sentence and add jetpack version

* Improve sentence

* move TENSORRT_DIR in the `Make TensorRT env` step

* Improve CUDA detail

* Update how_to_install_mmdeploy_on_jetsons.md

* Update how_to_install_mmdeploy_on_jetsons.md

* Improve conda installation

* Improve TensorRT installation

* Fix lint

* Add pip crash detail and FAQ

* Improve pip crash

* refine the jetson installation guide

* Improve python version

* Improve doc, added some detail

* Fix lint

* Add detail for `Runtime` problem

* Fix word

* Update how_to_install_mmdeploy_on_jetsons.md

Co-authored-by: lvhan028 <[email protected]>

* Version comments added, torch install steps added. (#449)

* [Docs] Fix API documentation (#443)

* [Docs] Fix API documentation

* add onnx dependency in readthedocs.txt

* fix dependencies

* [Fix] Fix display bugs for windows (#451)

* fix issue 330 for windows

* fix code

* fix lint

* fix all platform

* [Docs] Minor fixes and translation of installation tutorial for Jetson (#415)

* minor fixes

* add Jetson installation

* updated zh_cn based on new en version

* If a cuda launch error occurs, verify if cuda device requires top_k t… (#479)

* If a cuda launch error occurs, verify if cuda device requires top_k to be reduced.

* Fixed lint

* Clang format

* Fixed lint, clang-format

* [Fix] set optional arg a default value (#483)

* optional default value

* resolve comments

Co-authored-by: dongchunyu.vendor <[email protected]>

* Update: Optimize document (#484)

* Update: Optimize document

- Minor fixes in styling and grammar
- Add support for Jetson Xavier NX (Tested and worked)
- Add hardware recommendation
- Change JetPack installation guide URL from jp5.0 to jp4.6.1
- Add a note to select "Jetson SDK Components" when using NVIDIA SDK Manager
- Change PyTorch wheel save location
- Add more dependencies needed for torchvision installation. Otherwise installation error
- Simplify torchvision git cloning branch
- Add installation times for torchvision, MMCV, versioned-hdf5, ppl.cv, model converter, SDK libraries
- Delete "snap" from cmake removal as "apt-get purge" is enough
- Add a note on which scenarios you need to append cu da path and libraries to PATH and LD_LIBRARY_PATH
- Simplify MMCV git cloning branch
- Delete "skip if you don't need MMDeploy C/C++ Inference SDK", because that is the only available inference SDK at the moment
- Add more details to object detection demo using C/C++ Inference SDK such as installing MMDetection and converting a model
- Add image of inference result
- Delete "set env for pip" in troubleshooting because this is already mentioned under "installing Archiconda"

Signed-off-by: Lakshantha Dissanayake <[email protected]>

* Fix: note style on doc

* Fix: Trim trailing whitespaces

* Update: add source image before inference

* fix: bbox_nms not onnxizing if batch size > 1 (#501)

A typo prevents nms from onnxizing correctly if batch size is static and greater than 1.

* change seperator of function marker (#499)

* [docs] Fix typo in tutorial (#509)

* Fix docstring format (#495)

* Fix doc common

* Fix bugs

* Tutorial 04: onnx custom op (#508)

* Add tutorial04

* lint

* add image

* resolve comment

* fix mmseg twice resize (#480)

* fix mmseg twich resize

* remove comment

* Fix mask test with mismatched device (#511)

* align mask output to cpu device

* align ncnn ssd output to torch.Tensor type

* --amend

* compat mmpose v0.26 (#518)

* [Docs] adding new backends when using MMDeploy as a third package (#482)

* update doc

* refine expression

* cn doc

* Tutorial 05: ONNX Model Editing (#517)

* tutorial 05

* Upload image

* resolve comments

* resolve comment

* fix pspnet torchscript conversion (#538)

* fix pspnet torchscript conversion

* resolve comment

* add IR to rewrite

* changing the onnxwrapper script for gpu issue (#532)

* changing the onnxwrapper script

* gpu_issue

* Update wrapper.py

* Update wrapper.py

* Update runtime.txt

* Update runtime.txt

* Update wrapper.py

Co-authored-by: Chen Xin <[email protected]>
Co-authored-by: Shengxi Li <[email protected]>
Co-authored-by: hadoop-basecv <[email protected]>
Co-authored-by: lzhangzz <[email protected]>
Co-authored-by: Yifan Zhou <[email protected]>
Co-authored-by: tpoisonooo <[email protected]>
Co-authored-by: HinGwenWoong <[email protected]>
Co-authored-by: Junjie <[email protected]>
Co-authored-by: hanrui1sensetime <[email protected]>
Co-authored-by: q.yao <[email protected]>
Co-authored-by: Song Lin <[email protected]>
Co-authored-by: zly19540609 <[email protected]>
Co-authored-by: RunningLeon <[email protected]>
Co-authored-by: HinGwenWoong <[email protected]>
Co-authored-by: AllentDan <[email protected]>
Co-authored-by: dongchunyu.vendor <[email protected]>
Co-authored-by: VVsssssk <[email protected]>
Co-authored-by: NagatoYuki0943 <[email protected]>
Co-authored-by: Johannes L <[email protected]>
Co-authored-by: Zaida Zhou <[email protected]>
Co-authored-by: chaoqun <[email protected]>
Co-authored-by: Lakshantha Dissanayake <[email protected]>
Co-authored-by: Yifan Gu <[email protected]>
Co-authored-by: Zhiqiang Wang <[email protected]>
Co-authored-by: sanjaypavo <[email protected]>
RunningLeon added a commit that referenced this pull request Jun 8, 2022
* fix pose demo and windows build (#307)

* add postprocessing_masks gpu version (#276)

* add postprocessing_masks gpu version

* default device cpu

* pre-commit fix

Co-authored-by: hadoop-basecv <[email protected]>

* fixed a bug causes text-recognizer to fail when (non-NULL) empty bboxes list is passed (#310)

* [Fix] include missing <type_traits> for formatter.h (#313)

* fix formatter

* relax GCC version requirement

* [Fix] MMEditing cannot save results when testing (#336)

* fix show

* lint

* remove redundant codes

* resolve comment

* type hint

* docs(build): fix typo (#352)

* docs(build): add missing build option

* docs(build): add onnx install

* style(doc): trim whitespace

* docs(build): revert install onnx

* docs(build): add ncnn LD_LIBRARY_PATH

* docs(build): fix path error

* fix openvino export tmp model, add binary flag (#353)

* init circleci (#348)

* fix wrong input mat type (#362)

* fix wrong input mat type

* fix lint

* fix(docs): remove redundant doc tree (#360)

* fix missing ncnn_DIR & InferenceEngine_DIR (#364)

* Fix mmdet openvino dynamic 300x300 cfg base (#372)

* Fix: add onnxruntime building option in gpu dockerfile (#366)

* Tutorial 03: torch2onnx (#365)

* upload doc

* add images

* resolve comments

* update translation

* [Docs] fix ncnn docs (#378)

* fix ncnn docs`

* update 0216

* typo-fix (#397)

* add CUDA_TOOKIT_ROOT_DIR as tensorrt detect dir (#357)

* add CUDA_TOOKIT_ROOT_DIR as tensorrt detect dir

* Update FindTENSORRT.cmake

* Fix docs (#398)

* ort_net ONNX_TENSOR_ELEMENT_DATA_TYPE_BOOL (#383)

* fix wrong buffer which will case onnxruntime-gpu crash with segmentaion (#363)

* fix wrong buffer which will case onnxruntime-gpu crash with segmentaion

* fix check

* fix build error

* remove unused header

* fix benchmark (#411)

* Add `sm_53` in cuda.cmake for Jetson Nano which will cashe when process sdk predict. (#407)

* [Fix] fix feature test for `std::source_location` (#416)

* fix feature test for `std::source_location`

* suppress msvc warnings

* fix consistency

* fix format string (#417)

* [Fix] Fix seg name (#394)

* fix seg name

* use default name

Co-authored-by: dongchunyu.vendor <[email protected]>

* 【Docs】Add ipython notebook tutorial (#234)

* add ipynb file

* rename file

* add open in colab tag

* fix lint and add img show

* fix open in colab link

* fix comments

* fix pre-commit config

* fix mmpose api (#396)

* fix mmpose api

* use fmt::format instead

* fix potential nullptr access

* [Fix] support latest spdlog (#423)

* support formatting `PixelFormat` & `DataType`

* format enum for legacy spdlog

* fix format

* fix pillarencode (#331)

* fix ONNXRuntime cuda test bug (#438)

* Fix ci in master branch (#441)

* [Doc] Improve Jetson tutorial install doc (#381)

* Improve Jetson build doc

* add torchvision in the doc

* Fix lint

* Fix lint

* Fix lint

* Fix arg bug

* remove incorrect process

* Improve doc

* Add more detail on `Conda`

* Add python version detail

* Install `onnx` instead of `onnxruntime`

* Fix gramma

* Fix gramma

* Update Installation detail and fix some doc detail

* Update how_to_install_mmdeploy_on_jetsons.md

* Fix tensorrt and cudnn path

* Improve FAQ

* Improve FAQs

* pplcv not switch branch since the `sm_53` missing

* Update how_to_install_mmdeploy_on_jetsons.md

* Update how_to_install_mmdeploy_on_jetsons.md

* Update how_to_install_mmdeploy_on_jetsons.md

* Update how_to_install_mmdeploy_on_jetsons.md

* Improve doc

* Update how_to_install_mmdeploy_on_jetsons.md

* export `TENSORRT_DIR`

* Using pre-build cmake to update

* Improve sentence and add jetpack version

* Improve sentence

* move TENSORRT_DIR in the `Make TensorRT env` step

* Improve CUDA detail

* Update how_to_install_mmdeploy_on_jetsons.md

* Update how_to_install_mmdeploy_on_jetsons.md

* Improve conda installation

* Improve TensorRT installation

* Fix lint

* Add pip crash detail and FAQ

* Improve pip crash

* refine the jetson installation guide

* Improve python version

* Improve doc, added some detail

* Fix lint

* Add detail for `Runtime` problem

* Fix word

* Update how_to_install_mmdeploy_on_jetsons.md

Co-authored-by: lvhan028 <[email protected]>

* Version comments added, torch install steps added. (#449)

* [Docs] Fix API documentation (#443)

* [Docs] Fix API documentation

* add onnx dependency in readthedocs.txt

* fix dependencies

* [Fix] Fix display bugs for windows (#451)

* fix issue 330 for windows

* fix code

* fix lint

* fix all platform

* [Docs] Minor fixes and translation of installation tutorial for Jetson (#415)

* minor fixes

* add Jetson installation

* updated zh_cn based on new en version

* If a cuda launch error occurs, verify if cuda device requires top_k t… (#479)

* If a cuda launch error occurs, verify if cuda device requires top_k to be reduced.

* Fixed lint

* Clang format

* Fixed lint, clang-format

* [Fix] set optional arg a default value (#483)

* optional default value

* resolve comments

Co-authored-by: dongchunyu.vendor <[email protected]>

* Update: Optimize document (#484)

* Update: Optimize document

- Minor fixes in styling and grammar
- Add support for Jetson Xavier NX (Tested and worked)
- Add hardware recommendation
- Change JetPack installation guide URL from jp5.0 to jp4.6.1
- Add a note to select "Jetson SDK Components" when using NVIDIA SDK Manager
- Change PyTorch wheel save location
- Add more dependencies needed for torchvision installation. Otherwise installation error
- Simplify torchvision git cloning branch
- Add installation times for torchvision, MMCV, versioned-hdf5, ppl.cv, model converter, SDK libraries
- Delete "snap" from cmake removal as "apt-get purge" is enough
- Add a note on which scenarios you need to append cu da path and libraries to PATH and LD_LIBRARY_PATH
- Simplify MMCV git cloning branch
- Delete "skip if you don't need MMDeploy C/C++ Inference SDK", because that is the only available inference SDK at the moment
- Add more details to object detection demo using C/C++ Inference SDK such as installing MMDetection and converting a model
- Add image of inference result
- Delete "set env for pip" in troubleshooting because this is already mentioned under "installing Archiconda"

Signed-off-by: Lakshantha Dissanayake <[email protected]>

* Fix: note style on doc

* Fix: Trim trailing whitespaces

* Update: add source image before inference

* fix: bbox_nms not onnxizing if batch size > 1 (#501)

A typo prevents nms from onnxizing correctly if batch size is static and greater than 1.

* change seperator of function marker (#499)

* [docs] Fix typo in tutorial (#509)

* Fix docstring format (#495)

* Fix doc common

* Fix bugs

* Tutorial 04: onnx custom op (#508)

* Add tutorial04

* lint

* add image

* resolve comment

* fix mmseg twice resize (#480)

* fix mmseg twich resize

* remove comment

* Fix mask test with mismatched device (#511)

* align mask output to cpu device

* align ncnn ssd output to torch.Tensor type

* --amend

* compat mmpose v0.26 (#518)

* [Docs] adding new backends when using MMDeploy as a third package (#482)

* update doc

* refine expression

* cn doc

* Tutorial 05: ONNX Model Editing (#517)

* tutorial 05

* Upload image

* resolve comments

* resolve comment

* fix pspnet torchscript conversion (#538)

* fix pspnet torchscript conversion

* resolve comment

* add IR to rewrite

* changing the onnxwrapper script for gpu issue (#532)

* changing the onnxwrapper script

* gpu_issue

* Update wrapper.py

* Update wrapper.py

* Update runtime.txt

* Update runtime.txt

* Update wrapper.py

Co-authored-by: Chen Xin <[email protected]>
Co-authored-by: Shengxi Li <[email protected]>
Co-authored-by: hadoop-basecv <[email protected]>
Co-authored-by: lzhangzz <[email protected]>
Co-authored-by: Yifan Zhou <[email protected]>
Co-authored-by: tpoisonooo <[email protected]>
Co-authored-by: HinGwenWoong <[email protected]>
Co-authored-by: Junjie <[email protected]>
Co-authored-by: hanrui1sensetime <[email protected]>
Co-authored-by: q.yao <[email protected]>
Co-authored-by: Song Lin <[email protected]>
Co-authored-by: zly19540609 <[email protected]>
Co-authored-by: RunningLeon <[email protected]>
Co-authored-by: HinGwenWoong <[email protected]>
Co-authored-by: AllentDan <[email protected]>
Co-authored-by: dongchunyu.vendor <[email protected]>
Co-authored-by: VVsssssk <[email protected]>
Co-authored-by: NagatoYuki0943 <[email protected]>
Co-authored-by: Johannes L <[email protected]>
Co-authored-by: Zaida Zhou <[email protected]>
Co-authored-by: chaoqun <[email protected]>
Co-authored-by: Lakshantha Dissanayake <[email protected]>
Co-authored-by: Yifan Gu <[email protected]>
Co-authored-by: Zhiqiang Wang <[email protected]>
Co-authored-by: sanjaypavo <[email protected]>
@OpenMMLab-Assistant-004
Copy link

Hi @NagatoYuki0943 !First of all, we want to express our gratitude for your significant PR in the mmdeploy project. Your contribution is highly appreciated, and we are grateful for your efforts in helping improve this open-source project during your personal time. We believe that many developers will benefit from your PR.

We would also like to invite you to join our Special Interest Group (SIG) private channel on Discord, where you can share your experiences, ideas, and build connections with like-minded peers. To join the SIG channel, simply message moderator— OpenMMLab on Discord or briefly share your open-source contributions in the #introductions channel and we will assist you. Look forward to seeing you there! Join us :https://discord.gg/raweFPmdzG

If you have WeChat,welcome to join our community on WeChat. You can add our assistant :openmmlabwx. Please add "mmsig + Github ID" as a remark when adding friends:)
Thank you again for your contribution❤

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants