Download render_pipeline.py from RoboticImaging/3D-Reconstruction-Asset-Inspection-Benchmark: direct link, hf CLI and curl.
- Browser
- Download file 938 Bytes
-
https://huggingface.co/datasets/RoboticImaging/3D-Reconstruction-Asset-Inspection-Benchmark/resolve/main/render_pipeline.py
- Command line
-
hf download hf://datasets/RoboticImaging/3D-Reconstruction-Asset-Inspection-Benchmark/render_pipeline.py
-
curl -L -o render_pipeline.py https://huggingface.co/datasets/RoboticImaging/3D-Reconstruction-Asset-Inspection-Benchmark/resolve/main/render_pipeline.py
938 Bytes
| import os | |
| import tomllib | |
| import math | |
| scenes = ["bridge", "crane", "office_dynamic", "glass_house", "old_house", "unfinished_build", "ship"] | |
| for scene in scenes: | |
| os.system( | |
| f"blender -b {scene}/{scene}.blend -P export_unordered_cams.py -- {scene}" | |
| ) | |
| with open(f"{scene}/scene_data.toml", "rb") as f: | |
| data = tomllib.load(f) | |
| scene_data = data["scene_data"] | |
| offset_dict = data['traj2offset'] | |
| offsets = offset_dict.values() | |
| for offset in offsets: | |
| if math.isnan(offset): | |
| continue | |
| indir = f"{scene}/unordered_cams/traj=proxy_surface_{offset}" | |
| outdir = f"{scene}/cam_order/traj=proxy_surface_{offset}" | |
| os.makedirs(outdir, exist_ok=True) | |
| os.system( | |
| "python tsp_solver.py " + indir + " " + | |
| outdir + '/splatworks_cam_order.txt' | |
| ) | |
| os.system( | |
| f"blender -b {scene}/{scene}.blend -P render_scene.py" | |
| ) | |