pysolotools.core.models package

Submodules

pysolotools.core.models.solo module

class pysolotools.core.models.solo.Annotation(type: str, id: str, sensorId: str, description: str, extra_data: Union[CatchAllVar, NoneType])

Bases: object

dataclass_json_config = {'undefined': Undefined.INCLUDE}
description: str
extra_data: Optional[CatchAllVar]
classmethod from_dict(kvs: Optional[Union[dict, list, str, int, float, bool]], *, infer_missing=False) A
classmethod from_json(s: Union[str, bytes, bytearray], *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
id: str
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
sensorId: str
to_dict(encode_json=False) Dict[str, Optional[Union[dict, list, str, int, float, bool]]]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: Optional[Union[int, str]] = None, separators: Optional[Tuple[str, str]] = None, default: Optional[Callable] = None, sort_keys: bool = False, **kw) str
type: str
class pysolotools.core.models.solo.AnnotationDefinition(id: str, description: str, extra_data: Union[CatchAllVar, NoneType])

Bases: object

dataclass_json_config = {'undefined': Undefined.INCLUDE}
description: str
extra_data: Optional[CatchAllVar]
classmethod from_dict(kvs: Optional[Union[dict, list, str, int, float, bool]], *, infer_missing=False) A
classmethod from_json(s: Union[str, bytes, bytearray], *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
id: str
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, Optional[Union[dict, list, str, int, float, bool]]]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: Optional[Union[int, str]] = None, separators: Optional[Tuple[str, str]] = None, default: Optional[Callable] = None, sort_keys: bool = False, **kw) str
class pysolotools.core.models.solo.AnnotationLabel(instanceId: int, labelId: int)

Bases: _BaseMeta

instanceId: int
labelId: int
metadata: object
class pysolotools.core.models.solo.BoundingBox2DAnnotation(type: str, id: str, sensorId: str, description: str, extra_data: Union[~CatchAllVar, NoneType], values: List[pysolotools.core.models.solo.BoundingBox2DLabel] = <factory>)

Bases: Annotation

description: str
extra_data: Optional[CatchAllVar]
id: str
sensorId: str
type: str
values: List[BoundingBox2DLabel]
class pysolotools.core.models.solo.BoundingBox2DAnnotationDefinition(id: str, description: str, extra_data: Union[CatchAllVar, NoneType], spec: List[pysolotools.core.models.solo.LabelNameSpec])

Bases: AnnotationDefinition

description: str
extra_data: Optional[CatchAllVar]
id: str
spec: List[LabelNameSpec]
class pysolotools.core.models.solo.BoundingBox2DLabel(instanceId: int, labelId: int, labelName: str, origin: List[float], dimension: List[float])

Bases: AnnotationLabel

dimension: List[float]
classmethod from_dict(kvs: Optional[Union[dict, list, str, int, float, bool]], *, infer_missing=False) A
classmethod from_json(s: Union[str, bytes, bytearray], *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
labelName: str
origin: List[float]
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, Optional[Union[dict, list, str, int, float, bool]]]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: Optional[Union[int, str]] = None, separators: Optional[Tuple[str, str]] = None, default: Optional[Callable] = None, sort_keys: bool = False, **kw) str
class pysolotools.core.models.solo.BoundingBox3DAnnotation(type: str, id: str, sensorId: str, description: str, extra_data: Union[CatchAllVar, NoneType], values: List[pysolotools.core.models.solo.BoundingBox3DLabel])

Bases: Annotation

description: str
extra_data: Optional[CatchAllVar]
id: str
sensorId: str
type: str
values: List[BoundingBox3DLabel]
class pysolotools.core.models.solo.BoundingBox3DAnnotationDefinition(id: str, description: str, extra_data: Union[CatchAllVar, NoneType], spec: List[pysolotools.core.models.solo.LabelNameSpec])

Bases: AnnotationDefinition

spec: List[LabelNameSpec]
class pysolotools.core.models.solo.BoundingBox3DLabel(instanceId: int, labelId: int, labelName: str, size: List[float], translation: List[float], rotation: List[float], velocity: List[float], acceleration: List[float])

Bases: AnnotationLabel

