Abstract In recent years, object detection has experienced impressive progress. Despite these improvements, there is still a significant gap in the performance between the detection of small and large objects. We analyze the current state-of-the-art model, Mask-RCNN, on a challenging dataset, MS COCO. We show that the overlap between small ground-truth objects and the predicted anchors is much lower than the expected IoU threshold. We conjecture this is due to two factors: (1) only a few images contain small objects, and (2) small objects do not appear enough even within each image containing them. We thus propose to oversample those images with small objects and augment each of those images by copy-pasting small objects many times. It allows us to trade off the quality of the detector on large objects with that on small objects. We evaluate different pasting augmentation strategies, and ultimately, we achieve 9.7% relative improvement on the instance segmentation and 7.1% on the object detection of small objects, compared to the current state-of-the-art method on MS COCO.
Introduction: The Small Object Challenge
Despite the rapid evolution of deep learning models like Mask R-CNN, small objects remain the "Achilles' heel" of computer vision. On the MS COCO dataset, the Average Precision (AP) for small objects is typically 2-3 times lower than for large objects.
Three primary factors contribute to this disparity:
- Class Imbalance: Only about half of the images in the COCO dataset contain small objects, whereas medium and large objects appear much more frequently.
- Low Pixel Coverage: Small objects (defined as area < 32² pixels) account for only 1.23% of the total annotated pixel area, providing minimal signal for learning.
- The Anchor Gap: Most detectors use "anchors" to propose object locations. Because small objects are tiny, they often match with only one or zero anchors at the required Intersection over Union (IoU) threshold, leading to a lack of positive samples during training.
Proposed Methodology
To address these issues, we propose a two-pronged data-centric approach that can be integrated into any object detection pipeline:
Oversampling
We increase the frequency of images containing small objects during training. Empirical testing suggests that a 3x oversampling ratio is the "sweet spot," balancing improved sensitivity for small objects without excessively degrading performance on larger ones.
Copy-Paste Augmentation
To solve the lack of diversity and quantity of small objects, we use instance segmentation masks to "pick up" small objects from their original locations and "paste" them multiple times in random new locations within the same image.
Key aspects of this strategy include:
- Transformations: Random scaling (±20%) and rotation (±15°) are applied to prevent shape memorization.
- Constraint: Pasted objects do not overlap with existing ground-truth objects and are placed away from image boundaries.
- Context Preservation: By pasting objects back into the same image they originated from, we ensure the objects remain in a plausible environment, which is crucial for effective learning.
Experimental Results
Using Mask R-CNN with a ResNet-50 backbone on the MS COCO dataset, our augmentation strategies yielded significant gains:
- Detection Improvement: The baseline AP for small objects rose from 0.167 to 0.179 (a 7.1% relative increase).
- Segmentation Improvement: The baseline AP for small object segmentation rose from 0.113 to 0.124 (a 9.7% relative increase).
- Strategy Efficacy: Copy-pasting multiple small objects per image proved more effective than simply duplicating a single object many times.
Limitations and Future Work
While effective, the model can sometimes overfit to "pasting artifacts," such as imperfect mask edges or sudden contrast changes. Simple Gaussian blurring on the edges was found to decrease performance, suggesting that more sophisticated blending techniques—perhaps involving Generative Adversarial Networks (GANs)—are needed to realistically fuse pasted objects into their backgrounds.
Summary updated