shenjianmozhu commited on
Commit
cc6218b
·
verified ·
1 Parent(s): 0b07a1f

Update ready-to-use dataset card

Browse files
Files changed (1) hide show
  1. README.md +65 -115
README.md CHANGED
@@ -1,9 +1,11 @@
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
@@ -14,154 +16,102 @@ tags:
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
 
 
1
  ---
2
+ pretty_name: Ready-to-Use Preprocessed HAR Datasets
3
  license: other
4
  task_categories:
5
  - time-series-classification
6
  tags:
7
+ - preprocessed
8
+ - ready-to-use
9
  - human-activity-recognition
10
  - har
11
  - wearable-sensors
 
16
  - timeseries
17
  - benchmark
18
  - tabular
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  ---
20
 
21
+ # Ready-to-Use Preprocessed HAR Datasets
22
 
23
+ This dataset repository provides **ready-to-use, preprocessed Human Activity Recognition (HAR) datasets**. The released files are already windowed, split, and stored as NumPy arrays, so users can download them and run model comparisons directly.
24
 
25
+ 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, fall-related motions, and multimodal wearable settings under different sensor layouts and label granularities.
26
 
27
+ ## Current Dataset Folders
28
 
29
+ The browsable download layout is:
 
 
 
 
 
 
 
 
 
30
 
31
+ ```text
32
+ datasets/
33
+ uci/
34
+ unimib/
35
+ pamap2/
36
+ wisdm/
37
+ oppo/
38
+ WSBHA/
39
+ archives/
40
+ processed_har_npy_partial_2026-05-14.zip
41
+ metadata/
42
+ partial_upload_2026-05-14_manifest.csv
 
43
  ```
44
 
45
+ The `datasets/` folders are intended for direct per-dataset downloads. The `archives/` zip is a convenient one-file mirror of the current uploaded batch.
46
+
47
+ ## Quick Download
48
 
49
  ```python
50
+ from huggingface_hub import hf_hub_download, snapshot_download
51
  import numpy as np
52
 
53
+ x_train_path = hf_hub_download(
54
+ repo_id="shenjianmozhu/preprocessed-har-datasets",
55
+ repo_type="dataset",
56
+ filename="datasets/uci/x_train.npy",
57
+ )
58
+ y_train_path = hf_hub_download(
59
+ repo_id="shenjianmozhu/preprocessed-har-datasets",
60
+ repo_type="dataset",
61
+ filename="datasets/uci/y_train.npy",
62
+ )
63
+
64
+ X_train = np.load(x_train_path)
65
+ y_train = np.load(y_train_path)
66
+ print(X_train.shape, y_train.shape)
67
  ```
68
 
69
+ To download everything:
70
 
71
  ```python
72
+ local_dir = snapshot_download(
73
+ repo_id="shenjianmozhu/preprocessed-har-datasets",
 
 
 
74
  repo_type="dataset",
75
+ local_dir="preprocessed-har-datasets",
76
  )
 
 
77
  ```
78
 
79
+ ## Dataset Notes
80
 
81
+ | Folder | Main files | Notes |
82
+ | --- | --- | --- |
83
+ | `datasets/uci` | `x_train.npy`, `y_train.npy`, `x_test.npy`, `y_test.npy` | UCI-HAR-style train/test arrays. |
84
+ | `datasets/unimib` | `training_data.npy`, `training_labels.npy`, `testing_data.npy`, `testing_labels.npy` | UniMiB-style preprocessed arrays. |
85
+ | `datasets/pamap2` | `train_X_new.npy`, `train_y_new.npy`, `total_pamap2_valtestx.npy`, `total_pamap2_valtesty.npy` | Train plus validation/test batch. |
86
+ | `datasets/wisdm` | `x_train.npy`, `y_train.npy`, `x_test.npy`, `y_test.npy` | WISDM-style preprocessed arrays. |
87
+ | `datasets/oppo` | `data_train_one.npy`, `label_train_onehot.npy`, `data_test_one.npy`, `label_test_onehot.npy` | OPPORTUNITY-style arrays with one-hot labels. |
88
+ | `datasets/WSBHA` | `training_data.npy`, `training_labels.npy`, `testing_data.npy`, `testing_labels.npy` | Current uploaded WSBHA folder, preserved as provided. |
 
 
89
 
90
+ File-level shapes and dtypes are listed in `metadata/partial_upload_2026-05-14_manifest.csv`.
91
 
92
+ ## Google Drive Mirror
93
 
94
+ A Google Drive mirror can be used as a backup download route for users who prefer browser-based downloads. When public sharing is enabled, the link should be listed here and in the GitHub README as an optional mirror, while Hugging Face remains the canonical dataset host.
95
 
96
  ## Citation
97
 
98
+ Please cite this data release, the original datasets, and any relevant HAR method papers.
99
 
100
  ```bibtex
101
+ @misc{teng_preprocessed_har_datasets_2026,
102
+ title = {Ready-to-Use Preprocessed HAR Datasets},
103
+ author = {Teng, Qi and collaborators},
104
  year = {2026},
105
+ howpublished = {\url{https://huggingface.co/datasets/shenjianmozhu/preprocessed-har-datasets}},
106
+ note = {Preprocessed fixed-window NumPy arrays for HAR benchmarking}
107
  }
108
  ```
109
 
110
+ ## Licensing
111
+
112
+ 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.
113
+
114
+ 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.
115
 
116
  ## Responsible Use
117