faster-rcnn
一、先下载faster-rcnn的源码:https://github.com/rbgirshick/py-faster-rcnn
git clone --recursive
--recursive很重要,当克隆一个含有子模块的项目时,默认会包含子模块目录,但是没有任何文件。使用递归recursive选项会自动初始化并更新仓库的每一个子模块。还有一种方法是用submodule:先git submodule init 然后 git submodule update。
二、下载依赖:Cython、easydict、python-opencv
1. 先安装pip:安装前需要安装setuptools:wget --no-check-certificate https://pypi.python.org/packages/source/s/setuptools/setuptools-19.6.tar.gz#md5=c607dd118eae682c44ed146367a17e26
解压,然后python setup.py build && python setup.py install
安装pip:wget --no-check-certificate https://pypi.python.org/packages/source/p/pip/pip-8.0.2.tar.gz#md5=3a73c4188f8dbad6a1e6f6d44d117eeb
解压,同上安装。
测试报错:ImportError: cannot import name 'HTTPSHandler'
缺少OpenSSL的开发环境,yum install openssl-devel,重新编译安装Python3.5,建立软链接ln -s /usr/local/python/python3/pip3 /usr/bin/pip
2. 安装Cython和easydict:sudo pip install Cython ; sudo pip install easydict
修改Cython的lib目录下setup.py文件,这里用的是纯CPU版,注释掉GPU相关