{"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/video-depth-anything-consistent-depth","title":"Video Depth Anything: Consistent Depth Estimation for Super-Long Videos","arxiv_id":"2501.12375","date":"2025-01-21","proceeding":"CVPR 2025 1","authors":["Sili Chen","Hengkai Guo","Shengnan Zhu","Feihu Zhang","Zilong Huang","Jiashi Feng","Bingyi Kang"],"abstract":"Depth Anything has achieved remarkable success in monocular depth estimation with strong generalization ability. However, it suffers from temporal inconsistency in videos, hindering its practical applications. Various methods have been proposed to alleviate this issue by leveraging video generation models or introducing priors from optical flow and camera poses. Nonetheless, these methods are only applicable to short videos (< 10 seconds) and require a trade-off between quality and computational efficiency. We propose Video Depth Anything for high-quality, consistent depth estimation in super-long videos (over several minutes) without sacrificing efficiency. We base our model on Depth Anything V2 and replace its head with an efficient spatial-temporal head. We design a straightforward yet effective temporal consistency loss by constraining the temporal depth gradient, eliminating the need for additional geometric priors. The model is trained on a joint dataset of video depth and unlabeled images, similar to Depth Anything V2. Moreover, a novel key-frame-based strategy is developed for long video inference. Experiments show that our model can be applied to arbitrarily long videos without compromising quality, consistency, or generalization ability. Comprehensive evaluations on multiple video benchmarks demonstrate that our approach sets a new state-of-the-art in zero-shot video depth estimation. We offer models of different scales to support a range of scenarios, with our smallest model capable of real-time performance at 30 FPS.","url_abs":"https://arxiv.org/abs/2501.12375v2","url_pdf":"https://arxiv.org/pdf/2501.12375v2.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":"video-depth-anything-consistent-depth","repo_url":"https://github.com/DepthAnything/Video-Depth-Anything","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"computational-efficiency","task_name":"Computational Efficiency"},{"task_slug":"depth-estimation","task_name":"Depth Estimation"},{"task_slug":"monocular-depth-estimation","task_name":"Monocular Depth Estimation"},{"task_slug":"optical-flow-estimation","task_name":"Optical Flow Estimation"},{"task_slug":"video-generation","task_name":"Video Generation"}],"methods":[{"method_slug":"base","method_name":"BASE"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2501.12375","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2501.12375"}},"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/Video-Depth-Anything","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran_fixture":2,"ran_honours":1,"ran_draft_wrong":2,"ran_violates":1,"unverified":4},"by_repo_kind":{"listed":{"samples":10,"ran":6,"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/Video-Depth-Anything","repo_kind":"listed","path":"video_depth_anything/dinov2_layers/drop_path.py","file_url":"https://github.com/DepthAnything/Video-Depth-Anything/blob/HEAD/video_depth_anything/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/Video-Depth-Anything","repo_kind":"listed","path":"video_depth_anything/dinov2_layers/patch_embed.py","file_url":"https://github.com/DepthAnything/Video-Depth-Anything/blob/HEAD/video_depth_anything/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/Video-Depth-Anything","repo_kind":"listed","path":"video_depth_anything/dinov2.py","file_url":"https://github.com/DepthAnything/Video-Depth-Anything/blob/HEAD/video_depth_anything/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":"e93cc5b705c2eb3b","entry":"precompute_freqs_cis","repo":"DepthAnything/Video-Depth-Anything","repo_kind":"listed","path":"video_depth_anything/motion_module/attention.py","file_url":"https://github.com/DepthAnything/Video-Depth-Anything/blob/HEAD/video_depth_anything/motion_module/attention.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"e93cc5b705c2eb3b"}},{"code_sha256_prefix":"70bf6ebaafd266c4","entry":"reshape_for_broadcast","repo":"DepthAnything/Video-Depth-Anything","repo_kind":"listed","path":"video_depth_anything/motion_module/attention.py","file_url":"https://github.com/DepthAnything/Video-Depth-Anything/blob/HEAD/video_depth_anything/motion_module/attention.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"70bf6ebaafd266c4"}},{"code_sha256_prefix":"4719c763c53be3fe","entry":"zero_module","repo":"DepthAnything/Video-Depth-Anything","repo_kind":"listed","path":"video_depth_anything/motion_module/motion_module.py","file_url":"https://github.com/DepthAnything/Video-Depth-Anything/blob/HEAD/video_depth_anything/motion_module/motion_module.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":"4719c763c53be3fe"}},{"code_sha256_prefix":"5d16d4d4fc573ac7","entry":"add_residual","repo":"DepthAnything/Video-Depth-Anything","repo_kind":"listed","path":"video_depth_anything/dinov2_layers/block.py","file_url":"https://github.com/DepthAnything/Video-Depth-Anything/blob/HEAD/video_depth_anything/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":"307785ce73cb99aa","entry":"apply_rotary_emb","repo":"DepthAnything/Video-Depth-Anything","repo_kind":"listed","path":"video_depth_anything/motion_module/attention.py","file_url":"https://github.com/DepthAnything/Video-Depth-Anything/blob/HEAD/video_depth_anything/motion_module/attention.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":"307785ce73cb99aa"}},{"code_sha256_prefix":"85f7ffc01945bb72","entry":"drop_add_residual_stochastic_depth","repo":"DepthAnything/Video-Depth-Anything","repo_kind":"listed","path":"video_depth_anything/dinov2_layers/block.py","file_url":"https://github.com/DepthAnything/Video-Depth-Anything/blob/HEAD/video_depth_anything/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":"5be3610fa1fee19e","entry":"get_branges_scales","repo":"DepthAnything/Video-Depth-Anything","repo_kind":"listed","path":"video_depth_anything/dinov2_layers/block.py","file_url":"https://github.com/DepthAnything/Video-Depth-Anything/blob/HEAD/video_depth_anything/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"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}