{"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/dof-nerf-depth-of-field-meets-neural-radiance","title":"DoF-NeRF: Depth-of-Field Meets Neural Radiance Fields","arxiv_id":"2208.00945","date":"2022-08-01","proceeding":null,"authors":["Zijin Wu","Xingyi Li","Juewen Peng","Hao Lu","Zhiguo Cao","Weicai Zhong"],"abstract":"Neural Radiance Field (NeRF) and its variants have exhibited great success on representing 3D scenes and synthesizing photo-realistic novel views. However, they are generally based on the pinhole camera model and assume all-in-focus inputs. This limits their applicability as images captured from the real world often have finite depth-of-field (DoF). To mitigate this issue, we introduce DoF-NeRF, a novel neural rendering approach that can deal with shallow DoF inputs and can simulate DoF effect. In particular, it extends NeRF to simulate the aperture of lens following the principles of geometric optics. Such a physical guarantee allows DoF-NeRF to operate views with different focus configurations. Benefiting from explicit aperture modeling, DoF-NeRF also enables direct manipulation of DoF effect by adjusting virtual aperture and focus parameters. It is plug-and-play and can be inserted into NeRF-based frameworks. Experiments on synthetic and real-world datasets show that, DoF-NeRF not only performs comparably with NeRF in the all-in-focus setting, but also can synthesize all-in-focus novel views conditioned on shallow DoF inputs. An interesting application of DoF-NeRF to DoF rendering is also demonstrated. The source code will be made available at https://github.com/zijinwuzijin/DoF-NeRF.","url_abs":"https://arxiv.org/abs/2208.00945v1","url_pdf":"https://arxiv.org/pdf/2208.00945v1.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":"dof-nerf-depth-of-field-meets-neural-radiance","repo_url":"https://github.com/zijinwuzijin/dof-nerf","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"nerf","task_name":"NeRF"},{"task_slug":"neural-rendering","task_name":"Neural Rendering"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2208.00945","atlas_url":"https://app.syntology.ai/?focus=2208.00945","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2208.00945"}},"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/zijinwuzijin/dof-nerf","reach":null}],"summary":{"ran_draft_wrong":2,"ran_fixture":1},"by_repo_kind":{"official":{"samples":3,"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":"d26ffa77f1cd53a6","entry":"get_embedder","repo":"zijinwuzijin/dof-nerf","repo_kind":"official","path":"nerf_model.py","file_url":"https://github.com/zijinwuzijin/dof-nerf/blob/HEAD/nerf_model.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d26ffa77f1cd53a6"}},{"code_sha256_prefix":"492a3bd403592338","entry":"get_rays","repo":"zijinwuzijin/dof-nerf","repo_kind":"official","path":"nerf_model.py","file_url":"https://github.com/zijinwuzijin/dof-nerf/blob/HEAD/nerf_model.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"492a3bd403592338"}},{"code_sha256_prefix":"3a5488abbf352b17","entry":"get_rays_np","repo":"zijinwuzijin/dof-nerf","repo_kind":"official","path":"nerf_model.py","file_url":"https://github.com/zijinwuzijin/dof-nerf/blob/HEAD/nerf_model.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3a5488abbf352b17"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}