MEMO: Human-like Crisp Edge Detection Using Masked Edge Prediction
Organizations: Department of Computer and Information Science, University of Macau, Macau, China · Capital One, USA
Abstract
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.
Figures & tables
| Methods | SEval | CEval | AC | ||
| ODS | OIS | ODS | OIS | ||
| Canny [ 2 ] | 0.610 | 0.650 | - | - | - |
| SE [ 4 ] | 0.743 | 0.764 | - | - | - |
| OEF [ 7 ] | 0.746 | 0.770 | - | - | - |
| DeepCntr [ 24 ] | 0.757 | 0.776 | - | - | - |
| DeepBdry [ 16 ] | 0.789 | 0.811 | - | - | - |
| Methods | SEval | CEval | AC | ||
| ODS | OIS | ODS | OIS | ||
| HED [ 30 ] | 0.829 | 0.847 | - | - | - |
| RCF [ 17 ] | 0.843 | 0.859 | 0.640 | 0.647 | 0.212 |
| BDCN [ 8 ] | 0.839 | 0.854 | 0.629 | 0.637 | 0.238 |
| DexiNed [ 25 ] | 0.859 | 0.867 | 0.764 | 0.776 | 0.295 |
| DiffEdge [ 31 ] | 0.899 | 0.901 | 0.856 | 0.863 | 0.849 |
| Methods | SEval | CEval | AC | ||
| ODS | OIS | ODS | OIS | ||
| HED [ 30 ] | 0.851 | 0.864 | - | - | - |
| RCF [ 17 ] | 0.851 | 0.862 | 0.674 | 0.691 | 0.203 |
| BDCN [ 8 ] | 0.891 | 0.898 | 0.676 | 0.679 | 0.249 |
| DexiNed [ 25 ] | 0.872 | 0.881 | 0.764 | 0.776 | 0.274 |
| EDTER [ 22 ] | 0.894 | 0.900 | 0.735 | 0.747 | 0.196 |
| Methods | AC | FID | LPIPS |
| MuGE [ 34 ] | 0.296 | 115.89 | 0.456 |
| DiffEdge [ 31 ] | 0.476 | 89.96 | 0.300 |
| SAUGE [ 18 ] | 0.197 | 243.01 | 0.651 |
| CATS [ 14 ] | 0.333 | 135.89 | 0.421 |
| Refined Lbl [ 32 ] | 0.424 | 135.29 | 0.370 |
| MEMO (C*) | 0.663 | 83.95 | 0.282 |
| Inf. Steps | 5 | 10 | 20 | 40 | Full | |
| SEval | ODS | 0.855 | 0.854 | 0.847 | 0.846 | 0.846 |
| OIS | 0.861 | 0.861 | 0.854 | 0.852 | 0.852 | |
| CEval | ODS | 0.835 | 0.836 | 0.838 | 0.841 | 0.842 |
| OIS | 0.840 | 0.841 | 0.842 | 0.843 | 0.843 | |
| AC | 0.594 | 0.663 | 0.737 | 0.828 | 0.840 | |
| Inf. Time | (sec.) | 0.62 | 1.33 | 2.77 | 5.63 | 10.46 1.03 |
| Inference Strategy | Random | TopK | LocMax | |
| SEval. | ODS | 0.819 | 0.825 | 0.854 |
| OIS | 0.829 | 0.843 | 0.861 | |
| CEval. | ODS | 0.794 | 0.715 | 0.836 |
| OIS | 0.804 | 0.720 | 0.841 | |
| AC | 0.671 | 0.510 | 0.663 | |
| Training Set | Synth. | Real | Both | |
| SEval. | ODS | 0.729 | 0.804 | 0.854 |
| OIS | 0.748 | 0.810 | 0.861 | |
| CEval. | ODS | 0.725 | 0.799 | 0.836 |
| OIS | 0.726 | 0.803 | 0.841 | |
| AC | 0.765 | 0.619 | 0.663 | |
Appendix figures & tables7 assets
Supplementary material from the paper’s appendix.