A React Native app that uses motion sensor data to recognize physical exercises using a trained machine learning model. It allows users to start and stop workout sessions, processes the collected data, predicts the exercise being performed, and stores all session information in Firebase.
This mobile application aims to provide a smooth experience for users who want to track their workouts automatically. By collecting sensor data from mobile devices, the app predicts the type of exercise being performed using a hybrid 1D CNN-LSTM model trained on the PAMAP2 dataset (for now).
- Start/Stop exercise sessions
- Live prediction of performed exercise
- Firebase Authentication for user management
- Cloud-based ML inference with Firebase Functions
- Logs exercise history and statistics
- Data stored securely in Firestore
The system is composed of a React Native frontend and a Firebase backend that handles authentication, model inference, and data storage.
Click to view architecture description
- Allows the user to start and stop an exercise session.
- Collects sensor data.
- Sends sensor data to the backend for prediction.
- Displays the predicted exercise to the user.
- Manages login and authentication.
- Manages user credentials and provides auth tokens.
- Loads the ML model.
- Predicts the exercise from sensor data.
- Sends prediction to app and stores result.
- Stores the trained machine learning model.
- Stores:
- Exercise predictions
- User metadata
- Session logs
- Badge information
- User statistics
- Feedback from users
- React Native (Expo)
- Firebase (Authentication, Firestore, Cloud Storage)
- Python for model training
- PyTorch for the ML model
- mHealth dataset for training
- Node.js and npm
- Expo CLI (
npm install -g expo-cli) - Firebase project with:
- Authentication enabled
- Firestore and Storage configured
-
Clone the repository:
git clone https://github.com/JoaoCoelho2003/SA-FitSense.git cd SA-FitSense -
Go to the frontend folder:
cd frontend -
Install dependencies:
npm install
-
Set up your Firebase config in the app.
-
Start the app:
expo start
