The scene_gt.json file defines the spatial bounds and scaling of the scene. It requires:
scale: A scaling factor derived from the 3D bounding box of the objects (e.g., 1.0 / sqrt(sum(bbox_diff**2))).center: The 3D center of the scene (often [0, 0, 0]).bbox: The 3D bounding box corners [[min_x, min_y, min_z], [max_x, max_y, max_z]].near and far: The near and far clipping planes for ray sampling.
# Example scene info generation
bbox_corners = np.array([[0, 0, 0], [50, 50, 10]])
scene_scale = 1.0 / np.sqrt(np.sum((bbox_corners[1] - bbox_corners[0]) ** 2))
scene_center = np.array([0., 0., 0.])
with scene_json_path.open('w') as f:
json.dump({
'scale': scene_scale,
'center': scene_center.tolist(),
'bbox': bbox_corners.tolist(),
'near': 0.1,
'far': 1.0,
}, f, indent=2)