BANOS
Version 0.2.0 (11.9 KB) by
Benoit Girard
Set of metrics to assess behavior annotations of videos.
BANOS (Behavior ANnOtation Score) evaluates algorithmic behavior annotations against a ground truth (typically human annotations). Designed for ethology and computer vision workflows.
Traditional frame-based metrics miss important temporal qualities. BANOS addresses this with four complementary metrics:
1. Detection Accuracy (DA) — Precision, Recall, F1 at the bout level
2. Segment Overlap (SO) — Temporal Intersection over Union (tIoU)
3. Temporal Precision (TP) — 1 / (1 + |start deviation| + |end deviation|)
4. Intra-bout Continuity (IC) — 1 - (label switches / bout length)
Usage:
run('setup.m'); % add to path
metrics = BANOS_score(pred, gt); % single recording
[g, o] = BANOS_score(dataStruct); % multiple recordings
Inputs are cell arrays: row 1 = behavior headers, rows 2+ = binary (0/1) frame data.
A Python implementation (pip install banos) with identical results is available on PyPI. See GitHub for demos and tutorials.
Cite As
Chindemi, Giuseppe, et al. From Eye to AI: Studying Rodent Social Behavior in the Era of Machine Learning. arXiv, 2025, https://doi.org/10.48550/ARXIV.2508.04255.
MATLAB Release Compatibility
Created with
R2023b
Compatible with any release
Platform Compatibility
Windows macOS LinuxTags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
