open-mmlab / mmdeploy

OpenMMLab Model Deployment Framework
https://mmdeploy.readthedocs.io/en/latest/
Apache License 2.0
2.71k stars 619 forks source link

[Bug] How to deploy on iOS #2367

Closed yangl720 closed 1 year ago

yangl720 commented 1 year ago

Checklist

Describe the bug

May I ask how to deploy RTMdet and RTMpose on iOS? According to the tutorial documents, they have been converted into ncnn and coreML models. I don't know what to do next.

Reproduction

Model Converter: python3 ../../mmdeploy/tools/deploy.py ../../mmdeploy/configs/mmdet/detection/detection_coreml_static-320x320.py \ ../../mmpose-main/projects/rtmpose/rtmdet/person/rtmdet_nano_320-8xb32_coco-person.py \ https://download.openmmlab.com/mmpose/v1/projects/rtmpose/rtmdet_nano_8xb32-100e_coco-obj365-person-05d8511e.pth \ ../../mmdeploy/demo/resources/human-pose.jpg \ --work-dir ../output/rtmdet-coreml \ --device cpu \ --dump-info

Build SDK: cmake .. \ -DMMDEPLOY_BUILD_SDK=ON \ -DMMDEPLOY_BUILD_EXAMPLES=ON \ -DMMDEPLOY_BUILD_SDK_PYTHON_API=ON \ -DMMDEPLOY_TARGET_DEVICES=cpu \ -DMMDEPLOY_TARGET_BACKENDS=coreml \ -DTorch_DIR=${Torch_DIR}

Environment

08/22 12:22:32 - mmengine - INFO - 

08/22 12:22:32 - mmengine - INFO - **********Environmental information**********
08/22 12:22:33 - mmengine - INFO - sys.platform: darwin
08/22 12:22:33 - mmengine - INFO - Python: 3.8.17 (default, Jul  5 2023, 15:35:58) [Clang 14.0.6 ]
08/22 12:22:33 - mmengine - INFO - CUDA available: False
08/22 12:22:33 - mmengine - INFO - numpy_random_seed: 2147483648
08/22 12:22:33 - mmengine - INFO - GCC: Apple clang version 14.0.3 (clang-1403.0.22.14.1)
08/22 12:22:33 - mmengine - INFO - PyTorch: 2.0.0
08/22 12:22:33 - mmengine - INFO - PyTorch compiling details: PyTorch built with:
  - GCC 4.2
  - C++ Version: 201703
  - clang 13.1.6
  - LAPACK is enabled (usually provided by MKL)
  - NNPACK is enabled
  - CPU capability usage: NO AVX
  - Build settings: BLAS_INFO=accelerate, BUILD_TYPE=Release, CXX_COMPILER=/Applications/Xcode_13.3.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++, CXX_FLAGS= -Wno-deprecated -fvisibility-inlines-hidden -Wno-deprecated-declarations -DUSE_PTHREADPOOL -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DLIBKINETO_NOROCTRACER -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DUSE_PYTORCH_METAL_EXPORT -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -DUSE_COREML_DELEGATE -O2 -fPIC -Wall -Wextra -Werror=return-type -Werror=non-virtual-dtor -Werror=braced-scalar-init -Werror=range-loop-construct -Werror=bool-operation -Winconsistent-missing-override -Wnarrowing -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wunused-local-typedefs -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wvla-extension -Wno-range-loop-analysis -Wno-pass-failed -Wsuggest-override -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -Wconstant-conversion -Wno-invalid-partial-specialization -Wno-typedef-redefinition -Wno-unused-private-field -Wno-inconsistent-missing-override -Wno-constexpr-not-const -Wno-missing-braces -Wunused-lambda-capture -Wunused-local-typedef -Qunused-arguments -fcolor-diagnostics -fdiagnostics-color=always -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -DUSE_MPS -fno-objc-arc -Wno-unguarded-availability-new -Wno-unused-private-field -Wno-missing-braces -Wno-constexpr-not-const, LAPACK_INFO=accelerate, TORCH_DISABLE_GPU_ASSERTS=OFF, TORCH_VERSION=2.0.0, USE_CUDA=0, USE_CUDNN=OFF, USE_EIGEN_FOR_BLAS=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=OFF, USE_MKLDNN=OFF, USE_MPI=OFF, USE_NCCL=OFF, USE_NNPACK=ON, USE_OPENMP=OFF, USE_ROCM=OFF, 

