Classification of stages of sleep from EEG using Convolutional Neural Networks

6 0
  • 0 Collaborators

In this project, we use a 1D CNN to encode each Epoch and then another 1D CNN or LSTM that labels the sequence of epochs to create the final hypnogram, this is mainly used in our project for classification of Brain waves. This allows the prediction for an epoch to take into account the context too. ...learn more

Project status: Under Development

RealSense™, Internet of Things, Artificial Intelligence

Groups
Student Developers for AI

Intel Technologies
Movidius NCS, AI DevCloud / Xeon

Links [1]

Overview / Usage

In this particular project, we used 3 different approaches for solving our problem, which goes as follows:

  • CNN based approach(1D-CNN-1D-CNN) : This ones used a 1D CNN for the encoding the epochs of the model built and then another 1D CNN for the sequence labeling of data.
  • Conditional Random Fields based approach(CNN-CRF) : This model used a 1D CNN for the epoch encoding and then a 1D CNN-CRF for the sequence labeling, as CRFs are bayesian graphical models which also take context into account and work amazingly well for sequential data like Text data, and is implemented here as well using Flair by Zalando Research.
  • CNN-LSTM : This ones used a 1D CNN for the epoch encoding and then an LSTM for the sequence labeling, where we also tried using Long short term models with a few tweaks in the penultimate layers.

We tried evaluating the model on a test dataset on a beta phase model and satisfactory results were shown:

  • CNN-CNN : F1 = 0.79, ACCURACY = 0.85
  • CNN-CRF : F1 = 0.80, ACCURACY =0.87
  • CNN-LSTM : F1 = 0.71, ACCURACY = 0.74

CRF helps learn the transition probabilities between classes. The LSTM based model does not work as well because it is most sensitive to hyper-parameters like the optimizer and the batch size and requires extensive tuning to perform well, and hence CRF based approach does exceptionally well in terms of its performance. We are also trying newer approaches by determining the change points using Change point detection for further improvements in the model.

Methodology / Approach

We used Flair for the implementing the CRF(Conditional Random Field) and for LSTM and CNNs we used Tensorflow based implementation and quantified the data into numerical data and parsed it to the model using different methods. We also didn't want to over fit the model, so used Regularization methods along with post pruning, as compared to early stopping.

For example, Convolution1D(16, kernel_size=5, activation=relu, padding="valid")

Also read the following papers:

https://www.hindawi.com/journals/cin/2019/5627156/

https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5702353/

https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5655781/

Technologies Used

Intel Modivius NCS V1

Intel optimized Tensorflow

Scikitlearn

Flair-Zalando Research

Nvidia GPU

Comments (0)