AIDLAB-HAR / README.md
Guziq's picture
Fix dataset card task category
6792fbb verified
|
Raw
History Blame Contribute Delete
9.39 kB
---
license: cc-by-4.0
pretty_name: AIDLAB-HAR
annotations_creators:
- expert-generated
source_datasets:
- original
size_categories:
- 100K<n<1M
task_categories:
- other
tags:
- timeseries
- human-activity-recognition
- wearable-sensors
- inertial-sensors
- accelerometer
- orientation
- exercise
- repetition-counting
configs:
- config_name: recordings
default: true
data_files:
- split: full
path: data/recordings.parquet
- config_name: signals
data_files:
- split: full
path: data/signals.parquet
- config_name: annotations
data_files:
- split: full
path: data/annotations.parquet
---
# AIDLAB-HAR
AIDLAB-HAR is a chest-worn inertial-sensor dataset for exercise recognition and repetition-marker detection. It contains synchronized recorder-frame acceleration and orientation quaternions sampled at 50 Hz.
![AIDLAB-HAR squat example](assets/sample-squat.svg)
The dataset accompanies [Real-Time Sensor-Based Human Activity Recognition for eFitness and eHealth Platforms](https://doi.org/10.3390/s24123891). This repository provides a corrected EDF/CSV distribution and viewer-friendly Parquet tables generated reproducibly from the immutable public source.
## At a glance
| Property | Value |
|---|---:|
| Recordings | 180 |
| Signal samples | 518,300 |
| Duration | 10,366 s (2 h 52 min 46 s) |
| Annotation events | 3,232 |
| Repetition-marker intervals | 1,486 |
| Activity classes | 16 |
| Channels | 3 acceleration + 4 quaternion |
| Sampling rate | 50 Hz |
## Configurations
- `recordings` (default): one row per recording, including activity, duration, quality counts, and archive paths.
- `signals`: one row per 50 Hz sample, with nullable sample-level activity labels and signal-validity flags.
- `annotations`: series boundaries and repetition-marker boundaries.
All configurations use the split name `full`. The source does not provide a canonical evaluation split, and its pseudonymous source codes cannot support a verified participant-independent split.
```python
from datasets import load_dataset
recordings = load_dataset("aidlab-wearables/AIDLAB-HAR", "recordings", split="full")
signals = load_dataset("aidlab-wearables/AIDLAB-HAR", "signals", split="full")
annotations = load_dataset("aidlab-wearables/AIDLAB-HAR", "annotations", split="full")
# A clean sample-level training view.
training_rows = signals.filter(
lambda row: row["sample_valid"] and row["activity_label"] is not None
)
```
## Activity labels
`activity_id` is stable from 0 to 15. `activity_label` is the canonical label; `source_activity` preserves the filename label from the source archive.
| ID | Canonical label | Source label |
|---:|---|---|
| 0 | `abdominal_tense` | `ABDOMINALTENSE` |
| 1 | `bend` | `BEND` |
| 2 | `broad_jump` | `BROADJUMP` |
| 3 | `burpee` | `BURPEES` |
| 4 | `chair_stand_and_sit` | `CHAIRSTANDANDSIT` |
| 5 | `crunch` | `CRUNCHES` |
| 6 | `downward_dog` | `DOWNWARDDOG` |
| 7 | `lunge` | `LUNGES` |
| 8 | `lying_hip_rise` | `LYINGHIPRISES` |
| 9 | `plank` | `PLANK` |
| 10 | `push_up` | `PUSHUPS` |
| 11 | `rotating_toe_touch` | `ROTATINGTOETOUCHES` |
| 12 | `running_plank` | `RUNNINGPLANK` |
| 13 | `side_lunge` | `SIDELUNGES` |
| 14 | `squat` | `SQUATS` |
| 15 | `walk` | `WALK` |
The article's overview refers to 15 activities, while the released archive contains 16 distinct filename labels (13 exercises and 3 background activities). This package reports the archive contents and preserves the source labels so the discrepancy is explicit.
## Signal schema and units
The `signals` configuration contains:
- `recording_id`: stable recording key derived from the source filename.
- `source_subject_code`: pseudonymous `SUBxx` filename code. It is not a globally unique participant identifier.
- `recording_activity_id`, `recording_activity_label`: activity associated with the recording file.
- `activity_id`, `activity_label`: sample-level target. These are null before/after annotated exercise series; background recordings remain labeled throughout.
- `source_activity`: original activity token from the filename.
- `series_index`: source series number.
- `sample_index`: zero-based sample index; authoritative for exact timing.
- `timestamp_s`: `sample_index / 50`, stored as float64.
- `acceleration_{x,y,z}_g`: recorder-frame acceleration in multiples of standard gravity (`g`).
- `quaternion_{x,y,z,w}`: dimensionless orientation quaternion.
- `acceleration_valid`, `quaternion_valid`, `sample_valid`: explicit quality flags.
- `series_active`: nullable; true inside an annotated exercise series and null when no series annotation exists.
- `repetition_marker_active`, `repetition_marker_index`: nullable marker-window fields.
Invalid channel values are null in Parquet. A near-zero acceleration vector is treated as missing only when the simultaneous quaternion is also invalid, preserving plausible airborne/free-fall samples. These are documented preparation heuristics, not source-provided ground-truth quality labels. The rules and every affected interval are recorded in `metadata/manifest.json` and `quality_intervals.csv` inside the cleaned ZIP.
### Repetition-marker semantics
The source's `REPETITION ONSET/OFFSET` pairs define short annotation windows around repetition fiducial points. They do not span complete movement cycles. For this reason, the derived fields use `repetition_marker_*` rather than `repetition_*`.
## Raw distribution
`raw/AIDLAB-HAR-DATASET_v3.zip` contains:
- 180 corrected EDF files;
- 130 normalized annotation CSV files;
- `quality_intervals.csv` with invalid acceleration/quaternion intervals;
- a standalone raw-data README, cleaning notes, and the full CC BY 4.0 license.
The corrected raw distribution is also available from the permanent [AIDLAB-HAR v3 download URL](https://aidlab-production-datasets.s3.eu-central-1.amazonaws.com/AIDLAB-HAR-DATASET_v3.zip). The original v2 object remains unchanged for provenance.
Corrected EDF metadata:
| Channels | Dimension | Physical range |
|---|---|---:|
| Acceleration x/y/z | `g` | −8 to +8 |
| Quaternion x/y/z/w | `1` (dimensionless) | −1 to +1 |
EDF requires an absolute start date although the release has no trustworthy acquisition timestamps. The cleaned files therefore use the documented placeholder `1985-01-01` and explicitly mark it as a placeholder in the EDF header. Use relative time or `sample_index`.
## Collection and participants
The article describes functional and CrossFit-style sessions supported by a professional instructor. Series and repetition markers were synchronized with the signals. The released subset contains acceleration and orientation only, although the broader project collected additional physiological modalities.
The broader collection involved 24 participants. The public files contain 90 `SUBxx` codes, but no mapping from those codes to unique people across activities. Consequently, this package calls the field `source_subject_code` and does not provide person-level folds. The released subset is described as healthy men aged 20–40; informed consent was obtained.
## Limitations and responsible use
- The participant sample is demographically narrow.
- Sessions were structured and supervised; results may not transfer to unconstrained activity.
- No verified participant-independent train/test split is possible from the public release.
- The source EDF conversion quantized all channels using a broad ±200 physical range. The cleaned EDF corrects the range but cannot restore precision already lost upstream.
- Approximately 1% of samples contain a non-unit quaternion or the paired near-zero acceleration pattern. They are exposed through nulls and documented heuristic quality flags rather than silently treated as measurements.
- Class duration is imbalanced, with substantially more `walk` data than most exercises.
- The dataset is not intended for medical diagnosis or safety-critical decisions.
## Reproducibility
The package is rebuilt from the source ZIP with:
```bash
python -m pip install -r requirements.txt
python scripts/prepare_dataset.py
```
The builder downloads the immutable source when `--source` is omitted, verifies its SHA-256, validates annotations and schemas, corrects EDF metadata, generates Parquet tables and quality masks, and writes deterministic artifacts. Exact dependency versions and artifact checksums are stored in `metadata/manifest.json`.
## License and citation
The dataset is licensed under [Creative Commons Attribution 4.0 International](https://creativecommons.org/licenses/by/4.0/). Changes relative to the source are documented in `CLEANING_NOTES.md`.
```bibtex
@article{czekaj2024aidlabhar,
title = {Real-Time Sensor-Based Human Activity Recognition for eFitness and eHealth Platforms},
author = {Czekaj, {\L}ukasz and Kowalewski, Mateusz and Domaszewicz, Jakub and Kit{\l}owski, Robert and Szwoch, Mariusz and Duch, W{\l}odzis{\l}aw},
journal = {Sensors},
volume = {24},
number = {12},
pages = {3891},
year = {2024},
doi = {10.3390/s24123891}
}
```
## Provenance
Source: [AIDLAB-HAR-DATASET v2](https://aidlab-production-datasets.s3.eu-central-1.amazonaws.com/AIDLAB-HAR-DATASET_v2.zip)
Source SHA-256: `bc501d73ad636d9db29ca65525811b9d3a76f7257d1a0f5d9143ccb8bbbd63d7`
See `metadata/manifest.json` for all generated artifact checksums and `CHANGELOG.md` for package history.