Abstract
Instance segmentation typically relies on classification confidence to rank predicted masks. However, classification scores often fail to reflect the actual spatial quality of the mask. Mask Scoring R-CNN (MS R-CNN) addresses this "misalignment" by introducing a MaskIoU head that predicts the overlap between the mask and the ground truth. This allows the model to produce a more reliable mask score, leading to a consistent ~1.5% AP improvement on the COCO benchmark.
Introduction
In instance segmentation, models like Mask R-CNN perform two primary tasks: object classification and pixel-level mask generation. Evaluation metrics like Average Precision (AP) require ranking these predictions by a confidence score. Traditionally, the classification score is used as a proxy for mask quality.
However, classification confidence only measures the model's certainty about the object's category, not the mask's spatial accuracy. A high classification score might accompany a poorly aligned mask, leading to suboptimal ranking and penalizing the final AP. This discrepancy is known as the "misalignment" problem.
Methods
Mask Scoring R-CNN (MS R-CNN) introduces a modular addition to the standard Mask R-CNN architecture to rectify this issue:
- The MaskIoU Head: A lightweight branch that takes RoI (Region of Interest) features and the predicted mask as inputs.
- Information Fusion: The head concatenates these inputs and uses convolution and fully connected layers to regress the predicted Intersection-over-Union (IoU).
- Mask Scoring Strategy: During inference, the final mask score ($S_{mask}$) is calculated as the product of the classification score ($S_{cls}$) and the predicted Mask IoU ($S_{iou}$): $$S_{mask} = S_{cls} \times S_{iou}$$ This ensures that a prediction receives a high score only if the model is confident in both the category and the mask's quality.
Key Insights
A primary contribution of this work is the quantitative demonstration of the "Correlation Gap." In standard Mask R-CNN, there is a weak correlation between classification scores and actual mask IoU. By explicitly predicting MaskIoU, MS R-CNN significantly tightens this relationship.
Furthermore, the model treats the predicted mask as a feature. By allowing the network to "look" at its own prediction, it can better judge its quality. The MaskIoU head is remarkably efficient, adding only 0.39G FLOPs compared to the 0.53G of the standard mask head.
Key Results
MS R-CNN provides consistent performance gains across various backbones. On the COCO 2017 dataset, it achieved a ~1.5% AP improvement over the baseline Mask R-CNN.
On the COCO test-dev set, MS R-CNN with a ResNet-101 DCN+FPN backbone reached 39.6 AP, outperforming the baseline (38.4 AP) and other models like MaskLab. The method is also robust; training the head to predict IoU for only the target class proved more effective than multi-class IoU regression.
Conclusion
Mask Scoring R-CNN identifies and solves a fundamental ranking problem in instance segmentation. By adding a simple, lightweight MaskIoU head, the model aligns confidence scores with actual mask quality. While there is still room to improve the IoU regressor itself, MS R-CNN sets a new standard for reliable scoring in two-stage detectors.
Summary updated