Fast-RCNN

8,027 views
Skip to first unread message

Antonio Paes

unread,
Aug 6, 2015, 8:13:53 PM8/6/15
to Caffe Users
Hy guys I install and compile fast-rcnn from https://github.com/rbgirshick/fast-rcnn#installation-sufficient-for-the-demo

But when i run ./build/demo.py  i get this errors:

Traceback (most recent call last):
  File "./tools/demo.py", line 17, in <module>
    from fast_rcnn.config import cfg
  File "/home/antonio/fast-rcnn/tools/../lib/fast_rcnn/__init__.py", line 8, in <module>
    from . import config
  File "/home/antonio/fast-rcnn/tools/../lib/fast_rcnn/config.py", line 23, in <module>
    from easydict import EasyDict as edict
ImportError: No module named easydict


anybody help me?


Thanks.

Sebastian Sierra

unread,
Aug 6, 2015, 8:24:37 PM8/6/15
to Caffe Users
Maybe you already have. But out of curiosity, have you installed easydict with pip for python?

Antonio Paes

unread,
Aug 6, 2015, 11:49:09 PM8/6/15
to Caffe Users
Hi Sebastian, i already install it, I reboot the system and this error gone, but now I have this error:

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

but i have opencv instaled with pip install.

Antonio Paes

unread,
Aug 7, 2015, 12:39:04 AM8/7/15
to Caffe Users
Resolved, I create a symbolic link, Thanks man.
Message has been deleted

ChangHyun Kim

unread,
Sep 7, 2015, 1:25:36 AM9/7/15
to Caffe Users
I installed opencv and easydict by following ways.
apt-get install python-opencv
sudo pip install  easydict
and I found that the following "/usr/local/lib/python2.7/dist-packages/easydict-1.6-py2.7.egg/" directory is appeared now.


Even I reboot linux, there is the same "Import Error: No module named easydict".
Am I wrong?

Could you give me any idea or how to do symbolic link to the opencv?


2015년 8월 7일 금요일 오후 1시 39분 4초 UTC+9, Antonio Paes 님의 말:

X.T. Li

unread,
Sep 7, 2015, 1:57:48 AM9/7/15
to Caffe Users
try to add this to the demo.py file or any .py file you're running:

import sys
sys
.path.append('/usr/local/lib/python2.7/dist-packages/')

This works for me. Good luck.

在 2015年9月7日星期一 UTC+8下午1:25:36,ChangHyun Kim写道:

ChangHyun Kim

unread,
Sep 7, 2015, 4:02:48 AM9/7/15
to Caffe Users
Thank you X.T.Li.
I solved easydict error.
But I come across following error again:


Traceback (most recent call last):
  File "./tools/demo.py", line 19, in <module>
    from fast_rcnn.config import cfg
  File "/home/ch723.kim/caffe/fast-rcnn-master/tools/../lib/fast_rcnn/__init__.py", line 9, in <module>
    from . import train
  File "/home/ch723.kim/caffe/fast-rcnn-master/tools/../lib/fast_rcnn/train.py", line 10, in <module>
    import caffe
  File "/home/ch723.kim/caffe/fast-rcnn-master/tools/../caffe-fast-rcnn/python/caffe/__init__.py", line 1, in <module>
    from .pycaffe import Net, SGDSolver
  File "/home/ch723.kim/caffe/fast-rcnn-master/tools/../caffe-fast-rcnn/python/caffe/pycaffe.py", line 14, in <module>
    import caffe.io
  File "/home/ch723.kim/caffe/fast-rcnn-master/tools/../caffe-fast-rcnn/python/caffe/io.py", line 8, in <module>
    from caffe.proto import caffe_pb2
  File "/home/ch723.kim/caffe/fast-rcnn-master/tools/../caffe-fast-rcnn/python/caffe/proto/caffe_pb2.py", line 6, in <module>
    from google.protobuf.internal import enum_type_wrapper
ImportError: No module named google.protobuf.internal


I have installed google protobuf 2.4.1 in the /usr/local/include/google/protobuf.

Any comments please?


2015년 9월 7일 월요일 오후 2시 57분 48초 UTC+9, X.T. Li 님의 말:

X.T. Li

unread,
Sep 7, 2015, 4:39:23 AM9/7/15
to Caffe Users
For me, after installing protobuf, my libprotoc.so files are in /usr/local/lib, so by run:

