module documentation

Labels stored in dataset samples.

Copyright 2017-2025, Voxel51, Inc.

Class Attribute Base class for attributes.
Class BooleanAttribute A boolean attribute.
Class CategoricalAttribute A categorical attribute.
Class Classification A classification label.
Class Classifications A list of classifications for an image.
Class Detection An object detection.
Class Detections A list of object detections in an image.
Class GeoLocation Location data in GeoJSON format.
Class GeoLocations A batch of location data in GeoJSON format.
Class Heatmap A heatmap for an image.
Class Keypoint A list of keypoints in an image.
Class Keypoints A list of Keypoint instances in an image.
Class Label Base class for labels.
Class ListAttribute A list attribute.
Class NumericAttribute A numeric attribute.
Class Polyline A set of semantically related polylines or polygons.
Class Polylines A list of polylines or polygons in an image.
Class Regression A regression value.
Class Segmentation A semantic segmentation for an image.
Class TemporalDetection A temporal detection in a video whose support is defined by a start and end frame.
Class TemporalDetections A list of temporal detections for a video.
Variable foue Undocumented
Variable foug Undocumented
Variable foui Undocumented
Variable no_default Undocumented
Variable sg Undocumented
Class _HasAttributesDict Mixin for Label classes that have an attributes field that contains a dict of Attribute instances.
Class _HasID Mixin for Label classes that expose a UUID via an id property, as well as a tags attribute.
Class _HasLabelList Mixin for Label classes that contain a list of Label instances.
Class _HasMedia Mixin for Label classes that contain a media field.
Class _NoDefault Undocumented
Function _convert_segmentation Convert segmentation to a collection of detections, polylines, etc.
Function _find_slices Return slices that tightly bound each unique object in mask.
Function _from_geo_json Undocumented
Function _from_geo_json_single Undocumented
Function _get_polygons Undocumented
Function _heatmap_to_image Undocumented
Function _hex_to_int Undocumented
Function _hex_to_rgb Undocumented
Function _int_array_to_rgb Undocumented
Function _int_to_hex Undocumented
Function _mask_to_detections Undocumented
Function _mask_to_image Undocumented
Function _mask_to_polylines Undocumented
Function _parse_segmentation_mask_targets Undocumented
Function _parse_segmentation_target Undocumented
Function _parse_stuff_instance Undocumented
Function _parse_thing_instances Undocumented
Function _parse_video_metadata Undocumented
Function _read_heatmap Undocumented
Function _read_mask Undocumented
Function _render_instance Undocumented
Function _render_polyline Undocumented
Function _rgb_array_to_int Undocumented
Function _rgb_to_hex Undocumented
Function _rotation_matrix Undocumented
Function _segmentation_to_detections Undocumented
Function _segmentation_to_polylines Undocumented
Function _transform_mask Undocumented
Function _write_heatmap Undocumented
Function _write_mask Undocumented
Constant _INDEX_FIEDS Undocumented
Constant _LABEL_LIST_FIELDS Undocumented
Constant _LABEL_LIST_TO_SINGLE_MAP Undocumented
Constant _PATCHES_FIELDS Undocumented
Constant _SINGLE_LABEL_TO_LIST_MAP Undocumented

Undocumented

Undocumented

Undocumented

no_default = (source)

Undocumented

Undocumented

def _convert_segmentation(segmentation, mask_targets, mask_types, converter): (source)

Convert segmentation to a collection of detections, polylines, etc.

converter(label_mask, label, label_type, offset, frame_size) is a function that returns a list of detections, polylines, etc. It gets called for each value in mask_targets, or for all values in the mask if mask_targets is None.

def _find_slices(mask): (source)

Return slices that tightly bound each unique object in mask.

def _from_geo_json(d): (source)

Undocumented

def _from_geo_json_single(d): (source)

Undocumented

def _get_polygons(mask, tolerance, offset=None, frame_size=None, abs_coords=False): (source)

Undocumented

def _heatmap_to_image(map, range): (source)

Undocumented

def _hex_to_int(hex_str): (source)

Undocumented

def _hex_to_rgb(hex_str): (source)

Undocumented

def _int_array_to_rgb(mask): (source)

Undocumented

def _int_to_hex(value): (source)

Undocumented

def _mask_to_detections(label_mask, label, label_type, offset, frame_size): (source)

Undocumented

def _mask_to_image(mask): (source)

Undocumented

def _mask_to_polylines(label_mask, label, label_type, offset, frame_size, tolerance): (source)

Undocumented

def _parse_segmentation_mask_targets(mask, frame_size, mask_targets): (source)

Undocumented

def _parse_segmentation_target(mask, frame_size, target): (source)

Undocumented

def _parse_stuff_instance(mask, offset=None, frame_size=None): (source)

Undocumented

def _parse_thing_instances(mask, offset=None, frame_size=None): (source)

Undocumented

def _parse_video_metadata(sample, metadata): (source)

Undocumented

def _read_heatmap(map_path): (source)

Undocumented

def _read_mask(mask_path): (source)

Undocumented

def _render_instance(mask, detection, target): (source)

Undocumented

def _render_polyline(mask, polyline, target, thickness): (source)

Undocumented

def _rgb_array_to_int(mask): (source)

Undocumented

def _rgb_to_hex(rgb): (source)

Undocumented

def _rotation_matrix(theta): (source)

Undocumented

def _segmentation_to_detections(segmentation, mask_targets, mask_types): (source)

Undocumented

def _segmentation_to_polylines(segmentation, mask_targets, mask_types, tolerance): (source)

Undocumented

def _transform_mask(in_mask, targets_map): (source)

Undocumented

def _write_heatmap(map, map_path, range): (source)

Undocumented

def _write_mask(mask, mask_path): (source)

Undocumented

_PATCHES_FIELDS = (source)

Undocumented

Value
(Detection, Detections, Polyline, Polylines)