NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Recurrent Generic Contour-based Instance Segmentation with Progressive Learning

Hao Feng, Keyi Zhou, Wengang Zhou, Yufei Yin, Jiajun Deng, Qi Sun, Houqiang Li

TL;DR

PolySnake is a novel, lightweight contour-based instance segmentation framework that iteratively deforms a single polygon estimate to tightly fit object boundaries. By introducing a recurrent, weight-shared ConvGRU operator and a novel geometric shape loss, it avoids the parameter explosion of previous iterative methods while achieving state-of-the-art performance across general instance segmentation, scene text detection, and lane detection.

What Problem Does This Paper Address?

Most state-of-the-art instance segmentation methods follow a "detect then segment" approach (e.g., Mask R-CNN), where bounding boxes are generated first, followed by dense pixel-wise mask predictions. However, these methods suffer from heavy computational overhead and are fundamentally bottlenecked by the accuracy of the initial bounding boxes.

Contour-based methods offer a lightweight alternative by predicting a sequence of vertices along an object's silhouette. Unfortunately, existing contour methods have major drawbacks: some are restricted to simple convex shapes, while others (like DeepSnake) rely on stacking multiple independent refinement blocks. Stacking blocks causes the model size to grow linearly with the number of iterations, increasing training difficulty and actually degrading performance if iterated too many times. PolySnake tackles this by creating an iterative framework that is both parameter-efficient and structurally robust.

Methods

PolySnake consists of three main modules:

  1. Initial Contour Generation (ICG): Inspired by CenterNet, this module predicts an object center heatmap and an offset map to construct a coarse initial polygon ($C_0$). Crucially, it includes a temporary category-agnostic boundary map during training to help the backbone extract fine-grained edge features without adding inference latency.
  2. Iterative Contour Deformation (ICD): Instead of stacking separate network layers for each refinement step, PolySnake introduces a recurrent update operator based on a Gated Recurrent Unit (GRU) with 1D convolutional layers (ConvGRU). For each iteration, vertex features are sampled via bilinear interpolation and aggregated using circle-convolution (which links the head and tail of the polygon sequence). The ConvGRU then predicts a residual displacement to deform the contour. Because weights are shared across all iterations, the model remains highly lightweight.
  3. Multi-Scale Contour Refinement (MCR): To recover high-frequency boundary details lost during downsampling, a final module fuses low-level feature maps via a Feature Pyramid Network (FPN) to fine-tune the contour at full resolution.
Overview of the PolySnake framework showing the ICG, ICD, and MCR modules.

Training Objectives

Alongside standard coordinate regression loss, the authors introduce a novel Contour Shape Loss. Instead of evaluating absolute vertex positions, it computes the smooth $L_1$ distance between the offsets of adjacent points in the predicted vs. ground-truth contours. This acts as a geometric regularizer, forcing the network to learn the actual shape profile of the object.

Illustration of standard coordinate regression loss vs. the proposed contour shape loss.

Datasets

The authors evaluated PolySnake across three distinct computer vision tasks using standard benchmarks:

  • General Instance Segmentation: SBD (Semantic Boundary Dataset), Cityscapes, COCO, and KINS (for amodal instance segmentation).
  • Scene Text Detection: CTW1500 (focused on challenging curved text).
  • Lane Detection: CULane (lines characterized by non-closed topologies).

Key Insights and Ideas

  • Recurrent Weight-Sharing Prevents Overfitting: By reusing the same ConvGRU weights across iterations, PolySnake can run for more steps (converging around 6–8 iterations) without a linear explosion in parameters. This makes it more stable and easier to train than DeepSnake.
  • Shape Loss vs. Position Loss: Standard coordinate regression can lead to jagged or floating vertices. Minimizing the difference between adjacent vertex vectors (Shape Loss) preserves geometric continuity, ensuring the contour tightly hugs the object.
  • Flexibility via Topology Swapping: The framework easily adapts to open-curve tasks like lane detection. By simply swapping out the circle-convolution (used for closed loops) with standard 1D convolution, PolySnake seamlessly transitions from segmenting closed objects to tracking open lines.

Key Results

PolySnake consistently outperformed existing contour-based architectures while maintaining competitive frame rates:

  • SBD: Achieved 60.0 $AP_{vol}$, outperforming the classic DeepSnake by 5.6 and the previous state-of-the-art E2EC by 0.8.
  • COCO & Cityscapes: Reached 34.9 AP (test-dev) on COCO and 34.6 AP on Cityscapes test, demonstrating strong generalizability on complex urban scenes.
  • CTW1500 (Text): Achieved an F1-score of 84.7, proving its capability in handling highly curved, arbitrary text shapes.
  • CULane (Lanes): Attained a top F1-score of 76.82 using a ResNet-34 backbone, notably outperforming anchor-based methods by up to 6.41% in difficult "dazzle light" conditions.
  • Efficiency: Runs at 24.6 FPS on a single NVIDIA RTX 2080Ti GPU when utilizing the full multi-scale refinement module, making it viable for real-time applications.

Limitations and Future Work

The authors noted that the Multi-Scale Contour Refinement (MCR) module provided only a marginal performance boost (0.2 AP) on the KINS amodal segmentation dataset. This is because KINS requires predicting occluded, invisible parts of objects; high-resolution, low-level feature maps only provide clues for visible boundaries, offering little help for hidden structures.

Future directions include integrating PolySnake with other dense instance segmentation frameworks and exploring its application to broader curve-estimation problems in computer vision.

Summary updated

BibTeX
@article{feng2024recurrent,
  author = {Hao Feng and Keyi Zhou and Wengang Zhou and Yufei Yin and Jiajun Deng and Qi Sun and Houqiang Li},
  title = {{Recurrent Generic Contour-based Instance Segmentation with Progressive Learning}},
  journal = {IEEE Trans. Circuits Syst. Video Technol.},
  year = {2024},
  doi = {10.1109/tcsvt.2024.3383829},
}
Figure