jacobdavidson's picture
Add the example dataset archive, card and checksums
2180fbc verified
|
Raw History Blame Contribute Delete
5.25 kB
---
license: cc-by-4.0
language:
- en
tags:
- biology
- animal-behavior
- animal-tracking
- pose-estimation
- mosaic
pretty_name: "CalMS21 (subset): pose-model training and TREx tracking"
size_categories:
- 10K<n<100K
---
# CalMS21 — YOLO pose-model training and TREx tracking example
A [mosaic](https://github.com/EcodylicScience/mosaic) dataset for a complete tracking
workflow: published keypoints become pose pseudo-annotations, those train a YOLO pose
model, and TREx tracks with that model as its detector, with visual identification on.
Worked end to end in
[`notebooks/calms21-pose-training-and-tracking.ipynb`](https://github.com/EcodylicScience/mosaic/blob/main/notebooks/calms21-pose-training-and-tracking.ipynb).
## Contents
| File | Size |
| --- | --- |
| `calms21-pose.tar.gz` | 1.94 GB |
It unpacks to `calms21-pose/`, a mosaic dataset:
| Root | What |
| --- | --- |
| `media_raw/` | 3 re-encoded AV1 recordings from CalMS21 task 1 (21,364 / 19,343 / 13,222 frames) |
| `media/frames/` | 80 k-means-selected PNG frames per recording (240 total) |
| `tracks_raw/` | the CalMS21 task-1 arrays for those three sequences |
| `dataset.yaml` | the manifest |
```bash
tar xzf calms21-pose.tar.gz
```
Then point the notebook's `LOCAL_DATASET` at `calms21-pose/`, or let it download this
archive itself.
**`tracks/` is not included, on purpose.** It is regenerable from `tracks_raw/` in one
call, and rebuilding it is the notebook's first step. The same goes for the YOLO training
tree: it is a rearrangement of the frames and the tables — the same pixels under different
filenames — so shipping it would enlarge the download to carry nothing new.
## No model weights
None are included. The trainer, Ultralytics, is AGPL-3.0; rather than work through what
distributing a model produced by it requires, this dataset carries none. The notebook
trains one, or takes a `best.pt` you already have.
## What the tracks are, and are not
The shipped keypoints are MARS-derived and were corrected. Training a *new* pose model on
them is bootstrapping, not annotation — the labels are as good as MARS was, no better.
That is the point of the example rather than a caveat to it: the training path runs end to
end without anyone labelling a frame.
The tracks the notebook then produces with TREx are **not** as good as the ones it started
from. With default parameters TREx tends to drop a tracklet when the two mice come close,
which is exactly the moment a resident-intruder assay is about. Getting tracks worth
analysing needs parameter work and a better model than 240 bootstrapped frames can support.
The example demonstrates that the path runs, not that the result is usable.
## Provenance and licence
Resident-intruder assays: a black resident and a white intruder in a home cage, filmed from
above at 30 fps. Seven MARS keypoints per mouse (nose, ears, neck, hips, tail base).
Derived from the **Caltech Mouse Social Interactions (CalMS21) Dataset**, v1.0, task 1,
train split — three sequences of the 70 it contains. Source at CaltechDATA,
[doi:10.22002/D1.1991](https://doi.org/10.22002/D1.1991), under
[CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). Two files of that record are
upstream of this one:
| CalMS21 file | What it became here |
| --- | --- |
| `task1_videos_mp4.zip` (28.3 GB) | `media_raw/` — three clips, re-encoded to AV1 for frame-accurate reading |
| `task1_classic_classification.zip` (457.4 MB) | `tracks_raw/` — the trajectories, converted to `.npy` with the record's own `calms21_convert_to_npy.py` and trimmed to these three sequences |
Both are derivatives and carry the same CC BY 4.0 terms, which means **attribution travels
with them**: if you use this dataset, or anything built from it, cite the work below.
**Dataset:**
> Sun JJ, Karigo T, Anderson DJ, Perona P, Yue Y, Kennedy A (2021) *Caltech Mouse Social
> Interactions (CalMS21) Dataset* (Version 1.0) [Dataset]. CaltechDATA.
> [doi:10.22002/D1.1991](https://doi.org/10.22002/D1.1991)
**Paper:**
> Sun JJ, Karigo T, Chakraborty D, Mohanty SP, Wild B, Sun Q, Chen C, Anderson DJ,
> Perona P, Yue Y, Kennedy A (2021) The Multi-Agent Behavior Dataset: Mouse Dyadic Social
> Interactions. *NeurIPS Datasets and Benchmarks*.
> [arXiv:2104.02710](https://arxiv.org/abs/2104.02710)
```bibtex
@article{calms21,
title = {The Multi-Agent Behavior Dataset: Mouse Dyadic Social Interactions},
author = {Sun, Jennifer J and Karigo, Tomomi and Chakraborty, Dipam and
Mohanty, Sharada P and Wild, Benjamin and Sun, Quan and Chen, Chen and
Anderson, David J and Perona, Pietro and Yue, Yisong and Kennedy, Ann},
journal = {arXiv preprint arXiv:2104.02710},
year = {2021}
}
```
**The keypoints come from MARS**, and this dataset is only as good as that pipeline was:
> Segalin C, Williams J, Karigo T, Hui M, Zelikowsky M, Sun JJ, Perona P, Anderson DJ,
> Kennedy A (2021) The Mouse Action Recognition System (MARS) software pipeline for
> automated analysis of social behaviors in mice. *eLife* 10: e63720.
> [doi:10.7554/eLife.63720](https://doi.org/10.7554/eLife.63720)
More on CalMS21: <https://sites.google.com/view/computational-behavior/our-datasets/calms21-dataset>