Detection format
Each detection contains:| Field | Description |
|---|---|
artifact_type | The type of artifact detected (matches your dataset’s defined types) |
start_ms | Start time in milliseconds from the beginning of the audio |
end_ms | End time in milliseconds |
confidence | Model’s confidence that this is a real artifact (0.0 to 1.0) |
Confidence scores
The confidence score indicates how certain the model is about a detection:| Range | Interpretation | Typical Action |
|---|---|---|
| 0.9-1.0 | Very high confidence | Almost certainly a real artifact |
| 0.7-0.9 | High confidence | Likely a real artifact |
| 0.5-0.7 | Moderate confidence | May need human review |
| 0.3-0.5 | Low confidence | Possible false positive |
| < 0.3 | Very low confidence | Usually filtered out by threshold |
Threshold tuning
Thethreshold parameter in inference config controls which detections are returned:
Finding the right threshold
Start with the default (0.5) and adjust based on your needs:- Too many false positives? Raise the threshold
- Missing real artifacts? Lower the threshold
- Unsure? Return more detections and add human review
Python
Working with detections
Filtering by type
Python
Sorting detections
Python
Calculating duration
Python
Detection merging
Themerge_window_ms parameter combines adjacent detections:
Without merging:
merge_window_ms: 200:
- The model detects multiple pieces of a single artifact
- You want to count distinct artifacts rather than fragments
Integrating results into your pipeline
Flag problematic audio
Python
Generate quality score
Python
Create audio markers
Generate markers for audio editing software:Python
JSON export
Python
Handling edge cases
No detections
An empty detection list means no artifacts were found above the threshold:Python
Processing failures
Check file status before accessing detections:Python
Overlapping detections
Different artifact types can overlap (e.g., a glitch during a pause):Python
Metrics and monitoring
Track detection rates
Python
Monitor over time
Track detection patterns to identify issues:Python
