Online Object Representations with Contrastive Learning

Sören Pirk, Mohi Khansari, Yunfei Bai, Corey Lynch, Pierre SermanetarXiv 2019

Abstract

We propose a self-supervised approach for learning representations of objects from monocular videos and demonstrate it is particularly useful in situated settings such as robotics. The main contributions of this paper are: 1) a self-supervising objective trained with contrastive learning that can discover and disentangle object attributes from video without using any labels; 2) we leverage object self-supervision for online adaptation: the longer our online model looks at objects in a video, the lower the object identification error, while the offline baseline remains with a large fixed error; 3) to explore the possibilities of a system entirely free of human supervision, we let a robot collect its own data, train on this data with our self-supervise scheme, and then show the robot can point to objects similar to the one presented in front of it, demonstrating generalization of object attributes.

Introduction

In the dynamic environments typical of robotics, pre-trained models often struggle when encountering novel objects or unfamiliar lighting conditions. Traditional solutions rely on massive, human-labeled datasets, which are expensive and difficult to scale. This paper introduces the Object-Contrastive Network (OCN), a self-supervised method that allows agents to learn rich, continuous object representations directly from monocular video. By moving away from rigid discrete labels, OCN enables robots to adapt to their surroundings autonomously by simply "looking" at the world.

Methodology

The OCN framework leverages the temporal continuity of video to learn object attributes without human intervention. The process involves:

  1. Object Detection: Using a class-agnostic detector to identify bounding boxes for "object-like" regions.
  2. Contrastive Learning: The model processes pairs of frames from short video sequences. Since these frames are temporally close, the system assumes the same objects are present in both.
  3. Positive Mining: For each object in the first frame, the model identifies its nearest neighbor in the embedding space of the second frame, treating this as a "positive pair."
  4. N-Pairs Loss: The model pulls positive pair embeddings closer together while simultaneously pushing away embeddings of all other objects in the frames (negative pairs).

This approach relies on the hypothesis that the most consistent visual signal across different viewpoints is the identity of the objects themselves, leading to emergent correspondence without explicit tracking or 3D matching.

Experimental Results

The OCN was evaluated across diverse datasets, including real-world office and kitchen environments, autonomous robotic collections (43,000 images), and synthetic data from ModelNet.

Online Adaptation and Error Reduction

A key finding is the power of "looking longer." As the robot observes a scene from multiple angles, its internal representation of objects becomes significantly more accurate. In online adaptation tests, OCN reduced object identification error from an initial ~21% to just 2.2% after 80 seconds of video. In contrast, a standard ResNet50 baseline remained stagnant at over 52% error.

The OCN model significantly reduces object identification error over time through online adaptation, whereas the ResNet50 baseline remains at a high fixed error.

Robotic Generalization

To test the practical utility of these learned representations, a robot was tasked with pointing to objects similar to a reference. Trained entirely through self-supervision, the robot achieved 72% accuracy across five classes and 89% accuracy in identifying functional attributes, such as whether an object is a container.

Discussion and Conclusion

OCN demonstrates that object correspondences and attribute disentanglement (such as color and shape) can emerge naturally from contrastive learning without human labels. While the current system assumes a relatively stable set of objects within a video sequence, it proves that temporal signals in monocular video are a powerful proxy for supervision.

Future work will focus on "closing the loop"—using learned representations to improve the underlying object detector—and optimizing the system for real-time performance on low-power robotic hardware.

Summary updated

BibTeX
@misc{pirk2019online,
  author = {Sören Pirk and Mohi Khansari and Yunfei Bai and Corey Lynch and Pierre Sermanet},
  title = {{Online Object Representations with Contrastive Learning}},
  year = {2019},
  eprint = {1906.04312},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1906.04312},
}
Figure