Annotating Object Instances with a Polygon-RNN

Lluís Castrejón, Kaustav Kundu, Raquel Urtasun, Sanja Fidler

Abstract

We propose an approach for semi-automatic annotation of object instances. While most current methods treat object segmentation as a pixel-labeling problem, we here cast it as a polygon prediction task, mimicking how most current datasets have been annotated. In particular, our approach takes as input an image crop and sequentially produces vertices of the polygon outlining the object. This allows a human annotator to interfere at any time and correct a vertex if needed, producing as accurate segmentation as desired by the annotator. We show that our approach speeds up the annotation process by a factor of 4.7 across all classes in Cityscapes, while achieving 78.4% agreement in IoU with original ground-truth, matching the typical agreement between human annotators. For cars, our speed-up factor is 7.3 for an agreement of 82.2%. We further show generalization capabilities of our approach to unseen datasets.

Introduction

Deep learning models for semantic segmentation are notoriously "data hungry," requiring massive amounts of pixel-perfect training data. However, creating this data is a major bottleneck: manually outlining objects with polygons typically requires 30 to 40 clicks per object, making it both slow and expensive. Existing "weakly-supervised" methods using bounding boxes or scribbles are faster but often produce "noisy" labels that lack the precision required for gold-standard benchmarks.

The Polygon-RNN interactive annotation tool allows users to correct predicted vertices in real-time.

The authors propose a "middle ground": Polygon-RNN, a semi-automatic tool that treats segmentation as a sequential polygon-prediction task. By keeping a human "in the loop" to guide a Recurrent Neural Network (RNN), the tool achieves human-level accuracy with significantly fewer clicks, speeding up the process by a factor of 4.7x on average.

Methods

The core innovation of Polygon-RNN is casting object segmentation as a sequence-to-sequence problem. The model architecture consists of three main components:

  1. Feature Extraction: A modified VGG-16 network extracts visual features from an image crop defined by a user-provided bounding box. To preserve detail, "skip-connections" fuse low-level information (like edges and corners) with high-level semantic information.
  2. The RNN Decoder: Instead of a standard RNN, the model utilizes a Two-Layer Convolutional LSTM (ConvLSTM). This allows the network to process data in 2D, preserving the spatial relationship between the image features and the polygon vertices.
  3. Vertex Prediction: At each time step $t$, the model predicts the next vertex $(x, y)$ coordinate on a $28 \times 28$ grid. The prediction is conditioned on the image features, the previous two vertices, and the first vertex (to signal the closure of the polygon).
The Polygon-RNN architecture combines a VGG-16 feature extractor with a two-layer ConvLSTM for vertex prediction.

A key feature is the Human-in-the-Loop capability. If the model predicts a vertex incorrectly, a human can drag and drop it to the correct location. The model then accepts this corrected vertex and uses it to predict the subsequent points, effectively correcting the RNN's trajectory.

Results and Discussion

The model was primarily benchmarked on the Cityscapes dataset and tested for generalization on KITTI.

  • Efficiency and Speed: The tool reduces the number of required clicks by a factor of 4.74x across all classes in Cityscapes. For cars, the speedup reaches 7.3x.
  • Accuracy: In fully automatic mode, Polygon-RNN outperformed state-of-the-art pixel-labeling models like DeepMask and SharpMask in 6 out of 8 categories. With minimal human intervention, it achieved a 78.4% IoU, matching the typical variation between two different human annotators.
  • Generalization: The model performed excellently on the KITTI dataset without any fine-tuning, demonstrating its robustness as a general-purpose annotation tool.

The use of polygons over pixels mimics human annotation behavior, resulting in structured, coherent shapes. Furthermore, the authors found that a single human correction significantly improves all subsequent automated predictions for that object.

Limitations and Future Work

While effective, the model has some limitations. The $28 \times 28$ output grid introduces quantization errors for very large objects, suggesting a need for higher resolution outputs in future iterations. Additionally, the current model assumes objects are single, closed polygons and does not natively handle complex topologies like objects with holes or those split by occluders. Future work will focus on handling these complex shapes and reducing "drift" in the RNN over very long sequences.

Summary updated

BibTeX
@inproceedings{castrejon2017annotating,
  author = {Lluís Castrejón and Kaustav Kundu and Raquel Urtasun and Sanja Fidler},
  title = {{Annotating Object Instances with a Polygon-RNN}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2017},
  url = {https://openreview.net/forum?id=r1WRCp-_bS},
}
Figure