Mask RCNN

img

Mask R-CNN是在Faster R-CNN的基础上添加了一个预测分割mask的分支,如上图所示。其中黑色部分为原来的Faster-RCNN,红色部分为在Faster-RCNN网络上的修改。将RoI Pooling 层替换成了RoIAlign层;添加了并列的FCN层(mask层)。

Mask RCNN库的使用

环境安装:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
Installation
1.Clone this repository

2.Install dependencies
pip3 install -r requirements.txt

3.Run setup from the repository root directory
python3 setup.py install

4.Download pre-trained COCO weights (mask_rcnn_coco.h5) from the releases page.(https://github.com/matterport/Mask_RCNN/releases)

5.(Optional) 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 and Windows (the official repo doesn't seem to be active anymore).
Linux: https://github.com/waleedka/coco
Windows: https://github.com/philferriere/cocoapi. You must have the Visual C++ 2015 build tools on your path (see the repo for additional details)

语义分割使用:

https://github.com/matterport/Mask_RCNN/blob/master/samples/demo.ipynb

Ref:https://blog.csdn.net/qq_37392244/article/details/88844681