This repository contains all the software artifacts created within the scope of my bachelor's thesis, which focuses on using machine learning to differentiate between rim and net hits in Spikeball. The goal is to create a digital referee that can automatically detect faulty hits, resolving common disputes during gameplay.
This project is divided into three main components:
- Data Collection (README): Acquiring accelerometer data from an Arduino sensor during Spikeball gameplay.
- Model Training (README) : Training a machine learning model using the collected data.
- Arduino Firmware: Data collection sketch (README) & utilizing the trained model on an Arduino for real-time hit detection (README).
The repository is organized as follows:
SpikeballReferee-ML/
├── data_collector/ # Code for data collection (Python)
├── model_training/ # Code for model training (Python)
├── arduino_firmware/ # Code for data collection & inference on the Arduino
├── LICENSE
└── README.md
Refer to the specific directories for detailed instructions on setting up and running each component. A typical workflow is as follows:
- Data Collection: Use the
data_collectorprogram to gather accelerometer data from real Spikeball games, labeling each hit as either "rim" or "net". There is an arduino program for sending accelerometer data to a host PC. - Model Training: Use the
model_trainingprogramm to process the collected data and train the machine learning model. - Arduino Firmware: Upload the
arduino_firmware/Inferencecode to your Arduino, using your freshly trained model.
If you are not planning to collect your own data, use the model provided and start by uploading the inference sketch.
The specific dependencies for each component are detailed within the respective directories. Generally, you will need:
- Arduino IDE
- Python 3.x
- Libraries like:
pandas,numpy,scikit-learn,tensorflow-lite-micro
This project is provided as-is and will probably not be further developed in the future. Here are some things that could be done to make this project more useful:
- Migrate Arduino sketches to PlatformIO projects
- Support for other (less expensive) MCU's and IMU sensors
- Making use of the new LiteRT library which seems to replace TFLite-Micro
If you would like to contribute to this project, please feel free to submit a pull request.
This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details. In summary, this license allows you to use, share, and modify this software, even for commercial purposes, as long as you provide appropriate credit, disclose source code changes, and license derived works under GPL v3.