acceleration: List[float]
classmethod from_dict(kvs: Optional[Union[dict, list, str, int, float, bool]], *, infer_missing=False) A
classmethod from_json(s: Union[str, bytes, bytearray], *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
labelName: str
rotation: List[float]
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
size: List[float]
to_dict(encode_json=False) Dict[str, Optional[Union[dict, list, str, int, float, bool]]]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: Optional[Union[int, str]] = None, separators: Optional[Tuple[str, str]] = None, default: Optional[Callable] = None, sort_keys: bool = False, **kw) str
translation: List[float]
velocity: List[float]
class pysolotools.core.models.solo.BoundingBoxAnnotationDefinition(type: str, id: str, description: str, spec: List[pysolotools.core.models.solo.BoundingBoxAnnotationDefinitionSpec])

Bases: object

description: str
get_cat_ids() List[int]
id: str
spec: List[BoundingBoxAnnotationDefinitionSpec]
type: str
class pysolotools.core.models.solo.BoundingBoxAnnotationDefinitionSpec(label_id: int, label_name: str)

Bases: object

label_id: int
label_name: str
class pysolotools.core.models.solo.Capture(id: str, type: str, description: str, position: List[float], rotation: List[float], annotations: List[dataclass])

Bases: object

id (str): Id type(str):

annotations: List[dataclass]
description: str
classmethod from_dict(kvs: Optional[Union[dict, list, str, int, float, bool]], *, infer_missing=False) A
classmethod from_json(s: Union[str, bytes, bytearray], *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
get_annotations_df() DataFrame
Returns

Captures List fo

Return type

pd.DataFrame

id: str
position: List[float]
rotation: List[float]
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, Optional[Union[dict, list, str, int, float, bool]]]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: Optional[Union[int, str]] = None, separators: Optional[Tuple[str, str]] = None, default: Optional[Callable] = None, sort_keys: bool = False, **kw) str
type: str
class pysolotools.core.models.solo.DataFactory

Bases: object

Factory class used to register data types that can be deserialized from a solo dataset. Annotation, Capture, and Annotation Definition types must register with the annotation factory with the following class decorator:

@DataFactory.register(@type string)

annotation_switcher = {'type.unity.com/unity.solo.BoundingBox2DAnnotation': <class 'pysolotools.core.models.solo.BoundingBox2DAnnotation'>, 'type.unity.com/unity.solo.BoundingBox3DAnnotation': <class 'pysolotools.core.models.solo.BoundingBox3DAnnotation'>, 'type.unity.com/unity.solo.DepthAnnotation': <class 'pysolotools.core.models.solo.DepthAnnotation'>, 'type.unity.com/unity.solo.InstanceSegmentationAnnotation': <class 'pysolotools.core.models.solo.InstanceSegmentationAnnotation'>, 'type.unity.com/unity.solo.KeypointAnnotation': <class 'pysolotools.core.models.solo.KeypointAnnotation'>, 'type.unity.com/unity.solo.NormalAnnotation': <class 'pysolotools.core.models.solo.NormalAnnotation'>, 'type.unity.com/unity.solo.PixelPositionAnnotation': <class 'pysolotools.core.models.solo.PixelPositionAnnotation'>, 'type.unity.com/unity.solo.SemanticSegmentationAnnotation': <class 'pysolotools.core.models.solo.SemanticSegmentationAnnotation'>}
capture_switcher = {'type.unity.com/unity.solo.RGBCamera': <class 'pysolotools.core.models.solo.RGBCameraCapture'>}
classmethod cast_annotation(data)
classmethod cast_capture(data)
classmethod cast_definition(data)
definition_switcher = {'type.unity.com/unity.solo.BoundingBox2DAnnotation': <class 'pysolotools.core.models.solo.BoundingBox2DAnnotationDefinition'>, 'type.unity.com/unity.solo.BoundingBox3DAnnotation': <class 'pysolotools.core.models.solo.BoundingBox3DAnnotationDefinition'>, 'type.unity.com/unity.solo.DepthAnnotation': <class 'pysolotools.core.models.solo.DepthAnnotationDefinition'>, 'type.unity.com/unity.solo.InstanceSegmentationAnnotation': <class 'pysolotools.core.models.solo.InstanceSegmentationAnnotationDefinition'>, 'type.unity.com/unity.solo.KeypointAnnotation': <class 'pysolotools.core.models.solo.KeypointAnnotationDefinition'>, 'type.unity.com/unity.solo.NormalAnnotation': <class 'pysolotools.core.models.solo.NormalAnnotationDefinition'>, 'type.unity.com/unity.solo.PixelPositionAnnotation': <class 'pysolotools.core.models.solo.PixelPositionAnnotationDefinition'>, 'type.unity.com/unity.solo.SemanticSegmentationAnnotation': <class 'pysolotools.core.models.solo.SemanticSegmentationAnnotationDefinition'>}
classmethod register(name: str) Callable

