# MASK R-CNN instance segmentation **Repository Path**: mango_jam/mask-r-cnn-instance-segmentation ## Basic Information - **Project Name**: MASK R-CNN instance segmentation - **Description**: No description available - **Primary Language**: Python - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-12-26 - **Last Updated**: 2021-01-20 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # MASK R-CNN Instance Segmentation #### 安装教程和使用说明 1. Clone this repository git clone https://github.com/matterport/Mask_RCNN.git 安装anaconda或其他虚拟环境(对应python3.6版本),若有本身python3.6版本则不需安装 开启虚拟环境 在wy@ris-server下: source activate tensorflow 关闭虚拟环境 source deactivate 2.Install dependencies pip3 install -r requirements.txt 3.Run setup from the repository root directory sudo python3 setup.py install 4.Download pre-trained COCO weights (mask_rcnn_coco.h5), and under the mask rcnn folder. 5.(optional) if need to train or test on MS COCO install pycocotools from one of these repos. They are forks of the original pycocotools with fixes for Python3 Linux: https://github.com/waleedka/coco 若报关于 pycocotools或 coco的错,则在虚拟环境中,路径/../coco/PythonAPI下,运行make 或者make -j8 6. 测试 maskrcnn 是否能运行: in one terminal jupyter notebook 然后运行demo.ipynb文件 当tf.Session()报错internalerror:Failed to create session时,先在根目录运行: export CUDA_VISIBLE_DEVICES='' 然后接着重新打开jupyter notebook,再运行一次 7.修改好代码后进行训练自己的数据集 修改用于训练的代码主要参考链接: https://blog.csdn.net/heiheiya/article/details/81532914#commentBox 在mask rcnn/samples/bottle下打开终端 python3 bottle.py train --dataset=/../Mask_RCNN/dataset/bottle --weights=coco 若报以下错误: /../tensorflow/lib/python3.6/site-packages/skimage/transform/_warps.py:830: FutureWarning: Input image dtype is bool. Interpolation is not defined with bool data type. Please set order to 0 or explicitely cast input image to another data type. Starting from version 0.19 a ValueError will be raised instead of this warning. 则令order = 0 8.测试训练结果 直接用jupyter notebook打开sample/bottle/下的inpect_bottle_model文件进行测试即可