initial commit
Browse files- README.md +63 -3
- gesture_classifier.onnx +3 -0
- label_map.json +7 -0
README.md
CHANGED
|
@@ -1,3 +1,63 @@
|
|
| 1 |
-
---
|
| 2 |
-
|
| 3 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
tags:
|
| 3 |
+
- onnx
|
| 4 |
+
- gesture-recognition
|
| 5 |
+
- time-series-classification
|
| 6 |
+
- android
|
| 7 |
+
- on-device
|
| 8 |
+
- scikit-learn
|
| 9 |
+
datasets:
|
| 10 |
+
- ravenwing/cheedeh-IMU-data
|
| 11 |
+
library_name: onnxruntime
|
| 12 |
+
task_categories:
|
| 13 |
+
- time-series-classification
|
| 14 |
+
metrics:
|
| 15 |
+
- accuracy
|
| 16 |
+
- f1
|
| 17 |
+
---
|
| 18 |
+
|
| 19 |
+
# cheedeh-gesture-classifier
|
| 20 |
+
|
| 21 |
+
ONNX model for classifying phone air-gestures from accelerometer data. Designed for on-device inference on Android. Trained with scikit-learn (StandardScaler + SVM rbf), exported to ONNX.
|
| 22 |
+
|
| 23 |
+
**Classes:** `z`, `m`, `s`, `o`, `none`
|
| 24 |
+
|
| 25 |
+
## Files
|
| 26 |
+
|
| 27 |
+
| File | Description |
|
| 28 |
+
|------|-------------|
|
| 29 |
+
| `gesture_classifier.onnx` | Inference model (StandardScaler + SVM, ONNX opset 15) |
|
| 30 |
+
| `label_map.json` | Maps output class index (0–4) to gesture name |
|
| 31 |
+
|
| 32 |
+
## Model Details
|
| 33 |
+
|
| 34 |
+
| Property | Value |
|
| 35 |
+
|----------|-------|
|
| 36 |
+
| Architecture | StandardScaler + SVM (rbf, C=10, gamma=scale) |
|
| 37 |
+
| Input | 52 hand-crafted features from 3-axis accelerometer |
|
| 38 |
+
| Output | Class index (int64) + probabilities (float32\[5\]) |
|
| 39 |
+
| Test accuracy | 0.759 |
|
| 40 |
+
| Macro F1 | 0.793 |
|
| 41 |
+
| Training samples | ~372 |
|
| 42 |
+
| Test samples | ~54 |
|
| 43 |
+
|
| 44 |
+
## Usage
|
| 45 |
+
|
| 46 |
+
Input tensor: `float32[1, 52]` — 52 features extracted from a 100-point resampled accelerometer gesture.
|
| 47 |
+
Output tensors: `int64[1]` (class index), `float32[1, 5]` (class probabilities).
|
| 48 |
+
|
| 49 |
+
For data collection and inference implementation see [cheedeh-collect](https://github.com/raven-wing/cheedeh-collect).
|
| 50 |
+
|
| 51 |
+
## Input Sensor Requirements
|
| 52 |
+
|
| 53 |
+
- **Sensor type:** `TYPE_LINEAR_ACCELERATION` (gravity-compensated, m/s²)
|
| 54 |
+
- **Sample rate:** ~50 Hz (interpolated to exactly 100 points before feature extraction)
|
| 55 |
+
- **Gesture duration:** typically 0.5–3 seconds
|
| 56 |
+
|
| 57 |
+
The `none` class represents background / non-gesture motion.
|
| 58 |
+
|
| 59 |
+
## Training
|
| 60 |
+
|
| 61 |
+
Trained on the [cheedeh-IMU-data](https://huggingface.co/datasets/ravenwing/cheedeh-IMU-data) dataset collected with the [cheedeh-collect](https://github.com/raven-wing/cheedeh-collect) Android app. Training pipeline at [cheedeh-learn](https://github.com/raven-wing/cheedeh-learn).
|
| 62 |
+
|
| 63 |
+
Class weights were balanced during training to handle imbalanced class distribution.
|
gesture_classifier.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b97cf8efdc11f36ee608de266a315f9234c2ec0c211814c6c306bb48a7ee9243
|
| 3 |
+
size 65558
|
label_map.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"0": "m",
|
| 3 |
+
"1": "none",
|
| 4 |
+
"2": "o",
|
| 5 |
+
"3": "s",
|
| 6 |
+
"4": "z"
|
| 7 |
+
}
|