{"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/dfnet-enhance-aboslute-pose-regression-with","title":"DFNet: Enhance Absolute Pose Regression with Direct Feature Matching","arxiv_id":"2204.00559","date":"2022-04-01","proceeding":null,"authors":["Shuai Chen","Xinghui Li","ZiRui Wang","Victor Adrian Prisacariu"],"abstract":"We introduce a camera relocalization pipeline that combines absolute pose regression (APR) and direct feature matching. By incorporating exposure-adaptive novel view synthesis, our method successfully addresses photometric distortions in outdoor environments that existing photometric-based methods fail to handle. With domain-invariant feature matching, our solution improves pose regression accuracy using semi-supervised learning on unlabeled data. In particular, the pipeline consists of two components: Novel View Synthesizer and DFNet. The former synthesizes novel views compensating for changes in exposure and the latter regresses camera poses and extracts robust features that close the domain gap between real images and synthetic ones. Furthermore, we introduce an online synthetic data generation scheme. We show that these approaches effectively enhance camera pose estimation both in indoor and outdoor scenes. Hence, our method achieves a state-of-the-art accuracy by outperforming existing single-image APR methods by as much as 56%, comparable to 3D structure-based methods.","url_abs":"https://arxiv.org/abs/2204.00559v4","url_pdf":"https://arxiv.org/pdf/2204.00559v4.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":"dfnet-enhance-aboslute-pose-regression-with","repo_url":"https://github.com/activevisionlab/dfnet","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"camera-pose-estimation","task_name":"Camera Pose Estimation"},{"task_slug":"camera-relocalization","task_name":"Camera Relocalization"},{"task_slug":"novel-view-synthesis","task_name":"Novel View Synthesis"},{"task_slug":"pose-estimation","task_name":"Pose Estimation"},{"task_slug":"synthetic-data-generation","task_name":"Synthetic Data Generation"},{"task_slug":"regression-1","task_name":"regression"}],"methods":[{"method_slug":"attention","method_name":"Attention"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"synthesizer","method_name":"Synthesizer"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2204.00559","atlas_url":"https://app.syntology.ai/?focus=2204.00559","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2204.00559"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/activevisionlab/dfnet","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":2,"ran":10,"unverified":5},"by_repo_kind":{"official":{"samples":17,"ran":12,"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":"fd57e365830d09de","entry":"batchify","repo":"activevisionlab/dfnet","repo_kind":"official","path":"script/models/nerf.py","file_url":"https://github.com/activevisionlab/dfnet/blob/HEAD/script/models/nerf.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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fd57e365830d09de"}},{"code_sha256_prefix":"c9625d568955ffac","entry":"camera_frustum_initializer","repo":"activevisionlab/dfnet","repo_kind":"official","path":"dataset_loaders/load_7Scenes.py","file_url":"https://github.com/activevisionlab/dfnet/blob/HEAD/dataset_loaders/load_7Scenes.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":"c9625d568955ffac"}},{"code_sha256_prefix":"5ebe28260a0e2f2e","entry":"disable_model_grad","repo":"activevisionlab/dfnet","repo_kind":"official","path":"script/dm/direct_pose_model.py","file_url":"https://github.com/activevisionlab/dfnet/blob/HEAD/script/dm/direct_pose_model.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":"5ebe28260a0e2f2e"}},{"code_sha256_prefix":"c7bea2e25b534df3","entry":"filter_hook","repo":"activevisionlab/dfnet","repo_kind":"official","path":"script/dm/pose_model.py","file_url":"https://github.com/activevisionlab/dfnet/blob/HEAD/script/dm/pose_model.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":"c7bea2e25b534df3"}},{"code_sha256_prefix":"1fc1ac3d7fc531a9","entry":"generate_sampling_frustum","repo":"activevisionlab/dfnet","repo_kind":"official","path":"dataset_loaders/load_Cambridge.py","file_url":"https://github.com/activevisionlab/dfnet/blob/HEAD/dataset_loaders/load_Cambridge.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":"1fc1ac3d7fc531a9"}},{"code_sha256_prefix":"f869aad3a90d4156","entry":"is_inside_frustum","repo":"activevisionlab/dfnet","repo_kind":"official","path":"dataset_loaders/load_7Scenes.py","file_url":"https://github.com/activevisionlab/dfnet/blob/HEAD/dataset_loaders/load_7Scenes.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":"f869aad3a90d4156"}},{"code_sha256_prefix":"9b5a8fceac6859e6","entry":"load_image","repo":"activevisionlab/dfnet","repo_kind":"official","path":"dataset_loaders/cambridge_scenes.py","file_url":"https://github.com/activevisionlab/dfnet/blob/HEAD/dataset_loaders/cambridge_scenes.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":"9b5a8fceac6859e6"}},{"code_sha256_prefix":"c832923b546e9fb3","entry":"mse","repo":"activevisionlab/dfnet","repo_kind":"official","path":"script/models/metrics.py","file_url":"https://github.com/activevisionlab/dfnet/blob/HEAD/script/models/metrics.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":"c832923b546e9fb3"}},{"code_sha256_prefix":"1d4f466dd0b12111","entry":"preprocess_data","repo":"activevisionlab/dfnet","repo_kind":"official","path":"script/dm/pose_model.py","file_url":"https://github.com/activevisionlab/dfnet/blob/HEAD/script/dm/pose_model.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":"1d4f466dd0b12111"}},{"code_sha256_prefix":"aba0c9bab294b165","entry":"process_poses_rotmat","repo":"activevisionlab/dfnet","repo_kind":"official","path":"dataset_loaders/cambridge_scenes.py","file_url":"https://github.com/activevisionlab/dfnet/blob/HEAD/dataset_loaders/cambridge_scenes.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":"aba0c9bab294b165"}},{"code_sha256_prefix":"b5b388448f22219a","entry":"psnr","repo":"activevisionlab/dfnet","repo_kind":"official","path":"script/models/metrics.py","file_url":"https://github.com/activevisionlab/dfnet/blob/HEAD/script/models/metrics.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":"b5b388448f22219a"}},{"code_sha256_prefix":"8f235fb889b93174","entry":"run_network","repo":"activevisionlab/dfnet","repo_kind":"official","path":"script/models/nerf.py","file_url":"https://github.com/activevisionlab/dfnet/blob/HEAD/script/models/nerf.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8f235fb889b93174"}},{"code_sha256_prefix":"13be307ef0c24c0e","entry":"initK","repo":"activevisionlab/dfnet","repo_kind":"official","path":"dataset_loaders/load_7Scenes.py","file_url":"https://github.com/activevisionlab/dfnet/blob/HEAD/dataset_loaders/load_7Scenes.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":"13be307ef0c24c0e"}},{"code_sha256_prefix":"ecb54915a44f88b3","entry":"process_poses_rotmat","repo":"activevisionlab/dfnet","repo_kind":"official","path":"dataset_loaders/seven_scenes.py","file_url":"https://github.com/activevisionlab/dfnet/blob/HEAD/dataset_loaders/seven_scenes.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":"ecb54915a44f88b3"}},{"code_sha256_prefix":"667f7d75349dad79","entry":"qlog","repo":"activevisionlab/dfnet","repo_kind":"official","path":"dataset_loaders/cambridge_scenes.py","file_url":"https://github.com/activevisionlab/dfnet/blob/HEAD/dataset_loaders/cambridge_scenes.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":"667f7d75349dad79"}},{"code_sha256_prefix":"b2c204ce6bb5f30e","entry":"run_network_DNeRF","repo":"activevisionlab/dfnet","repo_kind":"official","path":"script/models/nerf.py","file_url":"https://github.com/activevisionlab/dfnet/blob/HEAD/script/models/nerf.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":"b2c204ce6bb5f30e"}},{"code_sha256_prefix":"895ffdb66b75e1b4","entry":"ssim","repo":"activevisionlab/dfnet","repo_kind":"official","path":"script/models/metrics.py","file_url":"https://github.com/activevisionlab/dfnet/blob/HEAD/script/models/metrics.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":"895ffdb66b75e1b4"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}