public class LazySEGMetrics extends Object
SEGMetrics over all images added by calling
addTimePoint. The images are expected to be
of dimension XYZ, where Z can be of depth 1.
The score is computed by accumulating the number of ground-truth labels and their corresponding
IoU with respect to matching prediction labels. Each contribution is computed by adding images
using addTimePoint. The final score can be queried by computeScore().
Each image's contribution is calculated independently. Therefore, the same LazYSEGMetrics object can be called from multiple threads in order to speed up computation. For instance, if the total stack does not fit in memory, lazy loading and multithreading can be used to compute the SEG score by splitting the XYZ images between threads and adding them one by one. The final score can then be calculated once all threads have finished.
Reference: Ulman, V., Maška, M., Magnusson, K. et al. An objective comparison of cell-tracking algorithms. Nat Methods 14, 1141–1152 (2017).
SEGMetrics,
Original implementation by Martin Maška and Vladimír Ulman| Constructor and Description |
|---|
LazySEGMetrics() |
| Modifier and Type | Method and Description |
|---|---|
<T,I extends net.imglib2.type.numeric.IntegerType<I>,U,J extends net.imglib2.type.numeric.IntegerType<J>> |
addTimePoint(net.imglib2.roi.labeling.ImgLabeling<T,I> groundTruth,
net.imglib2.roi.labeling.ImgLabeling<U,J> prediction)
Add a new image pair and compute its contribution to the SEG metrics.
|
<I extends net.imglib2.type.numeric.IntegerType<I>,J extends net.imglib2.type.numeric.IntegerType<J>> |
addTimePoint(net.imglib2.RandomAccessibleInterval<I> groundTruth,
net.imglib2.RandomAccessibleInterval<J> prediction)
Add a new image pair and compute its contribution to the SEG metrics.
|
double |
computeScore()
Compute the total SEG score.
|
public <T,I extends net.imglib2.type.numeric.IntegerType<I>,U,J extends net.imglib2.type.numeric.IntegerType<J>> void addTimePoint(net.imglib2.roi.labeling.ImgLabeling<T,I> groundTruth, net.imglib2.roi.labeling.ImgLabeling<U,J> prediction)
computeScore(). 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 <I extends net.imglib2.type.numeric.IntegerType<I>,J extends net.imglib2.type.numeric.IntegerType<J>> void addTimePoint(net.imglib2.RandomAccessibleInterval<I> groundTruth, net.imglib2.RandomAccessibleInterval<J> prediction)
computeScore().I - Ground-truth pixel typeJ - Prediction pixel typegroundTruth - Ground-truth imageprediction - Predicted imagepublic double computeScore()
Copyright © 2009–2026 ImgLib2. All rights reserved.