一、安装Anaconda3
1、下载
下载地址:https://www.continuum.io/downloads
2、安装
在文件目录下执行:bash Anaconda3-4.2.0-Linux-x86_64.sh
回车键继续
阅读完注册信息后,这里输入“yes”
选择加入环境变量,这里输入“yes”
看到信息“For this change to become active, you have to open a new terminal.”(要使这个更改生效,必须打开一个新的终端。)这句话提示,需要在新的终端窗口使用anaconda,打开新的终端,查看相应的版本信息
3、创建
conda create -n tensorflow python=3.6
4、激活
source activate tensorflow
激活以后命令行前面会增加 (tensorflow)
二、安装Tensorflow(CPU)
1、安装依赖包
在上一步命令行上直接输入一下命令安装
首先升级pip,如果不升级,会有提示,
pip install --upgrade pip
(目前,应该会升级到pip18)
接下来依次输入
pip install numpy
pip install scipy
pip install cython
pip install h5py
pip install Pillow
pip install scikit-image
pip install keras
pip install theano
pip install jupyter
pip install six
安装完成以后进入下一步
2、安装pycocotools
直接输入
git clone https://github.com/waleedka/coco.git
pip install git+ https://github.com/waleedka/coco.git#subdirectory=PythonAPI
3、在上一步的基础上直接输入命令:
pip install tensorflow==1.5.0 //版本号根据需要自定义
安装完成以后在命令行上输入:python 回车,进入python3.6,在命令行分别输入以下命令
(tensorflow)$ python ###########
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
sess.run(hello)
如果命令行输出 Hello, TensorFlow! ,说明tensorflow安装成功
测试完成以后输入 exit() 退出python,继续下一步安装
4、安装opencv
在上一基础上,在命令行输入:
pip install opencv-python
5、安装imagaug
pip install imgaug
三、配置Mask-RCNN
1、下载Mask-RCNN