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: Optional[str]#
field description: str#
field category: Category#
Validated by
  • check_category

field public: 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_interpolation: bool#
field use_timestamps_for_interpolation: bool#
field task_type: TaskType#
field label_stats: LabelStats#
field labeling_inactivity_timeout_seconds: Optional[int]#
field samples_count: Optional[Union[str, int]]#
field collaborators_count: Optional[int]#
field task_attributes: Optional[TaskAttributes]#
field labelsets: Optional[List[Labelset]]#
field role: Optional[str]#
field readme: Optional[str]#
field metadata: Dict[str, Any]#
field noncollaborator_can_label: Optional[bool]#
field noncollaborator_can_review: Optional[bool]#
field insights_urls: Optional[Dict[str, str]]#
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: Optional[str]#
field webhooks_enabled: Optional[bool]#
field private_upload_count: Optional[int]#
field public_upload_count: Optional[int]#
field subscription: Optional[Subscription]#
field is_trial_expired: Optional[bool]#
field organizations: Optional[List[User]]#
field organization_created_by: Optional[str]#
field organization_role: Optional[Role]#
field members: Optional[List[User]]#
field insights_urls: Optional[Dict[str, str]]#
class TaskType(value)[source]#

An enumeration.

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'#
TEXT_NAMED_ENTITIES = 'text-named-entities'#
TEXT_SPAN_CATEGORIZATION = 'text-span-categorization'#
EMPTY = ''#

Samples#

class Sample[source]#
field uuid: str#
field name: str#
field attributes: SampleAttributes#
field metadata: Dict[str, Any]#
field created_at: str#
field created_by: str#
field assigned_labeler: Optional[str]#
field assigned_reviewer: Optional[str]#
field comments: Optional[List[str]]#
field priority: float#
field label: Optional[Union[Label, LabelSummary]]#
field issues: Optional[List[Issue]]#
field dataset_full_name: Optional[str]#
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 comments: List[IssueComment]#
field status: IssueStatus#
field sample_uuid: str#
field sample_name: str#
class IssueComment[source]#
field created_at: str#
field created_by: str#
field text: str#
class IssueStatus(value)[source]#

An enumeration.

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: Optional[str]#
field timestamp: Optional[Timestamp]#

Point cloud sample#

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

Point cloud sequence sample#

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

Multi-sensor sample#

class MultiSensorSampleAttributes[source]#
field sensors: List[Union[MultiSensorPointcloudSequenceSampleAttributes, MultiSensorImageSequenceSampleAttributes]]#
class MultiSensorPointcloudSequenceSampleAttributes[source]#
field name: str#
field task_type: Literal[TaskType.POINTCLOUD_CUBOID_SEQUENCE]#
field attributes: PointcloudSequenceSampleAttributes#
class MultiSensorImageSequenceSampleAttributes[source]#
field name: str#
field task_type: Literal[TaskType.IMAGE_VECTOR_SEQUENCE]#
field attributes: ImageSequenceSampleAttributes#

Text sample#

class TextSampleAttributes[source]#
field text: str#

Labels#

class Label[source]#
field sample_uuid: str#
field label_type: TaskType#
field label_status: LabelStatus#
field labelset: str#
field attributes: Optional[LabelAttributes]#
field created_at: str#
field created_by: str#
field updated_at: str#
field score: Optional[float]#
field rating: Optional[float]#
field reviewed_at: Optional[str]#
field reviewed_by: Optional[str]#
class LabelStatus(value)[source]#

An enumeration.

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: Optional[ImageAttributes]#
field format_version: Optional[FormatVersion]#
class Annotation[source]#
field id: int#
field category_id: int#
field attributes: Optional[ObjectAttributes]#

Image vector label#

class ImageVectorLabelAttributes[source]#
field annotations: List[ImageVectorAnnotation]#
field format_version: Optional[FormatVersion]#
field image_attributes: Optional[ImageAttributes]#
class ImageVectorAnnotation[source]#
field id: int#
field category_id: int#
field points: List[List[float]]#
field type: ImageVectorAnnotationType#
field attributes: Optional[ObjectAttributes]#
class ImageVectorAnnotationType(value)[source]#

An enumeration.

BBOX = 'bbox'#
POLYGON = 'polygon'#
POLYLINE = 'polyline'#
POINT = 'point'#

Image sequence vector label#

class ImageSequenceVectorLabelAttributes[source]#
field frames: List[ImageVectorFrame]#
field format_version: Optional[FormatVersion]#
class ImageVectorFrame[source]#

Bases: ImageVectorLabelAttributes

field annotations: List[ImageSequenceVectorAnnotation]#
field timestamp: Optional[Timestamp]#
field format_version: Optional[FormatVersion]#
field image_attributes: Optional[ImageAttributes]#
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 point_annotations: List[int]#
field format_version: Optional[FormatVersion]#

