Types

See also

Please visit our docs for more information on Segments.ai and visit the setup page to learn how to install and setup the Segments.ai Python SDK.

Datasets

class Dataset[source]
field name: str
field full_name: str
field cloned_from: str | None
field description: str
field category: Category
field public: bool
field archived: bool
field owner: Owner
field created_at: str
field enable_ratings: bool
field enable_skip_labeling: bool
field enable_skip_reviewing: bool
field enable_save_button: bool
field enable_label_status_verified: bool
field enable_same_dimensions_track_constraint: bool
field enable_3d_region_of_interest: bool
field enable_3d_cuboid_rotation: bool | None
field enable_confirm_on_submit: bool | None
field enable_interpolation: bool
field use_timestamps_for_interpolation: bool
field enable_object_linking: bool
field task_type: TaskType
field label_stats: LabelStats
field labeling_inactivity_timeout_seconds: int | None
field samples_count: str | int | None
field collaborators_count: int | None
field task_attributes: TaskAttributes | None
field labelsets: List[Labelset] | None
field role: str | None
field readme: str | None
field metadata: Dict[str, Any]
field noncollaborator_can_label: bool | None
field noncollaborator_can_review: bool | None
field insights_urls: Dict[str, str] | None
field region_of_interest: Dict[str, Any] | None
class Collaborator[source]
field user: User
field role: Role
class User[source]
field username: str
field created_at: str
field is_organization: bool
field email: str | None
field webhooks_enabled: bool | None
field private_upload_count: int | None
field public_upload_count: int | None
field subscription: Subscription | None
field is_trial_expired: bool | None
field organizations: List[User] | None
field organization_created_by: str | None
field organization_role: Role | None
field members: List[User] | None
field insights_urls: Dict[str, str] | None
class TaskType(*values)[source]
SEGMENTATION_BITMAP = 'segmentation-bitmap'
SEGMENTATION_BITMAP_HIGHRES = 'segmentation-bitmap-highres'
IMAGE_SEGMENTATION_SEQUENCE = 'image-segmentation-sequence'
BBOXES = 'bboxes'
VECTOR = 'vector'
IMAGE_VECTOR_SEQUENCE = 'image-vector-sequence'
KEYPOINTS = 'keypoints'
POINTCLOUD_CUBOID = 'pointcloud-cuboid'
POINTCLOUD_CUBOID_SEQUENCE = 'pointcloud-cuboid-sequence'
POINTCLOUD_SEGMENTATION = 'pointcloud-segmentation'
POINTCLOUD_SEGMENTATION_SEQUENCE = 'pointcloud-segmentation-sequence'
POINTCLOUD_VECTOR = 'pointcloud-vector'
POINTCLOUD_VECTOR_SEQUENCE = 'pointcloud-vector-sequence'
MULTISENSOR_SEQUENCE = 'multisensor-sequence'
EMPTY = ''

Samples

class Sample[source]
field uuid: str
field name: str
field attributes: SampleAttributes | None
field metadata: Dict[str, Any]
field created_at: str
field created_by: str
field readme: str
field assigned_labeler: str | None
field assigned_reviewer: str | None
field priority: float
field label: Label | LabelSummary | None
field issues: List[Issue] | None
field dataset_full_name: str | None
class Issue[source]
field uuid: str
field description: str
field created_at: str
field updated_at: str
field created_by: str
field updated_by: str
field status: IssueStatus
field comments: List[IssueComment]
field anchor: IssueAnchor | None
field sample_uuid: str
field sample_name: str
class IssueComment[source]
field created_at: str
field created_by: str
field text: str
class IssueStatus(*values)[source]
OPEN = 'OPEN'
CLOSED = 'CLOSED'

Image sample

class ImageSampleAttributes[source]
field image: URL

Image sequence sample

class ImageSequenceSampleAttributes[source]
field frames: List[ImageFrame]
class ImageFrame[source]

Bases: ImageSampleAttributes

field name: str | None
field timestamp: Timestamp | None

Point cloud sample

class PointcloudSampleAttributes[source]
field pcd: PCD
field images: List[CalibratedImage]
field ego_pose: EgoPose | None
field default_z: float | None
field name: str | None
field timestamp: Timestamp | None
field bounds: Bounds | None

Point cloud sequence sample

class PointcloudSequenceSampleAttributes[source]
field frames: List[PointcloudSampleAttributes]

Multi-sensor sample

