Object-aware Cropping for Self-Supervised Learning

Shlok Kumar Mishra, Anshul Shah, Ankan Bansal, Janit K Anjaria, Abhyuday Narayan Jagannatha, Abhishek Sharma, David Jacobs, Dilip Krishnan

Abstract

A core component of the recent success of self-supervised learning is cropping data augmentation, which selects sub-regions of an image to be used as positive views in the self-supervised loss. The underlying assumption is that randomly cropped and resized regions of a given image share information about the objects of interest, which is captured by the learned representation. This assumption is mostly satisfied in datasets such as ImageNet where there is a large, centered object, which is highly likely to be present in random crops of the full image. However, in other datasets such as OpenImages or COCO, which are more representative of real world uncurated data, there are typically multiple small objects in an image. In this work, we show that self-supervised learning based on the usual random cropping performs poorly on such datasets (measured by the difference from fully-supervised learning). Instead of using pairs of random crops, we propose to leverage an unsupervised object proposal technique; the first view is a crop obtained from this algorithm, and the second view is a dilated version of the first view. This encourages the self-supervised model to learn both object and scene level semantic representations. Using this approach, which we call object-aware cropping, results in significant improvements over random scene cropping on classification and object detection benchmarks. For example, for pre-training on OpenImages, our approach achieves an improvement of 8.8% mAP over random scene cropping (both methods using MoCo-v2). We also show significant improvements on COCO and PASCAL-VOC object detection and segmentation tasks over the state-of-the-art self-supervised learning approaches. Our approach is efficient, simple and general, and can be used in most existing contrastive and non-contrastive self-supervised learning frameworks.

Introduction: The Iconic Bias in Self-Supervised Learning

Standard self-supervised learning (SSL) frameworks like MoCo and SimCLR rely heavily on data augmentation through random cropping. The core assumption is that two random crops of the same image likely contain the same semantic information. This holds true for "iconic" datasets like ImageNet, where a single, large object typically dominates the center of the frame.

However, real-world data is often "non-iconic." In datasets like OpenImages or COCO, images contain multiple small objects scattered across complex scenes. In these scenarios, random cropping frequently fails. For instance, one crop might capture a specific object while the second captures an unrelated background element like grass or sky. Forcing the model to align these disparate representations introduces noise and hinders the learning of meaningful semantic features.

Random cropping in non-iconic images often results in views that lack shared semantic content.

Object-aware Cropping (OAC)

To address this, we propose Object-aware Cropping (OAC). Instead of sampling coordinates at random, OAC leverages unsupervised object proposals to guide the cropping process. The method consists of three primary components:

Object-aware Views

Using the LOD (Large-scale Unsupervised Object Discovery) algorithm, we identify potential object regions without human labels. The first view is a crop of a discovered object. The second view is a dilated (expanded) version of the same bounding box, capturing the object along with its immediate environmental context. This strategy ensures that both views are semantically anchored to the same object while encouraging the model to learn the relationship between objects and their surroundings.

OAC uses unsupervised proposals to create an object-centric view and a dilated context view.

Auxiliary Pretext Tasks

Beyond contrastive learning, OAC incorporates two additional tasks:

  • Object Localization ($L_{loc}$): The model predicts which patches in a scene contain the object, reinforcing "objectness."
  • Relative Rotation ($L_{rot}$): The model predicts the rotation of an object relative to its scene, helping it understand spatial hierarchies.

Experimental Results

We evaluated OAC on several benchmarks, focusing on its ability to bridge the gap between SSL and supervised learning on complex datasets.

  • OpenImages (OHMS): On the "OpenImages Hard Multi-object Subset," OAC achieved an 8.8% mAP improvement over the MoCo-v2 baseline.
  • Downstream Detection: Pre-training with OAC on OHMS led to a +3.1 mAP gain on PASCAL VOC compared to standard random cropping.
  • Generalizability: OAC is framework-agnostic. It consistently improved performance when integrated into MoCo-v2, BYOL, and Dense-CL on the COCO benchmark for both detection and semantic segmentation.

Conclusion

Object-aware Cropping demonstrates that the strategy for sampling data is as critical as the learning architecture itself. By moving away from the "iconic" bias of random cropping and focusing on unsupervised object discovery, OAC significantly improves the quality of representations learned from complex, real-world scenes. This simple, "plug-and-play" modification effectively halves the performance gap between self-supervised and supervised methods on multi-object datasets.

Summary updated

BibTeX
@article{mishra2022object,
  author = {Shlok Kumar Mishra and Anshul Shah and Ankan Bansal and Janit K Anjaria and Abhyuday Narayan Jagannatha and Abhishek Sharma and David Jacobs and Dilip Krishnan},
  title = {{Object-aware Cropping for Self-Supervised Learning}},
  journal = {Accepted by TMLR},
  year = {2022},
  url = {https://openreview.net/forum?id=WXgJN7A69g},
}
Figure