linjieyangsc / densecap

Dense captioning with joint inference and visual context
Other
53 stars 24 forks source link

Error caffe: No module named 'caffe._caffe' #7

Closed antonionetoo closed 4 years ago

antonionetoo commented 5 years ago

I installed caffe on ubuntu 18.04 using sudo apt install caffe-cuda. Importing on python3 works, but when I run python3 ./lib/tools/demo.py --image images/ --gpu 0 --net VGG_ILSVRC_16_layers.caffemodel an error occurred: ModuleNotFoundError: No module named 'caffe._caffe' How I can fix this?

taniyaghosh29 commented 4 years ago

could you fix this error? I am facing the same issue

antonionetoo commented 4 years ago

Yep. The problem was the project alredy have a caffe code. Independently if you use ubuntu 18.04 (that you can install using apt-get install) or lower, you have to compile caffe manualy, because the are some changes in the project. You should install caffe using the code in the densecap project (root folder) and then add the path project/python in the python path.

I used this link to install caffe and worked. Maybe can help you.

https://mc.ai/caffe-installation-on-ubuntu-18-04-lts-python-2-7/