RapidStructure icon indicating copy to clipboard operation
RapidStructure copied to clipboard

directML causes error in rapid orientation

Open ragebear00 opened this issue 1 year ago • 3 comments

rapid orientation does not work after install directML as below The issue can be resolve only after uninstall directML and reinstall onnxruntime

from .rapid_orientation import RapidOrientation File "C:\Users\abc\AppData\Local\Programs\Python\Python310\lib\site-packages\rapid_orientation\rapid_orientation.py", line 25, in from .utils import OrtInferSession, create_operators File "C:\Users\abc\AppData\Local\Programs\Python\Python310\lib\site-packages\rapid_orientation\utils.py", line 10, in from onnxruntime import (GraphOptimizationLevel, InferenceSession, File "C:\Users\abc\AppData\Local\Programs\Python\Python310\lib\site-packages\onnxruntime_init_.py", line 57, in raise import_capi_exception File "C:\Users\abc\AppData\Local\Programs\Python\Python310\lib\site-packages\onnxruntime_init_.py", line 23, in from onnxruntime.capi._pybind_state import ExecutionMode # noqa: F401 File "C:\Users\abc\AppData\Local\Programs\Python\Python310\lib\site-packages\onnxruntime\capi_pybind_state.py", line 32, in from .onnxruntime_pybind11_state import * # noqa ImportError: DLL load failed while importing onnxruntime_pybind11_state: A dynamic link library (DLL) initialization routine failed.

ragebear00 avatar Jul 14 '24 08:07 ragebear00

The rapid orientation package has not supported the DirectML.

SWHL avatar Jul 14 '24 08:07 SWHL

Understood, the rapid orientation and rapidocr directML now have a conflict. So if some one need to use 'rapid orientation', she cannot upgrade rapidocr directML.

Any chance to have two onnxruntime work at the same machine? so rapid orientation package can refer to onnxruntime, and rapidocr directML can import onnxruntime directML

ragebear00 avatar Jul 15 '24 00:07 ragebear00

The onnxruntime-directml and onnxruntime can't installed at the same time. Only one of them can be installed.

The solution I can think of is that rapid orientation also supports onnxruntime directml.

You can use both directml or neither at the same time.

SWHL avatar Jul 15 '24 03:07 SWHL

The issue has beed closed, if you have other question, please to open it.

SWHL avatar Nov 08 '24 08:11 SWHL