MeanIntersectionOverUnion<T>

Models & Types · AiDotNet.Metrics

Mean Intersection over Union (mIoU) metric for segmentation tasks.

How It Works

mIoU is the standard metric for semantic segmentation evaluation. It computes IoU for each class and averages across all classes. IoU = TP / (TP + FP + FN) where TP=true positive, FP=false positive, FN=false negative.

Usage in 3D AI:

  • Point cloud segmentation (S3DIS, ScanNet)
  • Mesh semantic segmentation
  • Voxel-based 3D segmentation

Constructors

Constructor Summary
MeanIntersectionOverUnion(int numClasses, bool ignoreBackground) Initializes a new instance of the mIoU metric.

Methods

Method Summary
T Compute(Tensor<T> predicted, Tensor<T> groundTruth) Computes mIoU between predicted and ground truth segmentation masks.
T[] ComputePerClass(Tensor<T> predicted, Tensor<T> groundTruth) Computes per-class IoU values.