Registers a new annotation type. :param name: Type string for the annotation type :type name: str

class pysolotools.core.models.solo.DatasetAnnotations(annotationDefinitions: List[dataclass])

Bases: object

annotationDefinitions: List[dataclass]
classmethod from_dict(kvs: Optional[Union[dict, list, str, int, float, bool]], *, infer_missing=False) A
classmethod from_json(s: Union[str, bytes, bytearray], *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, Optional[Union[dict, list, str, int, float, bool]]]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: Optional[Union[int, str]] = None, separators: Optional[Tuple[str, str]] = None, default: Optional[Callable] = None, sort_keys: bool = False, **kw) str
class pysolotools.core.models.solo.DatasetMetadata(unityVersion: str, perceptionVersion: str, totalFrames: int, totalSequences: int, sensors: List[str], metricCollectors: List[str], annotators: List[object] = <factory>, scenarioActiveRandomizers: List[str] = <factory>, simulationStartTime: str = None, simulationEndTime: str = None, renderPipeline: str = None, scenarioRandomSeed: float = None)

Bases: object

annotators: List[object]
classmethod from_dict(kvs: Optional[Union[dict, list, str, int, float, bool]], *, infer_missing=False) A
classmethod from_json(s: Union[str, bytes, bytearray], *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
metricCollectors: List[str]
perceptionVersion: str
renderPipeline: str = None
scenarioActiveRandomizers: List[str]
scenarioRandomSeed: float = None
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
sensors: List[str]
simulationEndTime: str = None
simulationStartTime: str = None
to_dict(encode_json=False) Dict[str, Optional[Union[dict, list, str, int, float, bool]]]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: Optional[Union[int, str]] = None, separators: Optional[Tuple[str, str]] = None, default: Optional[Callable] = None, sort_keys: bool = False, **kw) str
totalFrames: int
totalSequences: int
unityVersion: str
class pysolotools.core.models.solo.DepthAnnotation(type: str, id: str, sensorId: str, description: str, extra_data: Union[CatchAllVar, NoneType], imageFormat: str, dimension: List[int], filename: str)

Bases: Annotation

dimension: List[int]
filename: str
imageFormat: str
class pysolotools.core.models.solo.DepthAnnotationDefinition(id: str, description: str, extra_data: Union[CatchAllVar, NoneType])

Bases: AnnotationDefinition

description: str
extra_data: Optional[CatchAllVar]
id: str
class pysolotools.core.models.solo.Frame(frame: int, sequence: int, step: int, timestamp: float = 0.0, metrics: List[dataclass] = <factory>, captures: List[dataclass] = <factory>)

Bases: object

captures: List[dataclass]
filter_captures(sensor)
frame: int
classmethod from_dict(kvs: Optional[Union[dict, list, str, int, float, bool]], *, infer_missing=False) A
classmethod from_json(s: Union[str, bytes, bytearray], *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
get_captures_df() DataFrame
Returns

Captures List for a Solo Frame

Return type

pd.DataFrame

get_file_path(capture: Capture) str
Returns

File path of given capture having current sequence as root

Return type

str

get_metrics_df() DataFrame
Returns

Solo Frame Metrics

Return type

pd.DataFrame

metrics: List[dataclass]
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
sequence: int
step: int
timestamp: float = 0.0
to_dict(encode_json=False) Dict[str, Optional[Union[dict, list, str, int, float, bool]]]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: Optional[Union[int, str]] = None, separators: Optional[Tuple[str, str]] = None, default: Optional[Callable] = None, sort_keys: bool = False, **kw) str
class pysolotools.core.models.solo.InstanceSegmentationAnnotation(type: str, id: str, sensorId: str, description: str, extra_data: Union[~CatchAllVar, NoneType], imageFormat: str, dimension: List[int], filename: str, instances: List[pysolotools.core.models.solo.InstanceSegmentationLabel] = <factory>)

Bases: Annotation

description: str
dimension: List[int]
extra_data: Optional[CatchAllVar]
filename: str
id: str
imageFormat: str
instances: List[InstanceSegmentationLabel]
sensorId: str
type: str
class pysolotools.core.models.solo.InstanceSegmentationAnnotationDefinition(id: str, description: str, extra_data: Union[CatchAllVar, NoneType], spec: List[pysolotools.core.models.solo.LabelNameSpec])