08/22 12:22:33 - mmengine - INFO - TorchVision: 0.15.0
08/22 12:22:33 - mmengine - INFO - OpenCV: 4.8.0
08/22 12:22:33 - mmengine - INFO - MMEngine: 0.8.4
08/22 12:22:33 - mmengine - INFO - MMCV: 2.0.1
08/22 12:22:33 - mmengine - INFO - MMCV Compiler: clang 14.0.3
08/22 12:22:33 - mmengine - INFO - MMCV CUDA Compiler: not available
08/22 12:22:33 - mmengine - INFO - MMDeploy: 1.2.0+7c7e43b
08/22 12:22:33 - mmengine - INFO - 

08/22 12:22:33 - mmengine - INFO - **********Backend information**********
08/22 12:22:33 - mmengine - INFO - tensorrt:    None
08/22 12:22:33 - mmengine - INFO - ONNXRuntime: None
08/22 12:22:33 - mmengine - INFO - pplnn:   None
08/22 12:22:33 - mmengine - INFO - ncnn:    None
08/22 12:22:33 - mmengine - INFO - snpe:    None
08/22 12:22:33 - mmengine - INFO - openvino:    None
08/22 12:22:33 - mmengine - INFO - torchscript: 2.0.0
08/22 12:22:33 - mmengine - INFO - torchscript custom ops:  Available
08/22 12:22:33 - mmengine - INFO - rknn-toolkit:    None
08/22 12:22:33 - mmengine - INFO - rknn-toolkit2:   None
08/22 12:22:33 - mmengine - INFO - ascend:  None
08/22 12:22:33 - mmengine - INFO - coreml:  6.3.0
08/22 12:22:33 - mmengine - INFO - tvm: None
08/22 12:22:33 - mmengine - INFO - vacc:    None
08/22 12:22:33 - mmengine - INFO - 

08/22 12:22:33 - mmengine - INFO - **********Codebase information**********
08/22 12:22:33 - mmengine - INFO - mmdet:   3.1.0
08/22 12:22:33 - mmengine - INFO - mmseg:   None
08/22 12:22:33 - mmengine - INFO - mmpretrain:  None
08/22 12:22:33 - mmengine - INFO - mmocr:   None
08/22 12:22:33 - mmengine - INFO - mmagic:  None
08/22 12:22:33 - mmengine - INFO - mmdet3d: None
08/22 12:22:33 - mmengine - INFO - mmpose:  1.1.0
08/22 12:22:33 - mmengine - INFO - mmrotate:    None
08/22 12:22:33 - mmengine - INFO - mmaction:    None
08/22 12:22:33 - mmengine - INFO - mmrazor: None
08/22 12:22:33 - mmengine - INFO - mmyolo:  None

Error traceback

No response

RunningLeon commented 1 year ago

hi, mmdeploy does not support IOS by far.

github-actions[bot] commented 1 year ago

This issue is marked as stale because it has been marked as invalid or awaiting response for 7 days without any further response. It will be closed in 5 days if the stale label is not removed or if there is no further response.

github-actions[bot] commented 1 year ago

This issue is closed because it has been stale for 5 days. Please open a new issue if you have similar issues or you have any new updates now.

martinazapletalova commented 3 months ago

Hi, @RunningLeon is it still true that mmdeploy (specifically RTMpose) can't be deployed on iOS?