1.安装需要的包
在ubuntu16.04环境下将python3设置成默认的(ubuntu16.04下是直接有python3)
直接执行这两个命令即可:
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 100
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 150
修改镜像源
找到
/etc/apt/source.list
清空整个source.list文件,然后复制下列内容到文件中:
- deb http://mirrors.ustc.edu.cn/ubuntu/ precise main restricted universe multiverse
- deb http://mirrors.ustc.edu.cn/ubuntu/ precise-security main restricted universe multiverse
- deb http://mirrors.ustc.edu.cn/ubuntu/ precise-updates main restricted universe multiverse
- deb http://mirrors.ustc.edu.cn/ubuntu/ precise-proposed main restricted universe multiverse
- deb http://mirrors.ustc.edu.cn/ubuntu/ precise-backports main restricted universe multiverse
- deb-src http://mirrors.ustc.edu.cn/ubuntu/ precise main restricted universe multiverse
- deb-src http://mirrors.ustc.edu.cn/ubuntu/ precise-security main restricted universe multiverse
- deb-src http://mirrors.ustc.edu.cn/ubuntu/ precise-updates main restricted universe multiverse
- deb-src http://mirrors.ustc.edu.cn/ubuntu/ precise-proposed main restricted universe multiverse
- deb-src http://mirrors.ustc.edu.cn/ubuntu/ precise-backports main restricted universe multiverse
然后执行更新一下:sudo apt-get updata
然后开始安装:
- Python 3.4+
- TensorFlow 1.3+
- Keras 2.0.8+
- Jupyter Notebook
- Numpy, skimage, scipy
- 下载数据集(mscoco2014)
- a. 使用aria2 搭配命令行下载。需要先安装:
- sudo apt-get install aria2
- b. 进入存放COCO的目录,依次输入下面3个命令下载:
- aria2c -c http://msvocds.blob.core.windows.net/annotations-1-0-3/instances_train-val2014.zip
aria2c -c http://msvocds.blob.core.windows.net/coco2014/train2014.zip
aria2c -c http://msvocds.blob.core.windows.net/coco2014/val2014.zip - 以上3个url链接分别为2014年的 annotations、train data、val data。
- 下面的操作请参考https://blog.csdn.net/xiongchao99/article/details/79106588这篇博客,写的非常详细