Downloads · 30 days
0
karnamgyal/sleep-stage-classifier
sleep-stage-classifier is a machine learning model from karnamgyal. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This project involved building a complete deep learning pipeline from scratch: from raw EEG/EOG/EMG data preprocessing with MNE, to designing and training a CNN-LSTM model, to evaluating test performance and deploying…
Downloads · 30 days
0
Access
Public
Updated Aug 15, 2025
Repo size
245 MB
Likes
0
Public
Click a slice to open those files.
.edf196 MB · 80%
From the Hugging Face model README
This project involved building a complete deep learning pipeline from scratch: from raw EEG/EOG/EMG data preprocessing with MNE, to designing and training a CNN-LSTM model, to evaluating test performance and deploying an interactive Streamlit web app for visualization!
This model predicts sleep stages (Wake, N1, N2, N3, REM) from EEG, EOG, and EMG recordings using a CNN-LSTM deep learning architecture.
I have deployed this project on HuggingFace as a web app here:
Python, PyTorch, NumPy, MNE, scikit-learn, Matplotlib, Streamlit, plotly.
This project uses the sleep-cassette file from the Sleep-EDF Expanded dataset from PhysioNet: https://physionet.org/content/sleep-edfx/1.0.0/
The model was trained and then tested on a smaller dataset for evaluation.
The model was also tested on the unseen subjects four that were taken out for the visualization on the web app.
This was also a highly valuable hands-on experience with the entire machine learning pipeline, preparing me to take on more challenging projects. While the model does not perform as accurately as those in research papers, it still performs well and provides valuable insight into how sleep stages evolve throughout the day-night cycle.
This contains a full deep dive explaining each part of the project's deep learning pipeline: Detailed Write-up on Notion