weijiawu / TransDETR

[IJCV 2024] TransDETR: End-to-end Video Text Spotting with Transformer
101 stars 11 forks source link

undefined symbol: _ZN6caffe28TypeMeta21_typeMetaDataInstanceISt7complexIdEEEPKNS_6detail12TypeMetaDataEv #14

Closed pd162 closed 1 year ago

pd162 commented 1 year ago

Thanks for your outstanding works! However, something wrong occured when I reproduced your project. The error log is following.

Traceback (most recent call last): File "main.py", line 26, in import datasets File "/data1/ljh/code/TransDETR/datasets/init.py", line 15, in from .detmot import build as build_e2e_mot File "/data1/ljh/code/TransDETR/datasets/detmot.py", line 23, in from models.structures import Instances File "/data1/ljh/code/TransDETR/models/init.py", line 12, in from .TransDETR import build as build_TransDETR File "/data1/ljh/code/TransDETR/models/TransDETR.py", line 32, in from .deformable_transformer_plus import build_deforamble_transformer File "/data1/ljh/code/TransDETR/models/deformable_transformer_plus.py", line 25, in from models.ops.modules import MSDeformAttn File "/data1/ljh/code/TransDETR/models/ops/modules/init.py", line 9, in from .ms_deform_attn import MSDeformAttn File "/data1/ljh/code/TransDETR/models/ops/modules/ms_deform_attn.py", line 21, in from ..functions import MSDeformAttnFunction File "/data1/ljh/code/TransDETR/models/ops/functions/init.py", line 9, in from .ms_deform_attn_func import MSDeformAttnFunction File "/data1/ljh/code/TransDETR/models/ops/functions/ms_deform_attn_func.py", line 18, in import MultiScaleDeformableAttention as MSDA ImportError: /data1/ljh/anaconda3/envs/transDETR/lib/python3.7/site-packages/MultiScaleDeformableAttention-1.0-py3.7-linux-x86_64.egg/MultiScaleDeformableAtte ntion.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _ZN6caffe28TypeMeta21_typeMetaDataInstanceISt7complexIdEEEPKNS_6detail12TypeMetaDataEv

How to solve this problem? It looks like MSDA cannot match the version of mmcv.

weijiawu commented 1 year ago

I have no idea about the problem.

As you mentioned, I guess its the version discrepancy, can you try other versions for mmcv or torch==1.8.0

pd162 commented 1 year ago

I have no idea about the problem.

As you mentioned, I guess its the version discrepancy, can you try other versions for mmcv or torch==1.8.0

Thanks for your reply. I have tried to degrade the version of torch==1.7.0 and rebuild all of dependencies. It works as expected.

PS: When I use torch>1.8.0, this error still exists. And timm needs torch>=1.7.0. So I suggest that developers who need to reproduce this project should choose torch==1.7.x.

Needafatima commented 1 year ago

Hey, @pd162 if you were able to reproduce the project successfully, can you please share the packages and their versions. I had the same error, following your solution resolved it. I installed torch==1.7.0+cu11.1 and have detectron2 0.6 for cu11.1, now its showing:

ImportError: libtorch_cuda_cu.so: cannot open shared object file.

I think there is some issue with cuda version. It would be helpful if you share your packages list with versions.

Thank you.

pd162 commented 1 year ago

Hey, @pd162 if you were able to reproduce the project successfully, can you please share the packages and their versions. I had the same error, following your solution resolved it. I installed torch==1.7.0+cu11.1 and have detectron2 0.6 for cu11.1, now its showing:

ImportError: libtorch_cuda_cu.so: cannot open shared object file.

I think there is some issue with cuda version. It would be helpful if you share your packages list with versions.

Thank you.

Hello! For the adaptation of my device(RTX 2080Ti), I use torch==1.7.0+cu102. Other packages were followed by instruction in REDAME. Hope it works!