跑代码Instance-aware Semantic Segmentation via Multi-task Network Cascades
需要用到caffe,阅读README.md
Clone the MNC repository:
# Make sure to clone with --recursive
git clone --recursive https://github.com/daijifeng001/MNC.git
Install Python packages: numpy, scipy, cython, python-opencv, easydict, yaml.
Build the Cython modules and the gpu_nms, gpu_mask_voting modules by:
cd $MNC_ROOT/lib
make
Install Caffe and pycaffe dependencies (see: Caffe installation instructions for official installation guide)
Note: Caffe must be built with support for Python layers!
# In your Makefile.config, make sure to have this line uncommented
WITH_PYTHON_LAYER := 1
# CUDNN is recommended in building to reduce memory footprint
USE_CUDNN := 1
Build Caffe and pycaffe:
cd $MNC_ROOT/caffe-mnc
# If you have all of the requirements installed
# and your Makefile.config in place, then simply do:
make -j8 && make pycaffe
按上图的步骤下载python packages,再在lib文件夹下make
接着安装caffe和依赖,先从github上下载caffe,
!git clone https://github.com/BVLC/caffe && cd caffe
接着按给的Makefile.config.example复制一份Makefile.config,按照自己的配置删改,这些可先跑一下看看有哪些错误,然后删减,其他博客也有很多详细介绍
先把caffe依赖装好
不是colab的直接删掉前面感叹号就好
!sudo apt-get install libgflags-dev libgoogle-glog-dev liblmdb-dev
!sudo apt-get install git
!sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev
!sudo apt-get install --no-install-recommends libboost-all-dev
!sudo apt-get install libatlas-base-dev
!sudo apt-get install python-dev
!sudo apt-get install libhdf5-dev
!sudo apt-get install libhdf5-serial-dev protobuf-compiler
import os
path = "/content/drive/My Drive/MNC-master/lib/caffe"
os.chdir(path)
!make clean
!make all -j8
再clean后重新编译,有错的就去百度,基本是Makefile哪里不对要改,看usr/lib文件夹路径啥的
接着就安装ok
执行make pycaffe
|