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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
pretty_name: Processed HAR Benchmark Collection
|
| 3 |
license: other
|
| 4 |
+
task_categories:
|
| 5 |
+
- time-series-classification
|
| 6 |
+
tags:
|
| 7 |
+
- human-activity-recognition
|
| 8 |
+
- har
|
| 9 |
+
- wearable-sensors
|
| 10 |
+
- smartphone-sensing
|
| 11 |
+
- imu
|
| 12 |
+
- accelerometer
|
| 13 |
+
- gyroscope
|
| 14 |
+
- timeseries
|
| 15 |
+
- benchmark
|
| 16 |
+
- tabular
|
| 17 |
+
configs:
|
| 18 |
+
- config_name: uci_har
|
| 19 |
+
data_files:
|
| 20 |
+
- split: train
|
| 21 |
+
path: data/uci_har/train.parquet
|
| 22 |
+
- split: test
|
| 23 |
+
path: data/uci_har/test.parquet
|
| 24 |
+
- config_name: unimib_shar
|
| 25 |
+
data_files:
|
| 26 |
+
- split: train
|
| 27 |
+
path: data/unimib_shar/train.parquet
|
| 28 |
+
- split: test
|
| 29 |
+
path: data/unimib_shar/test.parquet
|
| 30 |
+
- config_name: usc_had
|
| 31 |
+
data_files:
|
| 32 |
+
- split: train
|
| 33 |
+
path: data/usc_had/train.parquet
|
| 34 |
+
- split: test
|
| 35 |
+
path: data/usc_had/test.parquet
|
| 36 |
+
- config_name: flaap
|
| 37 |
+
data_files:
|
| 38 |
+
- split: train
|
| 39 |
+
path: data/flaap/train.parquet
|
| 40 |
+
- split: test
|
| 41 |
+
path: data/flaap/test.parquet
|
| 42 |
+
- config_name: hapt
|
| 43 |
+
data_files:
|
| 44 |
+
- split: train
|
| 45 |
+
path: data/hapt/train.parquet
|
| 46 |
+
- split: test
|
| 47 |
+
path: data/hapt/test.parquet
|
| 48 |
+
- config_name: mhealth
|
| 49 |
+
data_files:
|
| 50 |
+
- split: train
|
| 51 |
+
path: data/mhealth/train.parquet
|
| 52 |
+
- split: test
|
| 53 |
+
path: data/mhealth/test.parquet
|
| 54 |
+
- config_name: dsads
|
| 55 |
+
data_files:
|
| 56 |
+
- split: train
|
| 57 |
+
path: data/dsads/train.parquet
|
| 58 |
+
- split: test
|
| 59 |
+
path: data/dsads/test.parquet
|
| 60 |
+
- config_name: pamap2
|
| 61 |
+
data_files:
|
| 62 |
+
- split: train
|
| 63 |
+
path: data/pamap2/train.parquet
|
| 64 |
+
- split: test
|
| 65 |
+
path: data/pamap2/test.parquet
|
| 66 |
---
|
| 67 |
+
|
| 68 |
+
# Processed HAR Benchmark Collection
|
| 69 |
+
|
| 70 |
+
This dataset repository provides model-ready, fixed-window versions of eight public Human Activity Recognition (HAR) benchmarks: UCI-HAR, UniMiB-SHAR, USC-HAD, FLAAP, HAPT, mHealth, DSADS, and PAMAP2.
|
| 71 |
+
|
| 72 |
+
The goal is to make HAR model comparison easier by releasing a consistent set of preprocessed windows, split files, labels, and metadata. The collection covers smartphone-based sensing, wearable IMU sensing, daily activities, postural transitions, fall-related motions, and sports-style activities under different sensor layouts and label granularities.
|
| 73 |
+
|
| 74 |
+
## Dataset Subsets
|
| 75 |
+
|
| 76 |
+
| Config | Dataset | Sensing Setting | Classes | Channels | Timesteps | Sampling Rate |
|
| 77 |
+
| --- | --- | --- | ---: | ---: | ---: | --- |
|
| 78 |
+
| `uci_har` | UCI-HAR | Waist-mounted smartphone accelerometer and gyroscope | 6 | 9 | 128 | 50 Hz |
|
| 79 |
+
| `unimib_shar` | UniMiB-SHAR | Trouser-pocket smartphone accelerometer | 17 | 3 | 151 | 50 Hz |
|
| 80 |
+
| `usc_had` | USC-HAD | MotionNode at the front right hip | 12 | 6 | 512 | 100 Hz |
|
| 81 |
+
| `flaap` | FLAAP | Waist-mounted smartphone accelerometer and gyroscope | 10 | 6 | 100 | 100 Hz |
|
| 82 |
+
| `hapt` | HAPT | Waist-mounted smartphone accelerometer and gyroscope | 12 | 6 | 128 | 50 Hz |
|
| 83 |
+
| `mhealth` | mHealth | Body-worn sensors on chest, right wrist, and left ankle | 12 | 12 | 128 | 50 Hz |
|
| 84 |
+
| `dsads` | DSADS | Five wearable inertial units on torso, arms, and legs | 19 | 45 | 125 | 25 Hz |
|
| 85 |
+
| `pamap2` | PAMAP2 | IMUs on hand, chest, and ankle plus heart-rate sensing | 12 | 40 | 171 | 100 Hz |
|
| 86 |
+
|
| 87 |
+
## Usage
|
| 88 |
+
|
| 89 |
+
```python
|
| 90 |
+
from datasets import load_dataset
|
| 91 |
+
|
| 92 |
+
ds = load_dataset("shenjianmozhu/processed-har-benchmark-collection", "uci_har")
|
| 93 |
+
train = ds["train"]
|
| 94 |
+
example = train[0]
|
| 95 |
+
|
| 96 |
+
signal = example["signal"]
|
| 97 |
+
channels = example["channels"]
|
| 98 |
+
timesteps = example["timesteps"]
|
| 99 |
+
label = example["label"]
|
| 100 |
+
```
|
| 101 |
+
|
| 102 |
+
The `signal` field stores a flattened window. Reshape it according to `layout`:
|
| 103 |
+
|
| 104 |
+
```python
|
| 105 |
+
import numpy as np
|
| 106 |
+
|
| 107 |
+
def restore_window(row):
|
| 108 |
+
x = np.asarray(row["signal"], dtype="float32")
|
| 109 |
+
if row["layout"] == "channels_first":
|
| 110 |
+
return x.reshape(row["channels"], row["timesteps"])
|
| 111 |
+
if row["layout"] == "timesteps_first":
|
| 112 |
+
return x.reshape(row["timesteps"], row["channels"])
|
| 113 |
+
raise ValueError(f"Unknown layout: {row['layout']}")
|
| 114 |
+
```
|
| 115 |
+
|
| 116 |
+
If you prefer NumPy archives:
|
| 117 |
+
|
| 118 |
+
```python
|
| 119 |
+
from huggingface_hub import hf_hub_download
|
| 120 |
+
import numpy as np
|
| 121 |
+
|
| 122 |
+
path = hf_hub_download(
|
| 123 |
+
repo_id="shenjianmozhu/processed-har-benchmark-collection",
|
| 124 |
+
repo_type="dataset",
|
| 125 |
+
filename="arrays/uci_har.npz",
|
| 126 |
+
)
|
| 127 |
+
arr = np.load(path)
|
| 128 |
+
print(arr.files)
|
| 129 |
+
```
|
| 130 |
+
|
| 131 |
+
## Data Fields
|
| 132 |
+
|
| 133 |
+
- `id`: stable sample identifier
|
| 134 |
+
- `dataset`: subset slug
|
| 135 |
+
- `split`: split name
|
| 136 |
+
- `signal`: flattened sensor window
|
| 137 |
+
- `channels`: number of sensor channels
|
| 138 |
+
- `timesteps`: number of time steps
|
| 139 |
+
- `layout`: `channels_first` or `timesteps_first`
|
| 140 |
+
- `label`: integer label
|
| 141 |
+
- `label_name`: human-readable label, when available
|
| 142 |
+
- `subject`: subject identifier, when redistribution terms permit release
|
| 143 |
+
|
| 144 |
+
## Licensing
|
| 145 |
+
|
| 146 |
+
This repository contains processed versions of public datasets. The original datasets retain their own licenses, citation requirements, and redistribution terms. The `license: other` metadata is intentional because the collection is license-mixed. Users must comply with the terms of each original dataset.
|
| 147 |
+
|
| 148 |
+
If any source dataset does not permit redistribution of derived/preprocessed files, the corresponding processed files should be removed from this Hugging Face repository and replaced by preprocessing scripts plus links to the original source.
|
| 149 |
+
|
| 150 |
+
## Citation
|
| 151 |
+
|
| 152 |
+
Please cite this processed collection and the original datasets used in your work.
|
| 153 |
+
|
| 154 |
+
```bibtex
|
| 155 |
+
@misc{har_processed_benchmark_collection_2026,
|
| 156 |
+
title = {Processed HAR Benchmark Collection},
|
| 157 |
+
author = {Qi Teng and collaborators},
|
| 158 |
+
year = {2026},
|
| 159 |
+
howpublished = {\url{https://huggingface.co/datasets/shenjianmozhu/processed-har-benchmark-collection}},
|
| 160 |
+
note = {Version v0.1.0}
|
| 161 |
+
}
|
| 162 |
+
```
|
| 163 |
+
|
| 164 |
+
Original dataset citation keys: `anguita2013public`, `micucci2017unimib`, `zhang2012usc`, `kumar2022flaap`, `reyes2016transition`, `banos2014mhealth`, `altun2010comparative`, and `reiss2012creating`.
|
| 165 |
+
|
| 166 |
+
## Responsible Use
|
| 167 |
+
|
| 168 |
+
The data are intended for research on HAR, time-series classification, wearable sensing, and benchmark reproducibility. Users should avoid using the data for identity inference, health-status inference, or surveillance applications beyond the scope of the original datasets and consent protocols.
|