Undefined symbol: _ZN6caffe28TypeMeta21_typeMetaDataInstanceIN3c107complexIfEEEEPKNS_6detail12TypeMetaDataEv
HeilantG opened this issue · 2 comments
HeilantG commented
I installed detectron2 from source, because my cuda is 11.6 and my torch is 1.12.1, not on the table.
when I try to run the demo, I got _C import error:
(venv_frankmocap) gtw@NOTEBOOK:~/frankmocap$ python -m demo.demo_frankmocap --input_path ./sample_data/single_totalbody.mp4 --out_dir ./mocap_output
Traceback (most recent call last):
File "/home/gtw/miniconda3/envs/venv_frankmocap/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/home/gtw/miniconda3/envs/venv_frankmocap/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/gtw/frankmocap/demo/demo_frankmocap.py", line 24, in <module>
from handmocap.hand_bbox_detector import HandBboxDetector
File "/home/gtw/frankmocap/handmocap/hand_bbox_detector.py", line 33, in <module>
from detectors.hand_object_detector.lib.model.roi_layers import nms # might raise segmentation fault at the end of program
File "/home/gtw/frankmocap/detectors/hand_object_detector/lib/model/roi_layers/__init__.py", line 3, in <module>
from .nms import nms
File "/home/gtw/frankmocap/detectors/hand_object_detector/lib/model/roi_layers/nms.py", line 3, in <module>
from model import _C
ImportError: /home/gtw/frankmocap/detectors/hand_object_detector/lib/model/_C.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _ZN6caffe28TypeMeta21_typeMetaDataInstanceIN3c107complexIfEEEEPKNS_6detail12TypeMetaDataEv
I also tried copying _C.cpython-37m-x86_64-linux-gnu.so from frankmocap/detectron2/detectron2 to frankmocap/detectors/hand_object_detectors/lib/model (the new file is smaller than the old one), but the error message did not change.
penincillin commented
@HeilantG
The error is caused by incorrect installation of detectron2. I would suggest you install detectron2 according to their official guidance.
HeilantG commented
Thanks for your reply, I solved the problem by doing a full reinstall.