# Mask R-CNN (2017)

> Added a small parallel branch to Faster R-CNN that predicts a pixel mask for every detected object.

Page: https://mralbu.github.io/ai-datasets/p/mask-rcnn

## Key facts

- Title: Mask R-CNN
- Authors: Kaiming He, Georgia Gkioxari, Piotr Dollár, Ross Girshick
- Venue: ICCV 2017
- Category: Vision
- Paper: https://www.alphaxiv.org/abs/1703.06870

## Why it matters

Earlier instance segmentation systems were brittle and much slower than box detectors. Mask R-CNN showed that pixel masks—and even human pose keypoints—could be added as another cheap head on top of Faster R-CNN, turning two-stage detection into a general framework for instance-level vision.

## The idea

Attach a tiny fully convolutional mask head next to Faster R-CNN's class and box heads, predicting a separate binary mask per class so mask prediction does not compete across categories. Replace RoIPool with RoIAlign, using bilinear interpolation instead of integer rounding so pooled features stay aligned to exact pixels.

## The result

35.7 mask AP and 38.2 box AP on COCO test-dev with ResNet-101-FPN at 5 frames per second, plus 62.7 keypoint AP on COCO human pose and 32.0 AP on Cityscapes instance segmentation (with COCO pretraining).

## The data

- [MS COCO (2014)](https://mralbu.github.io/ai-datasets/d/coco.md): 330k everyday scenes with 1.5M labeled objects in 80 categories.
- [Cityscapes (2016)](https://mralbu.github.io/ai-datasets/d/cityscapes.md): 5,000 street photos from 50 cities, every pixel labeled as road, car, person, sky and so on.

## Builds on

- [Faster R-CNN (2015)](https://mralbu.github.io/ai-datasets/p/faster-rcnn.md)
- [FPN (2016)](https://mralbu.github.io/ai-datasets/p/fpn.md)
- [FCN (2014)](https://mralbu.github.io/ai-datasets/p/fcn.md)
- [ResNet (2015)](https://mralbu.github.io/ai-datasets/p/resnet.md)

## Led to

- [Mask2Former (2021)](https://mralbu.github.io/ai-datasets/p/mask2former.md)

## Part of

- [Segmentation](https://mralbu.github.io/ai-datasets/t/segmentation.md) (step 4 of 7)
