Have you ever got together with your friends for a friendly game of basketball only to make it to the court and see that it was already occupied by a different group? Or you wanted to play some football but all of your friends were busy and you did not feel like heading over to check if anyone else was playing? With Pametno Igrisce you can check not only if your local sports court is occupied, you can also monitor what activity is going on at that exact moment. Say goodbye to the days of uncertainty and reclaim your local sports court with the power of machine learning.
Machine LearningWe implemented the machine learning using Edge Impulse.
First, we recorded the audio samples with our smart phones and uploaded them to the platform. The samples were divided into five classes: basketball, football, breaking bottles, talking and no activity. We cut the original samples into shorter 3-4 seconds long subsamples to assure maximum accuracy (for example so that the silence in the "basketball" recordings wouldn't be mistakenly classed as "no activity").
Our data was then divided into training and testing samples with an 80/20 ratio. We were able to achieve 98.6% accuracy. The complete results of our training model's performance can be seen on the screenshots below.
After collecting and training our data model we deployed it by turning it into an Arduino library which allowed us to test our data using the Arduino Nano 33 BLE Sense.
Using the Arduino IDE we imported the library and adjusted the code so it would allow for sample analysis.
Once the app has been uploaded on the board, it's microphone records 10 seconds of audio samples and on the basis of our Edge Impulse data it sorts the recorded sample into one of the 5 possible results: playing basketball, playing football, possible vandalism, conversation, no activity. The process then repeats.
The Arduino board advertises itself via Bluetooth, which allows us to communicate with it using our mobile app.
The AppThe mobile app was developed in Android studio using Flutter. Upon opening the app, it automatically starts scanning for devices and connects to our Arduino board using Bluetooth. After connecting, it receives data from the board and displays it accordingly on the screen.
In order to test our app all you have to do is:
- Download and install our apk file
- Upload the code on your Arduino. You can use ours which can be found here.
- Open the app and enjoy.
The app is currently able to distinguish between five different types of activities. The recognition performs quite well for the prototype stage, however, there are still some improvements that could be made in order to improve the usability and user experience.
The possible improvements include:
- Collecting more data to improve the machine learning model's performance.
- Adding more classes to the ML model to be able to detect more types of activities.
- Expanding the app by enabling the user to connect to different sports courts at other locations.













Comments