{"id":18614379,"url":"https://github.com/google/mipnerf","last_synced_at":"2025-04-11T00:30:35.641Z","repository":{"id":37499639,"uuid":"367413802","full_name":"google/mipnerf","owner":"google","description":null,"archived":true,"fork":false,"pushed_at":"2022-10-10T18:09:16.000Z","size":86,"stargazers_count":922,"open_issues_count":27,"forks_count":108,"subscribers_count":17,"default_branch":"main","last_synced_at":"2025-04-08T20:07:40.209Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/google.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-05-14T16:01:11.000Z","updated_at":"2025-04-04T21:22:54.000Z","dependencies_parsed_at":"2023-01-19T11:30:59.689Z","dependency_job_id":null,"html_url":"https://github.com/google/mipnerf","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/google%2Fmipnerf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fmipnerf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fmipnerf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fmipnerf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/google","download_url":"https://codeload.github.com/google/mipnerf/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248322208,"owners_count":21084333,"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":[],"created_at":"2024-11-07T03:25:55.713Z","updated_at":"2025-04-11T00:30:35.036Z","avatar_url":"https://github.com/google.png","language":"Python","funding_links":[],"categories":["Papers","Implementations","Tools, Pipeline \u0026 Utilities","Models and Projects"],"sub_categories":["NeRF","Photogrammetry \u0026 3D Scanning","Flax"],"readme":"# mip-NeRF\n\nThis repository contains the code release for\n[Mip-NeRF: A Multiscale Representation for Anti-Aliasing Neural Radiance Fields](https://jonbarron.info/mipnerf/).\nThis implementation is written in [JAX](https://github.com/google/jax), and\nis a fork of Google's [JaxNeRF implementation](https://github.com/google-research/google-research/tree/master/jaxnerf).\nContact [Jon Barron](https://jonbarron.info/) if you encounter any issues.\n\n![rays](https://user-images.githubusercontent.com/3310961/118305131-6ce86700-b49c-11eb-99b8-adcf276e9fe9.jpg)\n\n## Abstract\n\nThe rendering procedure used by neural radiance fields (NeRF) samples a scene\nwith a single ray per pixel and may therefore produce renderings that are\nexcessively blurred or aliased when training or testing images observe scene\ncontent at different resolutions. The straightforward solution of supersampling\nby rendering with multiple rays per pixel is impractical for NeRF, because\nrendering each ray requires querying a multilayer perceptron hundreds of times.\nOur solution, which we call \"mip-NeRF\" (à la \"mipmap\"), extends NeRF to\nrepresent the scene at a continuously-valued scale. By efficiently rendering\nanti-aliased conical frustums instead of rays, mip-NeRF reduces objectionable\naliasing artifacts and significantly improves NeRF's ability to represent\nfine details, while also being 7% faster than NeRF and half the size. Compared\nto NeRF, mip-NeRF reduces average error rates by 17% on the dataset presented\nwith NeRF and by 60% on a challenging multiscale variant of that dataset that\nwe present. mip-NeRF is also able to match the accuracy of a brute-force\nsupersampled NeRF on our multiscale dataset while being 22x faster.\n\n\n## Installation\nWe recommend using [Anaconda](https://www.anaconda.com/products/individual) to set\nup the environment. Run the following commands:\n\n```\n# Clone the repo\ngit clone https://github.com/google/mipnerf.git; cd mipnerf\n# Create a conda environment, note you can use python 3.6-3.8 as\n# one of the dependencies (TensorFlow) hasn't supported python 3.9 yet.\nconda create --name mipnerf python=3.6.13; conda activate mipnerf\n# Prepare pip\nconda install pip; pip install --upgrade pip\n# Install requirements\npip install -r requirements.txt\n```\n\n[Optional] Install GPU and TPU support for Jax\n```\n# Remember to change cuda101 to your CUDA version, e.g. cuda110 for CUDA 11.0.\npip install --upgrade jax jaxlib==0.1.65+cuda101 -f https://storage.googleapis.com/jax-releases/jax_releases.html\n```\n\n## Data\n\nThen, you'll need to download the datasets\nfrom the [NeRF official Google Drive](https://drive.google.com/drive/folders/128yBriW1IG_3NJ5Rp7APSTZsJqdJdfc1).\nPlease download and unzip `nerf_synthetic.zip` and `nerf_llff_data.zip`.\n\n### Generate multiscale dataset\nYou can generate the multiscale dataset used in the paper by running the following command,\n```\npython scripts/convert_blender_data.py --blenderdir /nerf_synthetic --outdir /multiscale\n```\n\n## Running\n\nExample scripts for training mip-NeRF on individual scenes from the three\ndatasets used in the paper can be found in `scripts/`. You'll need to change\nthe paths to point to wherever the datasets are located.\n[Gin](https://github.com/google/gin-config) configuration files for our model\nand some ablations can be found in `configs/`.\nAn example script for evaluating on the test set of each scene can be found\nin `scripts/`, after which you can use `scripts/summarize.ipynb` to produce\nerror metrics across all scenes in the same format as was used in tables in the\npaper.\n\n### OOM errors\nYou may need to reduce the batch size to avoid out of memory errors. For example the model can be run on a NVIDIA 3080 (10Gb) using the following flag. \n```\n--gin_param=\"Config.batch_size = 1024\"\n```\n\n## Citation\nIf you use this software package, please cite our paper:\n\n```\n@misc{barron2021mipnerf,\n      title={Mip-NeRF: A Multiscale Representation for Anti-Aliasing Neural Radiance Fields},\n      author={Jonathan T. Barron and Ben Mildenhall and Matthew Tancik and Peter Hedman and Ricardo Martin-Brualla and Pratul P. Srinivasan},\n      year={2021},\n      eprint={2103.13415},\n      archivePrefix={arXiv},\n      primaryClass={cs.CV}\n}\n```\n\n## Acknowledgements\nThanks to [Boyang Deng](https://boyangdeng.com/) for JaxNeRF.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogle%2Fmipnerf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoogle%2Fmipnerf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogle%2Fmipnerf/lists"}