Datasets:
|
Download README.md from EcodylicScience/mosaic-example-calms21: direct link, hf CLI and curl.
- Browser
- Download file 4.21 kB
-
https://huggingface.co/datasets/EcodylicScience/mosaic-example-calms21/resolve/main/README.md
- Command line
-
hf download hf://datasets/EcodylicScience/mosaic-example-calms21/README.md
-
curl -L -o README.md https://huggingface.co/datasets/EcodylicScience/mosaic-example-calms21/resolve/main/README.md
4.21 kB
| license: cc-by-4.0 | |
| language: | |
| - en | |
| tags: | |
| - biology | |
| - animal-behavior | |
| - animal-tracking | |
| - pose-estimation | |
| - mosaic | |
| pretty_name: "CalMS21 (subset): tracks and labels for the mosaic analysis template" | |
| size_categories: | |
| - 10K<n<100K | |
| # CalMS21 subset: tracks and behaviour labels | |
| The CalMS21 task-1 arrays trimmed to four sequences per split, packaged as a | |
| [mosaic](https://github.com/EcodylicScience/mosaic) dataset. Resident-intruder | |
| assays: a black resident and a white intruder in a home cage, filmed from above at | |
| 30 fps, with seven MARS keypoints per mouse and a per-frame behaviour annotation. | |
| Worked example: | |
| [`notebooks/calms21-template.ipynb`](https://github.com/EcodylicScience/mosaic/blob/main/notebooks/calms21-template.ipynb). | |
| Set `SOURCE = "download"` (the default) and it fetches the file below. | |
| ## What is in it | |
| | File | Size | Contents | | |
| | --- | --- | --- | | |
| | `calms21-tracks-and-labels.tar.gz` | 12.6 MB | `dataset.yaml`, `tracks_raw/calms21_task1_{train,test}.npy`, and the two scan sources already declared | | |
| Four sequences: two from the train split and two from the test split, about 82,700 | |
| frames of two mice. That is enough for the template's whole path. | |
| Note what four entries mean for the supervised section. `ExtractLabeledTemplates` | |
| splits **by sequence**, holding out `max(1, min(n - 1, round(test_fraction * n)))` | |
| whole recordings -- so at the template's default `test_fraction=0.2` the test set is | |
| one recording. The notebook prints that split rather than assuming it, and says to | |
| read the classifier scores as a demonstration that the path runs rather than as a | |
| benchmark. | |
| **No video.** Every feature in the template reads the track table; media is only | |
| needed for overlays and crops, and the CalMS21 clips are roughly 500 MB each. The | |
| [mosaic-example-calms21-pose](https://huggingface.co/datasets/EcodylicScience/mosaic-example-calms21-pose) | |
| dataset ships three of them if you want them. | |
| ## One file, two roots | |
| `calms21_npy` is registered in mosaic as both a **track** converter and a **label** | |
| converter, so the same `.npy` feeds `tracks/` and `labels/` with no copy. The | |
| manifest declares both sources already; source overlap is only checked within a kind. | |
| Note `multi_sequences_per_file: true` on each. One CalMS21 file holds many sequences, | |
| and only that flag leaves the raw index's `sequence` cell blank, which is what | |
| triggers the converter's `enumerate_sequences`. Without it the whole file collapses | |
| into one entry named after the stem, and nothing fails. | |
| ## Use | |
| ```python | |
| from mosaic.core.dataset import open_dataset | |
| ds = open_dataset("calms21") | |
| ds.scan_tracks() | |
| ds.convert_all_tracks(group_from="filename") | |
| ds.scan_labels() | |
| ds.convert_all_labels(kind="behavior", source_format="calms21_npy") | |
| table = ds.load_tracks(*ds.list_sequences()[0]) | |
| ``` | |
| ## Provenance and licence | |
| Derived from the **Caltech Mouse Social Interactions (CalMS21) Dataset** v1.0 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/). The trajectories come from | |
| `task1_classic_classification.zip`, converted with that record's own | |
| `calms21_convert_to_npy.py` and then trimmed to eight sequences. This derivative | |
| carries the same licence, and **attribution travels with it**: if you use this, or | |
| anything built from it, cite the work below. | |
| > 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) | |
| > | |
| > 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) | |
| The keypoints are MARS (Segalin et al. 2021, *eLife* 10:e63720, | |
| [doi:10.7554/eLife.63720](https://doi.org/10.7554/eLife.63720)). | |
| ## Downloading | |
| The notebook uses `huggingface_hub >= 1.2.0`. The floor matters: older clients retry | |
| a rate-limit response with a 25-second backoff against a 5-minute window, so they | |
| fail rather than wait. | |