To install the models, run setup.py
sudo apt install caffe python3-caffe
If using CUDA, don't install cafe with apt. Compile it using the links in the troubleshooting section.
copy the compiled caffe folder from /build/python/caffe/
to the repository.
pip install -r requirements.txt
https://github.com/BVLC/caffe/wiki/Model-Zoo
python3 main.py
https://gist.github.com/CyanLetter/a72e4be744aef1ed603a7d0df1632972 https://gist.github.com/ewnd9/3d3f688f8c6d3fe643f1
- replace
CV_LOAD_IMAGE_COLOR
withcv::IMREAD_COLOR
- replace
CV_LOAD_IMAGE_GRAYSCALE
withcv::IMREAD_GRAYSCALE
- add
#include "opencv2/imgcodecs/imgcodecs.hpp"
to the top of all files with the error.
can't import caffe_pb2 or TypeError: Couldn't build proto file into descriptor pool: duplicate file name caffe/proto/caffe.proto
export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION="python"