{"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/depth-anything-v2","title":"Depth Anything V2","arxiv_id":"2406.09414","date":"2024-06-13","proceeding":null,"authors":["Lihe Yang","Bingyi Kang","Zilong Huang","Zhen Zhao","Xiaogang Xu","Jiashi Feng","Hengshuang Zhao"],"abstract":"This work presents Depth Anything V2. Without pursuing fancy techniques, we aim to reveal crucial findings to pave the way towards building a powerful monocular depth estimation model. Notably, compared with V1, this version produces much finer and more robust depth predictions through three key practices: 1) replacing all labeled real images with synthetic images, 2) scaling up the capacity of our teacher model, and 3) teaching student models via the bridge of large-scale pseudo-labeled real images. Compared with the latest models built on Stable Diffusion, our models are significantly more efficient (more than 10x faster) and more accurate. We offer models of different scales (ranging from 25M to 1.3B params) to support extensive scenarios. Benefiting from their strong generalization capability, we fine-tune them with metric depth labels to obtain our metric depth models. In addition to our models, considering the limited diversity and frequent noise in current test sets, we construct a versatile evaluation benchmark with precise annotations and diverse scenes to facilitate future research.","url_abs":"https://arxiv.org/abs/2406.09414v2","url_pdf":"https://arxiv.org/pdf/2406.09414v2.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":"depth-anything-v2","repo_url":"https://github.com/DepthAnything/Depth-Anything-V2","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"depth-anything-v2","repo_url":"https://github.com/fabio-sim/Depth-Anything-ONNX","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"depth-estimation","task_name":"Depth Estimation"},{"task_slug":"diversity","task_name":"Diversity"},{"task_slug":"monocular-depth-estimation","task_name":"Monocular Depth Estimation"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2406.09414","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2406.09414"}},"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/DepthAnything/Depth-Anything-V2","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/fabio-sim/Depth-Anything-ONNX","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran_fixture":1,"ran_honours":1,"ran_draft_wrong":1,"unverified":6},"by_repo_kind":{"official":{"samples":6,"ran":3,"repositories":1},"listed":{"samples":3,"ran":0,"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":"c157f5b112b3a392","entry":"drop_path","repo":"DepthAnything/Depth-Anything-V2","repo_kind":"official","path":"depth_anything_v2/dinov2_layers/drop_path.py","file_url":"https://github.com/DepthAnything/Depth-Anything-V2/blob/HEAD/depth_anything_v2/dinov2_layers/drop_path.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c157f5b112b3a392"}},{"code_sha256_prefix":"3c04490a215299f2","entry":"make_2tuple","repo":"DepthAnything/Depth-Anything-V2","repo_kind":"official","path":"depth_anything_v2/dinov2_layers/patch_embed.py","file_url":"https://github.com/DepthAnything/Depth-Anything-V2/blob/HEAD/depth_anything_v2/dinov2_layers/patch_embed.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"3c04490a215299f2"}},{"code_sha256_prefix":"e7fcb6d9ac9deaf4","entry":"named_apply","repo":"DepthAnything/Depth-Anything-V2","repo_kind":"official","path":"depth_anything_v2/dinov2.py","file_url":"https://github.com/DepthAnything/Depth-Anything-V2/blob/HEAD/depth_anything_v2/dinov2.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":"e7fcb6d9ac9deaf4"}},{"code_sha256_prefix":"5d16d4d4fc573ac7","entry":"add_residual","repo":"DepthAnything/Depth-Anything-V2","repo_kind":"official","path":"depth_anything_v2/dinov2_layers/block.py","file_url":"https://github.com/DepthAnything/Depth-Anything-V2/blob/HEAD/depth_anything_v2/dinov2_layers/block.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":"5d16d4d4fc573ac7"}},{"code_sha256_prefix":"85f7ffc01945bb72","entry":"drop_add_residual_stochastic_depth","repo":"DepthAnything/Depth-Anything-V2","repo_kind":"official","path":"depth_anything_v2/dinov2_layers/block.py","file_url":"https://github.com/DepthAnything/Depth-Anything-V2/blob/HEAD/depth_anything_v2/dinov2_layers/block.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":"85f7ffc01945bb72"}},{"code_sha256_prefix":"384c2ee5d2dc2afb","entry":"drop_add_residual_stochastic_depth","repo":"fabio-sim/Depth-Anything-ONNX","repo_kind":"listed","path":"depth_anything_v2/dinov2_layers/block.py","file_url":"https://github.com/fabio-sim/Depth-Anything-ONNX/blob/HEAD/depth_anything_v2/dinov2_layers/block.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":"384c2ee5d2dc2afb"}},{"code_sha256_prefix":"7fd11117910b59f9","entry":"drop_path","repo":"fabio-sim/Depth-Anything-ONNX","repo_kind":"listed","path":"depth_anything_v2/dinov2_layers/drop_path.py","file_url":"https://github.com/fabio-sim/Depth-Anything-ONNX/blob/HEAD/depth_anything_v2/dinov2_layers/drop_path.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":"7fd11117910b59f9"}},{"code_sha256_prefix":"5be3610fa1fee19e","entry":"get_branges_scales","repo":"DepthAnything/Depth-Anything-V2","repo_kind":"official","path":"depth_anything_v2/dinov2_layers/block.py","file_url":"https://github.com/DepthAnything/Depth-Anything-V2/blob/HEAD/depth_anything_v2/dinov2_layers/block.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":"5be3610fa1fee19e"}},{"code_sha256_prefix":"e1b62c034a7d44aa","entry":"named_apply","repo":"fabio-sim/Depth-Anything-ONNX","repo_kind":"listed","path":"depth_anything_v2/dinov2.py","file_url":"https://github.com/fabio-sim/Depth-Anything-ONNX/blob/HEAD/depth_anything_v2/dinov2.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":"e1b62c034a7d44aa"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}