Skip to main content

PointCloudFileSpace Objects

put_object_instance

Add an object instance to this point cloud space. Accepts either explicit Range objects or an Encord-compatible RLE string. When ranges is a string it is interpreted as an RLE-encoded set of point indices and is only valid for segmentation object types. Use encord.common.bitmask_operations.coco_rle_to_encord_rle before passing pycocotools/COCO RLE counts here. Arguments:
  • object_instance - The object instance to add to the space.
  • ranges - Point ranges where the object should appear. Can be:
    • A single Range object.
    • A list of Range objects.
    • An Encord-compatible RLE string (segmentation shapes only).
  • on_overlap - Strategy for handling existing annotations on overlapping ranges.
    • “error” (default): Raises an error if annotation already exists.
    • “merge”: Adds to new ranges while keeping existing annotations.
    • “replace”: Removes existing ranges before adding new ones.
  • created_at - Optional timestamp when the annotation was created.
  • created_by - Optional identifier of who created the annotation.
  • last_edited_at - Optional timestamp when the annotation was last edited.
  • last_edited_by - Optional identifier of who last edited the annotation.
  • confidence - Optional confidence score for the annotation (0.0 to 1.0).
  • manual_annotation - Optional flag indicating if this was manually annotated.
Raises:
  • LabelRowError - If an RLE string is given for a non-segmentation shape, if the RLE string produces no valid ranges, or if ranges overlap with existing ones when on_overlap="error".