Generating crisp, i.e., one-pixel-wide, edge maps remains one of the fundamental challenges in edge detection, affecting both traditional and learning-based methods. To obtain crisp edges, most existing approaches rely on two hand-crafted post-processing algorithms, Non-Maximum Suppression (NMS) and skeleton-based thinning, which are non-differentiable and hinder end-to-end optimization. Moreover, all existing crisp edge detection methods still depend on such post-processing to achieve satisfactory results. To address this limitation, we propose \MethodLPP, a lightweight, only ∼21K additional parameters, and plug-and-play matching-based supervision module that can be appended to any edge detection model for joint end-to-end learning of crisp edges. At each training iteration, \MethodLPP performs one-to-one matching between predicted and ground-truth edges based on spatial distance and confidence, ensuring consistency between training and testing protocols. Extensive experiments on four popular datasets demonstrate that integrating \MethodLPP substantially improves the performance of existing edge detection models. In particular, \MethodLPP increases the Average Crispness (AC) metric by up to 2--4× compared to baseline models. Under the crispness-emphasized evaluation (CEval), \MethodLPP further boosts baseline performance by up to 20--35% in ODS and achieves similar gains in OIS and AP, achieving SOTA performance that matches or surpasses standard post-processing for the first time. Code is available at https://cvpr26-matched.github.io.
Figures & tables
Figure 1: (a) Existing edge detectors require the use of a hand-crafted post-processing stage (e.g., NMS and thinning). (b) With MatchED , we generate a one-pixel-wide edge map in an end-to-end trainable manner. The recent DiffusionEdge’s results [ 45 ] (c) improve when integrated with MatchED (d) .
Method
Integrable to
Post-process
any model?
Free?
LPCB [ 7 ]
✓
✗
CED [ 41 ]
✗
✗
CATS [ 12 ]
✓
✗
GLR [ 46 ]
✓
✗
DiffusionEdge [ 45 ]
✗
✗
Table 1: Comparative summary of crisp edge detection methods.
Figure 2: An overview of MatchED , which can be easily integrated into any edge detector pipeline. A lightweight CNN consists of five blocks, each containing Conv2D, ReLU, and normalization layers, followed by a final Conv2D layer with a sigmoid activation. Therefore, MatchED adds only approximately 21K parameters.
Method
BSDS
Multi-cue
BIPED
PiDiNet + D [ 7 ]
(ECCV18)
.306
.208
.340
PiDiNet + T [ 12 ]
(PAMI22)
.333
.217
.296
PiDiNet + R [ 46 ]
(TIP23)
.424
.424
.512
DiffEdge [ 45 ]
(AAAI24)
.476
.462
.849
PiDiNet + MatchED
.930
.810
.941
Table 2: Exp 1: Comparison of SOTA crisp edge detection methods and ours in terms of Average Crispness (AC) metric. Bold and underlined numbers indicate the best and second-best results, respectively. Results are taken from [ 45 ] . D: Dice Loss [ 7 ] , T: Tracing-Loss [ 12 ] , R: Refined Label [ 46 ] .
CEval
SEval
Method
ODS
OIS
AP
AC
ODS
OIS
AP
HED [ 42 ]
(ICCV15)
.588
.608
–
.215
.788
.808
–
RCF [ 21 ]
(CVPR17)
.585
.604
–
.189
.798
.815
–
LPCB [ 7 ]
(CVPR18)
.693
.700
–
–
.800
.816
–
BDCN [ 9 ]
(CVPR19)
.636
.650
.643
.233
.817
.833
.883
PiDiNet [ 38 ]
(ICCV21)
.578
.587
–
.202
.789
.803
–
Table 3: Exp 2: Comparison of SOTA results under Standard (SEval) and Crispness-emphasized (CEval) evaluations on the BSDS dataset. The best and second-best results are shown in bold and underlined, respectively. +Green highlights improvements compared to the base model.
CEval
SEval
Method
ODS
OIS
AP
AC
ODS
OIS
AP
HED [ 42 ]
(ICCV15)
.387
.404
–
–
.722
.737
–
RCF [ 21 ]
(CVPR17)
.398
.413
–
–
.745
.759
–
LPCB [ 7 ]
(CVPR18)
–
–
–
–
.739
.754
–
BDCN [ 9 ]
(CVPR19)
.426
.450
.362
.162
.748
.762
.778
PiDiNet [ 38 ]
(ICCV21)
.399
.424
–
.173
.733
.747
–
Table 4: Exp 2: Comparison of SOTA results under Standard (SEval) and Crispness-emphasized (CEval) evaluations on the NYUD-v2 dataset using RGB images. ODS: Optimal Dataset Score, OIS: Optimal Image Score, AP: Average Precision, AC: Average Crispness. The best and second-best results for supervised methods (upper part of the table) are shown in bold and underlined, respectively. The bottom section presents zero-shot results, where training is conducted on BSDS and evaluation is performed on NYUD. * denotes results from our training and † denotes results obtained using the official checkpoint. +Green highlights improvements compared to the base model.
Method
ODS
OIS
AP
RCF [ 21 ]
(CVPR17)
.849
.861
.906
BDCN [ 9 ]
(CVPR19)
.890
.899
.934
CATS [ 12 ]
(PAMI21)
.887
.892
.817
PiDiNet [ 38 ]
(ICCV21)
.892
.897
.951
DexiNed [ 36 ]
(Pat.Rec.22)
.895
.900
.927
DiffEdge* [ 45 ]
(AAAI24)
.885
.886
.905
Table 5: Exp 2: Comparison of base models and base models with MatchED on BIPED-v2 dataset. MatchED results are reported without post-processing, while base model results include post-processing. Best and second-best results are shown in bold and underlined, respectively. * denotes results of our training.
(a) Confidence threshold τc
(b) Distance threshold τd
(c) Confidence score weight α
(d) CPU Runtime on NYUD
τc
ODS
OIS
AP
τd
ODS
OIS
AP
α
ODS
OIS
AP
Method
Time (sec.)
0.01
.800
.811
.866
2
.797
.807
.856
5
.630
.639
.653
NMS
25.69
0.03
.799
.811
.858
4
.800
.811
.866
10
.783
.790
.827
NMS + Thin. ( × 1)
41.36
0.05
.799
.811
.845
6
.797
.809
.866
15
.794
.802
.845
NMS + Thin. ( × 100)
1875.57
0.10
.799
.808
.836
8
.797
.808
.866
20
.798
.811
.857
MatchED (Ours)
32.98
0.20
.788
.803
.820
—
—
—
—
25
.800
.811
.866
—
—
Table 6: Exp 3 and 4: Effect of (a) confidence threshold τc , (b) distance threshold τd , and (c) confidence score weight α on the BSDS dataset using PiDiNet. The baseline (PiDiNet) performance is ODS = .789 and OIS = .803. (d) CPU running time comparison of MatchED and standard post-processing on the NYUD dataset using PiDiNet [ 38 ] . The reported running time corresponds to the entire NYUD test set (654 images).
Figure 3: Exp 5: Visual results of the raw outputs of SOTA models, their results after applying NMS, and their MatchED integrated versions on NYUD-v2 dataset. Best viewed by zooming in. Baseline results are generated from the pipeline of MatchED .
Appendix figures & tables17 assets
Supplementary material from the paper’s appendix.
Appendix
Figure S1 : (a) A lightweight CNN consists of five blocks followed by a final Conv2D layer with a sigmoid activation. Therefore, it has only approximately 21K parameters. (b) Each block contains Conv2D, ReLU, and normalization layers, where the type of normalization (e.g., BatchNorm, LayerNorm) is chosen to match that used in the base edge detector.
Model
Dataset
τc(×10−2)
α
β
RankED [ 5 ]
NYUD
1
25
5
BSDS
1
25
5
Multi-Cue
1
25
5
BIPED
–
–
–
PiDiNet [ 38 ]
NYUD
1
20
1
BSDS
1
25
1
Appendix
Table S1 : Hyperparameter configurations used for integrating MatchED into each base model across NYUD-v2 [ 34 ] , BSDS [ 1 ] , Multi-Cue [ 25 ] , and BIPED [ 36 ] datasets. τc is the confidence threshold for selecting edge pixels in Eq. 4 of the main manuscript, α is the weight of the confidence score in Eq. 3 of the main manuscript, and β is the loss coefficient of MatchED .
Edge
Method
ODS
OIS
AP
Human
.750 ± .024
–
–
Multicue [ 25 ] (VR’16)
.830 ± .002
–
–
HED [ 42 ] (ICCV’15)
.851 ± .014
.864 ± .011
–
RCF [ 21 ] (CVPR’17)
.857 ± .004
.862 ± .004
–
BDCN [ 9 ] (CVPR’19)
.891 ± .001
.898 ± .002
.935 ± .002
Appendix
Table S2 : Comparison of SOTA results on Multi-Cue dataset. While MatchED results are reported under CEval, other results are reported under SEval. ODS: Optimal Dataset Score, OIS: Optimal Image Score, AP: Average Precision, AC: Average Crispness. Best and second-best results are shown in bold and underlined, respectively.
(a) Confidence threshold τc
(b) Distance threshold τd
(c) Confidence score weight α
Param.
ODS
OIS
AP
Param.
ODS
OIS
AP
Param.
ODS
OIS
AP
0.01
.800
.811
.866
2
.797
.807
.856
5
.630
.639
.653
0.03
.799
.811
.858
4
.800
.811
.866
10
.783
.790
.827
0.05
.799
.811
.845
6
.797
.809
.866
15
.794
.802
.845
0.10
.799
.808
.836
8
.797
.808
.866
20
.798
.811
.857
0.20
.788
.803
.820
—
—
—
—
25
.800
.811
.866
Appendix
Table S3 : Effect of (a) confidence threshold τc , (b) distance threshold τd , and (c) confidence score weight α on BSDS dataset using PiDiNet. The baseline (PiDiNet) performance is ODS = .789 and OIS = .803.
Image Size
τd
GPU Memory (GB)
80×80
0.01
1.72
0.05
1.65
0.10
1.57
320×320
0.01
28.43
0.05
27.30
0.10
25.86
Appendix
Table S4 : GPU memory overhead introduced by MatchED at different image sizes and confidence thresholds τd .
Figure S2 : Qualitative comparisons on NYUD dataset using DiffusionEdge [ 45 ] . We show results from DiffusionEdge [ 45 ] (official checkpoint), raw outputs from our MatchED pipeline, raw outputs after applying NMS, and their corresponding MATCHED integrated results, respectively. Best viewed zoomed-in.
Figure S3 : Qualitative comparisons on NYUD dataset using PiDiNet [ 38 ] . We show results from PiDiNet [ 38 ] (official checkpoint), raw outputs from our MatchED pipeline, raw outputs after applying NMS, and their corresponding MATCHED integrated results, respectively. Best viewed zoomed-in.
Figure S4 : Qualitative comparisons on NYUD dataset using RankED [ 5 ] . We show results from RankED [ 5 ] (official checkpoint), raw outputs from our MatchED pipeline, raw outputs after applying NMS, and their corresponding MATCHED integrated results, respectively. Best viewed zoomed-in.
Figure S5 : Qualitative comparisons on NYUD dataset using SAUGE [ 22 ] . We show results from SAUGE [ 22 ] (official checkpoint), raw outputs from our MatchED pipeline, raw outputs after applying NMS, and their corresponding MATCHED integrated results, respectively. Best viewed zoomed-in.
Figure S6 : Qualitative comparisons on BSDS dataset using DiffusionEdge [ 45 ] . We show results from DiffusionEdge [ 45 ] (official checkpoint), raw outputs from our MatchED pipeline, raw outputs after applying NMS, and their corresponding MATCHED integrated results, respectively. Best viewed zoomed-in.
Figure S7 : Qualitative comparisons on BSDS dataset using PiDiNet [ 38 ] . We show results from PiDiNet [ 38 ] (official checkpoint), raw outputs from our MatchED pipeline, raw outputs after applying NMS, and their corresponding MATCHED integrated results, respectively. Best viewed zoomed-in.
Figure S8 : Qualitative comparisons on BSDS dataset using RankED [ 5 ] . We show results from RankED [ 5 ] (official checkpoint), raw outputs from our MatchED pipeline, raw outputs after applying NMS, and their corresponding MATCHED integrated results, respectively. Best viewed zoomed-in.
Figure S9 : Qualitative comparisons on BSDS dataset using SAUGE [ 22 ] . We show results from SAUGE [ 22 ] (official checkpoint), raw outputs from our MatchED pipeline, raw outputs after applying NMS, and their corresponding MATCHED integrated results, respectively. Best viewed zoomed-in.
Figure S10 : Qualitative comparisons on BIPED dataset using DiffusionEdge [ 45 ] . We show results of raw outputs from our MatchED pipeline, raw outputs after applying NMS, and their corresponding MATCHED integrated version, respectively. Best viewed zoomed-in.
Figure S11 : Qualitative comparisons on BIPED dataset using PiDiNet [ 38 ] . We show results of raw outputs from our MatchED pipeline, raw outputs after applying NMS, and their corresponding MATCHED integrated version, respectively. Best viewed zoomed-in.
Figure S12 : Qualitative comparisons on Multi-Cue dataset using PiDiNet [ 38 ] . We show results of raw outputs from our MatchED pipeline, raw outputs after applying NMS, and their corresponding MATCHED integrated version, respectively. Best viewed zoomed-in. While the upper part shows the boundary detection results, the lower part shows the edge detection results.
Figure S13 : Qualitative comparisons on Multi-Cue dataset using RankED [ 5 ] . We show results of raw outputs from our MatchED pipeline, raw outputs after applying NMS, and their corresponding MATCHED integrated version, respectively. Best viewed zoomed-in. While the upper part shows the boundary detection results, the lower part shows the edge detection results.
Learning-based edge detection models trained with cross-entropy loss often suffer from thick edge predictions, which deviate from the crisp, single-pixel annotations typically provided by humans. While previous approaches to achieving crisp edges have focused on designing specialized loss functions or modifying network architectures, we show that a carefully designed training and inference strategy alone is sufficient to achieve human-like edge quality. In this work, we introduce the Masked Edge Prediction MOdel (MEMO), which produces both accurate and crisp edges using only cross-entropy loss. We first construct a large-scale synthetic edge dataset to pre-train MEMO, enhancing its generalization ability. Subsequent fine-tuning on downstream datasets requires only a lightweight module comprising 1.2% additional parameters. During training, MEMO learns to predict edges under varying ratios of input masking. A key insight guiding our inference is that thick edge predictions typically exhibit a confidence gradient: high in the center and lower toward the boundaries. Leveraging this, we propose a novel progressive prediction strategy that sequentially finalizes edge predictions in order of prediction confidence, resulting in thinner and more precise contours. Our method achieves visually appealing, post-processing-free, human-like edge maps and outperforms prior methods on crispness-aware evaluations.
Jiaxin Cheng, Yue Wu, Yicong Zhou
Department of Computer and Information Science, University of Macau, Macau, China · Capital One, USA
We propose EasyControlEdge, adapting an image-generation foundation model to edge detection. In real-world edge detection (e.g., floor-plan walls, satellite roads/buildings, and medical organ boundaries), crispness and data efficiency are crucial, yet producing crisp raw edge maps with limited training samples remains challenging. Although image-generation foundation models perform well on many downstream tasks, their pretrained priors for data-efficient transfer and iterative refinement for high-frequency detail preservation remain underexploited for edge detection. To enable crisp and data-efficient edge detection using these capabilities, we introduce an edge-specialized adaptation of image-generation foundation models. To better specialize the foundation model for edge detection, we incorporate an edge-oriented objective with an efficient pixel-space loss. At inference, we introduce guidance based on unconditional dynamics, enabling a single model to control the edge density through a guidance scale. Experiments on BSDS500, NYUDv2, BIPED, and CubiCasa compare against state-of-the-art methods and show consistent gains, particularly under no-post-processing crispness evaluation and with limited training data.
Edge detection is a fundamental image analysis task that underpins numerous high-level vision applications. Recent advances in Transformer architectures have significantly improved edge quality by capturing long-range dependencies, but this often comes with computational overhead. Achieving higher pixel-level accuracy requires increased input resolution, further escalating computational cost and limiting practical deployment. Building on the strong representational capacity of recent Transformer-based edge detectors, we propose an Adaptive Multi-stage non-edge Pruning framework for Edge Detection(Amped). Amped identifies high-confidence non-edge tokens and removes them as early as possible to substantially reduce computation, thus retaining high accuracy while cutting GFLOPs and accelerating inference with minimal performance loss. Moreover, to mitigate the structural complexity of existing edge detection networks and facilitate their integration into real-world systems, we introduce a simple yet high-performance Transformer-based model, termed Streamline Edge Detector(SED). Applied to both existing detectors and our SED, the proposed pruning strategy provides a favorable balance between accuracy and efficiency-reducing GFLOPs by up to 40% with only a 0.4% drop in ODS F-measure. In addition, despite its simplicity, SED achieves a state-of-the-art ODS F-measure of 86.5%. The code will be released.
Yuhan Gao, Xinqing Li, Xin He +4
VCIP, College of Computer Science, Nankai University · Academy for Advanced Interdisciplinary Studies, Nankai University · School of Computer Science and Engineering, Tianjin University of Technology +3