Skip to content

ujjawalgarg7/STM-SmartWatch

Repository files navigation


🚀 STM - Smart Watch - Vigilanté

📌 Overview

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.


⚙️ Installation

1⃣ Clone the Repository

git clone https://github.com/ujjawalgarg7/STM-SmartWatch
cd STM-SmartWatch

2⃣ Set Up a Virtual Environment

Create a virtual environment to keep dependencies isolated:

python -m venv venv

Activate the virtual environment:

  • On Windows (Command Prompt):
    venv\Scripts\activate
  • On Windows (PowerShell):
    venv\Scripts\Activate.ps1
  • On macOS/Linux:
    source venv/bin/activate

3⃣ Install Dependencies

Once the virtual environment is activated, install the required packages:

pip install -r requirements.txt

📂 Dataset

📥 Download Training and Testing Data

To train and test the model, download the datasets:

After downloading, place the datasets in the appropriate directories:

mkdir Dataset Testing
mv <downloaded-training-file> Dataset/
mv <downloaded-testing-file> Testing/

🚀 Usage

🏋️ Train the Model

python ModelTrain.py

🧪 Test the Model

python ModelTest.py

📍 Location Handling

python location.py

✉️ Send Email Notifications

python mail.py

🌐 Run the Flask Web Application (Real-time Activity Recognition)

python app.py

This 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.


📂 File Structure

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

🎥 Demo

Watch the video demonstration here: Demo Video


❌ Deactivating the Virtual Environment

Once you're done working, deactivate the virtual environment:

deactivate

📑 Documentation

For more details about this project, refer to the official documentation:
📄 Project Documentation


💡 Contributing

Contributions are welcome! If you'd like to contribute, please fork the repository and submit a pull request.


✨ Happy Coding! 🚀🔥


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •