File size: 2,098 Bytes
dc54e15
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
---
tags:
  - onnx
  - gesture-recognition
  - time-series-classification
  - android
  - on-device
  - scikit-learn
datasets:
  - ravenwing/cheedeh-IMU-data
library_name: onnxruntime
task_categories:
  - time-series-classification
metrics:
  - accuracy
  - f1
---

# cheedeh-gesture-classifier

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.

**Classes:** `z`, `m`, `s`, `o`, `none`

## Files

| File | Description |
|------|-------------|
| `gesture_classifier.onnx` | Inference model (StandardScaler + SVM, ONNX opset 15) |
| `label_map.json` | Maps output class index (0–4) to gesture name |

## Model Details

| Property | Value |
|----------|-------|
| Architecture | StandardScaler + SVM (rbf, C=10, gamma=scale) |
| Input | 52 hand-crafted features from 3-axis accelerometer |
| Output | Class index (int64) + probabilities (float32\[5\]) |
| Test accuracy | 0.759 |
| Macro F1 | 0.793 |
| Training samples | ~372 |
| Test samples | ~54 |

## Usage

Input tensor: `float32[1, 52]` — 52 features extracted from a 100-point resampled accelerometer gesture.
Output tensors: `int64[1]` (class index), `float32[1, 5]` (class probabilities).

For data collection and inference implementation see [cheedeh-collect](https://github.com/raven-wing/cheedeh-collect).

## Input Sensor Requirements

- **Sensor type:** `TYPE_LINEAR_ACCELERATION` (gravity-compensated, m/s²)
- **Sample rate:** ~50 Hz (interpolated to exactly 100 points before feature extraction)
- **Gesture duration:** typically 0.5–3 seconds

The `none` class represents background / non-gesture motion.

## Training

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).

Class weights were balanced during training to handle imbalanced class distribution.