{"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/barf-bundle-adjusting-neural-radiance-fields","title":"BARF: Bundle-Adjusting Neural Radiance Fields","arxiv_id":"2104.06405","date":"2021-04-13","proceeding":"ICCV 2021 10","authors":["Chen-Hsuan Lin","Wei-Chiu Ma","Antonio Torralba","Simon Lucey"],"abstract":"Neural Radiance Fields (NeRF) have recently gained a surge of interest within the computer vision community for its power to synthesize photorealistic novel views of real-world scenes. One limitation of NeRF, however, is its requirement of accurate camera poses to learn the scene representations. In this paper, we propose Bundle-Adjusting Neural Radiance Fields (BARF) for training NeRF from imperfect (or even unknown) camera poses -- the joint problem of learning neural 3D representations and registering camera frames. We establish a theoretical connection to classical image alignment and show that coarse-to-fine registration is also applicable to NeRF. Furthermore, we show that na\\\"ively applying positional encoding in NeRF has a negative impact on registration with a synthesis-based objective. Experiments on synthetic and real-world data show that BARF can effectively optimize the neural scene representations and resolve large camera pose misalignment at the same time. This enables view synthesis and localization of video sequences from unknown camera poses, opening up new avenues for visual localization systems (e.g. SLAM) and potential applications for dense 3D mapping and reconstruction.","url_abs":"https://arxiv.org/abs/2104.06405v2","url_pdf":"https://arxiv.org/pdf/2104.06405v2.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":"barf-bundle-adjusting-neural-radiance-fields","repo_url":"https://github.com/chenhsuanlin/bundle-adjusting-NeRF","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"barf-bundle-adjusting-neural-radiance-fields","repo_url":"https://github.com/MQ66/gnerf","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"barf-bundle-adjusting-neural-radiance-fields","repo_url":"https://github.com/postech-cvlab/scnerf","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"barf-bundle-adjusting-neural-radiance-fields","repo_url":"https://github.com/quan-meng/gnerf","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"nerf","task_name":"NeRF"},{"task_slug":"visual-localization","task_name":"Visual Localization"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2104.06405","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2104.06405"}},"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/MQ66/gnerf","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/postech-cvlab/scnerf","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/quan-meng/gnerf","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/chenhsuanlin/bundle-adjusting-NeRF","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":3,"ran_draft_wrong":1,"unverified":15},"by_repo_kind":{"official":{"samples":13,"ran":2,"repositories":1},"listed":{"samples":6,"ran":2,"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":0,"samples":[{"code_sha256_prefix":"5c18825021f11763","entry":"CameraModel","repo":"postech-cvlab/scnerf","repo_kind":"listed","path":"model/camera_model.py","file_url":"https://github.com/postech-cvlab/scnerf/blob/HEAD/model/camera_model.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":"5c18825021f11763"}},{"code_sha256_prefix":"5dd98ac338acc206","entry":"load_options","repo":"chenhsuanlin/bundle-adjusting-NeRF","repo_kind":"official","path":"options.py","file_url":"https://github.com/chenhsuanlin/bundle-adjusting-NeRF/blob/HEAD/options.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":"5dd98ac338acc206"}},{"code_sha256_prefix":"c57c6e4ede0dc332","entry":"parse_arguments","repo":"chenhsuanlin/bundle-adjusting-NeRF","repo_kind":"official","path":"options.py","file_url":"https://github.com/chenhsuanlin/bundle-adjusting-NeRF/blob/HEAD/options.py","link_basis":"plan_row","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":"c57c6e4ede0dc332"}},{"code_sha256_prefix":"ce678ba4bfcfef79","entry":"sample_pdf","repo":"MQ66/gnerf","repo_kind":"listed","path":"model/rendering.py","file_url":"https://github.com/MQ66/gnerf/blob/HEAD/model/rendering.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ce678ba4bfcfef79"}},{"code_sha256_prefix":"60ca8c9c18693dbc","entry":"PinholeModelRotNoiseLearning10kRayoRaydDistortion","repo":"postech-cvlab/scnerf","repo_kind":"listed","path":"model/camera_model.py","file_url":"https://github.com/postech-cvlab/scnerf/blob/HEAD/model/camera_model.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":"60ca8c9c18693dbc"}},{"code_sha256_prefix":"2a69081f447e7ba0","entry":"blue","repo":"chenhsuanlin/bundle-adjusting-NeRF","repo_kind":"official","path":"util.py","file_url":"https://github.com/chenhsuanlin/bundle-adjusting-NeRF/blob/HEAD/util.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":"2a69081f447e7ba0"}},{"code_sha256_prefix":"54e93b2a1fc19f41","entry":"cam2img","repo":"chenhsuanlin/bundle-adjusting-NeRF","repo_kind":"official","path":"camera.py","file_url":"https://github.com/chenhsuanlin/bundle-adjusting-NeRF/blob/HEAD/camera.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":"54e93b2a1fc19f41"}},{"code_sha256_prefix":"ec862b3024c7ea71","entry":"color_border","repo":"chenhsuanlin/bundle-adjusting-NeRF","repo_kind":"official","path":"util_vis.py","file_url":"https://github.com/chenhsuanlin/bundle-adjusting-NeRF/blob/HEAD/util_vis.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":"ec862b3024c7ea71"}},{"code_sha256_prefix":"7c0f83be3b1230bb","entry":"create_dataloader","repo":"MQ66/gnerf","repo_kind":"listed","path":"dataset/dataloader.py","file_url":"https://github.com/MQ66/gnerf/blob/HEAD/dataset/dataloader.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":"7c0f83be3b1230bb"}},{"code_sha256_prefix":"3824193054538982","entry":"get_dataset","repo":"MQ66/gnerf","repo_kind":"listed","path":"dataset/dataloader.py","file_url":"https://github.com/MQ66/gnerf/blob/HEAD/dataset/dataloader.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":"3824193054538982"}},{"code_sha256_prefix":"3dcfc350d47d5fc9","entry":"get_heatmap","repo":"chenhsuanlin/bundle-adjusting-NeRF","repo_kind":"official","path":"util_vis.py","file_url":"https://github.com/chenhsuanlin/bundle-adjusting-NeRF/blob/HEAD/util_vis.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":"3dcfc350d47d5fc9"}},{"code_sha256_prefix":"31d8aba2ce388395","entry":"get_normalized_pixel_grid","repo":"chenhsuanlin/bundle-adjusting-NeRF","repo_kind":"official","path":"warp.py","file_url":"https://github.com/chenhsuanlin/bundle-adjusting-NeRF/blob/HEAD/warp.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":"31d8aba2ce388395"}},{"code_sha256_prefix":"7d12c0a3c8662e08","entry":"get_normalized_pixel_grid_crop","repo":"chenhsuanlin/bundle-adjusting-NeRF","repo_kind":"official","path":"warp.py","file_url":"https://github.com/chenhsuanlin/bundle-adjusting-NeRF/blob/HEAD/warp.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":"7d12c0a3c8662e08"}},{"code_sha256_prefix":"a84f43afe520c054","entry":"green","repo":"chenhsuanlin/bundle-adjusting-NeRF","repo_kind":"official","path":"util.py","file_url":"https://github.com/chenhsuanlin/bundle-adjusting-NeRF/blob/HEAD/util.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":"a84f43afe520c054"}},{"code_sha256_prefix":"c5960ba148e94710","entry":"inference","repo":"MQ66/gnerf","repo_kind":"listed","path":"model/rendering.py","file_url":"https://github.com/MQ66/gnerf/blob/HEAD/model/rendering.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":"c5960ba148e94710"}},{"code_sha256_prefix":"d61202a21ac5df1b","entry":"preprocess_vis_image","repo":"chenhsuanlin/bundle-adjusting-NeRF","repo_kind":"official","path":"util_vis.py","file_url":"https://github.com/chenhsuanlin/bundle-adjusting-NeRF/blob/HEAD/util_vis.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":"d61202a21ac5df1b"}},{"code_sha256_prefix":"8733b61e389a9be2","entry":"red","repo":"chenhsuanlin/bundle-adjusting-NeRF","repo_kind":"official","path":"util.py","file_url":"https://github.com/chenhsuanlin/bundle-adjusting-NeRF/blob/HEAD/util.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":"8733b61e389a9be2"}},{"code_sha256_prefix":"8ae29d1e7c9ed2f8","entry":"to_hom","repo":"chenhsuanlin/bundle-adjusting-NeRF","repo_kind":"official","path":"camera.py","file_url":"https://github.com/chenhsuanlin/bundle-adjusting-NeRF/blob/HEAD/camera.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":"8ae29d1e7c9ed2f8"}},{"code_sha256_prefix":"7e76538e2f377f4d","entry":"world2cam","repo":"chenhsuanlin/bundle-adjusting-NeRF","repo_kind":"official","path":"camera.py","file_url":"https://github.com/chenhsuanlin/bundle-adjusting-NeRF/blob/HEAD/camera.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":"7e76538e2f377f4d"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}