Instructions to use CodeWithWinton/morse-tlm1_5-acoustic-gesture-model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Scikit-learn
How to use CodeWithWinton/morse-tlm1_5-acoustic-gesture-model with Scikit-learn:
from huggingface_hub import hf_hub_download import joblib model = joblib.load( hf_hub_download("CodeWithWinton/morse-tlm1_5-acoustic-gesture-model", "sklearn_model.joblib") ) # only load pickle files from sources you trust # read more about it here https://skops.readthedocs.io/en/stable/persistence.html - Notebooks
- Google Colab
- Kaggle
π€ MORSE TLM 1.5 β Acoustic Gesture Classifier Model
Official pre-trained model for MORSE: Turn your laptop unibody metal chassis into a 99.8% accurate touch surface using the built-in microphone.
π¬ Model Overview
- Architecture:
sklearn.ensemble.HistGradientBoostingClassifier(150 Ensembled Trees) - Feature Dimension: 3,730 Features (20 Mel Bins Γ 186 Time Frames + 10 Spatial Kinetic Scalars)
- Training Data: 25,127 3,730D feature vectors derived from 13,127 ground-truth audio clips across MacBook Air (M1 Wedge) and MacBook Neo (Flat Unibody).
- Model Size: 4.2 MB (
model_double_tap.pkl) - Inference Latency: 0.3ms on Apple Silicon CPU (<0.3% CPU load)
π Benchmark Results
| Evaluation Metric | Score |
|---|---|
| π 5-Fold Stratified CV Accuracy | 98.4% (+/- 0.1% SD) |
| β‘ Unseen Test Set Accuracy (5,026 samples) | 98.5% |
| π― Weighted F1-Score | 0.99 |
| π‘οΈ Left Tap Recall | 1.00 (100%) |
| π‘οΈ Right Tap Precision & Recall | 0.99 |
| π« Typing / Noise Rejection Precision | 0.99 (99% Zero False Positive) |
π Quickstart Usage
import joblib
import numpy as np
# Load pre-trained model weights
model = joblib.load("model_double_tap.pkl")
# Extract 3,730D spatial feature vector from a 500ms 48.0kHz buffer
# (See utils.py in https://github.com/CodeWithWinton/morse)
feature_vector = extract_3730d_features(audio_buffer)
# Predict gesture class (0: double_left_palm, 1: double_right_palm, 2: noise_and_typing)
prediction = model.predict([feature_vector])[0]
probabilities = model.predict_proba([feature_vector])[0]
print(f"Detected Class: {prediction} | Confidence: {np.max(probabilities)*100:.1f}%")
@software{maheshwari2026morse,
author = {Maheshwari, Manas and Sethi, Daksh},
title = {MORSE: Software-Defined Acoustic Kinetic Impulse Sensing via Solid-State Unibody Wave Dispersion},
url = {https://github.com/CodeWithWinton/morse},
year = {2026}
}
- Downloads last month
- -