BehaVERT models
Pretrained models for BehaVERT, a transformer that reads animal pose keypoints as a sequence of tokens and decodes behavior from them (Shin et al., International Journal of Computer Vision 2026, doi:10.1007/s11263-026-02834-y). Code: https://github.com/ShinSeungJ/BehaVERT.
| Model | Predicts | Input | Head |
|---|---|---|---|
calms21-task1/ |
attack/investigation/mount/other | 2 mice × 7 keypoints | token |
mabe22-strain/ |
strain, WT/TG | 3 mice × 12 keypoints | sequence |
oft-behavior/ |
7 open‑field behaviors | 1 mouse × 11 keypoints | token |
All three read 2D keypoints. A token head labels every frame; the sequence head
labels each window from its [CLS] token.
Each folder holds config.json (architecture, classes, keypoint layout,
drawing settings) and model.safetensors (about 86M parameters). The
matching pose models are in ShinSeungJ/behavert-pose.
Use
pip install "behavert[pose] @ git+https://github.com/ShinSeungJ/BehaVERT"
behavert decode --video my_videos/ --model oft-behavior --overlay --sync # video -> behavior
behavert decode --keypoints session.csv --model calms21-task1 --video session.mp4 --sync
from behavert import BehaVERT
from behavert.inference import predict_recording
model = BehaVERT.from_pretrained("calms21-task1") # downloads calms21-task1/ from this repo
pred = predict_recording(model, keypoints) # keypoints [T, mouse, keypoint, (x, y)]
pred.labels # one class per frame
behavert decode writes per-frame behaviors, a summary per behavior, a video
with the skeleton and behavior drawn on, and a synchronized panel video with
window embeddings (t-SNE), attention and confidence. behavert attention and
behavert embed analyse attention and embeddings over a whole dataset.
calms21-task1 — CalMS21 Task 1
Resident–intruder pairs; frame-level attack, investigation, mount or other. Pretrained by masked keypoint modeling on all CalMS21 keypoints, then fine-tuned on Task 1.
- Input: 2 mice (resident, intruder) × 7 keypoints (nose, left ear, right ear, neck, left hip, right hip, tail base) × (x, y) = 28 values per frame; MARS pixel coordinates of a 1024 × 570 video.
- Windows: 128 frames at 30 fps, step 64, overlapping predictions averaged.
mabe22-strain — MABe22 strain
Mouse triplets; the strain (WT or TG) of 64-frame windows, combined into one prediction per video.
- Input: 3 mice × 12 keypoints (nose, left ear, right ear, neck, left forepaw, right forepaw, center back, left hindpaw, right hindpaw, tail base, tail middle, tail tip) × (x, y) = 72 values per frame; MABe22 pixel coordinates as distributed, missing keypoints 0.
- Windows: 64 frames at 30 fps, step 32; a video's label comes from its averaged window probabilities.
oft-behavior — open-field behavior
Single mouse, top-view open-field test; frame-level supported rearing,
unsupported rearing, grooming, freezing, jumping, backwards
walking or others. Reads the keypoints of the oft-pose model, so
behavert decode --video … --model oft-behavior goes from video to behavior in one step.
- Input: 1 mouse × 11 keypoints (nose, left ear, right ear, left forelimb,
right forelimb, tail base, left hindlimb, right hindlimb, tail middle, tail
tip, body center) × (x, y) = 22 values per frame, normalized to [0, 1] by
frame width and height; frames without a detection are linearly interpolated.
These are
oft-posekeypoints 0, 1, 2, 4–11 (its thoracic center is not used). - Windows: 64 frames at 30 fps, step 32, overlapping predictions averaged.
- Training data: top-view open-field recordings of single mice with frame-level behavior annotations made in our lab. Results depend on a similar setup (camera above a square open field, one mouse); check predictions on a few of your own videos before relying on them.
Citation
@article{shin2026behavert,
title = {BehaVERT: A Transformer-Based Motion Language Model for Decoding Behavioral Semantics in Mice},
author = {Shin, Seung Jae and Lee, Junesu and Ko, Chang and Kim, Daesoo},
journal = {International Journal of Computer Vision},
volume = {134},
pages = {303},
year = {2026},
doi = {10.1007/s11263-026-02834-y}
}
calms21-task1 was trained on CalMS21 (Sun et al., NeurIPS 2021 Datasets and
Benchmarks) and mabe22-strain on MABe22 (Sun et al., ICML 2023); please cite
those datasets as well when you use the models.