Skip to content

Instantly share code, notes, and snippets.

@Eppy-xDYS
Eppy-xDYS / reconstruct_mesh.py
Last active May 6, 2026 11:57
Mesh reconstruction from rgbd+3dgs
#!/usr/bin/env python3
"""
reconstruct_mesh.py — Geometry-only mesh from multi-modal inputs.
Dependencies:
pip install open3d numpy pillow scipy tqdm
Example commands:
python reconstruct_mesh.py \
@Eppy-xDYS
Eppy-xDYS / build_transforms.py
Last active May 1, 2026 18:51
Create a transforms.json for nerfstudio using a colmap reconstruction
import numpy as np
import json
import struct
from pathlib import Path
import argparse
def read_cameras_bin(path):
cameras = {}
with open(path, "rb") as f:
n = struct.unpack("<Q", f.read(8))[0]
@Eppy-xDYS
Eppy-xDYS / update_poses.py
Created April 30, 2026 11:09
If arkit tracking is lost while using Splatking run colmap and this will update the transforms.json with a colmap the reconstruction
import numpy as np, json, struct, sys
from pathlib import Path
def read_cameras_bin(path):
cameras = {}
with open(path, "rb") as f:
n = struct.unpack("<Q", f.read(8))[0]
for _ in range(n):
cam_id, model_id = struct.unpack("<ii", f.read(8))
w, h = struct.unpack("<qq", f.read(16))
@Eppy-xDYS
Eppy-xDYS / convert_to_nerfstudio.py
Last active May 27, 2026 15:25
Converts Splatking lidar capture to nerfstudio format
#!/usr/bin/env python3
"""
Convert ARKit LiDAR capture Gaussian Splat King → nerfstudio format.
Outputs (written to --output-dir, default = --capture-dir):
transforms.json nerfstudio camera + PLY reference file
images/<name>.jpg 180°-rotated JPEGs
depth/<stem>_depth.png 16-bit PNG depth maps in millimetres
lidar_pointcloud_world_xyz.ply Binary PLY in nerfstudio world space (Z-up)