This project implements a time series deep learning model, EMG sensor and ESP8266 microcontroller to classify strained/damaged muscles from regular/normal muscles. The system uses EMG (Electromyography) sensor data, processes it through a neural network, and provides classification results. This technology can be applied in various settings, including:
- Gyms
- Physical therapy clinics
- Sports medicine facilities
- Occupational health offices
- Ergonomic assessment in workplaces
- Home health monitoring
graph TD
A[EMG Sensor] -->|Raw data| B[ESP8266 Microcontroller]
B -->|WiFi| C[Supabase Database]
C -->|API| D[Web Application]
D -->|Display| E[User Interface]
F[Neural Network Model] -->|Classification| D
G[Feature Extraction] -->|Processed data| F
C -->|Raw data| G
link - https://archive.ics.uci.edu/dataset/278/emg+dataset+in+lower+limb
- Conda environment with the following packages:
- numpy
- tensorflow-keras
- plotly
- scikit-learn
- scipy
- pandas
- supabase-py
- Supabase account for cloud database
- ESP8266 microcontroller with WiFi module
- EMG sensor (or simulated data for testing)
-
Data Processing: Raw EMG data is processed to extract features such as mean, max, min, frequency over duration, and duration of test.
-
Neural Network Model: A deep learning model is created and trained on the extracted features to classify muscle strain.
-
Model Persistence: The trained neural network model and scalar file (for data preprocessing) are saved for future use.
-
Database Integration: Supabase cloud database is used to store and retrieve EMG readings.
-
Web Application: A web interface is provided to display graphical reports of EMG readings and classification results.
-
Microcontroller Code: Arduino code for the ESP8266 to send EMG readings to the database.
-
Clone this repository:
git clone https://github.com/MST-369/First-Aid-Recommender.git cd First-Aid-Recommender
-
Set up the Conda environment:
conda create --name muscle_class python=3.8 conda activate muscle_class conda install numpy tensorflow-keras plotly scikit-learn scipy pandas pip install supabase
-
Set up your Supabase project and note down the API key and URL.
-
Update the configuration file with your Supabase credentials.
-
Upload the Arduino code to your ESP8266 microcontroller.
- Collect EMG data using the sensor and ESP8266 setup. [Didn't use EMG sensor but microcontroller mimicked]
- Run the feature extraction script:
python feature_extraction.py
- Train the model:
python model.py
- Start the web application:
streamlit run <file path>
- Access the web interface to view results and classifications.
Contributions to this project are welcome. Please fork the repository and submit a pull request with your changes.
[Mani Surya Teja] - [[email protected]]
Project Link: https://github.com/MST-369/First-Aid-Recommender.git