Multiple moduleΒΆ

Module for functions to calculate multiple metrics.

This modules contains classes to calculate multiple metrics in batch mode or for one

Examples

>>> from viqa import BatchMetrics, MultipleMetrics, PSNR, QMeasure
>>> metrics = [PSNR(data_range=1), QMeasure(data_range=1)]
>>> metrics_parameters = [{}, {'hist_bins': 16, 'num_peaks': 2}]
>>> batch = BatchMetrics(
...     file_dir='path/to/images',
...     pairs_csv='path/to/pairs.csv',
...     metrics=metrics,
...     metrics_parameters=metrics_parameters
... )
>>> batch.calculate()
>>> batch.export_results(file_path='path/to/results', file_name='results.csv')
>>> img_r = 'path/to/reference_image'
>>> img_m = 'path/to/modified_image'
>>> multiple = MultipleMetrics(metrics, metrics_parameters)
>>> multiple.calculate(img_r, img_m)
>>> multiple.report(
...     csv=True,
...     metadata=True,
...     text=False,
...     image=False,
...     file_path='path/to/results'
... )

Classes

BatchMetrics(file_dir, pairs_file, metrics, ...)

Class to calculate metrics in batch mode.

MultipleMetrics(metrics, metrics_parameters)

Class to calculate metrics in batch mode.