Abstract
We attempt to overcome the restriction of requiring a writing surface for handwriting recognition. In this study, we design a prototype of a stylus equipped with motion sensor, and utilizes gyroscopic and acceleration sensor reading to perform written letter classification using various deep learning techniques such as CNN and RNNs. We also explore various data augmentation techniques and their effects, reaching up to 86% accuracy.
Introduction
Traditional handwriting recognition typically relies on digitizers (like tablets) or Optical Character Recognition (OCR) via cameras. Both methods have significant limitations: digitizers restrict users to specific surfaces, while OCR is sensitive to lighting and line-of-sight. This research proposes a motion-based approach using an Inertial Measurement Unit (IMU) embedded within a pen. By capturing yaw, pitch, roll, and acceleration, the system can recognize characters written on any surface or even in mid-air, which is highly relevant for AR/VR environments. The primary challenge is that motion data is non-intuitive and varies significantly between individuals.
Methodology
The researchers developed a hardware-to-software pipeline to transform raw inertial data into text.
Hardware and Data Collection
The prototype features an MPU9250 9-axis motion sensor, an Arduino Uno, and a 3D-printed mount for a standard stylus. A custom dataset was created involving 20 users who each wrote the lowercase alphabet 20 times, totaling 10,400 sequences.
Data Pipeline
- Normalization: 1D linear interpolation was used to standardize the length of writing events.
- Augmentation: The dataset was expanded by adding Gaussian noise, applying random rotations via quaternions, and time-stretching the sequences.
- Denoising: A Denoising Autoencoder (DAE) was employed to filter out sensor noise and hand tremors, which proved essential for stable classification.
- Models: The study compared traditional baselines (KNN, SVM) with deep learning models, specifically 1D CNNs and 5-layer LSTMs.
Results and Analysis
The LSTM model, combined with data augmentation and the DAE, significantly outperformed other architectures, particularly in capturing the temporal flow of writing.
| Experiment Type | Best Model | Accuracy |
|---|---|---|
| Random Split (Seen subjects) | RNN (aug+AE) | 86.6% |
| Subject Split (Unseen subjects) | RNN (aug+AE) | 53.6% |
Key Insights
- Temporal vs. Spatial: The superiority of LSTMs over CNNs suggests that the order and duration of movements (temporal signature) are more critical for motion-based recognition than local spatial patterns.
- Generalization Challenges: The drop to 53.6% accuracy on unseen subjects highlights the difficulty of handling diverse handwriting styles without user-specific calibration.
Conclusion
This work demonstrates that motion-based sensors can effectively recognize handwriting with high accuracy for known users. Future research will focus on improving generalization to new users, miniaturizing the hardware into wearable forms like rings, and extending the system to recognize full words and sentences using integrated language models.
Summary updated