安装MS Caffe
假设你已经装好了CUDA,cudnn,caffe等等。 这一步感觉和faster rcnn很像,都需要独特版本的caffe。这里的版本就是Microsoft的caffe。
pip install cython pip install easydict apt-get install
python-opencv
git clone https://github.com/Orpine/py-R-FCN.git
cd py-R-FCN
进入lib文件夹,然后:
make
接着进入caffe目录:(32核用起来果然很爽)
make -j32 && make pycaffe
这里的Makefile.config需要注意一下,每个人的都有一点点不一样,比如我就没有加入opencv。这里没写好的话就会有不少错误。
## Refer to http://caffe.berkeleyvision.org/installation.html
# Contributions simplifying and improving our build system are welcome!
# cuDNN acceleration switch (uncomment to build with cuDNN).
USE_CUDNN := 1
# CPU-only switch (uncomment to build without GPU support).
# CPU_ONLY := 1
# uncomment to disable IO dependencies and corresponding data layers
# USE_OPENCV := 0
# USE_LEVELDB := 0
# USE_LMDB := 0
# uncomment to allow MDB_NOLOCK when reading LMDB files (only if necessary)
# You should not set this flag if you will be reading LMDBs with any
# possibility of simultaneous read and write
# ALLOW_LMDB_NOLOCK := 1
# Uncomment if you're using OpenCV 3
# OPENCV_VERSION := 3
# To customize your choice of compiler, uncomment and set the following.
# CUDA directory contains bin/ and lib/ directories that we need.
CUDA_DIR := /usr/local/cuda
# On Ubuntu 14.04, if cuda tools are installed via
# "sudo apt-get install nvidia-cuda-toolkit" then use this instead:
# CUDA_DIR := /usr
# CUDA architecture setting: going with all of them.
# For CUDA < 6.0, comment the *_50 lines for compatibility.
CUDA_ARCH := -gencode arch=compute_20,code=sm_20 \
-gencode arch=compute_20,code=sm_21 \
-gencode arch&#