{"id":13411546,"url":"https://github.com/bmild/nerf","last_synced_at":"2025-04-09T01:21:37.619Z","repository":{"id":37391853,"uuid":"248381700","full_name":"bmild/nerf","owner":"bmild","description":"Code release for NeRF (Neural Radiance Fields)","archived":false,"fork":false,"pushed_at":"2024-07-12T14:24:14.000Z","size":3988,"stargazers_count":10299,"open_issues_count":121,"forks_count":1413,"subscribers_count":141,"default_branch":"master","last_synced_at":"2025-04-02T00:17:42.598Z","etag":null,"topics":["nerf","neural-radiance-fields"],"latest_commit_sha":null,"homepage":"http://tancik.com/nerf","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bmild.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-19T01:24:18.000Z","updated_at":"2025-04-01T13:40:00.000Z","dependencies_parsed_at":"2024-10-14T12:40:56.852Z","dependency_job_id":"1dd3e1ed-459b-4569-8b40-c0438bce0dab","html_url":"https://github.com/bmild/nerf","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmild%2Fnerf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmild%2Fnerf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmild%2Fnerf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmild%2Fnerf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bmild","download_url":"https://codeload.github.com/bmild/nerf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247953848,"owners_count":21024100,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nerf","neural-radiance-fields"],"created_at":"2024-07-30T20:01:14.404Z","updated_at":"2025-04-09T01:21:37.598Z","avatar_url":"https://github.com/bmild.png","language":"Jupyter Notebook","funding_links":[],"categories":["Jupyter Notebook","二、NeRF奠基与核心论文（含近年突破）","Datasets","3D视觉生成重建","Papers","Implementations","Tools, Pipeline \u0026 Utilities","NeRFs"],"sub_categories":["Arxiv","资源传输下载","NeRF","Photogrammetry \u0026 3D Scanning"],"readme":"# NeRF: Neural Radiance Fields\n### [Project Page](http://tancik.com/nerf) | [Video](https://youtu.be/JuH79E8rdKc) | [Paper](https://arxiv.org/abs/2003.08934) | [Data](https://drive.google.com/drive/folders/128yBriW1IG_3NJ5Rp7APSTZsJqdJdfc1)\n[![Open Tiny-NeRF in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/bmild/nerf/blob/master/tiny_nerf.ipynb)\u003cbr\u003e\nTensorflow implementation of optimizing a neural representation for a single scene and rendering new views.\u003cbr\u003e\u003cbr\u003e\n[NeRF: Representing Scenes as Neural Radiance Fields for View Synthesis](http://tancik.com/nerf)  \n [Ben Mildenhall](https://people.eecs.berkeley.edu/~bmild/)\\*\u003csup\u003e1\u003c/sup\u003e,\n [Pratul P. Srinivasan](https://people.eecs.berkeley.edu/~pratul/)\\*\u003csup\u003e1\u003c/sup\u003e,\n [Matthew Tancik](http://tancik.com/)\\*\u003csup\u003e1\u003c/sup\u003e,\n [Jonathan T. Barron](http://jonbarron.info/)\u003csup\u003e2\u003c/sup\u003e,\n [Ravi Ramamoorthi](http://cseweb.ucsd.edu/~ravir/)\u003csup\u003e3\u003c/sup\u003e,\n [Ren Ng](https://www2.eecs.berkeley.edu/Faculty/Homepages/yirenng.html)\u003csup\u003e1\u003c/sup\u003e \u003cbr\u003e\n \u003csup\u003e1\u003c/sup\u003eUC Berkeley, \u003csup\u003e2\u003c/sup\u003eGoogle Research, \u003csup\u003e3\u003c/sup\u003eUC San Diego  \n  \\*denotes equal contribution  \nin ECCV 2020 (Oral Presentation, Best Paper Honorable Mention)\n\n\u003cimg src='imgs/pipeline.jpg'/\u003e\n\n## TL;DR quickstart\n\nTo setup a conda environment, download example training data, begin the training process, and launch Tensorboard:\n```\nconda env create -f environment.yml\nconda activate nerf\nbash download_example_data.sh\npython run_nerf.py --config config_fern.txt\ntensorboard --logdir=logs/summaries --port=6006\n```\nIf everything works without errors, you can now go to `localhost:6006` in your browser and watch the \"Fern\" scene train.\n\n## Setup\n\nPython 3 dependencies:\n\n* Tensorflow 1.15\n* matplotlib\n* numpy\n* imageio\n*  configargparse\n\nThe LLFF data loader requires ImageMagick.\n\nWe provide a conda environment setup file including all of the above dependencies. Create the conda environment `nerf` by running:\n```\nconda env create -f environment.yml\n```\n\nYou will also need the [LLFF code](http://github.com/fyusion/llff) (and COLMAP) set up to compute poses if you want to run on your own real data.\n\n## What is a NeRF?\n\nA neural radiance field is a simple fully connected network (weights are ~5MB) trained to reproduce input views of a single scene using a rendering loss. The network directly maps from spatial location and viewing direction (5D input) to color and opacity (4D output), acting as the \"volume\" so we can use volume rendering to differentiably render new views.\n\nOptimizing a NeRF takes between a few hours and a day or two (depending on resolution) and only requires a single GPU. Rendering an image from an optimized NeRF takes somewhere between less than a second and ~30 seconds, again depending on resolution.\n\n\n## Running code\n\nHere we show how to run our code on two example scenes. You can download the rest of the synthetic and real data used in the paper [here](https://drive.google.com/drive/folders/128yBriW1IG_3NJ5Rp7APSTZsJqdJdfc1).\n\n### Optimizing a NeRF\n\nRun\n```\nbash download_example_data.sh\n```\nto get the our synthetic Lego dataset and the LLFF Fern dataset.\n\nTo optimize a low-res Fern NeRF:\n```\npython run_nerf.py --config config_fern.txt\n```\nAfter 200k iterations (about 15 hours), you should get a video like this at `logs/fern_test/fern_test_spiral_200000_rgb.mp4`:\n\n![ferngif](https://people.eecs.berkeley.edu/~bmild/nerf/fern_200k_256w.gif)\n\nTo optimize a low-res Lego NeRF:\n```\npython run_nerf.py --config config_lego.txt\n```\nAfter 200k iterations, you should get a video like this:\n\n![legogif](https://people.eecs.berkeley.edu/~bmild/nerf/lego_200k_256w.gif)\n\n### Rendering a NeRF\n\nRun\n```\nbash download_example_weights.sh\n```\nto get a pretrained high-res NeRF for the Fern dataset. Now you can use [`render_demo.ipynb`](https://github.com/bmild/nerf/blob/master/render_demo.ipynb) to render new views.\n\n### Replicating the paper results\n\nThe example config files run at lower resolutions than the quantitative/qualitative results in the paper and video. To replicate the results from the paper, start with the config files in [`paper_configs/`](https://github.com/bmild/nerf/tree/master/paper_configs). Our synthetic Blender data and LLFF scenes are hosted [here](https://drive.google.com/drive/folders/128yBriW1IG_3NJ5Rp7APSTZsJqdJdfc1) and the DeepVoxels data is hosted by Vincent Sitzmann [here](https://drive.google.com/open?id=1lUvJWB6oFtT8EQ_NzBrXnmi25BufxRfl).\n\n### Extracting geometry from a NeRF\n\nCheck out [`extract_mesh.ipynb`](https://github.com/bmild/nerf/blob/master/extract_mesh.ipynb) for an example of running marching cubes to extract a triangle mesh from a trained NeRF network. You'll need the install the [PyMCubes](https://github.com/pmneila/PyMCubes) package for marching cubes plus the [trimesh](https://github.com/mikedh/trimesh) and [pyrender](https://github.com/mmatl/pyrender) packages if you want to render the mesh inside the notebook:\n```\npip install trimesh pyrender PyMCubes\n```\n\n## Generating poses for your own scenes\n\n### Don't have poses?\n\nWe recommend using the `imgs2poses.py` script from the [LLFF code](https://github.com/fyusion/llff). Then you can pass the base scene directory into our code using `--datadir \u003cmyscene\u003e` along with `-dataset_type llff`. You can take a look at the `config_fern.txt` config file for example settings to use for a forward facing scene. For a spherically captured 360 scene, we recomment adding the `--no_ndc --spherify --lindisp` flags.\n\n### Already have poses!\n\nIn `run_nerf.py` and all other code, we use the same pose coordinate system as in OpenGL: the local camera coordinate system of an image is defined in a way that the X axis points to the right, the Y axis upwards, and the Z axis backwards as seen from the image.\n\nPoses are stored as 3x4 numpy arrays that represent camera-to-world transformation matrices. The other data you will need is simple pinhole camera intrinsics (`hwf = [height, width, focal length]`) and near/far scene bounds. Take a look at [our data loading code](https://github.com/bmild/nerf/blob/master/run_nerf.py#L406) to see more.\n\n## Citation\n\n```\n@inproceedings{mildenhall2020nerf,\n  title={NeRF: Representing Scenes as Neural Radiance Fields for View Synthesis},\n  author={Ben Mildenhall and Pratul P. Srinivasan and Matthew Tancik and Jonathan T. Barron and Ravi Ramamoorthi and Ren Ng},\n  year={2020},\n  booktitle={ECCV},\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbmild%2Fnerf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbmild%2Fnerf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbmild%2Fnerf/lists"}