class MultiSensorSampleAttributes[source]
field sensors: List[MultiSensorPointcloudSequenceSampleAttributes | MultiSensorImageSequenceSampleAttributes]
class MultiSensorPointcloudSequenceSampleAttributes[source]
field name: str
field task_type: Literal[TaskType.POINTCLOUD_CUBOID_SEQUENCE] | Literal[TaskType.POINTCLOUD_VECTOR_SEQUENCE] | Literal[TaskType.POINTCLOUD_SEGMENTATION_SEQUENCE]
field attributes: PointcloudSequenceSampleAttributes
class MultiSensorImageSequenceSampleAttributes[source]
field name: str
field task_type: Literal[TaskType.IMAGE_VECTOR_SEQUENCE] | Literal[TaskType.IMAGE_SEGMENTATION_SEQUENCE]
field attributes: ImageSequenceSampleAttributes

Labels

class Label[source]
field sample_uuid: str
field label_type: TaskType
field label_status: LabelStatus
field labelset: str
field attributes: LabelAttributes | None
field created_at: str
field created_by: str
field updated_at: str
field updated_by: str | None
field score: float | None
field rating: float | None
field reviewed_at: str | None
field reviewed_by: str | None
class LabelStatus(*values)[source]
REVIEWED = 'REVIEWED'
REVIEWING_IN_PROGRESS = 'REVIEWING_IN_PROGRESS'
LABELED = 'LABELED'
LABELING_IN_PROGRESS = 'LABELING_IN_PROGRESS'
REJECTED = 'REJECTED'
PRELABELED = 'PRELABELED'
SKIPPED = 'SKIPPED'
VERIFIED = 'VERIFIED'
UNLABELED = 'UNLABELED'

Image segmentation label

class ImageSegmentationLabelAttributes[source]
field annotations: List[Annotation]
field segmentation_bitmap: URL
field image_attributes: ImageAttributes | None
field format_version: FormatVersion | None
class Annotation[source]
field id: int
field category_id: int
field attributes: ObjectAttributes | None

Image vector label

class ImageVectorLabelAttributes[source]
field annotations: List[ImageVectorAnnotation]
field format_version: FormatVersion | None
field image_attributes: ImageAttributes | None
class ImageVectorAnnotation[source]
field id: int
field category_id: int
field points: List[List[float]]
field type: ImageVectorAnnotationType
field attributes: ObjectAttributes | None
class ImageVectorAnnotationType(*values)[source]
BBOX = 'bbox'
POLYGON = 'polygon'
POLYLINE = 'polyline'
POINT = 'point'

Image sequence vector label

class ImageSequenceVectorLabelAttributes[source]
field frames: List[ImageVectorFrame]
field format_version: FormatVersion | None
class ImageVectorFrame[source]

Bases: ImageVectorLabelAttributes

field annotations: List[ImageSequenceVectorAnnotation]
field timestamp: Timestamp | None
field format_version: FormatVersion | None
field image_attributes: ImageAttributes | None
class ImageSequenceVectorAnnotation[source]

Bases: ImageVectorAnnotation

field track_id: int
field is_keyframe: bool

Point cloud segmentation label

class PointcloudSegmentationLabelAttributes[source]
field annotations: List[Annotation]
field image_attributes: ImageAttributes | None
field point_annotations: List[int]
field format_version: FormatVersion | None

Point cloud cuboid label

class PointcloudCuboidLabelAttributes[source]
class PointcloudCuboidAnnotation[source]
field id: int
field category_id: int
field position: XYZ
field dimensions: XYZ
field yaw: float
field rotation: XYZW | None
field type: PointcloudCuboidAnnotationTypeLiteral
field attributes: ObjectAttributes | None
field velocity: Velocity | None
field acceleration: Acceleration | None
class PointcloudCuboidAnnotationType(*values)[source]
CUBOID = 'cuboid'
CUBOID_SYNC = 'cuboid-sync'
PointcloudCuboidAnnotationTypeLiteral

alias of Literal[CUBOID, CUBOID_SYNC]

Point cloud vector label

class PointcloudVectorLabelAttributes[source]
class PointcloudVectorAnnotation[source]
field id: int
field category_id: int
field points: List[List[float]]
field type: PointcloudVectorAnnotationTypeLiteral
field attributes: ObjectAttributes | None
class PointcloudVectorAnnotationType(*values)[source]
POLYGON = 'polygon'
POLYLINE = 'polyline'
POINT = 'point'
PointcloudVectorAnnotationTypeLiteral

alias of Literal[POLYGON, POLYLINE, POINT]

Point cloud sequence segmentation

class PointcloudSequenceSegmentationLabelAttributes[source]
field frames: List[PointcloudSegmentationFrame]
field format_version: FormatVersion | None
class PointcloudSegmentationFrame[source]

Bases: PointcloudSegmentationLabelAttributes

field annotations: List[PointcloudSequenceSegmentationAnnotation]
field timestamp: Timestamp | None
class PointcloudSequenceSegmentationAnnotation[source]

Bases: Annotation

field track_id: int
field is_keyframe: bool
field attributes: ObjectAttributes | None

Point cloud sequence cuboid label

