Open hbredin opened 4 years ago
Segmentation metrics fail with empty annotations.
from pyannote.core import Annotation, Segment reference = Annotation() hypothesis = Annotation() from pyannote.metrics.diarization import SegmentationPurity purity = SegmentationPurity() purity(reference, hypothesis)
ZeroDivisionError: float division by zero
from pyannote.metrics.diarization import SegmentationCoverage coverage = SegmentationCoverage() coverage(reference, hypothesis)
ValueError: zero-size array to reduction operation maximum which has no identity
from pyannote.metrics.diarization import SegmentationPurityCoverageFMeasure both = SegmentationPurityCoverageFMeasure() both(reference, hypothesis)
It does not really make sense to compute segmentation purity and coverage on empty files but I guess a more explicite message should be raised.
pyannote.core==3.0 pyannote.database==2.3.1 pyannote.metrics==2.1
Description
Segmentation metrics fail with empty annotations.
Steps/Code to Reproduce
Expected Results
It does not really make sense to compute segmentation purity and coverage on empty files but I guess a more explicite message should be raised.
Versions