Point cloud cuboid label#

class PointcloudCuboidLabelAttributes[source]#
field annotations: List[PointcloudCuboidAnnotation]#
field format_version: Optional[FormatVersion]#
class PointcloudCuboidAnnotation[source]#
field id: int#
field category_id: int#
field position: XYZ#
field dimensions: XYZ#
field yaw: float#
field rotation: Optional[XYZW]#
field type: PointcloudCuboidAnnotationType#
field attributes: Optional[ObjectAttributes]#
class PointcloudCuboidAnnotationType(value)[source]#

An enumeration.

CUBOID = 'cuboid'#
CUBOID_SYNC = 'cuboid-sync'#

Point cloud vector label#

class PointcloudVectorLabelAttributes[source]#
field annotations: List[PointcloudVectorAnnotation]#
field format_version: Optional[FormatVersion]#
class PointcloudVectorAnnotation[source]#
field id: int#
field category_id: int#
field points: List[List[float]]#
field type: PointcloudVectorAnnotationType#
field attributes: Optional[ObjectAttributes]#
class PointcloudVectorAnnotationType(value)[source]#

An enumeration.

POLYGON = 'polygon'#
POLYLINE = 'polyline'#
POINT = 'point'#

Point cloud sequence segmentation#

class PointcloudSequenceSegmentationLabelAttributes[source]#
field frames: List[PointcloudSegmentationFrame]#
field format_version: Optional[FormatVersion]#
class PointcloudSegmentationFrame[source]#

Bases: PointcloudSegmentationLabelAttributes

field annotations: List[PointcloudSequenceSegmentationAnnotation]#
field point_annotations: List[int]#
field timestamp: Optional[Timestamp]#
field format_version: Optional[FormatVersion]#
class PointcloudSequenceSegmentationAnnotation[source]#

Bases: Annotation

field track_id: int#
field is_keyframe: bool#
field attributes: Optional[ObjectAttributes]#

Point cloud sequence cuboid label#

class PointcloudSequenceCuboidLabelAttributes[source]#
field frames: List[PointcloudSequenceCuboidFrame]#
field format_version: Optional[FormatVersion]#
class PointcloudSequenceCuboidFrame[source]#

Bases: PointcloudCuboidLabelAttributes

field annotations: List[PointcloudSequenceCuboidAnnotation]#
field timestamp: Optional[Timestamp]#
field format_version: Optional[FormatVersion]#
class PointcloudSequenceCuboidAnnotation[source]#

Bases: PointcloudCuboidAnnotation

field track_id: int#
field is_keyframe: bool#

Point cloud sequence vector label#

class PointcloudSequenceVectorLabelAttributes[source]#
field frames: List[PointcloudSequenceVectorFrame]#
field format_version: Optional[FormatVersion]#
class PointcloudSequenceVectorFrame[source]#

Bases: PointcloudVectorLabelAttributes

field annotations: List[PointcloudSequenceVectorAnnotation]#
field format_version: Optional[FormatVersion]#
field timestamp: Optional[Timestamp]#
class PointcloudSequenceVectorAnnotation[source]#

Bases: PointcloudVectorAnnotation

field track_id: int#
field is_keyframe: bool#

Multi-sensor label#

class MultiSensorLabelAttributes[source]#
field sensors: List[Union[MultiSensorPointcloudSequenceCuboidLabelAttributes, MultiSensorImageSequenceVectorLabelAttributes]]#
class MultiSensorPointcloudSequenceCuboidLabelAttributes[source]#
field name: str#
field task_type: Literal[TaskType.POINTCLOUD_CUBOID_SEQUENCE]#
field attributes: Union[PointcloudSequenceCuboidLabelAttributes, List]#
class MultiSensorImageSequenceVectorLabelAttributes[source]#
field name: str#
field task_type: Literal[TaskType.IMAGE_VECTOR_SEQUENCE]#
field attributes: Union[ImageSequenceVectorLabelAttributes, List]#

Text label#

class TextLabelAttributes[source]#
field annotations: List[TextAnnotation]#
field format_version: Optional[FormatVersion]#
class TextAnnotation[source]#
field start: int#
field end: int#
field category_id: int#

Labelsets#

class Labelset[source]#
field name: str#
field description: str#
field is_groundtruth: Optional[bool]#
field created_at: Optional[str]#

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(value)[source]#

An enumeration.

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#

Helper classes#

