by Anthony Sky Ng-Thow-Hing 5 minute read
Duration: May 18-21st
GitHub Link: https://github.com/skynth/Real-Time-Sports-Classifier
In today's era of wearable technology, the Apple Watch has become a powerful tool for sports analytics, enabling advanced tracking and analysis. This article chronicles my 4-day journey in developing a real-time sport classifier app for the Apple Watch. Using motion data, the app can detect whether a user is dribbling a soccer ball or a basketball — leveraging SwiftUI, CoreML, CoreMotion, and WatchConnectivity.
Table of contents
Like any good project, my journey began with a deep dive into research to determine which types of motion data would provide semantic value in identifying the sport I’m playing.
I found relevant information in an article by IMeasureU, a leading inertial platform that quantifies body movement and workload metrics for different sports. The article discusses how inertial sensors are crucial for analyzing athlete performance across various sports, capturing player movement through accelerometers (measuring force and acceleration), gyroscopes (indicating rotation), and magnetometers (measuring body orientation). From these insights, I realized that these measurements could definitely be valuable for differentiating between sports.