class BasePointcloudSequenceCuboidLabelAttributes[source]
field frames: List[PointcloudSequenceCuboidFrame]
field format_version: FormatVersion | None
class PointcloudSequenceCuboidLabelAttributes[source]

Bases: BasePointcloudSequenceCuboidLabelAttributes

class PointcloudSequenceCuboidFrame[source]

Bases: BasePointcloudCuboidLabelAttributes

field annotations: List[PointcloudSequenceCuboidAnnotation]
field timestamp: Timestamp | None
field format_version: FormatVersion | None
class PointcloudSequenceCuboidAnnotation[source]

Bases: PointcloudCuboidAnnotation

field track_id: int
field is_keyframe: bool

Point cloud sequence vector label

class BasePointcloudSequenceVectorLabelAttributes[source]
field frames: List[PointcloudSequenceVectorFrame]
field format_version: FormatVersion | None
class PointcloudSequenceVectorLabelAttributes[source]

Bases: BasePointcloudSequenceVectorLabelAttributes

class PointcloudSequenceVectorFrame[source]

Bases: PointcloudVectorLabelAttributes

field annotations: List[Annotated[PointcloudSequenceVectorAnnotation | PointcloudSequenceCuboidAnnotation, pydantic.Field(discriminator='type')]]
field timestamp: Timestamp | None
class PointcloudSequenceVectorAnnotation[source]

Bases: PointcloudVectorAnnotation

field track_id: int
field is_keyframe: bool

Multi-sensor label

class MultiSensorLabelAttributes[source]
field sensors: List[Annotated[MultiSensorPointcloudSequenceCuboidLabelAttributes | MultiSensorPointcloudSequenceVectorLabelAttributes | MultiSensorPointcloudSequenceSegmentationLabelAttributes | MultiSensorImageSequenceVectorLabelAttributes | MultiSensorImageSequenceSegmentationLabelAttributes, pydantic.Field(discriminator='task_type')]]
class MultiSensorPointcloudSequenceCuboidLabelAttributes[source]
field name: str
field task_type: Literal[TaskType.POINTCLOUD_CUBOID_SEQUENCE]
field attributes: BasePointcloudSequenceCuboidLabelAttributes | List
class MultiSensorPointcloudSequenceVectorLabelAttributes[source]
field name: str
field task_type: Literal[TaskType.POINTCLOUD_VECTOR_SEQUENCE]
field attributes: BasePointcloudSequenceVectorLabelAttributes | List
class MultiSensorImageSequenceVectorLabelAttributes[source]
field name: str
field task_type: Literal[TaskType.IMAGE_VECTOR_SEQUENCE]
field attributes: ImageSequenceVectorLabelAttributes | List
class MultiSensorImageSequenceSegmentationLabelAttributes[source]
field name: str
field task_type: Literal[TaskType.IMAGE_SEGMENTATION_SEQUENCE]
field attributes: ImageSequenceSegmentationLabelAttributes | List
class MultiSensorPointcloudSequenceSegmentationLabelAttributes[source]
field name: str
field task_type: Literal[TaskType.POINTCLOUD_SEGMENTATION_SEQUENCE]
field attributes: PointcloudSequenceSegmentationLabelAttributes | List

Labelsets

class Labelset[source]
field name: str
field description: str
field is_groundtruth: bool | None
field created_at: str | None

Workunits

class Workunit[source]
field uuid: str | None
field created_at: str
field created_by: str
field work_type: str
field next_label_status: str | None
field time: int
field inactive_time: int
field sample_uuid: str
field sample_name: str
field label_rating: int | None

Releases

class Release[source]
field uuid: str
field name: str
field description: str
field release_type: Literal['JSON']
field attributes: URL
field status: ReleaseStatus
field created_at: str
field samples_count: int
class ReleaseStatus(*values)[source]
PENDING = 'PENDING'
SUCCEEDED = 'SUCCEEDED'
FAILED = 'FAILED'

Files

class File[source]
field uuid: str
field filename: str
field url: str
field created_at: str
field presignedPostFields: PresignedPostFields
class PresignedPostFields[source]
field url: str
field fields: AWSFields

Object attribute definitions

Base task attributes

This types are not used directly, but are instead mix-ins for their respective object and linking attribute classes.

class BaseAttribute[source]
field name: str
field is_mandatory: bool | None
class BaseSelectTaskAttribute[source]

Bases: BaseAttribute

field input_type: Literal[InputType.SELECT]
field values: List[str]
field default_value: str | None
class BaseTextTaskAttribute[source]

Bases: BaseAttribute

field input_type: Literal[InputType.TEXT]
field default_value: str | None
class BaseNumberTaskAttribute[source]

Bases: BaseAttribute