class URL[source]#
field url: Optional[str]#
class Owner[source]#
field username: str#
field created_at: str#
field email: Optional[str]#
class TaskAttributes[source]#
field format_version: Optional[FormatVersion]#
field categories: Optional[List[TaskAttributeCategory]]#
field image_attributes: Optional[List[TaskAttribute]]#
class TaskAttributeCategory[source]#
field name: str#
field id: int#
field color: Optional[Union[RGB, RGBA]]#
field has_instances: Optional[bool]#
field attributes: Optional[List[TaskAttribute]]#
field dimensions: Optional[XYZ]#
class SelectTaskAttribute(**data)[source]#
field name: str#
field input_type: Literal[InputType.SELECT]#
field values: List[str]#
field default_value: Optional[str]#
field is_mandatory: Optional[bool]#
field is_track_level: Optional[bool]#
model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': False, 'extra': 'ignore', 'use_enum_values': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'default_value': FieldInfo(annotation=Union[str, NoneType], required=False), 'input_type': FieldInfo(annotation=Literal[<InputType.SELECT: 'select'>], required=True), 'is_mandatory': FieldInfo(annotation=Union[bool, NoneType], required=False), 'is_track_level': FieldInfo(annotation=Union[bool, NoneType], required=False), 'name': FieldInfo(annotation=str, required=True), 'values': FieldInfo(annotation=List[str], required=True)}#

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

class TextTaskAttribute(**data)[source]#
field name: str#
field input_type: Literal[InputType.TEXT]#
field default_value: Optional[str]#
field is_mandatory: Optional[bool]#
model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': False, 'extra': 'ignore', 'use_enum_values': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'default_value': FieldInfo(annotation=Union[str, NoneType], required=False), 'input_type': FieldInfo(annotation=Literal[<InputType.TEXT: 'text'>], required=True), 'is_mandatory': FieldInfo(annotation=Union[bool, NoneType], required=False), 'name': FieldInfo(annotation=str, required=True)}#

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

class NumberTaskAttribute(**data)[source]#
field name: str#
field input_type: Literal[InputType.NUMBER]#
field default_value: Optional[float]#
field min: Optional[float]#
Validated by
field max: Optional[float]#
Validated by
field step: Optional[float]#
Validated by
field is_mandatory: Optional[bool]#
validator empty_str_to_none  ยป  max, min, step[source]#
model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': False, 'extra': 'ignore', 'use_enum_values': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'default_value': FieldInfo(annotation=Union[float, NoneType], required=False), 'input_type': FieldInfo(annotation=Literal[<InputType.NUMBER: 'number'>], required=True), 'is_mandatory': FieldInfo(annotation=Union[bool, NoneType], required=False), 'max': FieldInfo(annotation=Union[float, NoneType], required=False), 'min': FieldInfo(annotation=Union[float, NoneType], required=False), 'name': FieldInfo(annotation=str, required=True), 'step': FieldInfo(annotation=Union[float, NoneType], required=False)}#

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

class CheckboxTaskAttribute(**data)[source]#
field name: str#
field input_type: Literal[InputType.CHECKBOX]#
field default_value: Optional[bool]#
field is_track_level: Optional[bool]#
model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': False, 'extra': 'ignore', 'use_enum_values': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'default_value': FieldInfo(annotation=Union[bool, NoneType], required=False), 'input_type': FieldInfo(annotation=Literal[<InputType.CHECKBOX: 'checkbox'>], required=True), 'is_track_level': FieldInfo(annotation=Union[bool, NoneType], required=False), 'name': FieldInfo(annotation=str, required=True)}#

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

class LabelStats[source]#
field REVIEWED: Optional[int]#
field REVIEWING_IN_PROGRESS: Optional[int]#
field LABELED: Optional[int]#
field LABELING_IN_PROGRESS: Optional[int]#
field REJECTED: Optional[int]#
field PRELABELED: Optional[int]#
field SKIPPED: Optional[int]#
field VERIFIED: Optional[int]#
field UNLABELED: Optional[int]#
field TOTAL: Optional[int]#
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: Optional[str]#
field type: PCDType#
class PCDType(value)[source]#

An enumeration.

PCD = 'pcd'#
BINARY_XYZI = 'binary-xyzi'#
KITTI = 'kitti'#
BINARY_XYZIR = 'binary-xyzir'#
NUSCENES = 'nuscenes'#
PLY = 'ply'#
LAS = 'las'#
class CalibratedImage[source]#

Bases: URL

field row: Optional[int]#
field col: Optional[int]#
field intrinsics: Optional[CameraIntrinsics]#
field extrinsics: Optional[CameraExtrinsics]#
field distortion: Optional[Distortion]#
field camera_convention: CameraConvention#
field name: Optional[str]#
field rotation: Optional[float]#
class CameraConvention(value)[source]#

An enumeration.

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 Distortion[source]#
field model: CameraDistortionModel#
field coefficients: Union[FisheyeDistortionCoefficients, BrownConradyDistortionCoefficients]#
class CameraDistortionModel(value)[source]#

An enumeration.

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#