Abstract
Edge detection has long been an important problem in the field of computer vision. Previous works have explored category-agnostic or category-aware edge detection. In this paper, we explore edge detection in the context of object instances. Although object boundaries could be easily derived from segmentation masks, in practice, instance segmentation models are trained to maximize IoU to the ground-truth mask, which means that segmentation boundaries are not enforced to precisely align with ground-truth edge boundaries. Thus, the task of instance edge detection itself is different and critical. Since precise edge detection requires high resolution feature maps, we design a novel transformer architecture that efficiently combines a FPN and a transformer decoder to enable cross attention on multi-scale high resolution feature maps within a reasonable computation budget. Further, we propose a light weight dense prediction head that is applicable to both instance edge and mask detection. Finally, we use a penalty reduced focal loss to effectively train the model with point supervision on instance edges, which can reduce annotation costs. We demonstrate highly competitive instance edge detection performance compared to state-of-the-art baselines, and also show that the proposed task and loss are complementary to instance segmentation and object detection.
Introduction
In computer vision, instance segmentation (e.g., Mask R-CNN) is the standard for identifying objects at the pixel level. However, these models typically prioritize Intersection over Union (IoU), a metric that favors the total area of an object. Because boundary pixels represent a tiny fraction of the total object area, standard segmentation models often produce "soft" or imprecise edges.
This research introduces instance edge detection: the task of identifying the specific boundary for each individual object. Unlike category-agnostic edge detection, which finds all edges in a scene, or semantic edge detection, which finds boundaries between classes, instance edge detection provides the high-precision localization necessary for autonomous driving and robotic manipulation.
Methodology
The proposed framework extends the Detection Transformer (DETR) family with several key innovations to handle the high-resolution requirements of edge detection:
- Multi-scale Transformer Decoder: To manage the $O(n^2)$ computational cost of self-attention, the model employs a coarse-to-fine strategy. The initial decoder layers process low-resolution features (1/32 scale), while the final layers attend to high-resolution features (1/16 and 1/8 scales) from a Feature Pyramid Network (FPN).
- Lightweight Prediction Head: Instead of a complex mask head, the model uses a linear projection of object queries to generate coefficients. These are multiplied with high-resolution FPN features to produce the final edge map efficiently.
- Point-Supervised Training: To mitigate the high cost of manual contour annotation, the model is trained using sparse keypoints. A penalty-reduced focal loss creates a "tunnel" of high-probability signal around ground-truth edges, allowing the model to learn effectively from incomplete labels.
Key Results and Analysis
Evaluation on MS COCO and LVIS benchmarks demonstrates that the proposed model significantly outperforms existing instance segmentation baselines in edge precision. On COCO, the model achieved an ~18% improvement in edge detection metrics (ODS/OIS) over BMask R-CNN.
Beyond raw accuracy, the research reveals that edge detection is a synergistic task. Incorporating an edge detection objective into standard detection pipelines improved Bounding Box AP by 0.3–0.5 points and Mask AP by 0.6 points. This suggests that better edge localization inherently leads to a more robust understanding of object geometry.
Conclusion
By moving beyond the mask and focusing on the instance boundary, this framework achieves state-of-the-art precision with reduced annotation overhead. While future work will address the slight divergence in optimal queries for bounding boxes versus masks, the current results prove that instance edge detection is a vital, complementary component of the modern computer vision stack.
Summary updated