export LD_LIBRARY_PATH=/usr/local/lib

caffe knows how to find it.


在 2015年9月7日星期一 UTC+8下午4:02:48,ChangHyun Kim写道:

ChangHyun Kim

unread,
Sep 7, 2015, 6:38:25 AM9/7/15
to Caffe Users
Thank you.
But, I already had had the LD_LIBRARY_PATH link and confirmed that libprotoc.so files (from protobuf-2.4.1.tar) are located in /usr/local/lib well.
I still have the same ImportError: No module named google.protobuf.internal error.
What else can I work with?

Sincerely yours
Changhyun Kim





2015년 9월 7일 월요일 오후 5시 39분 23초 UTC+9, X.T. Li 님의 말:

X.T. Li

unread,
Sep 8, 2015, 3:40:17 AM9/8/15
to Caffe Users

Sameer Khan

unread,
Nov 23, 2015, 4:43:44 AM11/23/15
to Caffe Users
Hi Antonio i have the same problem no module named cv2 i need to know how to create the symbolic link

Antonio Paes

unread,
Nov 23, 2015, 9:30:05 PM11/23/15
to Caffe Users
HI Sameer, the symbolic link is create like this:

sudo ln -s  location destination

in my case I search when cv2.so was, then I type this:

sudo ln -s /folder/cv2.so ~/cv2

And works for me.

Chan Kim

unread,
Jan 20, 2016, 9:11:58 AM1/20/16
to Caffe Users
Hi Antonio,
when you do 'sudo ln -s /folder/cv2.so ~/cv2', you put the symbolic link in your home.
I found the cv2.so in /usr/local/lib/python2.6/site-packages/cv2.so. so I did
'sudo ln -s /usr/local/lib/python2.6/site-packages/cv2.so ~/cv2' 
but it doesn't work as I expected. Where should the symbolic link (cv2) be located? (I mean where does the script find cv2 at?)
Is it something in the $PATH?(guess not). Is it just open-cv or python-opencv?
THanks!

another question is : I've used anaconda2 for python2.7 download.

Hana' AL-Theiabat

unread,
Aug 22, 2016, 4:37:09 AM8/22/16
to Caffe Users
Guys 
Please help..

I have the same error "  from easydict import EasyDict as edict"
Then I install easydict and then reboot by doing this:

apt-get install python-opencv
sudo pip install  easydict

After that I have new errors:

  File "./tools/demo.py", line 17, in <module>
    from fast_rcnn.config import cfg
  File "/home/hana/Desktop/fast-rcnn-master/tools/../lib/fast_rcnn/__init__.py", line 9, in <module>
    from . import train
  File "/home/hana/Desktop/fast-rcnn-master/tools/../lib/fast_rcnn/train.py", line 10, in <module>
    import caffe
  File "/home/hana/Desktop/fast-rcnn-master/tools/../caffe-fast-rcnn/python/caffe/__init__.py", line 1, in <module>
    from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver
  File "/home/hana/Desktop/fast-rcnn-master/tools/../caffe-fast-rcnn/python/caffe/pycaffe.py", line 15, in <module>
    import caffe.io
  File "/home/hana/Desktop/fast-rcnn-master/tools/../caffe-fast-rcnn/python/caffe/io.py", line 2, in <module>
    import skimage.io
ImportError: No module named skimage.io


Then I make the following but still have same last error:

import sys
sys
.path.append('/usr/local/lib/python2.7/dist-packages/')


Any help Please!

Srinivas Rao

unread,
Oct 2, 2016, 4:22:42 PM10/2/16
to Caffe Users
Hi,

I would suggest trying the following:

First, check if easydict is installed or not On your terminal run:

python

from easydict import EasyDict

If this doesn't give an error then you have easydict installed. I had installed easydict using Anaconda:

conda install -c https://conda.binstar.org/auto easydict

Next, if this is working check if you have pip installed (It should have come installed with Anaconda):

which pip

This command should give output as /data/username/anaconda2/bin/pip

If this is the output then pip was installed with anaconda and not apt-get. In this case you should not use sudo while using pip and while running the code.

So, you should try running the code the following way:
bash build/demo.py
Reply all
Reply to author
Forward
0 new messages