1.git clone https://github.com/CharlesShang/FastMaskRCNN.git
2.Go to ./libs/datasets/pycocotools and run make
3.Download pretrained resnet50 model, wget http://download.tensorflow.org/models/resnet_v1_50_2016_08_28.tar.gz, unzip it, place it into ./data/pretrained_models/
4.Download COCO dataset, place it into ./data, then run python download_and_convert_data.py to build tf-records. It takes a while.
5.用virtualenv安装配置Tensorflow1.2
首先通过如下命令安装pip和virtualenv
sudo apt-get install python-pip python-dev python-virtualenv # for Python 2.7
sudo apt-get install python3-pip python3-dev python-virtualenv # for Python 3.n
使用如下命令创建virtualenv环境
virtualenv --system-site-packages targetDirectory # for Python 2.7
virtualenv --system-site-packages -p python3 targetDirectory # for Python 3.n
上述名称中的targetDirectory是自己命名的一个空间,这里假定是 ~/tensorflow1.2,你也可名命名其他名称
使用如下命令激活virtualenv环境
source ~/tensorflow1.2/bin/activate # bash, sh, ksh, or zsh
source ~/tensorflow/bin/activate.csh # csh or tcsh
pip install tensorflow-gpu==1.2.1
测试安装结果
python
import tensorflow as tf
训练失败,放弃该版本。