You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched related issues but cannot get the expected help.
2. I have read the FAQ documentation but cannot get the expected help.
3. The bug has not been fixed in the latest version.
Describe the bug
i use the mmdeploy for mmseg the model inference,but there is a mistake.
AttributeError: module 'ctypes' has no attribute 'DLL'
11/18 16:27:36 - mmengine - ERROR - tools/deploy.py - create_process - 82 - visualize onnxruntime model failed.
(openmmlab) C:\Users\xxk\mmdeploy>python tools/deploy.py configs/mmseg/segmentation_onnxruntime_static-1024x2048.py my_maskformer_r50-d32_8xb2-160k_ade20k-512x512.py iter_10000.pth 100103.jpg --work-dir mmdeploy_models --show --dump-info
11/18 16:27:10 - mmengine - WARNING - Failed to search registry with scope "mmseg"in the "Codebases" registry tree. As a workaround, the current "Codebases" registry in"mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmseg" is a correct scope, or whether the registry is initialized.
11/18 16:27:10 - mmengine - WARNING - Failed to search registry with scope "mmseg"in the "mmseg_tasks" registry tree. As a workaround, the current "mmseg_tasks" registry in"mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmseg" is a correct scope, or whether the registry is initialized.
11/18 16:27:13 - mmengine - INFO - Start pipeline mmdeploy.apis.pytorch2onnx.torch2onnx in subprocess
11/18 16:27:16 - mmengine - WARNING - Failed to search registry with scope "mmseg"in the "Codebases" registry tree. As a workaround, the current "Codebases" registry in"mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmseg" is a correct scope, or whether the registry is initialized.
11/18 16:27:16 - mmengine - WARNING - Failed to search registry with scope "mmseg"in the "mmseg_tasks" registry tree. As a workaround, the current "mmseg_tasks" registry in"mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmseg" is a correct scope, or whether the registry is initialized.
Loads checkpoint by local backend from path: iter_10000.pth
11/18 16:27:16 - mmengine - WARNING - DeprecationWarning: get_onnx_config will be deprecated in the future.
11/18 16:27:16 - mmengine - INFO - Export PyTorch model to ONNX: mmdeploy_models\end2end.onnx.
E:\PyTorch_learning\Miniconda\install\envs\openmmlab\lib\site-packages\mmdeploy\core\optimizers\function_marker.py:160: TracerWarning: Converting a tensor to a Python integer might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs! ys_shape = tuple(int(s) for s in ys.shape)E:\PyTorch_learning\Miniconda\install\envs\openmmlab\lib\site-packages\mmdeploy\codebase\mmseg\models\segmentors\base.py:47: TracerWarning: Converting a tensor to a Python integer might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
img_shape = [int(val) forvalin img_shape]
E:\PyTorch_learning\Miniconda\install\envs\openmmlab\lib\site-packages\mmdeploy\codebase\mmseg\models\segmentors\base.py:61: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs! if seg_logit.shape[1] == 1:11/18 16:27:27 - mmengine - INFO - Execute onnx optimize passes.11/18 16:27:27 - mmengine - WARNING - Can not optimize model, please build torchscipt extension.More details: https://github.com/open-mmlab/mmdeploy/tree/main/docs/en/experimental/onnx_optimizer.md============= Diagnostic Run torch.onnx.export version 2.0.1+cu117 =============verbose: False, log level: Level.ERROR======================= 0 NONE 0 NOTE 0 WARNING 0 ERROR ========================11/18 16:27:28 - mmengine - INFO - Finish pipeline mmdeploy.apis.pytorch2onnx.torch2onnx11/18 16:27:29 - mmengine - INFO - Start pipeline mmdeploy.apis.utils.utils.to_backend in main process11/18 16:27:29 - mmengine - INFO - Finish pipeline mmdeploy.apis.utils.utils.to_backend11/18 16:27:29 - mmengine - INFO - visualize onnxruntime model start.11/18 16:27:35 - mmengine - WARNING - Failed to search registry with scope "mmseg" in the "Codebases" registry tree. As a workaround, the current "Codebases" registry in "mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmseg" is a correct scope, or whether the registry is initialized.11/18 16:27:35 - mmengine - WARNING - Failed to search registry with scope "mmseg" in the "mmseg_tasks" registry tree. As a workaround, the current "mmseg_tasks" registry in "mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmseg" is a correct scope, or whether the registry is initialized.11/18 16:27:35 - mmengine - WARNING - Failed to search registry with scope "mmseg" in the "backend_segmentors" registry tree. As a workaround, the current "backend_segmentors" registry in "mmdeploy" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmseg" is a correct scope, or whether the registry is initialized.2024-11-18:16:27:35 - root - ERROR - module 'ctypes' has no attribute 'DLL'Traceback (most recent call last): File "E:\PyTorch_learning\Miniconda\install\envs\openmmlab\lib\site-packages\mmdeploy\utils\utils.py", line 41, in target_wrapper result = target(*args, **kwargs) File "E:\PyTorch_learning\Miniconda\install\envs\openmmlab\lib\site-packages\mmdeploy\apis\visualize.py", line 65, in visualize_model model = task_processor.build_backend_model( File "E:\PyTorch_learning\Miniconda\install\envs\openmmlab\lib\site-packages\mmdeploy\codebase\mmseg\deploy\segmentation.py", line 157, in build_backend_model model = build_segmentation_model( File "E:\PyTorch_learning\Miniconda\install\envs\openmmlab\lib\site-packages\mmdeploy\codebase\mmseg\deploy\segmentation_model.py", line 224, in build_segmentation_model backend_segmentor = __BACKEND_MODEL.build( File "E:\PyTorch_learning\Miniconda\install\envs\openmmlab\lib\site-packages\mmengine\registry\registry.py", line 570, in build return self.build_func(cfg, *args, **kwargs, registry=self) File "E:\PyTorch_learning\Miniconda\install\envs\openmmlab\lib\site-packages\mmengine\registry\build_functions.py", line 121, in build_from_cfg obj = obj_cls(**args) # type: ignore File "E:\PyTorch_learning\Miniconda\install\envs\openmmlab\lib\site-packages\mmdeploy\codebase\mmseg\deploy\segmentation_model.py", line 44, in __init__ self._init_wrapper( File "E:\PyTorch_learning\Miniconda\install\envs\openmmlab\lib\site-packages\mmdeploy\codebase\mmseg\deploy\segmentation_model.py", line 52, in _init_wrapper self.wrapper = BaseBackendModel._build_wrapper( File "E:\PyTorch_learning\Miniconda\install\envs\openmmlab\lib\site-packages\mmdeploy\codebase\base\backend_model.py", line 65, in _build_wrapper return backend_mgr.build_wrapper(backend_files, device, input_names, File "E:\PyTorch_learning\Miniconda\install\envs\openmmlab\lib\site-packages\mmdeploy\backend\onnxruntime\backend_manager.py", line 35, in build_wrapper return ORTWrapper( File "E:\PyTorch_learning\Miniconda\install\envs\openmmlab\lib\site-packages\mmdeploy\backend\onnxruntime\wrapper.py", line 51, in __init__ ctypes.DLL(lib_path)AttributeError: module 'ctypes' has no attribute 'DLL'11/18 16:27:36 - mmengine - ERROR - tools/deploy.py - create_process - 82 - visualize onnxruntime model failed.
The text was updated successfully, but these errors were encountered:
Checklist
Describe the bug
i use the mmdeploy for mmseg the model inference,but there is a mistake.
AttributeError: module 'ctypes' has no attribute 'DLL'
11/18 16:27:36 - mmengine - ERROR - tools/deploy.py - create_process - 82 - visualize onnxruntime model failed.
Reproduction
python tools/deploy.py configs/mmseg/segmentation_onnxruntime_static-1024x2048.py my_maskformer_r50-d32_8xb2-160k_ade20k-512x512.py iter_10000.pth 100103.jpg --work-dir mmdeploy_models --show --dump-info
Environment
Error traceback
The text was updated successfully, but these errors were encountered: