{"id":18614339,"url":"https://github.com/ashawkey/CCNeRF","last_synced_at":"2025-04-11T00:30:33.666Z","repository":{"id":37678964,"uuid":"497547671","full_name":"ashawkey/CCNeRF","owner":"ashawkey","description":"[NeurIPS 2022] Compressible-composable NeRF via Rank-residual Decomposition.","archived":false,"fork":false,"pushed_at":"2022-06-16T10:02:37.000Z","size":1118,"stargazers_count":130,"open_issues_count":4,"forks_count":9,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-04-05T21:22:50.531Z","etag":null,"topics":["nerf","pytorch"],"latest_commit_sha":null,"homepage":"","language":"Python","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/ashawkey.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}},"created_at":"2022-05-29T09:44:21.000Z","updated_at":"2025-02-22T05:28:00.000Z","dependencies_parsed_at":"2022-09-15T09:02:26.103Z","dependency_job_id":null,"html_url":"https://github.com/ashawkey/CCNeRF","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/ashawkey%2FCCNeRF","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashawkey%2FCCNeRF/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashawkey%2FCCNeRF/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashawkey%2FCCNeRF/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ashawkey","download_url":"https://codeload.github.com/ashawkey/CCNeRF/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":["nerf","pytorch"],"created_at":"2024-11-07T03:25:54.825Z","updated_at":"2025-04-11T00:30:32.855Z","avatar_url":"https://github.com/ashawkey.png","language":"Python","funding_links":[],"categories":["Papers"],"sub_categories":["NeRF"],"readme":"# CCNeRF\n\nThis repository contains the official implementation for the paper: __[Compressible-composable NeRF via Rank-residual Decomposition](https://arxiv.org/abs/2205.14870)__.\n\nWe also provide a slightly different implementation in the [torch-ngp](https://github.com/ashawkey/torch-ngp) framework, which has an interactive GUI and maybe better for experience!\n\n### [Project Page](https://ashawkey.github.io/ccnerf/) | [Arxiv](https://arxiv.org/abs/2205.14870) | [Torch-ngp implementation](https://github.com/ashawkey/torch-ngp)\n\n![teaser](assets/teaser.png)\n\n### Installation\n\nTested on Ubuntu with Python \u003e= 3.6 and PyTorch \u003e= 1.8.0.\n\n```bash\ngit clone https://github.com/ashawkey/CCNeRF.git\ncd CCNeRF\npip install -r requirements.txt \n```\n\n### Datasets\n\nYou can download the following datasets and put them under `./data`\n\n* [Synthetic-NeRF](https://drive.google.com/drive/folders/128yBriW1IG_3NJ5Rp7APSTZsJqdJdfc1)\n* [Tanks\u0026Temples](https://dl.fbaipublicfiles.com/nsvf/dataset/TanksAndTemple.zip)\n\n### Quick start\n\nTo reproduce the scene in teaser, simply run: \n```bash \nbash run.sh\n```\n\n### Train \u0026 Test on a single object / scene\n\nTo generate config files for all objects:\n\n```bash\ncd configs\n\n# modify the config template in this file.\npython gen_config.py \n```\n\nTo train and test on a single object:\n\n```bash\n# train and test on lego\npython train.py --config configs/lego_hybrid.txt\n\n# test with a pretrained checkpoint\npython train.py --config configs/lego_hybrid.txt --render_only 1 # choose the default ckpt\npython train.py --config configs/lego_hybrid.txt --render_only 1 --ckpt path/to/ckpt # speficy ckpt path\n```\n\nBy default, we test and report at all compression levels (groups), which may take some time to finish.\n\n### Compose multiple objects / scenes\n\nTo compose multiple pretrained objects in to a scene, we can modify the composition settings (model checkpoint and transformation matrix) in `compose.py`.\nWe provide some composed scenes as examples too:\n\n```python\n# load model\nchair = load_model('./log/chair_hybrid/chair_hybrid_5.th', 'CCNeRF')\n# scale and translation\nT0 = np.array([\n    [0.6, 0, 0, 0.8],\n    [0, 0.6, 0, 0],\n    [0, 0, 0.6, 0],\n    [0, 0, 0, 1],\n])\n# rotation\nR0 = np.eye(4)\nR0[:3, :3] = Rot.from_euler('zyx', [-90, 0, 0], degrees=True).as_matrix()\nT0 = T0 @ R0\n# compose to the scene\ntensorf.compose(chair, T0, R0[:3, :3])\n```\n\nThe config file is still needed to provide testing camera poses.\n`--ckpt none` means we are going to compose on an empty scene, else we will compose on the hotdog scene, which is not desired for the current example.\n```bash\npython compose.py --config configs/hotdog_hybrid.txt --ckpt none\n```\n\n### Citation\n\nIf you find the code useful for your research, please use the following `BibTeX` entry:\n```\n@article{tang2022compressible,\n  title={Compressible-composable NeRF via Rank-residual Decomposition},\n  author={Tang, Jiaxiang and Chen, Xiaokang and Wang, Jingbo and Zeng, Gang},\n  journal={arXiv preprint arXiv:2205.14870},\n  year={2022}\n}\n```\n\n### Acknowledgement\nWe would like to thank [TensoRF](https://github.com/apchenstu/TensoRF) authors for the great framework!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashawkey%2FCCNeRF","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fashawkey%2FCCNeRF","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashawkey%2FCCNeRF/lists"}