Error FAST r-cnn demo on CPU mode

711 views
Skip to first unread message

Jumabek Alihanov

unread,
Jun 1, 2015, 10:08:08 PM6/1/15
to caffe...@googlegroups.com
Hi! I am trying to run fast rcnn demo with python on cpu by the command "./tools/demo.py --cpu"

However, I am receiving error as shown below any comments would be appreciated.
  
Traceback (most recent call last):
  File "./tools/demo.py", line 17, in <module>
    from fast_rcnn.config import cfg
  File "/home/wayfarer/fast-rcnn/tools/../lib/fast_rcnn/__init__.py", line 9, in <module>
    from . import train
  File "/home/wayfarer/fast-rcnn/tools/../lib/fast_rcnn/train.py", line 10, in <module>
    import caffe
  File "/home/wayfarer/fast-rcnn/tools/../caffe-fast-rcnn/python/caffe/__init__.py", line 1, in <module>
    from .pycaffe import Net, SGDSolver
  File "/home/wayfarer/fast-rcnn/tools/../caffe-fast-rcnn/python/caffe/pycaffe.py", line 13, in <module>
    from ._caffe import Net, SGDSolver
ImportError: No module named _caffe

林子達

unread,
Jun 3, 2015, 9:13:11 PM6/3/15
to caffe...@googlegroups.com
Do you export python path in terminal or bashrc?
export export PYTHONPATH=/to/your/path/caffe/python/:$PYTHONPATH


Jumabek Alihanov於 2015年6月2日星期二 UTC+8上午10時08分08秒寫道:

Jumabek Alihanov

unread,
Jun 3, 2015, 9:44:53 PM6/3/15
to caffe...@googlegroups.com
Yes I did, but now I am having other problem saying can't find module cv2. 

However I just installed Opencv 2.4.9 
root@wayfarer-desktop:/home/wayfarer/fast-rcnn# pkg-config --modversion opencv
2.4.8

This is the error message I am receiving.
Thanks for your response.

Traceback (most recent call last):
  File "./tools/demo.py", line 17, in <module>
    from fast_rcnn.config import cfg
  File "/home/wayfarer/fast-rcnn/tools/../lib/fast_rcnn/__init__.py", line 10, in <module>
    from . import test
  File "/home/wayfarer/fast-rcnn/tools/../lib/fast_rcnn/test.py", line 14, in <module>
    import cv2
ImportError: No module named cv2

林子達

unread,
Jun 3, 2015, 10:13:39 PM6/3/15
to caffe...@googlegroups.com
My opencv version is 2.4.8, it can work. So it seems there are some issue on your environment.
$pkg-config --modversion opencv
2.4.8

My suggestion is that you should setup/build your caffe first. After that, build and run fast-rcnn.

How to setup Caffe (Environment: Ubuntu 14.04 without GPU)




Jumabek Alihanov於 2015年6月4日星期四 UTC+8上午9時44分53秒寫道:
Message has been deleted

顾佳昕

unread,
Sep 13, 2016, 10:04:04 PM9/13/16
to Caffe Users
Have you solved this problem yet ? I am confronted  with the same problem as you now.

在 2015年6月2日星期二 UTC+8上午10:08:08,Jumabek Alikhanov写道:

abhigoku10

unread,
Jun 22, 2017, 12:50:25 AM6/22/17
to Caffe Users
You have to run sudo make pycaffe command , this will solve the issue
Reply all
Reply to author
Forward
0 new messages