VisionData#

class VisionData[source]#

VisionData is the base data object of deepcheck vision used as input to checks and suites.

Parameters
batch_loader

A batch_loader which load a batch of data in an iterative manner. Batch loader batch output must be a dictionary in BatchOutputFormat format. The batch loader must provide SHUFFLED batches.

task_typestr

The task type of the data. can be one of the following: ‘classification’, ‘semantic_segmentation’, ‘object_detection’, ‘other’. For ‘other’, only image related checks (such as ImagePropertyOutliers) will be run.

label_mapDict[int, str], optional

A dictionary mapping class ids to their names.

dataset_name: str, optional

Name of the dataset to use in the displays instead of “Train” or “Test”.

reshuffle_data: bool, default=True

If True we will attempt to shuffle the batch loader. Only set this to False if the data is already shuffled.

__init__(batch_loader, task_type: typing_extensions.Literal[classification, object_detection, semantic_segmentation, other], label_map: Optional[Dict[int, str]] = None, dataset_name: Optional[str] = None, reshuffle_data: bool = True)[source]#
__new__(*args, **kwargs)#

Attributes

VisionData.batch_loader

Return the batch loader used be the vision data.

VisionData.has_additional_data

Return True if the batch loader contains additional_data.

VisionData.has_embeddings

Return True if the batch loader contains embeddings.

VisionData.has_image_identifiers

Return True if the batch loader contains image identifiers.

VisionData.has_images

Return True if the batch loader contains images.

VisionData.has_labels

Return True if the batch loader contains labels.

VisionData.has_predictions

Return True if the batch loader contains predictions.

VisionData.num_classes

Return a number of possible classes based on model proba, label map or observed classes.

VisionData.number_of_images_cached

Return True if the number of images processed and whose statistics were cached.

VisionData.task_type

Return True if the batch loader contains labels.

Methods

VisionData.copy([reshuffle_data, batch_loader])

Create new copy of the vision data object with clean cache.

VisionData.get_cache([use_class_names])

Return a dictionary of stored cache.

VisionData.get_observed_classes([...])

Return a dictionary of observed classes either as class ids or as the class names.

VisionData.head([num_images_to_display, ...])

Show data from a single batch of this VisionData.

VisionData.init_cache()

Initialize the cache.

VisionData.update_cache(batch_size, ...)

Update cache based on newly arrived batch.

VisionData.validate()

Validate the VisionData functionalities implemented by the user and set which formatters were implemented.