1. 论文基本信息
- 论文标题:Mask R-CNN
- 论文作者:Kaiming He(Facebook AI Research (FAIR))等人
- 论文出处:ICCV 2017
- 在线阅读:https://arxiv.org/pdf/1703.06870.pdf
- 源码链接:https://github.com/facebookresearch/maskrcnn-benchmark
2. 运行环境
- NVIDIA GTX 1070
- Ubuntu 18.04 x64
- gcc/g++ 7.4.0
- CUDA 10.0 (cuda_10.0.130_410.48_linux.run)
- Anaconda 3
- Python 3.7
- PyTorch 1.3.0 for CUDA 10.0
只需要预先安装好gcc/g++ 7.4.0、CUDA 10.0和Anaconda即可,其他依赖包(包括PyTorch)会在下一节会的详细环境搭建步骤进行安装。
3. 准备
S1. 运行如下命令安装matplotlib后端:
sudo apt-get install tcl-dev tk-dev python-tk python3-tk
S2. 在自己的工作区目录中,运行如下命令下载源码包,也可以手工复制链接在浏览器下载:
git clone https://github.com/facebookresearch/maskrcnn-benchmark.git
S3. cd到maskrcnn-benchmark
目录中,然后运行如下命令创建虚拟环境并激活:
conda create --name maskrcnn_benchmark python=3.7
conda activate maskrcnn_benchmark
S4. 继续保持在maskrcnn-benchmark
目录和刚刚激活的虚拟环境中,然后运行如下命令编写简易安装脚本:
gedit install.sh
在打开的gedit空白编辑界面中,粘贴如下文本:
# this installs the right pip and dependencies for the fresh python
conda install ipython pip
# maskrcnn_benchmark and coco api dependencies
pip install ninja yacs cython matplotlib tqdm opencv-python requests
# follow PyTorch installation in https://pytorch.org/get-started/locally/
# we give the instructions for CUDA 10.0
conda install -c pytorch pytorch-nightly torchvision cudatoolkit=10.0
export INSTALL_DIR=$PWD
# install pycocotools