Abstract
Subject Independent Drowsiness Recognition From Single Channel EEG With An Interpretable CNN LSTM is an open-source AI & Machine Learning project. In this project, we propose a CNN-LSTM model to classify single-channel EEG for driver drowsiness detection. We designed a visualization technique by taking advantage of the hidden states output by the LSTM layer. Results show that the model not only has a high accuracy but also learns biologically explainable features, e.g., Alpha spindles, as evidence for the drowsy state. Pytorch implementation of the paper "Subject-Independent Drowsiness Recognition from Single-Channel EEG with an Interpretable CNN-LSTM model". https://doi.org/10.1109/CW52790.2021.00041. It is built using Python. The complete source code is publicly available on GitHub under the Creative Commons Zero v1.0 Universal, making it a useful reference for students building an AI & Machine Learning mini project or final-year project.
1. Introduction
Pytorch implementation of the paper "Subject-Independent Drowsiness Recognition from Single-Channel EEG with an Interpretable CNN-LSTM model". https://doi.org/10.1109/CW52790.2021.00041
J. Cui et al., "Subject-Independent Drowsiness Recognition from Single-Channel EEG with an Interpretable CNN-LSTM model," 2021 International Conference on Cyberworlds (CW), 2021, pp. 201-208, doi: 10.1109/CW52790.2021.00041.
The project contains 3 code files. They are implemented with Python 3.6.6.
2. Objective
In this project, we propose a CNN-LSTM model to classify single-channel EEG for driver drowsiness detection. We designed a visualization technique by taking advantage of the hidden states output by the LSTM layer. Results show that the model not only has a high accuracy but also learns biologically explainable features, e.g., Alpha spindles, as evidence for the drowsy state.
This project demonstrates how Python can be applied to a real-world AI & Machine Learning problem.
4. Technology Stack
5. System Requirements
General requirements for this technology stack — check the README for exact versions.
- Python 3.8 or later
- pip / virtualenv for dependencies
- VS Code, PyCharm or Jupyter Notebook
- Git (to clone the repository)
6. Installation & Setup
git clone https://github.com/cuijiancorbin/Subject-Independent-Drowsiness-Recognition-from-Single-Channel-EEG-with-an-Interpretable-CNN-LSTM.git
cd Subject-Independent-Drowsiness-Recognition-from-Single-Channel-EEG-with-an-Interpretable-CNN-LSTMFull setup instructions are in the project README.
7. Future Enhancements
Suggested extensions you can add to make this your own project.
- Deploy the model as a web app with Streamlit, Flask or FastAPI
- Compare against an additional model and report the metric difference
- Add explainability (SHAP / Grad-CAM)
8. Viva / Review Questions
Common questions examiners ask for projects in this domain.
- What dataset does the project use and how was it pre-processed?
- Which algorithm / model architecture is used and why was it chosen over alternatives?
- How are training and testing data split, and how is overfitting avoided?
- Which evaluation metrics (accuracy, precision, recall, F1) are reported and what do they mean here?
- How would you deploy this model for real users?
9. Source Code & License
This project is developed by cuijiancorbin and published on GitHub under the Creative Commons Zero v1.0 Universal. Please follow the license terms and credit the original author when you use or modify this code.
Want to build this as your internship project?
Work on an AI & Machine Learning project like this with mentor guidance, weekly reviews and an internship certificate from Training Trains, Erode — online or offline.
Apply for AI & Machine Learning Internship