Downloads · 30 days
6
18% of all-time downloads
muzammil-khan/wearable-activity-classifier
wearable-activity-classifier is a machine learning model from muzammil-khan. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for keras. The card lists the license as mit.
A CNN-based deep learning model for classifying wearable sensor signals into three activity classes:
Downloads · 30 days
6
18% of all-time downloads
All-time downloads
34
Public
Repo size
635 KB
Likes
0
Public
Click a slice to open those files.
.keras635 KB · 99%
From the Hugging Face model README
A CNN-based deep learning model for classifying wearable sensor signals into three activity classes:
The model was trained as part of a deep learning laboratory activity using wearable sensor data.
The selected model is a 1D Convolutional Neural Network:
The model expects:
(100, 1)The model predicts three classes:
The CNN achieved the following results on the test set:
| Metric | Result |
|---|---|
| Test Accuracy | 100% |
| Parameters | 50,435 |
| Training Time | ~2.9 seconds |
The CNN was selected because it achieved the highest test accuracy while also having a relatively short training time compared with the other tested models.
Three other architectures were also tested:
| Model | Test Accuracy | Parameters | Train Time |
|---|---|---|---|
| CNN | 100% | 50,435 | ~2.9 s |
| SimpleRNN | 100% | 2,243 | ~4.1 s |
| CNN + LSTM | 66.67% | 9,603 | ~6.8 s |
| LSTM | 64.67% | 5,507 | ~6.5 s |
The CNN was selected for the final activity because it provided excellent classification performance and fast training on this dataset.
The model can be loaded with TensorFlow/Keras:
import tensorflow as tf
model = tf.keras.models.load_model("activity_model.keras")