Prompting-MammAlps / README.md
gabeva's picture
Update README.md
04d96ea verified
|
Raw
History Blame Contribute Delete
18.6 kB
---
license: cc-by-nc-4.0
language:
- en
pretty_name: MammAlps-S2 & Prompting-MammAlps
tags:
- wildlife
- conservation
- video
- mammals
- behavior
- camera-trap
- text-to-video-retrieval
- temporal-action-localization
- action-recognition
- bounding-box
- tracking
task_categories:
- video-classification
- other
size_categories:
- 1K<n<10K
annotations_creators:
- expert-generated
language_creators:
- expert-generated
multilinguality:
- monolingual
---
# Dataset Card for MammAlps-S2 & Prompting-MammAlps
**MammAlps-S2** is a camera-trap video dataset of wildlife monitoring in the Swiss National Park, covering two summer field seasons (2023 and 2024).
It contains video clips of seven Alpine mammal species annotated with per-frame bounding boxes, individual tracks, behavioural labels, and frame-level attributes (age for deer species, and sex for adult deer species). It extends **MammAlps** (see [MammAlps](https://eceo-epfl.github.io/MammAlps/)) with a new season of data, refined labels, and additional attributes.
Built on top of these dense annotations, we propose a **text-to-video retrieval (TVR) benchmark** called **Prompting-MammAlps**. 135 natural-language queries are each associated with the subset of train/test videos whose content fully satisfies the query.
## Dataset Details
### Dataset Description
MammAlps-S2 provides 2 865 camera-trap video clips (1920×1080 MP4, ~75 GB uncompressed) from three sites in the Swiss National Park across two field seasons. Each clip is annotated with per-frame bounding boxes, persistent animal tracks, species labels, behavioural action/activity labels, and demographic attributes (age and sex for deer species). The prompting-MammAlps TVR benchmark consists of 135 natural-language queries each linked to the set of videos that fully satisfy the query.
- **Curated by:** Environmental Computational Science and Earth Observation Laboratory (EPFL), and Mathis Group for Computational Neuroscience and AI (EPFL)
- **Funded by:** EPFL SV-ENAC I-PhD program (G.V.); Swiss SNF grant 320030-227871
- **Shared by:** ECEO, EPFL
- **Language(s):** English
- **License:** [CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/legalcode) (non-commercial)
- **Github Repository:** [amathislab/prompting-mammalps](https://github.com/amathislab/prompting-mammalps/)
- **Project Page:** [http://cnai.epfl.ch/prompting-mammalps/](http://cnai.epfl.ch/prompting-mammalps/)
## Uses
### Direct Use
This dataset is intended for research and method development in:
- Species recognition
- Behaviour recognition and segmentation
- Multi-animal tracking with occlusions
- Spatio-temporal action localisation
- Text-to-video retrieval
### Out-of-Scope Use
This dataset is released under a **non-commercial** license (CC BY-NC 4.0). Commercial use, surveillance applications, or any use that could compromise the privacy of monitored wildlife populations or research integrity is out of scope.
## Dataset Structure
### Overview
| | |
|---|---|
| **Data modality** | Video clips (MP4, 1920×1080), text queries |
| **Annotation type** | Animal tracks + frame-level attributes |
| **Total videos** | 2 865 |
| **Train / Test split** | 2 090 / 775 videos |
| **Total duration** | 18.4 h |
| **Video duration** | min 1.2 s — mean 23.1 s — max 120.8 s |
| **Dataset size (uncompressed)** | ~75 GB |
| **Species** | 7 |
| **Actions** | 23 |
| **Activities** | 12 |
| **Weather categories** | 4 |
| **TVR queries** | 135 |
| **Videos per query (train)** | min 0 — mean 57.8 — max 1 110 |
| **Videos per query (test)** | min 0 — mean 20.8 — max 373 |
| **Recording period** | Aug.–Oct. 2023 & Jun.–Aug. 2024 |
| **Annotation format** | JSON (per video), CSV metadata index |
### Data Instances
Each video clip is paired with a JSON annotation file containing per-frame detections. The metadata CSVs index all videos with their annotation paths and split assignments.
### Data Fields
Each annotation JSON file has two top-level keys: `info` and `frames`.
**`info`** — video-level metadata:
| Field | Type | Description |
|---|---|---|
| `file_id` | str | Unique video identifier (matches the filename stem) |
| `site_id` | str | Site identifier (`S1`, `S2`, or `S3`) |
| `cam_id` | str | Camera identifier (e.g. `C1`) |
| `width` | int | Frame width in pixels (1920) |
| `height` | int | Frame height in pixels (1080) |
| `attributes.weather` | str | Video-level weather label: `sunny`, `clear`, `overcast`, or `rainy` |
**`frames`** — list of per-frame objects, each with:
| Field | Type | Description |
|---|---|---|
| `frame_id` | int | Zero-based frame index within the video |
| `detections` | list | List of detection objects for this frame (may be empty) |
Each detection object contains:
| Field | Type | Description |
|---|---|---|
| `track_id` | int | Persistent animal identity across frames within a video |
| `segment_id` | int | Track segment identifier, increases when the animal re-enters the camera field-of-view |
| `bbox` | list[int] | Bounding box [x_min, y_min, x_max, y_max] in pixels |
| `attributes.Species` | str | Species label |
| `attributes.Action` | str | Primary action label |
| `attributes.Action2` | str | Secondary action label, or `"none"` |
| `attributes.Activity` | str | Activity label |
| `attributes.Deer_age` | str | `adult` / `juvenile` (deer species only) |
| `attributes.Deer_adult_sex` | str | `male` / `female` (adult deer only) |
Full label vocabularies (actions, activities, species, weather, deer age, deer sex) are provided in `metadata/label_mapping.json`.
`metadata/train.csv` and `metadata/test.csv` list every video with the following columns:
| Column | Description |
|---|---|
| `video_file_path` | Relative path to the `.mp4` file |
| `annotation_file_path` | Relative path to the corresponding `.json` file |
| `duration` | Video duration in seconds |
| `fps` | Frames per second |
| `sampling_weight` | Suggested sampling weight for class-balanced training (accounts for label imbalance and group size — videos with more individuals are upweighted) |
### Data Splits
The dataset is split into **train** (2 090 videos) and **test** (775 videos) by randomly partitioning acquisition days while maintaining a similar label distribution across sets. Use `metadata/train.csv` and `metadata/test.csv` to reproduce the official split. The `sampling_weight` column can be used with a weighted sampler to compensate for cumulative class imbalance.
### Directory Structure
```
.
├── videos/
│ ├── train/
│ │ └── {S}/{C}/{S}_{C}_{season}{event_id}_{V}{video_id}.mp4
│ └── test/
│ └── {S}/{C}/{S}_{C}_{season}{event_id}_{V}{video_id}.mp4
├── annotations/
│ ├── train/
│ │ └── {S}/{C}/{S}_{C}_{season}{event_id}_{V}{video_id}.json
│ └── test/
│ └── {S}/{C}/{S}_{C}_{season}{event_id}_{V}{video_id}.json
└── metadata/
├── train.csv # video index for training videos
├── test.csv # video index for test (candidate) videos
├── label_mapping.json # integer ↔ string label vocabularies (actions, activities, species, weather, deer age/sex)
├── query_categories.json # ECOLOGY and VISION category assignments for all 135 queries
├── queries_and_videos_train.json # query text → list of matching train video ids
└── queries_and_videos_test.json # query text → list of matching test video ids
```
**File naming convention:** `{S}_{C}_{season}{event_id}_{V}{video_id}` where:
- `{S}` — site identifier: `S1`, `S2`, or `S3`
- `{C}` — camera identifier: `C1``C6`
- `{season}``E` for 2023 recordings, `F` for 2024 recordings
- `{event_id}` — zero-padded event index (contiguous recording period at a given site)
- `{V}{video_id}` — zero-padded clip index within that event
Example: `S1_C3_E104_V0262.mp4` is clip 262 from event 104 recorded in 2023 by camera 3 at site 1.
### TVR Benchmark — Prompting-MammAlps
135 natural-language queries were manually defined in collaboration with a behavioural ecologist. Each query is categorised along two independent axes:
**Ecological relevance** (`query_categories.json``ECOLOGY`):
| Category | Description |
|---|---|
| `RARE` | Rare events of ecological interest (rare species, rare behaviours, specific weather conditions) |
| `COURTSHIP` | Courtship-related behaviours |
| `SOCIAL` | Other social interactions (chasing, playing, nursing, …) |
| `CAMERA_REACTION` | Animals reacting to the camera-trap |
| `COMMON` | Frequent baseline events (designed to filter out the majority of videos) |
**Retrieval complexity** (`query_categories.json``VISION`):
| Category | Description |
|---|---|
| `SINGLE_ATTR` | Queries specifying a single attribute (e.g. species or action) |
| `MULTI_ATTR` | Queries combining two or more attributes |
| `MULTI_INDIV` | Queries requiring information about two or more individuals simultaneously |
| `COMPLEX` | Queries requiring temporal or relational reasoning beyond attribute presence |
| `VIDEO_COMPARISON` | Queries referencing another video and asking for related content |
A query can belong to multiple categories. The full mapping is stored in `metadata/query_categories.json` with the following structure:
```json
{
"ECOLOGY": {
"RARE": ["query text", ...],
"COURTSHIP": ["query text", ...],
"SOCIAL": ["query text", ...],
"CAMERA_REACTION": ["query text", ...],
"COMMON": ["query text", ...]
},
"VISION": {
"SINGLE_ATTR": ["query text", ...],
"MULTI_ATTR": ["query text", ...],
"MULTI_INDIV": ["query text", ...],
"COMPLEX": ["query text", ...],
"VIDEO_COMPARISON": ["query text", ...]
}
}
```
Videos are associated with a query only if they contain at least one behavioural segment that **fully** satisfies all elements of that query; partial matches are excluded. Some videos are not matched to any query, and some queries have no matching video (kept to reflect realistic retrieval conditions where an event may never have been captured).
Associations are stored in `metadata/queries_and_videos_train.json` and `metadata/queries_and_videos_test.json`, both with a flat mapping from query text to a list of matching video file IDs:
```json
{
"A red deer foraging.": ["S1_C1_E104_V0262", "S3_C3_E453_V0159", ...],
"An adult male red deer vocalizing.": ["S2_C2_E351_V0099", ...],
...
}
```
The video IDs are bare file stems (no directory prefix, no extension). To resolve to an actual file path, prepend the split directory and site/camera subdirectory from the corresponding CSV: e.g., `train/S1/C1/S1_C1_E104_V0262.mp4`.
### Getting Started
Download the full dataset from the Hugging Face Hub using the `huggingface_hub` library:
```python
from huggingface_hub import snapshot_download
snapshot_download(
repo_id="eceo-epfl/prompting-mammalps",
repo_type="dataset",
local_dir="./prompting-mammalps",
)
```
Or via the Hugging Face CLI:
```bash
huggingface-cli download eceo-epfl/prompting-mammalps --repo-type dataset --local-dir ./prompting-mammalps
```
The metadata files are small and can be downloaded independently if you only need the annotations:
```python
from huggingface_hub import hf_hub_download
hf_hub_download(
repo_id="eceo-epfl/prompting-mammalps",
repo_type="dataset",
filename="metadata/train.csv",
local_dir="./prompting-mammalps",
)
```
## Dataset Creation
### Curation Rationale
Camera-trap datasets from protected alpine environments are scarce. MammAlps-S2 addresses this gap by providing densely annotated multi-season footage from the Swiss National Park, enabling research on species recognition, behaviour analysis, multi-animal tracking, and video retrieval in realistic wildlife monitoring conditions.
### Source Data
#### Data Collection and Processing
**Recording protocol.** Videos were recorded with Browning Spec Ops Elite HP5 camera-traps deployed across three sites in the Swiss National Park, covering 15 unique camera views in total (6 at Site 1, 3 at Site 2, 6 at Site 3). In 2023, cameras were deployed for 6 weeks (August–October); in 2024, for 8 weeks (June–August). The three cameras at Site 2 were all placed at the same location in 2024, providing overlapping fields of view of the same scene. Because both seasons do not overlap, they exhibit different ecological dynamics (e.g., species occurrence), different morphologies (e.g., deer antler growth), and different behavioural expressions (e.g., courtship-related behaviours). Any comparative analysis across years should account for these differences.
Cameras were set to record for 1–2 minutes during the day and 20 seconds at night (infra-red illumination, invisible to most species). The videos are acquired at 30 FPS at 1920×1080 px. Battery exhaustion near the end of deployment can shorten nighttime videos (down to ~1 second).
**Sites:**
| | |
|---|---|
| **Site 1** | Small clearing in a mixed alpine forest, slope facing S/W — 6 cameras |
| **Site 2** | Multiple game paths joining in a mixed alpine forest, slope facing N — 3 cameras (co-located in 2024) |
| **Site 3** | Larger clearing in a mixed alpine forest, with a nearby water stream and pond, slope facing N — 6 cameras |
**Processing pipeline.** Raw videos were grouped into events (periods without more than five minutes of inactivity at a given site). False-positive videos were removed and true-positive ones trimmed using MegaDetector (MDv6-10-e). Dense detection predictions over trimmed videos were used as inputs to an adapted version of ByteTrack to produce individual tracks, which were subsequently corrected in CVAT to remove identity switches, lost tracks, and remaining false-positive segments. Small spatial and temporal localisation errors (e.g., body parts outside bounding boxes, tracks starting too late or finishing too early) were not corrected.
Only the trimmed videos are provided. Please reach out to the authors if you are interested in the raw videos.
#### Who are the source data producers?
The videos were collected by the Environmental Computational Science and Earth Observation Laboratory (EPFL), and the Mathis Group for Computational Neuroscience and AI (EPFL). The project was approved by the Research Commission of the Swiss National Park.
### Annotations
#### Annotation Process
Species were annotated by visual examination of the videos. The final dataset contains observations for seven species: red deer (*Cervus elaphus*), roe deer (*Capreolus capreolus*), red fox (*Vulpes vulpes*), wolf (*Canis lupus*), mountain hare (*Lepus timidus*), chamois (*Rupicapra rupicapra*), and marten (*Martes martes*). Chamois and martens were absent from the original MammAlps dataset.
The behavioural annotation scheme was derived from two published ungulate ethograms (Cap et al., 2002; Prikhod'ko et al., 2011), which together describe over 130 behaviours. Behaviours never observed in camera-trap footage, too fine-grained to be reliably assessed, or supported by a single observation were excluded or merged, yielding the final 23-action / 12-activity vocabulary. Actions are fine-grained behaviours often identifiable from a single frame (e.g., walking). Activities are more complex behaviours that require contextual or temporal information (e.g., foraging, chasing). `Unknown` annotations mark segments where the behaviour cannot be reliably identified from the available footage, including cases of partial occlusion.
**Labels from the original MammAlps dataset were refined to conform to this updated scheme** (activity updated for 10% of annotated frames, first action for 6%, second action for 3%, species for 1%).
101 false-positive (empty-trigger) videos were included to reflect real field conditions without adding unnecessary computation.
#### Who are the Annotators?
Track corrections were produced by Valentin Gabeff, Jennifer Shan.
Behavioral annotations were produced by Valentin Gabeff with domain expertise in wildlife behaviour and ecology.
Original annotations from MammAlps were produced by Valentin Gabeff and Brendan Flaherty and refined by Valentin Gabeff.
The TVR queries were defined by Valentin Gabeff in collaboration with Blair Costelloe.
#### Personal and Sensitive Information
This dataset contains footage of wildlife in a protected area. No personally identifiable information about humans is present.
## Bias, Risks, and Limitations
- **Trimmed videos:** Raw videos are trimmed using MegaDetector (MDv6-10-e) detections to keep only animal segments. The trimming step may introduce false negatives (missed animals) or false positives (retained empty segments).
- **Different acquisition periods across years:** 2023 has more red deer activity due to the rutting period. 2024 has more roe deer courtship events. Models trained on one season may not generalise to the other without accounting for these distributional shifts.
- **Camera-trap detection bias:** Camera-traps are biased toward detecting large and medium-sized vertebrates. The observed biodiversity does not represent the true biodiversity in the park. Small mammals (e.g., squirrels), birds, and insects are excluded.
- **Single geographic region:** All footage comes from three sites within the Swiss National Park. Generalisation to other habitats, climates, or species assemblages is not guaranteed.
### Recommendations
Users should be aware of the seasonal and site-level distributional shifts described above before training or evaluating models on this dataset. Cross-season evaluation is recommended to assess robustness. The `sampling_weight` column in the metadata CSVs can help mitigate class imbalance during training.
## Citation
**BibTeX:**
```bibtex
```
For additional information about the original MammAlps dataset, see [MammAlps](https://eceo-epfl.github.io/MammAlps/).
## Acknowledgments
We thank members of the Mathis Group for Computational Neuroscience & AI (EPFL) and of ECEO (EPFL) for their feedback and fieldwork efforts. We also thank members of the Swiss National Park monitoring team for their valuable support and feedback.
### Changelog
| Version | Date | Notes |
|---|---|---|
| v0 | 2026-06-30 | Initial release |
## Dataset Card Authors
ECEO, EPFL
## Dataset Card Contact
- Valentin Gabeff (Dataset curator)
- Devis Tuia (Project Leader)
- Alexander Mathis (Project Leader)