Abstract
Instance segmentation has traditionally been divided between high-accuracy mask-based methods and high-speed contour-based methods. While contour-based approaches offer computational efficiency, they often suffer from poor boundary quality due to rigid initialization and fixed vertex pairing during training. This paper presents E2EC, a novel end-to-end contour-based framework that achieves state-of-the-art accuracy while maintaining real-time performance. By introducing a learnable contour initialization architecture, Multi-Direction Alignment (MDA), and a Dynamic Matching Loss (DML), E2EC eliminates unreasonable deformation paths and produces significantly sharper object boundaries. Evaluated on KINS, SBD, Cityscapes, and COCO, E2EC demonstrates superior performance, reaching speeds of 36–50+ fps.
Introduction
Instance segmentation requires both detecting objects and delineating their exact pixel-level boundaries. Current methodologies generally fall into two categories: mask-based and contour-based. Mask-based methods, such as Mask R-CNN, classify pixels within bounding boxes; while accurate, they are computationally intensive and often produce low-resolution results. Conversely, contour-based methods treat boundaries as polygons and regress vertex coordinates. These are faster and simpler but have historically lagged in accuracy.
The authors identify three critical bottlenecks in existing contour-based models:
- Rigid Initialization: Most methods start with a manual shape (e.g., a circle or octagon). For elongated or complex objects, the deformation path from a generic shape to the ground truth becomes convoluted, leading to intersecting lines and training instability.
- Local Information Bottlenecks: Previous architectures often rely on circular convolutions that only consider neighboring vertices, making it difficult for the model to correct large-scale geometric errors.
- Fixed Vertex Pairing: Standard training compares the $i$-th predicted vertex to the $i$-th ground-truth vertex. This rigid indexing forces the model to learn suboptimal directions if the predicted vertex is slightly shifted, resulting in over-smoothed boundaries.
Methodology
E2EC addresses these limitations through three core architectural innovations designed to streamline the deformation process and enhance boundary precision.
Learnable Contour Initialization
Instead of utilizing a static geometric primitive, E2EC employs a Contour Initialization Module. This module regresses a rough initial shape based on the object's center. This is followed by a Global Contour Deformation module—an MLP that processes the features of all vertices simultaneously. By considering the global context of the shape rather than just local neighbors, the model produces a coarse contour that closely approximates the target object from the outset.
Multi-Direction Alignment (MDA)
To simplify the regression task, E2EC introduces Multi-Direction Alignment. This component fixes the directions of specific "anchor" vertices relative to the object's center. By preventing vertices from "drifting" along the boundary during the optimization process, MDA ensures that the deformation paths remain straight and non-intersecting, significantly reducing the complexity of the learning task.
Dynamic Matching Loss (DML)
The Dynamic Matching Loss is the primary driver for high-quality boundary recovery. Rather than using fixed index pairing, DML dynamically matches predicted vertices to the nearest points on the ground-truth boundary. Crucially, it pulls vertices toward "key vertices"—inflection points such as corners or sharp edges. This allows E2EC to capture fine details, such as chair legs or vehicle mirrors, which are typically lost in other contour-based methods.
Experimental Results
The effectiveness of E2EC was validated across four major benchmarks: KINS (KITTI INStance), SBD (Semantic Boundaries Dataset), Cityscapes, and COCO.
Accuracy and Boundary Quality
On the KINS dataset, which focuses on amodal instance segmentation in autonomous driving, E2EC achieved 34.0 $AP^{msk}$, outperforming the previous state-of-the-art contour method, Deep Snake, by 2.7 points. The impact on boundary precision is most evident in the SBD results, where E2EC improved the boundary-specific metric ($AP^{bdy}$) by 8.3 points over the baseline. Qualitative analysis confirms that E2EC successfully segments complex structures that previous methods often over-smooth into blobs.
Speed and Efficiency
E2EC is designed for real-time applications. Running on an NVIDIA A6000 at $512 \times 512$ resolution, the model achieves 36 fps. A high-speed variant, which removes iterative refinement stages, reaches 54.3 fps on the COCO dataset while maintaining competitive accuracy. This makes E2EC suitable for deployment in time-sensitive environments like autonomous robotics and live video analysis.
Discussion and Limitations
While E2EC represents a significant step forward, certain trade-offs remain. The highest accuracy levels require two iterative refinement stages, which slightly reduces inference speed. Additionally, as the method is currently integrated with the CenterNet detector framework, its performance is somewhat tied to the underlying backbone's ability to locate object centers. Finally, like many contour-based approaches, very small objects consisting of only a few pixels remain a challenge for vertex regression compared to dense mask-based methods.
Conclusion
E2EC provides a robust framework for high-quality, high-speed instance segmentation. by replacing hand-crafted initializations with learnable modules and introducing dynamic matching, it overcomes the traditional accuracy limitations of contour-based models. The authors propose E2EC as a strong, fundamental baseline for future research into vertex-based object representation.
Summary updated