field input_type: Literal[InputType.NUMBER]
field default_value: float | None
field min: float | None
field max: float | None
field step: float | None
class BaseCheckboxTaskAttribute[source]

Bases: BaseAttribute

field input_type: Literal[InputType.CHECKBOX]
field default_value: bool | None
class BaseMultiselectTaskAttribute[source]

Bases: BaseAttribute

field input_type: Literal[InputType.MULTISELECT]
field values: List[str]
field default_value: str | None
class BaseVector3TaskAttribute[source]

Bases: BaseAttribute

field input_type: Literal[InputType.VECTOR3]
class BaseQuaternionTaskAttribute[source]

Bases: BaseAttribute

field input_type: Literal[InputType.QUATERNION]
class BasePointsTaskAttribute[source]

Bases: BaseAttribute

field input_type: Literal[InputType.POINTS]

Task attributes

These types are used for defining task attributes.

class TaskAttributes[source]
field format_version: FormatVersion | None
field categories: List[TaskAttributeCategory] | None
field image_attributes: List[TaskAttribute] | None
field warning_rules: List[WarningRule] | None
TaskAttribute

TaskAttribute can be one of the following:

class TaskAttributeCategory[source]
field name: str
field id: int
field color: RGB | RGBA | None
field has_instances: bool | None
field attributes: List[TaskAttribute] | None
field dimensions: XYZ | None
class BaseTaskAttribute[source]
field is_track_level: bool | None
field synced_across_sensors: bool | None
field sensor_filter: str | None
class SelectTaskAttribute[source]

Bases: BaseTaskAttribute, BaseSelectTaskAttribute

class TextTaskAttribute[source]

Bases: BaseTaskAttribute, BaseTextTaskAttribute

class NumberTaskAttribute[source]

Bases: BaseTaskAttribute, BaseNumberTaskAttribute

class CheckboxTaskAttribute[source]

Bases: BaseTaskAttribute, BaseCheckboxTaskAttribute

class MultiselectTaskAttribute[source]

Bases: BaseTaskAttribute, BaseMultiselectTaskAttribute

class Vector3TaskAttribute[source]

Bases: BaseTaskAttribute, BaseVector3TaskAttribute

class QuaternionTaskAttribute[source]

Bases: BaseTaskAttribute, BaseQuaternionTaskAttribute

class PointsTaskAttribute[source]

Bases: BaseTaskAttribute, BasePointsTaskAttribute

Helper classes

class URL[source]
field url: str | None
field signed_url: str | None
class Owner[source]
field username: str
field created_at: str
field email: str | None
class LabelStats[source]
field REVIEWED: int | None
field REVIEWING_IN_PROGRESS: int | None
field LABELED: int | None
field LABELING_IN_PROGRESS: int | None
field REJECTED: int | None
field PRELABELED: int | None
field SKIPPED: int | None
field VERIFIED: int | None
field UNLABELED: int | None
field TOTAL: int | None
class XYZ[source]
field x: float
field y: float
field z: float
class XYZW[source]
field qx: float
field qy: float
field qz: float
field qw: float
class EgoPose[source]
field position: XYZ
field heading: XYZW
class PCD[source]
field url: str
field signed_url: str | None
field type: PCDType
class PCDType(*values)[source]
PCD = 'pcd'
BINARY_XYZI = 'binary-xyzi'
KITTI = 'kitti'
BINARY_XYZIR = 'binary-xyzir'
NUSCENES = 'nuscenes'
PLY = 'ply'
LAS = 'las'
SPLAT = 'splat'
class CalibratedImage[source]

Bases: URL

field row: int | None
field col: int | None
field intrinsics: CameraIntrinsics | None
field extrinsics: CameraExtrinsics | None
field distortion: Distortion | None
field camera_convention: CameraConvention
field name: str | None
field rotation: float | None
class CameraConvention(*values)[source]
OPEN_CV = 'OpenCV'
OPEN_GL = 'OpenGL'
class CameraIntrinsics[source]
field intrinsic_matrix: List[List[float]]
class CameraExtrinsics[source]
field translation: XYZ
field rotation: XYZW
class DistortionFisheye[source]
field model: Literal[CameraDistortionModel.FISH_EYE]
field coefficients: FisheyeDistortionCoefficients
class DistortionBrownConrady[source]
field model: Literal[CameraDistortionModel.BROWN_CONRADY]
field coefficients: BrownConradyDistortionCoefficients
class CameraDistortionModel(*values)[source]
FISH_EYE = 'fisheye'
BROWN_CONRADY = 'brown-conrady'
class FisheyeDistortionCoefficients[source]
field k1: float
field k2: float
field k3: float
field k4: float
class BrownConradyDistortionCoefficients[source]
field k1: float
field k2: float
field p1: float
field p2: float
field k3: float
field k4: float | None
field k5: float | None
field k6: float | None