Skip to main content

per_class_iou

Function per_class_iou 

Source
pub fn per_class_iou(
    predictions: &[usize],
    targets: &[usize],
    num_classes: usize,
) -> Vec<f32>
Expand description

Per-class Intersection over Union: |pred ∩ target| / |pred ∪ target|.

Returns a Vec of IoU scores, one per class. Classes that appear in neither predictions nor targets receive a score of 0.0.