timmeinhardt / trackformer

Implementation of "TrackFormer: Multi-Object Tracking with Transformers”. [Conference on Computer Vision and Pattern Recognition (CVPR), 2022]
https://arxiv.org/abs/2101.02702
Apache License 2.0
509 stars 115 forks source link

import MultiScaleDeformableAttention as MSDA ImportError: DLL load failed: #76

Open simonseo22 opened 1 year ago

simonseo22 commented 1 year ago

I completed the installation according to docs/INSTALL.md and tried to run the demo, but it can not import MultiScaleDeformableAttention

$ python src/track.py with dataset_name=DEMO data_root_dir=data/snakeboard output_dir=data/snakeboard write_images=pretty Traceback (most recent call last): File "src/track.py", line 16, in from trackformer.models import build_model File "D:\tracking\trackformer\trackformer-main\src\trackformer\models__init.py", line 6, in from .deformable_transformer import build_deforamble_transformer File "D:\tracking\trackformer\trackformer-main\src\trackformer\models\deformable_transformer.py", line 17, in from .ops.modules import MSDeformAttn File "D:\tracking\trackformer\trackformer-main\src\trackformer\models\ops\modules\init.py", line 1, in from .ms_deform_attn import MSDeformAttn File "D:\tracking\trackformer\trackformer-main\src\trackformer\models\ops\modules\ms_deform_attn.py", line 11, in from ..functions import MSDeformAttnFunction, ms_deform_attn_core_pytorch File "D:\tracking\trackformer\trackformer-main\src\trackformer\models\ops\functions\init__.py", line 1, in from .ms_deform_attn_func import MSDeformAttnFunction, ms_deform_attn_core_pytorch, ms_deform_attn_core_pytorch_mot File "D:\tracking\trackformer\trackformer-main\src\trackformer\models\ops\functions\ms_deform_attn_func.py", line 11, in import MultiScaleDeformableAttention as MSDA ImportError: DLL load failed:

timmeinhardt commented 1 year ago

Did the manual compiling of the MultiScaleDeformableAttention module finish without errors? And did the test run through?

simonseo22 commented 1 year ago

below is the code when I install the MultiScaleDeformableAttention package and what did you mean the test?

$ python src/trackformer/models/ops/setup.py build --build-base=src/trackformer/models/ops/ install running build running build_ext C:\Users\SIMON\anaconda3\envs\TrackFormer_10\lib\site-packages\torch\utils\cpp_extension.py:237: UserWarning: Error checking compiler version for cl: [WinError 2] 지정된 파일을 찾을 수 없습니다 warnings.warn('Error checking compiler version for {}: {}'.format(compiler, error)) running install C:\Users\SIMON\anaconda3\envs\TrackFormer_10\lib\site-packages\setuptools\command\install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. setuptools.SetuptoolsDeprecationWarning, C:\Users\SIMON\anaconda3\envs\TrackFormer_10\lib\site-packages\setuptools\command\easy_install.py:147: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools. EasyInstallDeprecationWarning, running bdist_egg running egg_info writing MultiScaleDeformableAttention.egg-info\PKG-INFO writing dependency_links to MultiScaleDeformableAttention.egg-info\dependency_links.txt writing top-level names to MultiScaleDeformableAttention.egg-info\top_level.txt reading manifest file 'MultiScaleDeformableAttention.egg-info\SOURCES.txt' adding license file 'LICENSE' writing manifest file 'MultiScaleDeformableAttention.egg-info\SOURCES.txt' installing library code to src/trackformer/models/ops/bdist.win-amd64\egg running install_lib creating src\trackformer\models\ops\bdist.win-amd64\egg copying src/trackformer/models/ops/lib.win-amd64-cpython-37\MultiScaleDeformableAttention.cp37-win_amd64.pyd -> src/trackformer/models/ops/bdist.win-amd64\egg creating stub loader for MultiScaleDeformableAttention.cp37-win_amd64.pyd byte-compiling src/trackformer/models/ops/bdist.win-amd64\egg\MultiScaleDeformableAttention.py to MultiScaleDeformableAttention.cpython-37.pyc creating src\trackformer\models\ops\bdist.win-amd64\egg\EGG-INFO copying MultiScaleDeformableAttention.egg-info\PKG-INFO -> src/trackformer/models/ops/bdist.win-amd64\egg\EGG-INFO copying MultiScaleDeformableAttention.egg-info\SOURCES.txt -> src/trackformer/models/ops/bdist.win-amd64\egg\EGG-INFO copying MultiScaleDeformableAttention.egg-info\dependency_links.txt -> src/trackformer/models/ops/bdist.win-amd64\egg\EGG-INFO copying MultiScaleDeformableAttention.egg-info\top_level.txt -> src/trackformer/models/ops/bdist.win-amd64\egg\EGG-INFO writing src/trackformer/models/ops/bdist.win-amd64\egg\EGG-INFO\native_libs.txt zip_safe flag not set; analyzing archive contents... pycache.MultiScaleDeformableAttention.cpython-37: module references file creating 'dist\MultiScaleDeformableAttention-1.0-py3.7-win-amd64.egg' and adding 'src/trackformer/models/ops/bdist.win-amd64\egg' to it removing 'src/trackformer/models/ops/bdist.win-amd64\egg' (and everything under it) Processing MultiScaleDeformableAttention-1.0-py3.7-win-amd64.egg removing 'c:\users\simon\anaconda3\envs\trackformer_10\lib\site-packages\MultiScaleDeformableAttention-1.0-py3.7-win-amd64.egg' (and everything under it) creating c:\users\simon\anaconda3\envs\trackformer_10\lib\site-packages\MultiScaleDeformableAttention-1.0-py3.7-win-amd64.egg Extracting MultiScaleDeformableAttention-1.0-py3.7-win-amd64.egg to c:\users\simon\anaconda3\envs\trackformer_10\lib\site-packages MultiScaleDeformableAttention 1.0 is already the active version in easy-install.pth

Installed c:\users\simon\anaconda3\envs\trackformer_10\lib\site-packages\multiscaledeformableattention-1.0-py3.7-win-amd64.egg Processing dependencies for MultiScaleDeformableAttention==1.0 Finished processing dependencies for MultiScaleDeformableAttention==1.0

timmeinhardt commented 1 year ago

Is this the output from the first install or a second execution? The second one might not show the same errors as the first one. So you need to uninstall and then run it again. And try running this test script and check if it runs without error.

Maggie-Xue commented 1 year ago

Is this the output from the first install or a second execution? The second one might not show the same errors as the first one. So you need to uninstall and then run it again. And try running this test script and check if it runs without error.

Hi, I have the same error: import MultiScaleDeformableAttention as MSDA ImportError: DLL load failed

And I have tried to run test.py, it shows as below: checking forward

Process finished with exit code 0

ya-haha-ai commented 1 year ago

Hello,I also meet the problem,did you solve it?