Builder API for constructing Encord scene payloads. Provides a multi-stage builder pattern for assembling scene data. Each stream type has its own nested builder, and event timestamps are assigned sequentially. Stages:Documentation Index
Fetch the complete documentation index at: https://docs.encord.com/llms.txt
Use this file to discover all available pages before exploring further.
- Create a SceneBuilder and (optionally) configure global settings.
- Add one or more streams — each
add_*_streamcall returns a nested stream builder. - Populate streams with events via the stream-specific method
(
add_pcd,add_image,add_camera_params,add_pose). - Pass the builder to SDK upload/create methods, which validates and serializes internally.
self, so stream-local calls can be chained fluently::
scene = SceneBuilder()
scene.add_pcd_stream(“lidar”).add_pcd(uri=“s3://bucket/frame0.pcd”)
SceneBuilder Objects
- Point cloud — add_pcd_stream()
- Camera parameters — add_camera_stream()
- Frame of reference — add_for_stream()
- Image — add_image_stream()
_build validates and serializes
builders internally for SDK upload/create methods.
set_world_convention
cross(x, y) == z) must match
the camera convention.
Available directions: Direction.UP, Direction.DOWN,
Direction.LEFT, Direction.RIGHT, Direction.FORWARD,
Direction.BACKWARD.
set_camera_convention
Direction.UP, Direction.DOWN,
Direction.LEFT, Direction.RIGHT, Direction.FORWARD,
Direction.BACKWARD.
add_pcd_stream
name- Unique stream name.frame_of_reference- Optional FoR stream to link to.pose- Optional static pose for the sensor mount.
add_camera_stream
name- Unique stream name.frame_of_reference- Optional FoR stream to link to.pose- Optional static pose for the sensor mount.
add_for_stream
name- Unique stream name. Other streams reference this stream via this name.parent_for_id- Optional parent FoR — either the stream name or a FoRStreamBuilder. If omitted, the stream is attached to the scene root.
add_image_stream
- Existing camera: pass
camera="cam_stream_name"to link to an already-registered camera stream. - Inline camera: pass
width,height, andintrinsicsto auto-create a camera stream named{name}/camera.
name- Unique stream name.camera- The stream name of a camera-parameters stream. Mutually exclusive withwidth/height/intrinsics.width- Image width in pixels (inline camera mode).height- Image height in pixels (inline camera mode).intrinsics- Camera intrinsics (inline camera mode).timestamp- Camera-parameters event timestamp (inline camera mode).frame_of_reference- Optional FoR linkage for the auto-created camera stream (only used in inline camera mode).pose- Optional static pose for the auto-created camera stream (only used in inline camera mode).

