HeatmapComparison#

class HeatmapComparison[source]#

Check if the average image brightness (or bbox location if applicable) is similar between train and test set.

The check computes the average grayscale image per dataset (train and test) and compares the resulting images. Additionally, in case of an object detection task, the check will compare the average locations of the bounding boxes between the datasets.

Parameters
n_samplesOptional[int] , default10000

Number of samples to use for the check. If None, all samples will be used.

__init__(n_samples: Optional[int] = 10000, **kwargs)[source]#
__new__(*args, **kwargs)#

Methods

HeatmapComparison.add_condition(name, ...)

Add new condition function to the check.

HeatmapComparison.clean_conditions()

Remove all conditions from this check instance.

HeatmapComparison.compute(context)

Create the average images and display them.

HeatmapComparison.conditions_decision(result)

Run conditions on given result.

HeatmapComparison.config([include_version, ...])

Return check configuration (conditions' configuration not yet supported).

HeatmapComparison.from_config(conf[, ...])

Return check object from a CheckConfig object.

HeatmapComparison.from_json(conf[, ...])

Deserialize check instance from JSON string.

HeatmapComparison.initialize_run(context)

Initialize run.

HeatmapComparison.metadata([with_doc_link])

Return check metadata.

HeatmapComparison.name()

Name of class in split camel case.

HeatmapComparison.params([show_defaults])

Return parameters to show when printing the check.

HeatmapComparison.plot_row_of_heatmaps(...)

Plot a row of heatmaps for train and test images.

HeatmapComparison.remove_condition(index)

Remove given condition by index.

HeatmapComparison.run(train_dataset, ...[, ...])

Run check.

HeatmapComparison.to_json([indent, ...])

Serialize check instance to JSON string.

HeatmapComparison.update(context, batch, ...)

Perform update on batch for train or test counters and histograms.

Examples#