{"id":18614307,"url":"https://github.com/gyhandy/Neural-Sim-NeRF","last_synced_at":"2025-04-11T00:30:32.372Z","repository":{"id":49869264,"uuid":"516227505","full_name":"gyhandy/Neural-Sim-NeRF","owner":"gyhandy","description":"[ECCV 2022] Neural-Sim: Learning to Generate Training Data with NeRF","archived":false,"fork":false,"pushed_at":"2023-01-02T18:10:19.000Z","size":2303,"stargazers_count":158,"open_issues_count":5,"forks_count":8,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-11-07T03:30:59.828Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gyhandy.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-07-21T04:46:15.000Z","updated_at":"2024-09-27T17:47:01.000Z","dependencies_parsed_at":"2023-02-01T03:45:58.483Z","dependency_job_id":null,"html_url":"https://github.com/gyhandy/Neural-Sim-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/gyhandy%2FNeural-Sim-NeRF","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gyhandy%2FNeural-Sim-NeRF/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gyhandy%2FNeural-Sim-NeRF/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gyhandy%2FNeural-Sim-NeRF/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gyhandy","download_url":"https://codeload.github.com/gyhandy/Neural-Sim-NeRF/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:54.374Z","updated_at":"2025-04-11T00:30:31.751Z","avatar_url":"https://github.com/gyhandy.png","language":"Python","funding_links":[],"categories":["NeRF任务分类","Papers"],"sub_categories":["数据增强","NeRF"],"readme":"# Neural-Sim: Learning to Generate Training Data with NeRF\r\n\r\n[ECCV 2022] [Neural-Sim: Learning to Generate Training Data with NeRF](https://arxiv.org/pdf/2207.11368.pdf)\r\n\r\nCode are actively updating, thanks!\r\n\r\n## Overview\r\nThe code is for On-demand synthetic data generation: Given a target task and a\r\ntest dataset, our approach “Neural-sim” generates data on-demand using a fully\r\ndifferentiable synthetic data generation pipeline which maximises accuracy for\r\nthe target task.\r\n\u003cdiv align=\"center\"\u003e\r\n    \u003cimg src=\"./docs/neural-sim.png\" alt=\"Editor\" width=\"500\"\u003e\r\n\u003c/div\u003e\r\n\r\n\r\nNeural-Sim pipeline: Our pipeline finds the optimal parameters for generating views from a trained neural renderer (NeRF) to use as training data for\r\nobject detection. The objective is to find the optimal NeRF rendering parameters ψ that can generate synthetic training data Dtrain, such that the model\r\n(RetinaNet, in our experiments) trained on Dtrain, maximizes accuracy on a\r\ndownstream task represented by the validation set Dval\r\n\r\n\u003cdiv align=\"center\"\u003e\r\n    \u003cimg src=\"./docs/pipeline.png\" alt=\"Editor\" width=\"800\"\u003e\r\n\u003c/div\u003e\r\n\r\n## 1 Installation\r\n\r\nStart by cloning the repo:\r\n\r\n```bash\r\ngit clone https://github.com/gyhandy/Neural-Sim-NeRF.git\r\n```\r\n\r\n\r\n1 install the requirement of nerf-pytorch\r\n```bash\r\npip install -r requirements.txt\r\n```\r\n\r\n2 install [detectorn2](https://detectron2.readthedocs.io/en/latest/tutorials/install.html)\r\n\r\n## 2 NeRF models and dataset\r\n\r\n\r\n### Quick start\r\n\r\n\r\nFor quick start, you could download our pretrained NeRF models and created sample dataset with BlenderProc\r\n[here](http://ilab.usc.edu/andy/dataset/ycb_syn_data_and_nerfmodel.zip). Then unzip it and place in `.logs`. \r\n(Note: if not download automatically, please right click, copy the link and open in a new tab.)\r\n\r\n\r\n### Train your own NeRF model with BlenderProc\r\n\r\n\r\n#### (1) Generate Bop format images with BlenderProc \r\n\r\n- Follow the Installation instruction of [BlenderProc](https://github.com/DLR-RM/BlenderProc)\r\n\r\n- Download [BOP dataset](https://bop.felk.cvut.cz/datasets/) object toolkit used in BlenderProc. \r\nFor instance, to download the YCB-V dataset toolkit, please download the \"Base archive\" and \"Object models\", two zip files.\r\nThen unzip ycbv_base.zip get the ycbv folder, unzip ycbv_models.zip get the models folder, move the models folder into ycbv folder.\r\nThe path may look like this:\r\n```bash\r\n-BOP\r\n--bop_toolkit\r\n--ycbv_models\r\n--ycbv\r\n---models\r\n```\r\n\r\n- Follow the examples (https://github.com/DLR-RM/BlenderProc/blob/main/README.md#examples) to understand the basic configuration file.\r\nor use our example configure files in ./data/BlenderProc/camera_sampling.\r\n\r\nNote: It would be better to create a new virtual environment for Blenderproc synthesis.\r\n\r\nexample command\r\n```bash\r\npython run.py examples/camera_sampling/config.yaml /PATH/OF/BOP/ ycbv /PATH/OF/BOP/bop_toolkit/ OUTPUT/PATH\r\n```\r\n\r\n\r\n#### (2) Process synthesized images to be admitted by nerf (OPENCV --\u003e OPENGL)\r\n\r\nif use BlenderProc synthesized image, please use\r\n```bash\r\npython data_generation-Blender.py\r\n```\r\n\r\nif use LatentFusion read BOP format data, please use\r\n```bash\r\npython data_generation-LINEMOD.py\r\n```\r\n\r\n\r\n#### (3) You could train NeRF with instructions [NeRF-pytorch](https://github.com/yenchenlin/nerf-pytorch)\r\n\r\n## 3 Neural_Sim Bilelve optimization pipeline\r\n\r\n```bash\r\ncd ./optimization\r\n```\r\n\r\nPlease use the neural-sim_main.py to run the end-to-end pipeline. E.g.,\r\n\r\n```bash\r\npython neural_sim_main.py --config ../configs/nerf_param_ycbv_general.txt --object_id 2 --expname exp_ycb_synthetic --psi_pose_cats_mode 5 --test_distribution 'one_1'\r\n```\r\n'--config' indicates the NeRF parameter\r\n\r\n'--object_id' indicates the optimized ycbv object id, here is cheese box\r\n\r\n'--expname' indicates the name of experiment\r\n\r\n'--psi_pose_cats_mode' indicates the bin number of starting pose distribution during training\r\n\r\n'--test_distribution' indicates the bin number of test pose distribution\r\n\r\n\r\n\r\n## Contact / Cite\r\nIf you use (part of) our code or find our work helpful, please consider citing\r\n```\r\n@article{ge2022neural,\r\n  title={Neural-Sim: Learning to Generate Training Data with NeRF},\r\n  author={Ge, Yunhao and Behl, Harkirat and Xu, Jiashu and Gunasekar, Suriya and Joshi, Neel and Song, Yale and Wang, Xin and Itti, Laurent and Vineet, Vibhav},\r\n  journal={arXiv preprint arXiv:2207.11368},\r\n  year={2022}\r\n}\r\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgyhandy%2FNeural-Sim-NeRF","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgyhandy%2FNeural-Sim-NeRF","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgyhandy%2FNeural-Sim-NeRF/lists"}