Bases: AnnotationDefinition

spec: List[LabelNameSpec]
class pysolotools.core.models.solo.InstanceSegmentationLabel(instanceId: int, labelId: int, labelName: str, color: List[int])

Bases: AnnotationLabel

color: List[int]
labelName: str
class pysolotools.core.models.solo.Keypoint(index: int, location: List[float], state: int, cameraCartesianLocation: List[float] = <factory>)

Bases: object

cameraCartesianLocation: List[float]
index: int
location: List[float]
state: int
class pysolotools.core.models.solo.KeypointAnnotation(type: str, id: str, sensorId: str, description: str, extra_data: Union[CatchAllVar, NoneType], templateId: str, values: List[pysolotools.core.models.solo.KeypointLabel])

Bases: Annotation

description: str
extra_data: Optional[CatchAllVar]
id: str
sensorId: str
templateId: str
type: str
values: List[KeypointLabel]
class pysolotools.core.models.solo.KeypointAnnotationDefinition(id: str, description: str, extra_data: Union[CatchAllVar, NoneType], template: pysolotools.core.models.solo.KeypointTemplateDefinition)

Bases: AnnotationDefinition

description: str
extra_data: Optional[CatchAllVar]
id: str
template: KeypointTemplateDefinition
class pysolotools.core.models.solo.KeypointDefinition(label: str, index: int, color: List[int])

Bases: object

color: List[int]
index: int
label: str
class pysolotools.core.models.solo.KeypointLabel(instanceId: int, labelId: int, pose: str, keypoints: List[pysolotools.core.models.solo.Keypoint])

Bases: AnnotationLabel

keypoints: List[Keypoint]
pose: str
class pysolotools.core.models.solo.KeypointTemplateDefinition(templateId: str, templateName: str, keypoints: List[pysolotools.core.models.solo.KeypointDefinition])

Bases: object

keypoints: List[KeypointDefinition]
templateId: str
templateName: str
class pysolotools.core.models.solo.LabelNameSpec(label_id: int, label_name: str)

Bases: object

label_id: int
label_name: str
class pysolotools.core.models.solo.NormalAnnotation(type: str, id: str, sensorId: str, description: str, extra_data: Union[CatchAllVar, NoneType], imageFormat: str, dimension: List[int], filename: str)

Bases: Annotation

dimension: List[int]
filename: str
imageFormat: str
class pysolotools.core.models.solo.NormalAnnotationDefinition(id: str, description: str, extra_data: Union[CatchAllVar, NoneType])

Bases: AnnotationDefinition

description: str
extra_data: Optional[CatchAllVar]
id: str
class pysolotools.core.models.solo.PixelPositionAnnotation(type: str, id: str, sensorId: str, description: str, extra_data: Union[CatchAllVar, NoneType], imageFormat: str, dimension: List[int], filename: str)

Bases: Annotation

dimension: List[int]
filename: str
imageFormat: str
class pysolotools.core.models.solo.PixelPositionAnnotationDefinition(id: str, description: str, extra_data: Union[CatchAllVar, NoneType])

Bases: AnnotationDefinition

description: str
extra_data: Optional[CatchAllVar]
id: str
class pysolotools.core.models.solo.RGBCameraCapture(id: str, type: str, description: str, position: List[float], rotation: List[float], annotations: List[dataclass], velocity: List[float], acceleration: List[float], filename: str, imageFormat: str, dimension: List[float], projection: str, matrix: List[float])

Bases: Capture

acceleration: List[float]
annotations: List[dataclass]
description: str
dimension: List[float]
filename: str
id: str
imageFormat: str
matrix: List[float]
position: List[float]
projection: str
rotation: List[float]
type: str
velocity: List[float]
class pysolotools.core.models.solo.SemanticSegmentationAnnotation(type: str, id: str, sensorId: str, description: str, extra_data: Union[CatchAllVar, NoneType], imageFormat: str, dimension: List[int], filename: str, instances: List[pysolotools.core.models.solo.SemanticSegmentationLabel])

Bases: Annotation

description: str
dimension: List[int]
extra_data: Optional[CatchAllVar]
filename: str
id: str
imageFormat: str
instances: List[SemanticSegmentationLabel]
sensorId: str
type: str
class pysolotools.core.models.solo.SemanticSegmentationAnnotationDefinition(id: str, description: str, extra_data: Union[CatchAllVar, NoneType])

Bases: AnnotationDefinition

