public class SEGMetrics extends Object
The metrics expect images of dimensions XYZT, where Z and T can be of depth 1. The metrics score is calculated for each ground-truth label in each XYZ volume (XY if dimension Z is of depth 1), and averaged over the total number of ground-truth labels in the XYZT volume. If the Z dimension has depth greater than 1, then the labels are considered 3D and pixels of equal values at different depths are considered to be part of the same labeling.
Finally, if the image stack does not fit in memory, you can use LazySEGMetrics to compute
a running SEG score for which images can be added one at time.
Reference: Ulman, V., Maška, M., Magnusson, K. et al. An objective comparison of cell-tracking algorithms. Nat Methods 14, 1141–1152 (2017).
| Constructor and Description |
|---|
SEGMetrics() |
public static <T,I extends net.imglib2.type.numeric.IntegerType<I>,U,J extends net.imglib2.type.numeric.IntegerType<J>> double computeMetrics(net.imglib2.roi.labeling.ImgLabeling<T,I> groundTruth, net.imglib2.roi.labeling.ImgLabeling<U,J> prediction)
This method is not compatible with ImgLabeling with intersecting labels.
T - Label type associated to the ground-truthI - Ground-truth pixel typeU - Label type associated to the predictionJ - Prediction pixel typegroundTruth - Ground-truth imageprediction - Predicted imagepublic static <I extends net.imglib2.type.numeric.IntegerType<I>,J extends net.imglib2.type.numeric.IntegerType<J>> double computeMetrics(net.imglib2.RandomAccessibleInterval<I> groundTruth, net.imglib2.RandomAccessibleInterval<J> prediction)
I - Ground-truth pixel typeJ - Prediction pixel typegroundTruth - Ground-truth imageprediction - Predicted imageprotected static <I extends net.imglib2.type.numeric.IntegerType<I>,J extends net.imglib2.type.numeric.IntegerType<J>> net.imglib2.util.Pair<Integer,Double> runSingle(net.imglib2.RandomAccessibleInterval<I> groundTruth, net.imglib2.RandomAccessibleInterval<J> prediction)
protected static double[][] computeCostMatrix(ConfusionMatrix cM)
protected static double getLocalIoUScore(ConfusionMatrix cM, int i, int j)
Copyright © 2009–2025 ImgLib2. All rights reserved.