Cameras (.cameras)#
Module contents#
- infinigen2.cameras.attach_stereo_right(
- camera_left,
- baseline,
- focal_length_mm=15,
Create a right camera parented to camera_left with a baseline offset.
- Parameters:
camera_left (CameraObject)
baseline (float)
focal_length_mm (float) -- (default:
15)
- infinigen2.cameras.camera_cube_free_space_check(...) bool[source]#
Return whether the camera’s clearance cubes avoid all colliders.
- Parameters:
camera (CameraObject)
colliders (CollisionSet)
probe_offset (float) -- (default:
0.0)probe_size (float) -- (default:
0.75)forward_clearance (float) -- (default:
0.0)
- infinigen2.cameras.camera_follow_path(...) CameraObject[source]#
- Parameters:
rng (Generator)
frame_start (int)
frame_end (int)
focal_length_mm (float) -- (default:
15)rot_std_deg (tuple[float, float, float]) -- (default:
(20.0, 20.0, 20.0))yaw_motion_std_deg (float) -- (default:
80.0)rotation_interval_sec_range (tuple[float, float]) -- (default:
(1.5, 4.0))rotation_lookahead_m (float) -- (default:
1.0)max_abs_roll_deg (float) -- (default:
25.0)max_abs_pitch_offset_deg (float) -- (default:
25.0)
- infinigen2.cameras.camera_linear_pan_rand(...) list[CameraObject][source]#
Dolly travelling in a straight line between two points drawn uniformly in the room interior, at up to speed metres/frame, holding a random fixed yaw and slight downward pitch so the scene slides across the view.
accept_pred replaces the default collision probe as the test every pose along the trajectory must satisfy, so a custom predicate must include any required collision checks.
Example renders
- Parameters:
rng (Generator)
objects (list[pf.MeshObject])
colliders (CollisionSet)
frame_start (int) -- (default:
0)frame_end (int) -- (default:
72)focal_length_mm (float) -- (default:
15)speed (float) -- (default:
0.04)footprint_frac (float) -- (default:
0.4)forward_clearance (float) -- (default:
0.75)max_tries (int) -- (default:
200)accept_pred (Callable[[CameraObject, CollisionSet], bool] | None) -- (default:
None)
- infinigen2.cameras.camera_monocular_360_rand(...) list[CameraObject][source]#
Example renders
- Parameters:
objects (list[pf.MeshObject])
camera (CameraObject | None) -- (default:
None)radius (float | None) -- (default:
None)height (float | None) -- (default:
None)frame_start (int) -- (default:
1)frame_end (int) -- (default:
1)focal_length_mm (float) -- (default:
15)total_angle_rad (float) -- (default:
6.283)
- infinigen2.cameras.camera_monocular_in_bbox_rand(...) list[CameraObject][source]#
Example renders
- Parameters:
rng (Generator)
objects (list[pf.MeshObject])
colliders (CollisionSet)
frame_start (int) -- (default:
1)frame_end (int) -- (default:
1)margin (float) -- (default:
0.05)max_tries (int) -- (default:
100)focal_length_mm (float) -- (default:
15)accept_pred (Callable[[CameraObject, CollisionSet], bool] | None) -- (default:
None)
- infinigen2.cameras.camera_orbit_90_rand(...) list[CameraObject][source]#
Eye-level 90-degree orbit around the room centre over the full frame range, for spinout clips. Pair with exporter_frames to render shards (the orbit is deterministic, so every shard follows the identical path).
When bbox is given, the orbit is computed from that interior box so exterior meshes (extruded wall slabs, skylight shafts) can’t inflate the radius and push the camera through the walls; otherwise it falls back to the object bbox.
Example renders
- infinigen2.cameras.camera_random_walk(...) CameraObject[source]#
Example renders
- Parameters:
rng (Generator)
colliders (CollisionSet)
objects (list[pf.MeshObject])
camera (CameraObject | None) -- (default:
None)frame_start (int) -- (default:
1)frame_end (int) -- (default:
1)focal_length_mm (float) -- (default:
15)margin (float) -- (default:
0.05)accept_pred (Callable[[CameraObject, CollisionSet], bool] | None) -- (default:
None)max_tries (int) -- (default:
20)max_retries (int) -- (default:
20)speed_mps_range (tuple[float, float]) -- (default:
(1.33, 2.0))loc_step_range (tuple[float, float]) -- (default:
(1.0, 4.0))rot_std_deg (tuple[float, float, float]) -- (default:
(15.0, 15.0, 30.0))roll_range_deg (tuple[float, float]) -- (default:
(-25.0, 25.0))pitch_range_deg (tuple[float, float]) -- (default:
(45.0, 135.0))height_range (tuple[float, float] | None) -- (default:
(0.5, 2.2))
- infinigen2.cameras.camera_rrt_trajectory(...) CameraObject[source]#
Example renders
- Parameters:
rng (Generator)
colliders (CollisionSet)
frame_start (int)
frame_end (int)
n_random_goals (int) -- (default:
4)clearance (float) -- (default:
0.6)point_pred (Callable[[ndarray], bool] | None) -- (default:
None)max_rrt_iter (int) -- (default:
2000)focal_length_mm (float) -- (default:
15)rot_std_deg (tuple[float, float, float]) -- (default:
(20.0, 20.0, 20.0))max_abs_roll_deg (float) -- (default:
25.0)max_abs_pitch_offset_deg (float) -- (default:
25.0)
- infinigen2.cameras.camera_transform_cube_free_space_check(...) bool[source]#
Return whether clearance cubes at transform avoid all colliders.
- Parameters:
transform (ndarray)
colliders (CollisionSet)
probe_offset (float) -- (default:
0.0)probe_size (float) -- (default:
0.75)forward_clearance (float) -- (default:
0.0)
- infinigen2.cameras.camera_with_distance_framing_objects(...) CameraObject[source]#
- Parameters:
margin_pct (float) -- What percent of the image width/height should remain empty around the object
query_distance -- distance to use for an initial projection of the target object.
target_objects (list[pf.MeshObject])
direction (pf.Vector)
center_location (pf.Vector | None) -- (default:
None)camera (CameraObject | None) -- (default:
None)use_bbox (bool) -- (default:
False)
- infinigen2.cameras.rrt_path(...) list[ndarray][source]#
RRT* waypoints from start (excluded) to goal (included) through points with a free clearance cube that satisfy point_pred, joined by edges a clearance-wide box can sweep without hitting colliders.
- infinigen2.cameras.stereo_accept_pred(
- baseline,
- accept_pred=None,
Wrap a left-camera accept predicate so the baseline-offset right camera is collision-validated too. Pass to any monocular camera placement (e.g.
camera_random_walk) so both eyes are checked at every pose, then realize the right camera withattach_stereo_right().- Parameters:
baseline (float)
accept_pred (Callable[[CameraObject, CollisionSet], bool] | None) -- (default:
None)