description: str
extra_data: Optional[CatchAllVar]
id: str
class pysolotools.core.models.solo.SemanticSegmentationLabel(labelName: str, pixelValue: List[int])

Bases: _BaseMeta

labelName: str
pixelValue: List[int]

pysolotools.core.models.ucvd module

Module contents

class pysolotools.core.models.Annotation(type: str, id: str, sensorId: str, description: str, extra_data: Union[CatchAllVar, NoneType])

Bases: object

dataclass_json_config = {'undefined': Undefined.INCLUDE}
description: str
extra_data: Optional[CatchAllVar]
classmethod from_dict(kvs: Optional[Union[dict, list, str, int, float, bool]], *, infer_missing=False) A
classmethod from_json(s: Union[str, bytes, bytearray], *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
id: str
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
sensorId: str
to_dict(encode_json=False) Dict[str, Optional[Union[dict, list, str, int, float, bool]]]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: Optional[Union[int, str]] = None, separators: Optional[Tuple[str, str]] = None, default: Optional[Callable] = None, sort_keys: bool = False, **kw) str
type: str
class pysolotools.core.models.AnnotationDefinition(id: str, description: str, extra_data: Union[CatchAllVar, NoneType])

Bases: object

dataclass_json_config = {'undefined': Undefined.INCLUDE}
description: str
extra_data: Optional[CatchAllVar]
classmethod from_dict(kvs: Optional[Union[dict, list, str, int, float, bool]], *, infer_missing=False) A
classmethod from_json(s: Union[str, bytes, bytearray], *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
id: str
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, Optional[Union[dict, list, str, int, float, bool]]]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: Optional[Union[int, str]] = None, separators: Optional[Tuple[str, str]] = None, default: Optional[Callable] = None, sort_keys: bool = False, **kw) str
class pysolotools.core.models.AnnotationLabel(instanceId: int, labelId: int)

Bases: _BaseMeta

instanceId: int
labelId: int
metadata: object
class pysolotools.core.models.BoundingBox2DAnnotation(type: str, id: str, sensorId: str, description: str, extra_data: Union[~CatchAllVar, NoneType], values: List[pysolotools.core.models.solo.BoundingBox2DLabel] = <factory>)

Bases: Annotation

description: str
extra_data: Optional[CatchAllVar]
id: str
sensorId: str
type: str
values: List[BoundingBox2DLabel]
class pysolotools.core.models.BoundingBox2DAnnotationDefinition(id: str, description: str, extra_data: Union[CatchAllVar, NoneType], spec: List[pysolotools.core.models.solo.LabelNameSpec])

Bases: AnnotationDefinition

description: str
extra_data: Optional[CatchAllVar]
id: str
spec: List[LabelNameSpec]
class pysolotools.core.models.BoundingBox2DLabel(instanceId: int, labelId: int, labelName: str, origin: List[float], dimension: List[float])

Bases: AnnotationLabel

dimension: List[float]
classmethod from_dict(kvs: Optional[Union[dict, list, str, int, float, bool]], *, infer_missing=False) A
classmethod from_json(s: Union[str, bytes, bytearray], *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
instanceId: int
labelId: int
labelName: str
metadata: object
origin: List[float]
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, Optional[Union[dict, list, str, int, float, bool]]]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: Optional[Union[int, str]] = None, separators: Optional[Tuple[str, str]] = None, default: Optional[Callable] = None, sort_keys: bool = False, **kw) str
class pysolotools.core.models.BoundingBox3DAnnotation(type: str, id: str, sensorId: str, description: str, extra_data: Union[CatchAllVar, NoneType], values: List[pysolotools.core.models.solo.BoundingBox3DLabel])

Bases: Annotation

description: str
extra_data: Optional[CatchAllVar]
id: str
sensorId: str
type: str
values: List[BoundingBox3DLabel]
class pysolotools.core.models.BoundingBox3DAnnotationDefinition(id: str, description: str, extra_data: Union[CatchAllVar, NoneType], spec: List[pysolotools.core.models.solo.LabelNameSpec])

Bases: AnnotationDefinition

description: str
extra_data: Optional[CatchAllVar]
id: str
spec: List[LabelNameSpec]
class pysolotools.core.models.BoundingBox3DLabel(instanceId: int, labelId: int, labelName: str, size: List[float], translation: List[float], rotation: List[float], velocity: List[float], acceleration: List[float])

Bases: AnnotationLabel

