SegmentationEvaluation

Models & Types · AiDotNet.ComputerVision.Segmentation.Common

Comprehensive evaluation metrics for segmentation models covering all standard benchmarks.

For Beginners

These metrics measure how good a segmentation model is. Different metrics matter for different tasks:

  • mIoU: Standard for semantic segmentation (higher = better, max 100%)
  • AP: Standard for instance segmentation (higher = better, max 100%)
  • PQ: Standard for panoptic segmentation (higher = better, max 100%)
  • Dice: Standard for medical segmentation (higher = better, max 1.0)
  • J&F: Standard for video object segmentation (higher = better, max 100%)

Constructors

Constructor Summary
SegmentationEvaluation()

Properties

Property Summary
Dictionary<int, double> PerClassAP { get; set; } Per-class AP scores.
Dictionary<int, double> PerClassDice { get; set; } Per-class Dice scores.
Dictionary<int, double> PerClassHD95 { get; set; } Per-class Hausdorff Distance (95th percentile).
Dictionary<int, double> PerClassIoU { get; set; } Per-class IoU scores.
Dictionary<int, double> PerClassPQ { get; set; } Per-class PQ scores.
Dictionary<int, double> PerObjectJAndF { get; set; } Per-object J&F scores in video.
TimeSpan InferenceTime { get; set; } Inference time per image/frame.
double AP { get; set; } Average Precision averaged over IoU thresholds 0.50:0.05:0.95 (COCO primary metric).
double AP50 { get; set; } Average Precision at IoU=0.50 (COCO-style AP50).
double AP75 { get; set; } Average Precision at IoU=0.75 (stricter).
double APLarge { get; set; } AP for large objects (area greater than 96^2 pixels).
double APMedium { get; set; } AP for medium objects (32^2 to 96^2 pixels).
double APSmall { get; set; } AP for small objects (area less than 32^2 pixels).
double AR1 { get; set; } Average Recall at maximum 1 detection per image.
double AR10 { get; set; } Average Recall at maximum 10 detections per image.
double AR100 { get; set; } Average Recall at maximum 100 detections per image.
double BoundaryF1 { get; set; } Boundary F1 score (precision/recall of boundary pixels).
double BoundaryIoU { get; set; } Boundary IoU at specified pixel tolerance.
double FPS { get; set; } Frames per second.
double FScore { get; set; } F score (boundary F-measure for VOS).
double FrequencyWeightedIoU { get; set; } Frequency-weighted IoU (classes weighted by pixel frequency).
double GFLOPs { get; set; } Floating point operations in GFLOPs.
double JAndFMean { get; set; } J&F mean (average of J and F scores).
double JScore { get; set; } J score (Jaccard/IoU for VOS).
double MeanASSD { get; set; } Average Symmetric Surface Distance in mm.
double MeanDice { get; set; } Mean Dice score across classes.
double MeanHD95 { get; set; } Mean Hausdorff Distance (95th percentile) in mm.
double MeanIoU { get; set; } Mean Intersection over Union across all classes.
double MeanNSD { get; set; } Normalized Surface Distance at specified tolerance.
double MeanPixelAccuracy { get; set; } Mean pixel accuracy across classes.
double MeanVolumeSimilarity { get; set; } Volume Similarity (1 = perfect, 0 = no overlap).
double PQStuff { get; set; } PQ for “stuff” (amorphous regions) only.
double PQThings { get; set; } PQ for “things” (countable objects) only.
double PanopticQuality { get; set; } Panoptic Quality.
double ParameterCountM { get; set; } Number of model parameters in millions.
double PeakGpuMemoryMB { get; set; } Peak GPU memory usage in MB.
double PixelAccuracy { get; set; } Pixel accuracy: fraction of correctly classified pixels.
double RecognitionQuality { get; set; } Recognition Quality (F1 of matched segments, measures detection accuracy).
double SegmentationQuality { get; set; } Segmentation Quality (average IoU of matched segments).
double TemporalStability { get; set; } Temporal stability score (how consistent masks are across frames).
double TrimapAccuracy { get; set; } Trimap accuracy (accuracy in the uncertain boundary region).
int NumClasses { get; set; } Number of classes in the evaluation.
int NumSamples { get; set; } Number of images/frames evaluated.
string DatasetName { get; set; } Name of the evaluation dataset (e.g., “COCO”, “ADE20K”, “Cityscapes”, “DAVIS”).