This is Zhuo's fork of Caffe, which fix build(compilation, linking, dependencies) problems. It's not hacking, but better maintainance.
Caffe is the best, really ONNX for model conversion for mobile deployment!
Linux Only tested under ubuntu 16.04
which
pip returns /usr/local/bin/pip
, do this:sudo pip uninstall pip
conda install pip
apt install cmake
since this only gives cmake 3.5.1, which is too old and buggy.conda install cmake
conda install boost
and conda install py-boost
. For python3.7, it provides boost 1.67cmake/Custom.cmake
to specifying boost include directory implicitlylmdb: We need it. It's kept for training purpose thou many modern boys only use tf/pytorch/mxnet.
sudo apt install liblmdb-dev
opencv: we need it. For load image and preprocess. tested version: manually compiled opencv 4.1.1 / 3.4.5's C/C++ lib, 4.1.1's python lib.
Please compile it like this:
cmake .. \
-DCMAKE_INSTALL_PREFIX=/usr/local/opencv-4.1 \
-DINSTALL_PYTHON_EXAMPLES=ON \
-DOPENCV_PYTHON3_VERSION=3.7 \
-DPYTHON3_EXECUTABLE=/home/zz/soft/miniconda3/bin/python \
-DPYTHON3_INCLUDE_DIR=/home/zz/soft/miniconda3/include/python3.7m \
-DPYTHON3_LIBRARY=/home/zz/soft/miniconda3/lib/libpython3.7m.so \
-DBUILD_opencv_python3=ON \
-DBUILD_opencv_python2=OFF \
-DPYTHON_DEFAULT_EXECUTABLE=/home/zz/soft/miniconda3/bin/python \
-DHAVE_opencv_python3=ON \
-DBUILD_TIFF=ON
make -j8
sudo make install
cd python_loader
python setup.py develop
cuda/cudnn: we need it for NVidia GPU speedup.
protobuf: we need it for model loading and saving.
tested version: sudo apt install libprotobuf-dev protobuf-compiler
gflags: I'll remove it gradually.
glog: I'll remove it gradually. Will be replaced by spdlog
Now include/spdlog
folder using spdlog v1.x code.
blas: use OpenBLAS by default.
sudo apt install libopenblas-dev
Python packages
pip install numpy
pip install scikit-image
conda install jupyter notebook
pip install protobuf==2.6.1
.Caffe is released under the BSD 2-Clause license. The BAIR/BVLC reference models are released for unrestricted use.
Please cite Caffe in your publications if it helps your research:
@article{jia2014caffe,
Author = {Jia, Yangqing and Shelhamer, Evan and Donahue, Jeff and Karayev, Sergey and Long, Jonathan and Girshick, Ross and Guadarrama, Sergio and Darrell, Trevor},
Journal = {arXiv preprint arXiv:1408.5093},
Title = {Caffe: Convolutional Architecture for Fast Feature Embedding},
Year = {2014}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。