acceleration: List[float]
classmethod from_dict(kvs: Optional[Union[dict, list, str, int, float, bool]], *, infer_missing=False) A
classmethod from_json(s: Union[str, bytes, bytearray], *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
instanceId: int
labelId: int
labelName: str
metadata: object
rotation: List[float]
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
size: List[float]
to_dict(encode_json=False) Dict[str, Optional[Union[dict, list, str, int, float, bool]]]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: Optional[Union[int, str]] = None, separators: Optional[Tuple[str, str]] = None, default: Optional[Callable] = None, sort_keys: bool = False, **kw) str
translation: List[float]
velocity: List[float]
class pysolotools.core.models.BoundingBoxAnnotationDefinition(type: str, id: str, description: str, spec: List[pysolotools.core.models.solo.BoundingBoxAnnotationDefinitionSpec])

Bases: object

description: str
get_cat_ids() List[int]
id: str
spec: List[BoundingBoxAnnotationDefinitionSpec]
type: str
class pysolotools.core.models.Capture(id: str, type: str, description: str, position: List[float], rotation: List[float], annotations: List[dataclass])

Bases: object

id (str): Id type(str):

annotations: List[dataclass]
description: str
classmethod from_dict(kvs: Optional[Union[dict, list, str, int, float, bool]], *, infer_missing=False) A
classmethod from_json(s: Union[str, bytes, bytearray], *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
get_annotations_df() DataFrame
Returns

Captures List fo

Return type

pd.DataFrame

id: str
position: List[float]
rotation: List[float]
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, Optional[Union[dict, list, str, int, float, bool]]]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: Optional[Union[int, str]] = None, separators: Optional[Tuple[str, str]] = None, default: Optional[Callable] = None, sort_keys: bool = False, **kw) str
type: str
class pysolotools.core.models.DataFactory

Bases: object

Factory class used to register data types that can be deserialized from a solo dataset. Annotation, Capture, and Annotation Definition types must register with the annotation factory with the following class decorator:

@DataFactory.register(@type string)

annotation_switcher = {'type.unity.com/unity.solo.BoundingBox2DAnnotation': <class 'pysolotools.core.models.solo.BoundingBox2DAnnotation'>, 'type.unity.com/unity.solo.BoundingBox3DAnnotation': <class 'pysolotools.core.models.solo.BoundingBox3DAnnotation'>, 'type.unity.com/unity.solo.DepthAnnotation': <class 'pysolotools.core.models.solo.DepthAnnotation'>, 'type.unity.com/unity.solo.InstanceSegmentationAnnotation': <class 'pysolotools.core.models.solo.InstanceSegmentationAnnotation'>, 'type.unity.com/unity.solo.KeypointAnnotation': <class 'pysolotools.core.models.solo.KeypointAnnotation'>, 'type.unity.com/unity.solo.NormalAnnotation': <class 'pysolotools.core.models.solo.NormalAnnotation'>, 'type.unity.com/unity.solo.PixelPositionAnnotation': <class 'pysolotools.core.models.solo.PixelPositionAnnotation'>, 'type.unity.com/unity.solo.SemanticSegmentationAnnotation': <class 'pysolotools.core.models.solo.SemanticSegmentationAnnotation'>}
capture_switcher = {'type.unity.com/unity.solo.RGBCamera': <class 'pysolotools.core.models.solo.RGBCameraCapture'>}
classmethod cast_annotation(data)
classmethod cast_capture(data)
classmethod cast_definition(data)
definition_switcher = {'type.unity.com/unity.solo.BoundingBox2DAnnotation': <class 'pysolotools.core.models.solo.BoundingBox2DAnnotationDefinition'>, 'type.unity.com/unity.solo.BoundingBox3DAnnotation': <class 'pysolotools.core.models.solo.BoundingBox3DAnnotationDefinition'>, 'type.unity.com/unity.solo.DepthAnnotation': <class 'pysolotools.core.models.solo.DepthAnnotationDefinition'>, 'type.unity.com/unity.solo.InstanceSegmentationAnnotation': <class 'pysolotools.core.models.solo.InstanceSegmentationAnnotationDefinition'>, 'type.unity.com/unity.solo.KeypointAnnotation': <class 'pysolotools.core.models.solo.KeypointAnnotationDefinition'>, 'type.unity.com/unity.solo.NormalAnnotation': <class 'pysolotools.core.models.solo.NormalAnnotationDefinition'>, 'type.unity.com/unity.solo.PixelPositionAnnotation': <class 'pysolotools.core.models.solo.PixelPositionAnnotationDefinition'>, 'type.unity.com/unity.solo.SemanticSegmentationAnnotation': <class 'pysolotools.core.models.solo.SemanticSegmentationAnnotationDefinition'>}
classmethod register(name: str) Callable

