datasetinsights.datasets

datasetinsights.datasets.exceptions

exception datasetinsights.datasets.exceptions.DatasetNotFoundError

Bases: Exception

Raise when a dataset file can’t be found.

datasetinsights.datasets.synthetic

Simulation Dataset Catalog

class datasetinsights.datasets.synthetic.SynDetection2D(*, data_path=None, transforms=None, version='0.0.1', def_id=4, **kwargs)

Bases: object

Synthetic dataset for 2D object detection.

During the class instantiation, it would check whether the data files such as annotations.json, images.png are present, if not it’ll check whether a compressed dataset file is present which contains the necessary files, if not it’ll raise an error.

See synthetic dataset schema documentation for more details. <https://datasetinsights.readthedocs.io/en/latest/Synthetic_Dataset_Schema.html>

catalog

catalog of all captures in this dataset

Type

list

transforms

callable transformation that applies to a pair of capture, annotation. Capture is the information captured by the sensor, in this case an image, and annotations, which in this dataset are 2d bounding box coordinates and labels.

label_mappings

a dict of {label_id: label_name} mapping

Type

dict

ARCHIVE_FILE = 'SynthDet.zip'
SUBFOLDER = 'synthetic'
static is_dataset_files_present(data_path)
datasetinsights.datasets.synthetic.read_bounding_box_2d(annotation, label_mappings=None)

Convert dictionary representations of 2d bounding boxes into objects of the BBox2D class

Parameters
  • annotation (List[dict]) – 2D bounding box annotation

  • label_mappings (dict) – a dict of {label_id: label_name} mapping

Returns

A list of 2D bounding box objects

datasetinsights.datasets.synthetic.read_bounding_box_3d(annotation, label_mappings=None)

Convert dictionary representations of 3d bounding boxes into objects of the BBox3d class

Parameters
  • annotation (List[dict]) – 3D bounding box annotation

  • label_mappings (dict) – a dict of {label_id: label_name} mapping

Returns

A list of 3d bounding box objects