SCNet: Training Inference Sample Consistency for Instance Segmentation

Thang Vu, Haeyong Kang, Chang D. Yoo

Abstract

Cascaded architectures have become the standard for high-quality object detection, yet their application to instance segmentation often suffers from a significant distribution mismatch. While training involves multiple stages with varying Intersection-over-Union (IoU) distributions, inference typically relies on the refined outputs of the final stage. SCNet (Sample Consistency Network) addresses this gap by ensuring sample consistency between training and inference. By integrating a single, deep mask branch with feature relay and global context mechanisms, SCNet achieves a 2.3-point improvement in mask AP and a 38% increase in inference speed over the Cascade Mask R-CNN baseline on the COCO dataset.

Introduction

In modern computer vision, cascaded architectures refine bounding boxes through successive stages to achieve high precision. However, when adapted for instance segmentation, a "distribution mismatch" occurs. Mask branches are typically trained on the outputs of all detection stages, including low-quality initial proposals. At inference, however, only the high-quality boxes from the final stage are used. This inconsistency forces the model to learn from irrelevant, noisy data, limiting performance and wasting computational resources on redundant intermediate mask branches.

Architectural Innovations

SCNet introduces three primary components to resolve these issues and improve synergy between detection and segmentation tasks:

  1. Effective Sample Consistency: Rather than attaching mask branches to every stage, SCNet employs a single, deeper mask branch connected only to the final stage. This ensures the training distribution matches the high-quality IoU samples encountered during inference.
  2. Feature Relay: To strengthen the link between the box and mask branches, SCNet "relays" features from the box refinement process into the mask branch. This provides an explicit geometric prior that aids in pixel-level segmentation.
  3. Global Context: A dedicated global branch processes the entire image to provide scene-level context, helping local branches disambiguate objects in complex environments.
Comparison of cascaded architectures: (a) Cascade Mask R-CNN, (b) Hybrid Task Cascade (HTC), and (c) the proposed SCNet.

Analysis of the IoU Shift

The core motivation for SCNet is the observation of the IoU distribution shift. In traditional cascaded training (without sample consistency), nearly 50% of the training samples fall into low-quality IoU regions (below 0.75). In contrast, the inference stage almost exclusively processes high-quality samples. By enforcing sample consistency, SCNet aligns the training distribution with the inference reality, focusing the model's learning capacity on the most relevant data.

IoU distribution comparison: (a) Training without sample consistency, (b) Training with sample consistency, and (c) Inference distribution.

Experimental Results

The researchers evaluated SCNet on the COCO benchmark (train2017, val2017, and test-dev).

  • Accuracy: With a ResNet-50 backbone, SCNet improved Box AP by 1.3 points and Mask AP by 2.3 points over Cascade Mask R-CNN.
  • Efficiency: SCNet achieved an inference speed of 6.2 FPS, a 38% improvement over the baseline's 4.5 FPS. This speedup is primarily due to the removal of redundant intermediate mask branches.
  • Scalability: When utilizing a ResNeXt-101 backbone, SCNet reached 42.7 Mask AP, outperforming more complex models like Hybrid Task Cascade (HTC).

Conclusion

SCNet demonstrates that architectural simplification, when guided by principles of consistency, can lead to simultaneous gains in accuracy and efficiency. By aligning the training and inference distributions and facilitating explicit feature sharing between tasks, SCNet provides a robust and fast framework for instance segmentation. Future work may explore deeper integration of global context within the backbone and multi-directional information flow between all sub-tasks.

Summary updated

BibTeX
@inproceedings{vu2021scnet,
  author = {Thang Vu and Haeyong Kang and Chang D. Yoo},
  title = {{SCNet: Training Inference Sample Consistency for Instance Segmentation}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2021},
  doi = {10.1609/aaai.v35i3.16374},
}
Figure