Registers a new annotation type. :param name: Type string for the annotation type :type name: str

class pysolotools.core.models.DatasetAnnotations(annotationDefinitions: List[dataclass])

Bases: object

annotationDefinitions: List[dataclass]
classmethod from_dict(kvs: Optional[Union[dict, list, str, int, float, bool]], *, infer_missing=False) A
classmethod from_json(s: Union[str, bytes, bytearray], *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, Optional[Union[dict, list, str, int, float, bool]]]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: Optional[Union[int, str]] = None, separators: Optional[Tuple[str, str]] = None, default: Optional[Callable] = None, sort_keys: bool = False, **kw) str
class pysolotools.core.models.DatasetMetadata(unityVersion: str, perceptionVersion: str, totalFrames: int, totalSequences: int, sensors: List[str], metricCollectors: List[str], annotators: List[object] = <factory>, scenarioActiveRandomizers: List[str] = <factory>, simulationStartTime: str = None, simulationEndTime: str = None, renderPipeline: str = None, scenarioRandomSeed: float = None)

Bases: object

annotators: List[object]
classmethod from_dict(kvs: Optional[Union[dict, list, str, int, float, bool]], *, infer_missing=False) A
classmethod from_json(s: Union[str, bytes, bytearray], *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
metricCollectors: List[str]
perceptionVersion: str
renderPipeline: str = None
scenarioActiveRandomizers: List[str]
scenarioRandomSeed: float = None
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
sensors: List[str]
simulationEndTime: str = None
simulationStartTime: str = None
to_dict(encode_json=False) Dict[str, Optional[Union[dict, list, str, int, float, bool]]]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: Optional[Union[int, str]] = None, separators: Optional[Tuple[str, str]] = None, default: Optional[Callable] = None, sort_keys: bool = False, **kw) str
totalFrames: int
totalSequences: int
unityVersion: str
class pysolotools.core.models.DepthAnnotation(type: str, id: str, sensorId: str, description: str, extra_data: Union[CatchAllVar, NoneType], imageFormat: str, dimension: List[int], filename: str)

Bases: Annotation

description: str
dimension: List[int]
extra_data: Optional[CatchAllVar]
filename: str
id: str
imageFormat: str
sensorId: str
type: str
class pysolotools.core.models.DepthAnnotationDefinition(id: str, description: str, extra_data: Union[CatchAllVar, NoneType])

Bases: AnnotationDefinition

description: str
extra_data: Optional[CatchAllVar]
id: str
class pysolotools.core.models.Frame(frame: int, sequence: int, step: int, timestamp: float = 0.0, metrics: List[dataclass] = <factory>, captures: List[dataclass] = <factory>)

Bases: object

captures: List[dataclass]
filter_captures(sensor)
frame: int
classmethod from_dict(kvs: Optional[Union[dict, list, str, int, float, bool]], *, infer_missing=False) A
classmethod from_json(s: Union[str, bytes, bytearray], *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
get_captures_df() DataFrame
Returns

Captures List for a Solo Frame

Return type

pd.DataFrame

get_file_path(capture: Capture) str
Returns

File path of given capture having current sequence as root

Return type

str

get_metrics_df() DataFrame
Returns

Solo Frame Metrics

Return type

pd.DataFrame

metrics: List[dataclass]
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
sequence: int
step: int
timestamp: float = 0.0
to_dict(encode_json=False) Dict[str, Optional[Union[dict, list, str, int, float, bool]]]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: Optional[Union[int, str]] = None, separators: Optional[Tuple[str, str]] = None, default: Optional[Callable] = None, sort_keys: bool = False, **kw) str
class pysolotools.core.models.InstanceSegmentationAnnotation(type: str, id: str, sensorId: str, description: str, extra_data: Union[~CatchAllVar, NoneType], imageFormat: str, dimension: List[int], filename: str, instances: List[pysolotools.core.models.solo.InstanceSegmentationLabel] = <factory>)

Bases: Annotation

description: str
dimension: List[int]
extra_data: Optional[CatchAllVar]
filename: str
id: str
imageFormat: str
instances: List[InstanceSegmentationLabel]
sensorId: str
type: str
class pysolotools.core.models.InstanceSegmentationAnnotationDefinition(id: str, description: str, extra_data: Union[CatchAllVar, NoneType], spec: List[pysolotools.core.models.solo.LabelNameSpec])

