foolbox.distances

Provides classes to measure the distance between images.

Distances

MeanSquaredDistance Calculates the mean squared error between two images.
MeanAbsoluteDistance Calculates the mean absolute error between two images.

Aliases

MSE alias of MeanSquaredDistance

Base class

To implement a new distance, simply subclass the Distance class and implement the _calculate() method.

Distance Base class for distances.

Detailed description

class foolbox.distances.Distance(reference=None, other=None, bounds=None, value=None)[source]

Base class for distances.

This class should be subclassed when implementing new distances. Subclasses must implement _calculate.

class foolbox.distances.MeanSquaredDistance(reference=None, other=None, bounds=None, value=None)[source]

Calculates the mean squared error between two images.

class foolbox.distances.MeanAbsoluteDistance(reference=None, other=None, bounds=None, value=None)[source]

Calculates the mean absolute error between two images.

foolbox.distances.MSE[source]

alias of MeanSquaredDistance