TinyML Packs a Punch!
Improve your boxing technique with a pair of Arduinos and TensorFlow Lite.
These days, machine learning is finding its way into more and more applications, including sports performance enhancement. I have personally worked on an application designed to improve batting performance in baseball using substantial compute power. Shrinking down the computational workload, Anthony Joseph, CTO of My House Geek, has recently presented a micro-sized, wearable device designed to improve your boxing skills.
With the goal of reinforcing good technique in mind, Joseph designed a device that is capable of detecting when one hand is in a blocking position, while the other hand is throwing a punch.
The hardware consists of a pair of Arduino Nano 33 BLE Sense development boards, one for each hand, and a Seeed Studio Wio Terminal. The Arduinos collect data from their onboard accelerometers to detect motion and send that data on to TensorFlow Lite, also running on the Arduinos. Insights derived from the machine learning model are sent over Bluetooth Low Energy to the Wio Terminal to give feedback to the boxer. In addition to the visual feedback on the display terminal, immediate feedback is also given via a buzzer.
The neural network was trained using Edge Impulse on a body of accelerometry data derived from boxers throwing different types of punches. The model achieved 99.4% classification accuracy in detecting punch types. Detecting blocking proved to be more difficult, as the arm remains in a static position when guarding. A secondary model was used, a k-nearest neighbor algorithm, to recognize the difference between a good block and a bad block.
Before you grab your Arduinos and head to the boxing gym, note that this method is still a work in progress. It was not tested on a wide variety of users, for example. Given the differing styles of boxers, performance will likely be poor for many users without a good deal more training data. Joseph is also looking to add support for more complex movement types in the future, like weaving and combos.