This was the Machine Learning code that was designed for Advanced fitness purposes.
Hardware- Raspberry Pi 0w with custom charging circuit, BMP180(Pressure Sensor) and MPU9250(Gyro Sensor)
Tech stack- Python 3.x, Sklearn, Scipy, Numpy, and Pandas.
- Detects the exercise when the device is in the active-time mode i.e when the code is running. Can currently detect Vertical Raises, Bicep Curls, Push Ups and Sit-Ups.
- Detects number of steps and displays total calorie burnt in passive mode.
- Detects the number of counts a user workouts.
- Total Model accuracy of 0.95
-
Pandas-
pip install pandas
- csv included
-
Sklearn-
pip install scikit-learn
-
Numpy-
pip install numpy
-
Matplotlib.pyplot(Optional)-
pip install matplotlib
-
scipy.signal-
pip install scipy
- Install the requirements.
- Fill up the body-movement data in ExerciseClassifier.csv and save it in the directory of the file FitnessXpertProgram.py (Mind the Path of the csv file).
- Run the code to get counts and detect exercises.
-
Expect incomplete data to process error from csv.
Solution: Browse to the csv file and delete the last row since it shouldn't matter after the data is acquired for a long time.
-
Inaccurate detection if the active-time is lesser than required i.e 30s.
Solution: Workout/Acquire data for more than 30s.
Note: Evaluation Data for different workouts are saved with their respective names for testing.