batch_kpis

Description

Loss and metric functions and classes that can be calculated per batch.

A good overview and collection can be found e.g. here: https://lars76.github.io/neural-networks/object-detection/losses-for-segmentation/ (the contained code samples are quite instructive but in tensorflow, thus not used here).

Classes

AbstractIoULike

General functions for intersection over union like calculation on binarized in- and output.

AbstractIoULoss

Shared settings for intersection over union based losses.

AbstractIoUMetric

Common properties of IoU calculation.

BalancedBCELoss

Balanced binary cross entropy loss.

BalancedPenaltyReducedFocalLoss

Balanced version of the penalty reduced focal loss from CenterNet.

BatchReduction

Aggregation types to reduce the 0th (meaning the batch) dimension of a tensor.

IoU

Calc sample-wise intersection over union (IoU) values output batch.

MaskRCNNLoss

Loss and associated data for a standard Mask R-CNN model.

Net2VecLoss

Simplified intersection over union as loss.

TverskyLoss

Calc Tversky loss (balanced Dice loss) for given outputs amd targets.

WeightedLossSum

Weighted sum of loss results.