{"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/repurposing-diffusion-based-image-generators","title":"Repurposing Diffusion-Based Image Generators for Monocular Depth Estimation","arxiv_id":"2312.02145","date":"2023-12-04","proceeding":"CVPR 2024 1","authors":["Bingxin Ke","Anton Obukhov","Shengyu Huang","Nando Metzger","Rodrigo Caye Daudt","Konrad Schindler"],"abstract":"Monocular depth estimation is a fundamental computer vision task. Recovering 3D depth from a single image is geometrically ill-posed and requires scene understanding, so it is not surprising that the rise of deep learning has led to a breakthrough. The impressive progress of monocular depth estimators has mirrored the growth in model capacity, from relatively modest CNNs to large Transformer architectures. Still, monocular depth estimators tend to struggle when presented with images with unfamiliar content and layout, since their knowledge of the visual world is restricted by the data seen during training, and challenged by zero-shot generalization to new domains. This motivates us to explore whether the extensive priors captured in recent generative diffusion models can enable better, more generalizable depth estimation. We introduce Marigold, a method for affine-invariant monocular depth estimation that is derived from Stable Diffusion and retains its rich prior knowledge. The estimator can be fine-tuned in a couple of days on a single GPU using only synthetic training data. It delivers state-of-the-art performance across a wide range of datasets, including over 20% performance gains in specific cases. Project page: https://marigoldmonodepth.github.io.","url_abs":"https://arxiv.org/abs/2312.02145v2","url_pdf":"https://arxiv.org/pdf/2312.02145v2.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":"repurposing-diffusion-based-image-generators","repo_url":"https://github.com/prs-eth/marigold","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"repurposing-diffusion-based-image-generators","repo_url":"https://github.com/Magicboomliu/Accelerator-Simple-Template","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"repurposing-diffusion-based-image-generators","repo_url":"https://github.com/damaggu/tadp","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"repurposing-diffusion-based-image-generators","repo_url":"https://github.com/indu1ge/DepthMaster","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"depth-estimation","task_name":"Depth Estimation"},{"task_slug":null,"task_name":"GPU"},{"task_slug":"monocular-depth-estimation","task_name":"Monocular Depth Estimation"},{"task_slug":"scene-understanding","task_name":"Scene Understanding"},{"task_slug":"zero-shot-generalization","task_name":"Zero-shot Generalization"}],"methods":[{"method_slug":"absolute-position-encodings","method_name":"Absolute Position Encodings"},{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"diffusion","method_name":"Diffusion"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"label-smoothing","method_name":"Label Smoothing"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"position-wise-feed-forward-layer","method_name":"Position-Wise Feed-Forward Layer"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"transformer","method_name":"Transformer"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/monocular-depth-estimation-on-eth3d","task":"Monocular Depth Estimation","dataset":"ETH3D","model":"Marigold","rank_in_archive_order":6,"of":10,"metrics":{"Delta < 1.25":"0.0960","absolute relative error":"0.065"},"uses_additional_data":false},{"leaderboard":"/sota/monocular-depth-estimation-on-kitti-eigen","task":"Monocular Depth Estimation","dataset":"KITTI Eigen split","model":"Marigold","rank_in_archive_order":58,"of":79,"metrics":{"Delta < 1.25":"0.916","Delta < 1.25^2":"0.987","Delta < 1.25^3":"0.996","RMSE":"3.304","RMSE log":"0.138","absolute relative error":"0.099"},"uses_additional_data":true},{"leaderboard":"/sota/monocular-depth-estimation-on-nyu-depth-v2","task":"Monocular Depth Estimation","dataset":"NYU-Depth V2","model":"Marigold","rank_in_archive_order":10,"of":85,"metrics":{"Delta < 1.25":"0.964","Delta < 1.25^2":"0.991","Delta < 1.25^3":"0.998","RMSE":"0.224","absolute relative error":"0.055","log 10":"0.024"},"uses_additional_data":true}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2312.02145","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2312.02145"}},"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/Magicboomliu/Accelerator-Simple-Template","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/indu1ge/DepthMaster","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/prs-eth/marigold","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/damaggu/tadp","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran_draft_wrong":3,"ran":8,"ran_violates":3,"unverified":12},"by_repo_kind":{"official":{"samples":11,"ran":9,"repositories":1},"listed":{"samples":15,"ran":5,"repositories":2}},"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":"8241c0562bc710fd","entry":"chunk","repo":"damaggu/tadp","repo_kind":"listed","path":"TADP/tadp_seg.py","file_url":"https://github.com/damaggu/tadp/blob/HEAD/TADP/tadp_seg.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"8241c0562bc710fd"}},{"code_sha256_prefix":"1a9761d7649b539b","entry":"chw2hwc","repo":"prs-eth/marigold","repo_kind":"official","path":"marigold/util/image_util.py","file_url":"https://github.com/prs-eth/marigold/blob/HEAD/marigold/util/image_util.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"1a9761d7649b539b"}},{"code_sha256_prefix":"1e519d3cea1f46e3","entry":"colorize_depth_maps","repo":"prs-eth/marigold","repo_kind":"official","path":"marigold/util/image_util.py","file_url":"https://github.com/prs-eth/marigold/blob/HEAD/marigold/util/image_util.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":"1e519d3cea1f46e3"}},{"code_sha256_prefix":"424012cb37b31172","entry":"default","repo":"damaggu/tadp","repo_kind":"listed","path":"TADP/vpd/models.py","file_url":"https://github.com/damaggu/tadp/blob/HEAD/TADP/vpd/models.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"424012cb37b31172"}},{"code_sha256_prefix":"55702399683243f2","entry":"ensemble_depth","repo":"prs-eth/marigold","repo_kind":"official","path":"marigold/util/ensemble.py","file_url":"https://github.com/prs-eth/marigold/blob/HEAD/marigold/util/ensemble.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":"55702399683243f2"}},{"code_sha256_prefix":"8dd1994ceb1eb671","entry":"ensemble_iid","repo":"prs-eth/marigold","repo_kind":"official","path":"marigold/util/ensemble.py","file_url":"https://github.com/prs-eth/marigold/blob/HEAD/marigold/util/ensemble.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":"8dd1994ceb1eb671"}},{"code_sha256_prefix":"6f901ea1ce90a56a","entry":"ensemble_normals","repo":"prs-eth/marigold","repo_kind":"official","path":"marigold/util/ensemble.py","file_url":"https://github.com/prs-eth/marigold/blob/HEAD/marigold/util/ensemble.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":"6f901ea1ce90a56a"}},{"code_sha256_prefix":"aa5486a3650902d8","entry":"exists","repo":"damaggu/tadp","repo_kind":"listed","path":"TADP/vpd/models.py","file_url":"https://github.com/damaggu/tadp/blob/HEAD/TADP/vpd/models.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":"aa5486a3650902d8"}},{"code_sha256_prefix":"a15cfd7932844ef9","entry":"extract_into_tensor","repo":"prs-eth/marigold","repo_kind":"official","path":"src/trainer/marigold_depth_LCM_trainer.py","file_url":"https://github.com/prs-eth/marigold/blob/HEAD/src/trainer/marigold_depth_LCM_trainer.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"a15cfd7932844ef9"}},{"code_sha256_prefix":"1950491589be0476","entry":"get_predicted_original_sample","repo":"prs-eth/marigold","repo_kind":"official","path":"src/trainer/marigold_depth_LCM_trainer.py","file_url":"https://github.com/prs-eth/marigold/blob/HEAD/src/trainer/marigold_depth_LCM_trainer.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":"1950491589be0476"}},{"code_sha256_prefix":"78088e741a0c4b80","entry":"read_text_lines","repo":"Magicboomliu/Accelerator-Simple-Template","repo_kind":"listed","path":"dataloader/utils.py","file_url":"https://github.com/Magicboomliu/Accelerator-Simple-Template/blob/HEAD/dataloader/utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"78088e741a0c4b80"}},{"code_sha256_prefix":"715b48a5e7426c5e","entry":"resize_max_res","repo":"prs-eth/marigold","repo_kind":"official","path":"marigold/util/image_util.py","file_url":"https://github.com/prs-eth/marigold/blob/HEAD/marigold/util/image_util.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":"715b48a5e7426c5e"}},{"code_sha256_prefix":"74a9b4e5e34c0860","entry":"scalings_for_boundary_conditions","repo":"prs-eth/marigold","repo_kind":"official","path":"src/trainer/marigold_depth_LCM_trainer.py","file_url":"https://github.com/prs-eth/marigold/blob/HEAD/src/trainer/marigold_depth_LCM_trainer.py","link_basis":"plan_row","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"74a9b4e5e34c0860"}},{"code_sha256_prefix":"9a299fe5ae09e407","entry":"uniq","repo":"damaggu/tadp","repo_kind":"listed","path":"TADP/vpd/models.py","file_url":"https://github.com/damaggu/tadp/blob/HEAD/TADP/vpd/models.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"9a299fe5ae09e407"}},{"code_sha256_prefix":"babc9c3037a5b587","entry":"Disparity_Normalization","repo":"Magicboomliu/Accelerator-Simple-Template","repo_kind":"listed","path":"playground/check_depth_est.py","file_url":"https://github.com/Magicboomliu/Accelerator-Simple-Template/blob/HEAD/playground/check_depth_est.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"babc9c3037a5b587"}},{"code_sha256_prefix":"7d50f6c8900b3933","entry":"depth2disp","repo":"Magicboomliu/Accelerator-Simple-Template","repo_kind":"listed","path":"dataloader/file_io.py","file_url":"https://github.com/Magicboomliu/Accelerator-Simple-Template/blob/HEAD/dataloader/file_io.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7d50f6c8900b3933"}},{"code_sha256_prefix":"12e95408bfe2ed81","entry":"depth2disp_cv","repo":"Magicboomliu/Accelerator-Simple-Template","repo_kind":"listed","path":"dataloader/file_io.py","file_url":"https://github.com/Magicboomliu/Accelerator-Simple-Template/blob/HEAD/dataloader/file_io.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"12e95408bfe2ed81"}},{"code_sha256_prefix":"55c27917099f7dc3","entry":"find_batch_size","repo":"prs-eth/marigold","repo_kind":"official","path":"marigold/util/batchsize.py","file_url":"https://github.com/prs-eth/marigold/blob/HEAD/marigold/util/batchsize.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":"55c27917099f7dc3"}},{"code_sha256_prefix":"28a8af1b1cd8cb05","entry":"find_batch_size","repo":"Magicboomliu/Accelerator-Simple-Template","repo_kind":"listed","path":"utils/batch_size.py","file_url":"https://github.com/Magicboomliu/Accelerator-Simple-Template/blob/HEAD/utils/batch_size.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"28a8af1b1cd8cb05"}},{"code_sha256_prefix":"bd107ff2d1229ab5","entry":"find_occ_mask","repo":"Magicboomliu/Accelerator-Simple-Template","repo_kind":"listed","path":"dataloader/utils.py","file_url":"https://github.com/Magicboomliu/Accelerator-Simple-Template/blob/HEAD/dataloader/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"bd107ff2d1229ab5"}},{"code_sha256_prefix":"19b4e7dbd2c70b35","entry":"get_pred_name","repo":"prs-eth/marigold","repo_kind":"official","path":"src/dataset/base_depth_dataset.py","file_url":"https://github.com/prs-eth/marigold/blob/HEAD/src/dataset/base_depth_dataset.py","link_basis":"harvester_set","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":"19b4e7dbd2c70b35"}},{"code_sha256_prefix":"76f433ffb0eb1150","entry":"int_list","repo":"Magicboomliu/Accelerator-Simple-Template","repo_kind":"listed","path":"dataloader/utils.py","file_url":"https://github.com/Magicboomliu/Accelerator-Simple-Template/blob/HEAD/dataloader/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"76f433ffb0eb1150"}},{"code_sha256_prefix":"50a3e2b7e8148db0","entry":"kitti_colormap","repo":"Magicboomliu/Accelerator-Simple-Template","repo_kind":"listed","path":"utils/colormap.py","file_url":"https://github.com/Magicboomliu/Accelerator-Simple-Template/blob/HEAD/utils/colormap.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"50a3e2b7e8148db0"}},{"code_sha256_prefix":"bf3d969e975a0237","entry":"read_16bit_gt","repo":"Magicboomliu/Accelerator-Simple-Template","repo_kind":"listed","path":"utils/colormap.py","file_url":"https://github.com/Magicboomliu/Accelerator-Simple-Template/blob/HEAD/utils/colormap.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"bf3d969e975a0237"}},{"code_sha256_prefix":"a5edaeb9db495d4c","entry":"read_img","repo":"Magicboomliu/Accelerator-Simple-Template","repo_kind":"listed","path":"dataloader/file_io.py","file_url":"https://github.com/Magicboomliu/Accelerator-Simple-Template/blob/HEAD/dataloader/file_io.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a5edaeb9db495d4c"}},{"code_sha256_prefix":"ff6b98fbbe52720a","entry":"resize_max_res_tensor","repo":"Magicboomliu/Accelerator-Simple-Template","repo_kind":"listed","path":"playground/check_depth_est.py","file_url":"https://github.com/Magicboomliu/Accelerator-Simple-Template/blob/HEAD/playground/check_depth_est.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ff6b98fbbe52720a"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}