Running inference on demo data accordind to tutorial
` ~/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 \ demoFound 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 `
PYTHONPATH environment variable: blankpython --version output: Python 2.7.14 :: Anaconda, Inc.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!