Bases: AnnotationDefinition

description: str
extra_data: Optional[CatchAllVar]
id: str
spec: List[LabelNameSpec]
class pysolotools.core.models.InstanceSegmentationLabel(instanceId: int, labelId: int, labelName: str, color: List[int])

Bases: AnnotationLabel

color: List[int]
instanceId: int
labelId: int
labelName: str
metadata: object
class pysolotools.core.models.Keypoint(index: int, location: List[float], state: int, cameraCartesianLocation: List[float] = <factory>)

Bases: object

cameraCartesianLocation: List[float]
index: int
location: List[float]
state: int
class pysolotools.core.models.KeypointAnnotation(type: str, id: str, sensorId: str, description: str, extra_data: Union[CatchAllVar, NoneType], templateId: str, values: List[pysolotools.core.models.solo.KeypointLabel])

Bases: Annotation

description: str
extra_data: Optional[CatchAllVar]
id: str
sensorId: str
templateId: str
type: str
values: List[KeypointLabel]
class pysolotools.core.models.KeypointAnnotationDefinition(id: str, description: str, extra_data: Union[CatchAllVar, NoneType], template: pysolotools.core.models.solo.KeypointTemplateDefinition)

Bases: AnnotationDefinition

description: str
extra_data: Optional[CatchAllVar]
id: str
template: KeypointTemplateDefinition
class pysolotools.core.models.KeypointLabel(instanceId: int, labelId: int, pose: str, keypoints: List[pysolotools.core.models.solo.Keypoint])

Bases: AnnotationLabel

instanceId: int
keypoints: List[Keypoint]
labelId: int
metadata: object
pose: str
class pysolotools.core.models.NormalAnnotation(type: str, id: str, sensorId: str, description: str, extra_data: Union[CatchAllVar, NoneType], imageFormat: str, dimension: List[int], filename: str)

Bases: Annotation

description: str
dimension: List[int]
extra_data: Optional[CatchAllVar]
filename: str
id: str
imageFormat: str
sensorId: str
type: str
class pysolotools.core.models.NormalAnnotationDefinition(id: str, description: str, extra_data: Union[CatchAllVar, NoneType])

Bases: AnnotationDefinition

description: str
extra_data: Optional[CatchAllVar]
id: str
class pysolotools.core.models.PixelPositionAnnotation(type: str, id: str, sensorId: str, description: str, extra_data: Union[CatchAllVar, NoneType], imageFormat: str, dimension: List[int], filename: str)

Bases: Annotation

description: str
dimension: List[int]
extra_data: Optional[CatchAllVar]
filename: str
id: str
imageFormat: str
sensorId: str
type: str
class pysolotools.core.models.PixelPositionAnnotationDefinition(id: str, description: str, extra_data: Union[CatchAllVar, NoneType])

Bases: AnnotationDefinition

description: str
extra_data: Optional[CatchAllVar]
id: str
class pysolotools.core.models.RGBCameraCapture(id: str, type: str, description: str, position: List[float], rotation: List[float], annotations: List[dataclass], velocity: List[float], acceleration: List[float], filename: str, imageFormat: str, dimension: List[float], projection: str, matrix: List[float])

Bases: Capture

acceleration: List[float]
annotations: List[dataclass]
description: str
dimension: List[float]
filename: str
id: str
imageFormat: str
matrix: List[float]
position: List[float]
projection: str
rotation: List[float]
type: str
velocity: List[float]
class pysolotools.core.models.SemanticSegmentationAnnotation(type: str, id: str, sensorId: str, description: str, extra_data: Union[CatchAllVar, NoneType], imageFormat: str, dimension: List[int], filename: str, instances: List[pysolotools.core.models.solo.SemanticSegmentationLabel])

Bases: Annotation

description: str
dimension: List[int]
extra_data: Optional[CatchAllVar]
filename: str
id: str
imageFormat: str
instances: List[SemanticSegmentationLabel]
sensorId: str
type: str
class pysolotools.core.models.SemanticSegmentationAnnotationDefinition(id: str, description: str, extra_data: Union[CatchAllVar, NoneType])

Bases: AnnotationDefinition

description: str
extra_data: Optional[CatchAllVar]
id: str
class pysolotools.core.models.SemanticSegmentationLabel(labelName: str, pixelValue: List[int])

Bases: _BaseMeta

labelName: str
metadata: object
pixelValue: List[int]