Detectron: Inference with Pretrained Models OSError: /usr/local/lib/libcaffe2_detectron_ops_gpu.so: undefined symbol: _ZN6caffe211OperatorDef17default_instance_E

Created on 5 Apr 2018  路  6Comments  路  Source: facebookresearch/Detectron

Expected results

Running inference on demo data accordind to tutorial

Actual results & Detailed steps to reproduce

` ~/projects/Detectron$ python2 tools/infer_simple.py \

--cfg configs/12_2017_baselines/e2e_mask_rcnn_R-101-FPN_2x.yaml \
--output-dir /tmp/detectron-visualizations \
--image-ext jpg \
--wts https://s3-us-west-2.amazonaws.com/detectron/35861858/12_2017_baselines/e2e_mask_rcnn_R-101-FPN_2x.yaml.02_32_51.SgT4y1cO/output/train/coco_2014_train:coco_2014_valminusminival/generalized_rcnn/model_final.pkl \
demo

Found Detectron ops lib: /usr/local/lib/libcaffe2_detectron_ops_gpu.so
Traceback (most recent call last):
File "tools/infer_simple.py", line 51, in
c2_utils.import_detectron_ops()
File "/home/user/projects/Detectron/lib/utils/c2.py", line 42, in import_detectron_ops
dyndep.InitOpsLibrary(detectron_ops_lib)
File "/home/user/anaconda2/lib/python2.7/site-packages/caffe2/python/dyndep.py", line 35, in InitOpsLibrary
_init_impl(name)
File "/home/user/anaconda2/lib/python2.7/site-packages/caffe2/python/dyndep.py", line 48, in _init_impl
ctypes.CDLL(path)
File "/home/user/anaconda2/lib/python2.7/ctypes/__init__.py", line 366, in __init__
self._handle = _dlopen(self._name, mode)
OSError: /usr/local/lib/libcaffe2_detectron_ops_gpu.so: undefined symbol: _ZN6caffe211OperatorDef17default_instance_E `

System information

  • Operating system: Ubuntu 16.04
  • Compiler version: gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  • CUDA version: V9.0.176
  • cuDNN version: libcudnn7_7.1.2.21-1+cuda9.0_amd64
  • NVIDIA driver version: 390.48
  • GPU models (for all devices if they are not all the same): v100
  • PYTHONPATH environment variable: blank
  • python --version output: Python 2.7.14 :: Anaconda, Inc.
  • Anything else that seems relevant: I've reinstalled all nvidia drivers and libraries today. Biggest issue was with CUDA, as for some tests like cheking caffe2 or nvidia installations I had errors pointing to CUDA 9.1 while I set explicite to use CUDA 9.0

All 6 comments

same error ...would you like to share the method?

Got it!

I export the python path like /home/chopin/anaconda3/envs/caffe2/caffe2/build/caffe2/python to ~/.bashrc and then pip install utils .

Now, it's running! I hope this will help you.

I export the python path like /home/chopin/anaconda3/envs/caffe2/caffe2/build/caffe2/python to ~/.bashrc and then pip install utils .

Do you run inference in conda active env?

yes

Exporting path to ~/.bashrc pointing on python and caffe2 folders works

I have the same problem. I install the caffe2 with conda install following the official tutorial and it passes the test code for caffe2. In this way, could you please tell me how I can find the build path for caffe2? Thanks!

Was this page helpful?
0 / 5 - 0 ratings