mmpose
mmpose copied to clipboard
[Bug] Kernel crashs when RTMO with ONNX
Prerequisite
- [X] I have searched Issues and Discussions but cannot get the expected help.
- [X] The bug has not been fixed in the latest version(https://github.com/open-mmlab/mmpose).
Environment
04/04 09:48:07 - mmengine - INFO -
04/04 09:48:07 - mmengine - INFO - Environmental information 04/04 09:48:12 - mmengine - INFO - sys.platform: win32 04/04 09:48:12 - mmengine - INFO - Python: 3.8.19 (default, Mar 20 2024, 19:55:45) [MSC v.1916 64 bit (AMD64)] 04/04 09:48:12 - mmengine - INFO - CUDA available: True 04/04 09:48:12 - mmengine - INFO - MUSA available: False 04/04 09:48:12 - mmengine - INFO - numpy_random_seed: 2147483648 04/04 09:48:12 - mmengine - INFO - GPU 0: NVIDIA GeForce RTX 2060 04/04 09:48:12 - mmengine - INFO - CUDA_HOME: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6 04/04 09:48:12 - mmengine - INFO - NVCC: Cuda compilation tools, release 11.6, V11.6.55 04/04 09:48:12 - mmengine - INFO - MSVC: Compilador de optimización de C/C++ de Microsoft (R) versión 19.39.33523 para x64 04/04 09:48:12 - mmengine - INFO - GCC: n/a 04/04 09:48:12 - mmengine - INFO - PyTorch: 2.2.1+cu118 04/04 09:48:12 - mmengine - INFO - PyTorch compiling details: PyTorch built with:
- C++ Version: 201703
- MSVC 192930151
- Intel(R) Math Kernel Library Version 2020.0.2 Product Build 20200624 for Intel(R) 64 architecture applications
- Intel(R) MKL-DNN v3.3.2 (Git Hash 2dc95a2ad0841e29db8b22fbccaf3e5da7992b01)
- OpenMP 2019
- LAPACK is enabled (usually provided by MKL)
- CPU capability usage: AVX2
- CUDA Runtime 11.8
- NVCC architecture flags: -gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_61,code=sm_61;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_80,code=sm_80;-gencode;arch=compute_86,code=sm_86;-gencode;arch=compute_90,code=sm_90;-gencode;arch=compute_37,code=compute_37
- CuDNN 8.7
- Magma 2.5.4
- Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=11.8, CUDNN_VERSION=8.7.0, CXX_COMPILER=C:/actions-runner/_work/pytorch/pytorch/builder/windows/tmp_bin/sccache-cl.exe, CXX_FLAGS=/DWIN32 /D_WINDOWS /GR /EHsc /Zc:__cplusplus /bigobj /FS /utf-8 -DUSE_PTHREADPOOL -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DLIBKINETO_NOROCTRACER -DUSE_FBGEMM -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE /wd4624 /wd4068 /wd4067 /wd4267 /wd4661 /wd4717 /wd4244 /wd4804 /wd4273, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=2.2.1, USE_CUDA=ON, USE_CUDNN=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=OFF, USE_NNPACK=OFF, USE_OPENMP=ON, USE_ROCM=OFF, USE_ROCM_KERNEL_ASSERT=OFF,
04/04 09:48:12 - mmengine - INFO - TorchVision: 0.17.1+cu118 04/04 09:48:12 - mmengine - INFO - OpenCV: 4.8.0 04/04 09:48:12 - mmengine - INFO - MMEngine: 0.10.3 04/04 09:48:12 - mmengine - INFO - MMCV: 2.1.0 04/04 09:48:12 - mmengine - INFO - MMCV Compiler: MSVC 193933523 04/04 09:48:12 - mmengine - INFO - MMCV CUDA Compiler: 11.6 04/04 09:48:12 - mmengine - INFO - MMDeploy: 1.3.1+bc75c9d 04/04 09:48:12 - mmengine - INFO -
04/04 09:48:12 - mmengine - INFO - Backend information 04/04 09:48:13 - mmengine - INFO - tensorrt: 8.6.1 04/04 09:48:13 - mmengine - INFO - tensorrt custom ops: NotAvailable 04/04 09:48:13 - mmengine - INFO - ONNXRuntime: None 04/04 09:48:13 - mmengine - INFO - ONNXRuntime-gpu: 1.16.0 04/04 09:48:13 - mmengine - INFO - ONNXRuntime custom ops: NotAvailable 04/04 09:48:13 - mmengine - INFO - pplnn: None 04/04 09:48:13 - mmengine - INFO - ncnn: None 04/04 09:48:13 - mmengine - INFO - snpe: None 04/04 09:48:13 - mmengine - INFO - openvino: None 04/04 09:48:13 - mmengine - INFO - torchscript: 2.2.1+cu118 04/04 09:48:13 - mmengine - INFO - torchscript custom ops: NotAvailable 04/04 09:48:13 - mmengine - INFO - rknn-toolkit: None 04/04 09:48:13 - mmengine - INFO - rknn-toolkit2: None 04/04 09:48:13 - mmengine - INFO - ascend: None 04/04 09:48:13 - mmengine - INFO - coreml: None 04/04 09:48:13 - mmengine - INFO - tvm: None 04/04 09:48:13 - mmengine - INFO - vacc: None 04/04 09:48:13 - mmengine - INFO -
04/04 09:48:13 - mmengine - INFO - Codebase information 04/04 09:48:13 - mmengine - INFO - mmdet: 3.2.0 04/04 09:48:13 - mmengine - INFO - mmseg: None 04/04 09:48:13 - mmengine - INFO - mmpretrain: 1.2.0 04/04 09:48:13 - mmengine - INFO - mmocr: None 04/04 09:48:13 - mmengine - INFO - mmagic: None 04/04 09:48:13 - mmengine - INFO - mmdet3d: None 04/04 09:48:13 - mmengine - INFO - mmpose: 1.3.1 04/04 09:48:13 - mmengine - INFO - mmrotate: None 04/04 09:48:13 - mmengine - INFO - mmaction: None 04/04 09:48:13 - mmengine - INFO - mmrazor: None 04/04 09:48:13 - mmengine - INFO - mmyolo: None
Reproduces the problem - code sample
import cv2
import numpy as np
from mmdeploy_runtime import PoseDetector
pose_model_path = 'rtmo-m_body7_onnx'
device_name = 'cpu'
img_path = 'image.jpg'
pose_detector = PoseDetector(pose_model_path, device_name, device_id=0)
image = cv2.imdecode(np.fromfile(img_path, dtype=np.uint8), 1)
poses = pose_detector(image)
Reproduces the problem - command or script
import cv2
import numpy as np
from mmdeploy_runtime import PoseDetector
pose_model_path = 'rtmo-m_body7_onnx'
device_name = 'cpu'
img_path = 'image.jpg'
pose_detector = PoseDetector(pose_model_path, device_name, device_id=0)
image = cv2.imdecode(np.fromfile(img_path, dtype=np.uint8), 1)
poses = pose_detector(image)
Reproduces the problem - error message
My kernel crashs and this is my jupyter log:
09:53:49.402 [error] Error in execution (get message for cell) Error: The kernel 'mmpose (Python 3.8.19)' died. Click [here](https://aka.ms/vscodeJupyterKernelCrash) for more info. View Jupyter [log](command:jupyter.viewOutput) for further details.
> Kernel Id = .jvsc74a57bd001022005712524cded9d87368ba1e7e72ed8aa1cb4902bd60b77f372001553f3.~\anaconda3\envs\mmpose\python.exe.~\anaconda3\envs\mmpose\python.exe.-m#ipykernel_launcher
> Interpreter Id = ~\ANACONDA3\ENVS\MMPOSE\PYTHON.EXE
> at Function.verifyKernelState (~\.vscode\extensions\ms-toolsai.jupyter-2024.2.0-win32-x64\dist\extension.node.js:341:54560)
> originalException = undefined
Additional information
I want to use RTMO model with ONNX, so I have downloaded the model from https://download.openmmlab.com/mmpose/v1/projects/rtmo/onnx_sdk/rtmo-m_16xb16-600e_body7-640x640-39e78cc4_20231211.zip.
pose_model_path is the path where I have the folder with the files from the zip file.
When I execute the code my kernel crashs (in the last line).
I have run the code below on a jupyter notebook, but I have run it on a python file and my kernel crashs as well.