This project includes a machine learning model for training and testing, along with additional utilities for handling location-based data, email notifications, and a Flask web application for real-time activity recognition using a trained model.
git clone https://github.com/ujjawalgarg7/STM-SmartWatch
cd STM-SmartWatchCreate a virtual environment to keep dependencies isolated:
python -m venv venvActivate the virtual environment:
- On Windows (Command Prompt):
venv\Scripts\activate
- On Windows (PowerShell):
venv\Scripts\Activate.ps1
- On macOS/Linux:
source venv/bin/activate
Once the virtual environment is activated, install the required packages:
pip install -r requirements.txtTo train and test the model, download the datasets:
- 📂 Training Set: Download here
- 📂 FineTuningSet Set: Download here
- 📂 Testing Set 1: Download here
- 📂 Testing Set 2: Download here
After downloading, place the datasets in the appropriate directories:
mkdir Dataset Testing
mv <downloaded-training-file> Dataset/
mv <downloaded-testing-file> Testing/python ModelTrain.pypython ModelTest.pypython location.pypython mail.pypython app.pyThis will start the Flask server. Open your web browser and navigate to http://127.0.0.1:5000/ to access the application. You can upload a CSV file containing sensor data to predict the activity.
STM-SmartWatch/
│── .gitignore # Specifies files to be ignored by Git
│── ModelTrain.py # Trains the machine learning model
│── ModelTest.py # Tests the trained model on new data
│── location.py # Handles location-based functionalities
│── mail.py # Manages email notifications
│── requirements.txt # Dependencies required for the project
│── app.py # Flask web application for real-time activity recognition
│── data/ # Directory for training and testing datasets
│── templates/ # Contains HTML templates for the Flask app
│ └── index.html # Main page of the web application
Watch the video demonstration here: Demo Video
Once you're done working, deactivate the virtual environment:
deactivateFor more details about this project, refer to the official documentation:
📄 Project Documentation
Contributions are welcome! If you'd like to contribute, please fork the repository and submit a pull request.