Transparent Liquid Segmentation for Robotic Pouring

Gautham Narayan Narasimhan, Kai Zhang, Ben Eisner, Xingyu Lin, David HeldDGMs Applications @ NeurIPS 2021

TL;DR

This paper introduces a novel method for segmenting transparent liquids in RGB images without manual annotations, by leveraging image translation to generate synthetic training data from colored liquids. This enables a robotic pouring system to accurately perceive liquid levels, demonstrating the practical utility of the approach.

What Problem Does This Paper Address?

Robotic pouring, a seemingly simple task, is surprisingly challenging when dealing with transparent liquids like water. The primary difficulty lies in accurately perceiving the liquid's state, such as its volume or height, from visual input. Transparent liquids offer minimal visual cues, primarily through light refraction, making traditional computer vision techniques struggle. Existing methods often require tedious manual annotations, heating the liquid to make it visible to thermal cameras, or relying on complex setups like multiple viewpoints or specialized sensors. This paper aims to overcome these limitations by developing a robust and annotation-free method for transparent liquid segmentation, crucial for enabling robots to perform tasks like pouring with precision.

Methods

The core innovation of this work lies in its self-supervised approach to generating training data for transparent liquid segmentation. The pipeline consists of two main stages:

  1. Image Translation for Synthetic Data Generation: The authors employ a generative model, specifically Contrastive Unpaired Translation (CUT) [24], to learn a mapping from colored liquids to transparent liquids. They collect two unpaired datasets: one of colored liquids and another of transparent liquids. The CUT model is trained to translate an image of a colored liquid into a synthetic image that looks like a transparent liquid, while preserving the container and background. This is achieved using a combination of adversarial GAN loss and a patch-wise contrastive loss, ensuring visual similarity and spatial correspondence.
  2. Transparent Liquid Segmentation: Once the image translation model is trained, it's used to generate synthetic transparent liquid images from the colored liquid dataset. Crucially, segmentation labels for the colored liquids are automatically obtained using background subtraction (which is straightforward for colored liquids). Because the image translation preserves the liquid's location, these automatically generated colored liquid masks are then used as pseudo-ground truth for the synthetically generated transparent liquid images. A standard segmentation model (U-Net architecture) is then trained on these synthetic pairs.

This approach bypasses the need for manual annotation of transparent liquid images, making dataset creation significantly more efficient.

Datasets

The paper utilizes two primary datasets:

  • Colored Liquid Dataset (Dcolor): Used for training the image translation model.
  • Transparent Liquid Dataset (Dtransparent): Also used for training the image translation model.

These datasets are unpaired, meaning there's no direct correspondence between individual images from the two sets.

For the robotic pouring system, a specific dataset was collected within the robot's workspace, consisting of pouring videos of green-colored water and clear water, resulting in approximately 2231 and 2237 RGB frames respectively. A test set of 133 images from 4 different videos was also collected.

The paper also introduces benchmarks for evaluating generalization:

  • Diverse Containers: A model trained on a single cup type is evaluated on 7 different transparent cups with varying shapes, sizes, and liquid quantities.
  • Diverse Backgrounds: A model is trained on a dataset with diverse backgrounds (generated using an LED display showing various scenes) and evaluated on unseen backgrounds.

Key Insights and Ideas

  • Unpaired Image Translation is Sufficient: The success of using unpaired image translation (CUT) to generate realistic synthetic transparent liquid images is a major insight. This avoids the need for costly paired data collection or manual alignment.
  • Location Preservation is Key: The image translation method's ability to preserve the spatial location of the liquid is critical. This allows the direct transfer of automatically generated segmentation masks from colored liquids to their synthetic transparent counterparts.
  • Background Subtraction for Colored Liquids is Reliable: The paper highlights that background subtraction, a simple and effective technique for colored objects, can reliably generate segmentation masks for colored liquids, which are then leveraged for the more challenging transparent liquid segmentation task.
  • Self-Supervision for Efficiency: The entire pipeline is self-supervised in terms of transparent liquid segmentation, drastically reducing the annotation burden and enabling scalable data collection.
  • Surprisingly Better Pouring Accuracy: The robotic pouring system achieved better accuracy with the proposed transparent liquid segmentation than with a high-fidelity segmentation of colored liquids. This was attributed to the colored liquid segmentation being more susceptible to noise from splashing and sloshing, leading to inaccurate bounding box estimations.

Key Results

  • Segmentation Performance: The proposed method achieves high IoU scores on transparent liquid segmentation, with an average of 0.72 on a test set. Ablation studies show that simple color jitter augmentation on colored liquids is insufficient for good transparent liquid segmentation.
  • Robotic Pouring Performance: The robotic pouring system, using the learned segmentation, achieved an average accuracy of 0.94% (0.13 cm error) for reaching target liquid levels. This was surprisingly better than the 3.38% average error (0.47 cm) achieved when pouring colored liquids with background subtraction.
  • Generalization: The model demonstrates reasonable generalization to unseen containers (average IoU of 0.65) and unseen backgrounds (average IoU of 0.76), indicating robustness beyond the training distribution.

Limitations and Future Work

  • Limitations:
    • The method's performance on highly turbulent or bubbly liquid regions can be imperfect, sometimes missing small interior patches.
  • While generalization is shown, the paper acknowledges that scaling to a wider variety of settings (diverse containers, backgrounds, lighting, camera angles) with a single model is a future goal.
  • The robotic pouring system is described as a "simple testbed," implying potential for more sophisticated control strategies.
  • Future Work:
    • Scaling the transparent liquid perception model to a wider variety of settings.
  • Developing a single model that can handle diverse containers, backgrounds, lighting conditions, and camera angles.
  • Exploring more flexible and robust perception for robotic pouring.

Summary updated

BibTeX
@inproceedings{narasimhan2021transparent,
  author = {Gautham Narayan Narasimhan and Kai Zhang and Ben Eisner and Xingyu Lin and David Held},
  title = {{Transparent Liquid Segmentation for Robotic Pouring}},
  booktitle = {DGMs Applications @ NeurIPS},
  year = {2021},
  url = {https://openreview.net/forum?id=xvvpL6X3c6},
}
Figure