{"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/distformer-enhancing-local-and-global","title":"DistFormer: Enhancing Local and Global Features for Monocular Per-Object Distance Estimation","arxiv_id":"2401.03191","date":"2024-01-06","proceeding":null,"authors":["Aniello Panariello","Gianluca Mancusi","Fedy Haj Ali","Angelo Porrello","Simone Calderara","Rita Cucchiara"],"abstract":"Accurate per-object distance estimation is crucial in safety-critical applications such as autonomous driving, surveillance, and robotics. Existing approaches rely on two scales: local information (i.e., the bounding box proportions) or global information, which encodes the semantics of the scene as well as the spatial relations with neighboring objects. However, these approaches may struggle with long-range objects and in the presence of strong occlusions or unusual visual patterns. In this respect, our work aims to strengthen both local and global cues. Our architecture -- named DistFormer -- builds upon three major components acting jointly: i) a robust context encoder extracting fine-grained per-object representations; ii) a masked encoder-decoder module exploiting self-supervision to promote the learning of useful per-object features; iii) a global refinement module that aggregates object representations and computes a joint, spatially-consistent estimation. To evaluate the effectiveness of DistFormer, we conduct experiments on the standard KITTI dataset and the large-scale NuScenes and MOTSynth datasets. Such datasets cover various indoor/outdoor environments, changing weather conditions, appearances, and camera viewpoints. Our comprehensive analysis shows that DistFormer outperforms existing methods. Moreover, we further delve into its generalization capabilities, showing its regularization benefits in zero-shot synth-to-real transfer.","url_abs":"https://arxiv.org/abs/2401.03191v1","url_pdf":"https://arxiv.org/pdf/2401.03191v1.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":"distformer-enhancing-local-and-global","repo_url":"https://github.com/apanariello4/DistFormer","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"autonomous-driving","task_name":"Autonomous Driving"},{"task_slug":"decoder","task_name":"Decoder"},{"task_slug":"distance-regression","task_name":"Distance regression"},{"task_slug":"object","task_name":"Object"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2401.03191","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2401.03191"}},"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/apanariello4/DistFormer","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":3,"unverified":1},"by_repo_kind":{"official":{"samples":4,"ran":3,"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":"55b6fb419c3c6971","entry":"pair","repo":"apanariello4/DistFormer","repo_kind":"official","path":"models/mae.py","file_url":"https://github.com/apanariello4/DistFormer/blob/HEAD/models/mae.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"55b6fb419c3c6971"}},{"code_sha256_prefix":"d4d2238d0d97a50d","entry":"parse_line","repo":"apanariello4/DistFormer","repo_kind":"official","path":"dataset/get_gt.py","file_url":"https://github.com/apanariello4/DistFormer/blob/HEAD/dataset/get_gt.py","link_basis":"first_harvest_node","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":"d4d2238d0d97a50d"}},{"code_sha256_prefix":"5c7fa2ff965c2d61","entry":"points_in_img_mask","repo":"apanariello4/DistFormer","repo_kind":"official","path":"dataset/get_gt.py","file_url":"https://github.com/apanariello4/DistFormer/blob/HEAD/dataset/get_gt.py","link_basis":"first_harvest_node","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":"5c7fa2ff965c2d61"}},{"code_sha256_prefix":"415869b2a9bfd401","entry":"load_3d_boxes","repo":"apanariello4/DistFormer","repo_kind":"official","path":"dataset/get_gt.py","file_url":"https://github.com/apanariello4/DistFormer/blob/HEAD/dataset/get_gt.py","link_basis":"first_harvest_node","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":"415869b2a9bfd401"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}