{"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/unidepth-universal-monocular-metric-depth","title":"UniDepth: Universal Monocular Metric Depth Estimation","arxiv_id":"2403.18913","date":"2024-03-27","proceeding":"CVPR 2024 1","authors":["Luigi Piccinelli","Yung-Hsu Yang","Christos Sakaridis","Mattia Segu","Siyuan Li","Luc van Gool","Fisher Yu"],"abstract":"Accurate monocular metric depth estimation (MMDE) is crucial to solving downstream tasks in 3D perception and modeling. However, the remarkable accuracy of recent MMDE methods is confined to their training domains. These methods fail to generalize to unseen domains even in the presence of moderate domain gaps, which hinders their practical applicability. We propose a new model, UniDepth, capable of reconstructing metric 3D scenes from solely single images across domains. Departing from the existing MMDE methods, UniDepth directly predicts metric 3D points from the input image at inference time without any additional information, striving for a universal and flexible MMDE solution. In particular, UniDepth implements a self-promptable camera module predicting dense camera representation to condition depth features. Our model exploits a pseudo-spherical output representation, which disentangles camera and depth representations. In addition, we propose a geometric invariance loss that promotes the invariance of camera-prompted depth features. Thorough evaluations on ten datasets in a zero-shot regime consistently demonstrate the superior performance of UniDepth, even when compared with methods directly trained on the testing domains. Code and models are available at: https://github.com/lpiccinelli-eth/unidepth","url_abs":"https://arxiv.org/abs/2403.18913v1","url_pdf":"https://arxiv.org/pdf/2403.18913v1.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":"unidepth-universal-monocular-metric-depth","repo_url":"https://github.com/lpiccinelli-eth/unidepth","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"unidepth-universal-monocular-metric-depth","repo_url":"https://github.com/henry123-boy/SpaTracker","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"unidepth-universal-monocular-metric-depth","repo_url":"https://github.com/ibaiGorordo/ONNX-Unidepth-Monocular-Metric-Depth-Estimation","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"none","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"depth-estimation","task_name":"Depth Estimation"},{"task_slug":"monocular-depth-estimation","task_name":"Monocular Depth Estimation"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/monocular-depth-estimation-on-kitti-eigen","task":"Monocular Depth Estimation","dataset":"KITTI Eigen split","model":"UniDepth (Zero-shot)","rank_in_archive_order":7,"of":79,"metrics":{"Delta < 1.25":"0.986","Delta < 1.25^2":"0.998","Delta < 1.25^3":"0.999","RMSE":"1.75","RMSE log":"0.064","absolute relative error":"0.042"},"uses_additional_data":true},{"leaderboard":"/sota/monocular-depth-estimation-on-nyu-depth-v2","task":"Monocular Depth Estimation","dataset":"NYU-Depth V2","model":"UniDepth (Zero-shot)","rank_in_archive_order":12,"of":85,"metrics":{"Delta < 1.25":"0.984","Delta < 1.25^2":"0.997","Delta < 1.25^3":"0.999","RMSE":"0.201","absolute relative error":"0.058","log 10":"0.024"},"uses_additional_data":true}],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2403.18913","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2403.18913"}},"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/henry123-boy/SpaTracker","reach":null},{"provenance":"deterministic:regex_extraction","url":"https://github.com/lpiccinelli-eth/unidepth","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ibaiGorordo/ONNX-Unidepth-Monocular-Metric-Depth-Estimation","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":6,"ran_fixture":6,"ran_draft_wrong":3,"unverified":11},"by_repo_kind":{"official":{"samples":23,"ran":15,"repositories":1},"listed":{"samples":3,"ran":0,"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":25,"samples":[{"code_sha256_prefix":"5e4cca49cac4d80e","entry":"ListAdapter","repo":"lpiccinelli-eth/unidepth","repo_kind":"official","path":"unidepth/models/unidepthv1/unidepthv1.py","file_url":"https://github.com/lpiccinelli-eth/unidepth/blob/HEAD/unidepth/models/unidepthv1/unidepthv1.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"5e4cca49cac4d80e"}},{"code_sha256_prefix":"95084bc240332452","entry":"_paddings","repo":"lpiccinelli-eth/unidepth","repo_kind":"official","path":"unidepth/models/unidepthv1/unidepthv1.py","file_url":"https://github.com/lpiccinelli-eth/unidepth/blob/HEAD/unidepth/models/unidepthv1/unidepthv1.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"95084bc240332452"}},{"code_sha256_prefix":"d5d4d422a21b0a05","entry":"_postprocess","repo":"lpiccinelli-eth/unidepth","repo_kind":"official","path":"unidepth/models/unidepthv1/unidepthv1.py","file_url":"https://github.com/lpiccinelli-eth/unidepth/blob/HEAD/unidepth/models/unidepthv1/unidepthv1.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"d5d4d422a21b0a05"}},{"code_sha256_prefix":"27638cf0225e17aa","entry":"_preprocess","repo":"lpiccinelli-eth/unidepth","repo_kind":"official","path":"unidepth/models/unidepthv1/unidepthv1.py","file_url":"https://github.com/lpiccinelli-eth/unidepth/blob/HEAD/unidepth/models/unidepthv1/unidepthv1.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"27638cf0225e17aa"}},{"code_sha256_prefix":"6d5d386b010a90cc","entry":"_shapes","repo":"lpiccinelli-eth/unidepth","repo_kind":"official","path":"unidepth/models/unidepthv1/unidepthv1.py","file_url":"https://github.com/lpiccinelli-eth/unidepth/blob/HEAD/unidepth/models/unidepthv1/unidepthv1.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"6d5d386b010a90cc"}},{"code_sha256_prefix":"ab5f0cf7db8829b0","entry":"flat_interpolate","repo":"lpiccinelli-eth/unidepth","repo_kind":"official","path":"unidepth/models/unidepthv1/unidepthv1.py","file_url":"https://github.com/lpiccinelli-eth/unidepth/blob/HEAD/unidepth/models/unidepthv1/unidepthv1.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"ab5f0cf7db8829b0"}},{"code_sha256_prefix":"1a61b6729f16be14","entry":"get_params","repo":"lpiccinelli-eth/unidepth","repo_kind":"official","path":"unidepth/models/unidepthv1/unidepthv1.py","file_url":"https://github.com/lpiccinelli-eth/unidepth/blob/HEAD/unidepth/models/unidepthv1/unidepthv1.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"1a61b6729f16be14"}},{"code_sha256_prefix":"21f13ea283351acc","entry":"get_rank","repo":"lpiccinelli-eth/unidepth","repo_kind":"official","path":"unidepth/models/unidepthv1/unidepthv1.py","file_url":"https://github.com/lpiccinelli-eth/unidepth/blob/HEAD/unidepth/models/unidepthv1/unidepthv1.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"21f13ea283351acc"}},{"code_sha256_prefix":"776d3f86791004d1","entry":"is_dist_avail_and_initialized","repo":"lpiccinelli-eth/unidepth","repo_kind":"official","path":"unidepth/models/unidepthv1/unidepthv1.py","file_url":"https://github.com/lpiccinelli-eth/unidepth/blob/HEAD/unidepth/models/unidepthv1/unidepthv1.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"776d3f86791004d1"}},{"code_sha256_prefix":"e17a1e0c67eaf7b8","entry":"is_main_process","repo":"lpiccinelli-eth/unidepth","repo_kind":"official","path":"unidepth/models/unidepthv1/unidepthv1.py","file_url":"https://github.com/lpiccinelli-eth/unidepth/blob/HEAD/unidepth/models/unidepthv1/unidepthv1.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"e17a1e0c67eaf7b8"}},{"code_sha256_prefix":"c54375eea881eda0","entry":"match_gt","repo":"lpiccinelli-eth/unidepth","repo_kind":"official","path":"unidepth/models/unidepthv1/unidepthv1.py","file_url":"https://github.com/lpiccinelli-eth/unidepth/blob/HEAD/unidepth/models/unidepthv1/unidepthv1.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"c54375eea881eda0"}},{"code_sha256_prefix":"be3fb71a3dda1ed6","entry":"match_intrinsics","repo":"lpiccinelli-eth/unidepth","repo_kind":"official","path":"unidepth/models/unidepthv1/unidepthv1.py","file_url":"https://github.com/lpiccinelli-eth/unidepth/blob/HEAD/unidepth/models/unidepthv1/unidepthv1.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"be3fb71a3dda1ed6"}},{"code_sha256_prefix":"0d444610e9aa423f","entry":"max_stack","repo":"lpiccinelli-eth/unidepth","repo_kind":"official","path":"unidepth/models/unidepthv1/unidepthv1.py","file_url":"https://github.com/lpiccinelli-eth/unidepth/blob/HEAD/unidepth/models/unidepthv1/unidepthv1.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"0d444610e9aa423f"}},{"code_sha256_prefix":"c7571a839bb7916c","entry":"rsh_cart_8","repo":"lpiccinelli-eth/unidepth","repo_kind":"official","path":"unidepth/models/unidepthv1/unidepthv1.py","file_url":"https://github.com/lpiccinelli-eth/unidepth/blob/HEAD/unidepth/models/unidepthv1/unidepthv1.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"c7571a839bb7916c"}},{"code_sha256_prefix":"2f4bab52957d3b0e","entry":"spherical_zbuffer_to_euclidean","repo":"lpiccinelli-eth/unidepth","repo_kind":"official","path":"unidepth/models/unidepthv1/unidepthv1.py","file_url":"https://github.com/lpiccinelli-eth/unidepth/blob/HEAD/unidepth/models/unidepthv1/unidepthv1.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"2f4bab52957d3b0e"}},{"code_sha256_prefix":"3bbe2dc4e9f7b54b","entry":"AttentionBlock","repo":"lpiccinelli-eth/unidepth","repo_kind":"official","path":"unidepth/models/unidepthv1/unidepthv1.py","file_url":"https://github.com/lpiccinelli-eth/unidepth/blob/HEAD/unidepth/models/unidepthv1/unidepthv1.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"3bbe2dc4e9f7b54b"}},{"code_sha256_prefix":"bfbc779ee61e385c","entry":"CameraHead","repo":"lpiccinelli-eth/unidepth","repo_kind":"official","path":"unidepth/models/unidepthv1/unidepthv1.py","file_url":"https://github.com/lpiccinelli-eth/unidepth/blob/HEAD/unidepth/models/unidepthv1/unidepthv1.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"bfbc779ee61e385c"}},{"code_sha256_prefix":"5f8c327ff4b304d4","entry":"DPTHead","repo":"henry123-boy/SpaTracker","repo_kind":"listed","path":"models/monoD/depth_anything/dpt.py","file_url":"https://github.com/henry123-boy/SpaTracker/blob/HEAD/models/monoD/depth_anything/dpt.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"5f8c327ff4b304d4"}},{"code_sha256_prefix":"c918b2b60a6b0cf2","entry":"DPT_DINOv2","repo":"henry123-boy/SpaTracker","repo_kind":"listed","path":"models/monoD/depth_anything/dpt.py","file_url":"https://github.com/henry123-boy/SpaTracker/blob/HEAD/models/monoD/depth_anything/dpt.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"c918b2b60a6b0cf2"}},{"code_sha256_prefix":"4fed83b01592cd1b","entry":"Decoder","repo":"lpiccinelli-eth/unidepth","repo_kind":"official","path":"unidepth/models/unidepthv1/unidepthv1.py","file_url":"https://github.com/lpiccinelli-eth/unidepth/blob/HEAD/unidepth/models/unidepthv1/unidepthv1.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"4fed83b01592cd1b"}},{"code_sha256_prefix":"50c790a0244300f6","entry":"DepthHead","repo":"lpiccinelli-eth/unidepth","repo_kind":"official","path":"unidepth/models/unidepthv1/unidepthv1.py","file_url":"https://github.com/lpiccinelli-eth/unidepth/blob/HEAD/unidepth/models/unidepthv1/unidepthv1.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"50c790a0244300f6"}},{"code_sha256_prefix":"2a686a5ac19872b4","entry":"ProfileMethod","repo":"lpiccinelli-eth/unidepth","repo_kind":"official","path":"unidepth/models/unidepthv1/unidepthv1.py","file_url":"https://github.com/lpiccinelli-eth/unidepth/blob/HEAD/unidepth/models/unidepthv1/unidepthv1.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"2a686a5ac19872b4"}},{"code_sha256_prefix":"5e7bb5ae1c94af71","entry":"UniDepthV1","repo":"lpiccinelli-eth/unidepth","repo_kind":"official","path":"unidepth/models/unidepthv1/unidepthv1.py","file_url":"https://github.com/lpiccinelli-eth/unidepth/blob/HEAD/unidepth/models/unidepthv1/unidepthv1.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"5e7bb5ae1c94af71"}},{"code_sha256_prefix":"b270379104db863c","entry":"colorize_map","repo":"ibaiGorordo/ONNX-Unidepth-Monocular-Metric-Depth-Estimation","repo_kind":"listed","path":"unidepth/UniDepth.py","file_url":"https://github.com/ibaiGorordo/ONNX-Unidepth-Monocular-Metric-Depth-Estimation/blob/HEAD/unidepth/UniDepth.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":"b270379104db863c"}},{"code_sha256_prefix":"c136d0e4ba11d802","entry":"generate_rays","repo":"lpiccinelli-eth/unidepth","repo_kind":"official","path":"unidepth/models/unidepthv1/unidepthv1.py","file_url":"https://github.com/lpiccinelli-eth/unidepth/blob/HEAD/unidepth/models/unidepthv1/unidepthv1.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"c136d0e4ba11d802"}},{"code_sha256_prefix":"4fa984f2f2be8ec1","entry":"profile_method","repo":"lpiccinelli-eth/unidepth","repo_kind":"official","path":"unidepth/models/unidepthv1/unidepthv1.py","file_url":"https://github.com/lpiccinelli-eth/unidepth/blob/HEAD/unidepth/models/unidepthv1/unidepthv1.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"4fa984f2f2be8ec1"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}