inferno.extensions.metrics package

Submodules

inferno.extensions.metrics.arand module

class inferno.extensions.metrics.arand.ArandError[source]

Bases: inferno.extensions.metrics.arand.ArandScore

Arand Error = 1 - <arand score>

forward(prediction, target)[source]
class inferno.extensions.metrics.arand.ArandScore[source]

Bases: inferno.extensions.metrics.base.Metric

Arand Score, as defined in [1].

References

[1]: http://journal.frontiersin.org/article/10.3389/fnana.2015.00142/full#h3

forward(prediction, target)[source]
inferno.extensions.metrics.arand.adapted_rand(seg, gt)[source]
Compute Adapted Rand error as defined by the SNEMI3D contest [1]

Formula is given as 1 - the maximal F-score of the Rand index (excluding the zero component of the original labels). Adapted from the SNEMI3D MATLAB script, hence the strange style.

seg : np.ndarray
the segmentation to score, where each value is the label at that point
gt : np.ndarray, same shape as seg
the groundtruth to score against, where each value is a label
are : float
The adapted Rand error; equal to $1 -
rac{2pr}{p + r}$,
where $p$ and $r$ are the precision and recall described below.
prec : float, optional
The adapted Rand precision.
rec : float, optional
The adapted Rand recall.

[1]: http://brainiac2.mit.edu/SNEMI3D/evaluation

inferno.extensions.metrics.base module

class inferno.extensions.metrics.base.Metric[source]

Bases: object

forward(*args, **kwargs)[source]

inferno.extensions.metrics.categorical module

class inferno.extensions.metrics.categorical.CategoricalError(aggregation_mode='mean')[source]

Bases: inferno.extensions.metrics.base.Metric

Categorical error.

forward(prediction, target)[source]
class inferno.extensions.metrics.categorical.IOU(ignore_class=None, sharpen_prediction=False, eps=1e-06)[source]

Bases: inferno.extensions.metrics.base.Metric

Intersection over Union.

forward(prediction, target)[source]
class inferno.extensions.metrics.categorical.NegativeIOU(ignore_class=None, sharpen_prediction=False, eps=1e-06)[source]

Bases: inferno.extensions.metrics.categorical.IOU

forward(prediction, target)[source]

Module contents