{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/diffusionedge-diffusion-probabilistic-model","title":"DiffusionEdge: Diffusion Probabilistic Model for Crisp Edge Detection","arxiv_id":"2401.02032","date":"2024-01-04","proceeding":null,"authors":["Yunfan Ye","Kai Xu","Yuhang Huang","Renjiao Yi","Zhiping Cai"],"abstract":"Limited by the encoder-decoder architecture, learning-based edge detectors usually have difficulty predicting edge maps that satisfy both correctness and crispness. With the recent success of the diffusion probabilistic model (DPM), we found it is especially suitable for accurate and crisp edge detection since the denoising process is directly applied to the original image size. Therefore, we propose the first diffusion model for the task of general edge detection, which we call DiffusionEdge. To avoid expensive computational resources while retaining the final performance, we apply DPM in the latent space and enable the classic cross-entropy loss which is uncertainty-aware in pixel level to directly optimize the parameters in latent space in a distillation manner. We also adopt a decoupled architecture to speed up the denoising process and propose a corresponding adaptive Fourier filter to adjust the latent features of specific frequencies. With all the technical designs, DiffusionEdge can be stably trained with limited resources, predicting crisp and accurate edge maps with much fewer augmentation strategies. Extensive experiments on four edge detection benchmarks demonstrate the superiority of DiffusionEdge both in correctness and crispness. On the NYUDv2 dataset, compared to the second best, we increase the ODS, OIS (without post-processing) and AC by 30.2%, 28.1% and 65.1%, respectively. Code: https://github.com/GuHuangAI/DiffusionEdge.","url_abs":"https://arxiv.org/abs/2401.02032v2","url_pdf":"https://arxiv.org/pdf/2401.02032v2.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"diffusionedge-diffusion-probabilistic-model","repo_url":"https://github.com/guhuangai/diffusionedge","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"decoder","task_name":"Decoder"},{"task_slug":"denoising","task_name":"Denoising"},{"task_slug":"edge-detection","task_name":"Edge Detection"},{"task_slug":"model","task_name":"model"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"},{"method_slug":"speed","method_name":"SPEED"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2401.02032","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2401.02032"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/guhuangai/diffusionedge","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/GuHuangAI/DiffusionEdge","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran_honours":2,"ran_draft_wrong":2,"ran_violates":2,"ran":1,"unverified":2},"by_repo_kind":{"official":{"samples":9,"ran":7,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"7f1040f5e3991d5e","entry":"identity","repo":"GuHuangAI/DiffusionEdge","repo_kind":"official","path":"denoising_diffusion_pytorch/mask_cond_unet.py","file_url":"https://github.com/GuHuangAI/DiffusionEdge/blob/HEAD/denoising_diffusion_pytorch/mask_cond_unet.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":2,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"7f1040f5e3991d5e"}},{"code_sha256_prefix":"2a80220dabcb742a","entry":"conv1x1","repo":"GuHuangAI/DiffusionEdge","repo_kind":"official","path":"denoising_diffusion_pytorch/resnet.py","file_url":"https://github.com/GuHuangAI/DiffusionEdge/blob/HEAD/denoising_diffusion_pytorch/resnet.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"2a80220dabcb742a"}},{"code_sha256_prefix":"600ff2c45e0de056","entry":"conv3x3","repo":"GuHuangAI/DiffusionEdge","repo_kind":"official","path":"denoising_diffusion_pytorch/resnet.py","file_url":"https://github.com/GuHuangAI/DiffusionEdge/blob/HEAD/denoising_diffusion_pytorch/resnet.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"600ff2c45e0de056"}},{"code_sha256_prefix":"d1ef6b8cb9a28a53","entry":"default","repo":"GuHuangAI/DiffusionEdge","repo_kind":"official","path":"denoising_diffusion_pytorch/mask_cond_unet.py","file_url":"https://github.com/GuHuangAI/DiffusionEdge/blob/HEAD/denoising_diffusion_pytorch/mask_cond_unet.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"d1ef6b8cb9a28a53"}},{"code_sha256_prefix":"608e364a9d2376a3","entry":"exists","repo":"GuHuangAI/DiffusionEdge","repo_kind":"official","path":"denoising_diffusion_pytorch/mask_cond_unet.py","file_url":"https://github.com/GuHuangAI/DiffusionEdge/blob/HEAD/denoising_diffusion_pytorch/mask_cond_unet.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"608e364a9d2376a3"}},{"code_sha256_prefix":"cf4d628a84fcfd0c","entry":"get_ode_sampler","repo":"GuHuangAI/DiffusionEdge","repo_kind":"official","path":"sample_cond_ldm.py","file_url":"https://github.com/GuHuangAI/DiffusionEdge/blob/HEAD/sample_cond_ldm.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"cf4d628a84fcfd0c"}},{"code_sha256_prefix":"d0bdb81d2cb8c3e7","entry":"to_flattened_numpy","repo":"GuHuangAI/DiffusionEdge","repo_kind":"official","path":"sample_cond_ldm.py","file_url":"https://github.com/GuHuangAI/DiffusionEdge/blob/HEAD/sample_cond_ldm.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"d0bdb81d2cb8c3e7"}},{"code_sha256_prefix":"2ef4eaa5a3a76875","entry":"load_conf","repo":"GuHuangAI/DiffusionEdge","repo_kind":"official","path":"sample_cond_ldm.py","file_url":"https://github.com/GuHuangAI/DiffusionEdge/blob/HEAD/sample_cond_ldm.py","link_basis":"plan_row","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"2ef4eaa5a3a76875"}},{"code_sha256_prefix":"93eef68f71877d53","entry":"synset2idx","repo":"GuHuangAI/DiffusionEdge","repo_kind":"official","path":"denoising_diffusion_pytorch/imagenet.py","file_url":"https://github.com/GuHuangAI/DiffusionEdge/blob/HEAD/denoising_diffusion_pytorch/imagenet.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"93eef68f71877d53"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}