GithubHelp home page GithubHelp logo

mostafapiran / my_thesis Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 14.1 MB

My research on the diagnosis of epilepsy based on brain signals as a master's thesis. (Deep Learning - ECoG - EEG)

License: MIT License

Jupyter Notebook 98.48% Python 1.52%
deep-learning ecog eeg-analysis biomedical epilepsy epileptic-seizures seizure seizure-detection

my_thesis's Introduction

My_Thesis

My research on the diagnosis of epilepsy is based on brain signals as a master's thesis.

Thesis Topic: Design of epileptic activity detection system using deep learning methods from electrocorticographic signals in rats

Abstract:

According to the World Health Organization, epilepsy is the most common brain disorder that affects approximately fifty million people worldwide. Epilepsy diagnosis relies on manual EEG inspection, which is error-prone and time-consuming. Automatic diagnosis of epileptic seizure from EEG or ECoG signal can reduce diagnosis time and facilitate treatment targeting for patients. Current detection approaches mainly rely on features that are manually designed by domain experts. The features are inflexible for recognizing a variety of complex patterns in large volumes of EEG data. In addition, EEG and ECoG signals are non-constant, and seizure patterns vary across patients and recording sessions. EEG and ECoG data always contain many types of noise, which negatively affect the accuracy of epileptic seizure diagnosis. To address these challenges, deep learning approaches are reviewed in this paper. The data used in this research were collected from animal samples (gerbils) and seizures were caused abnormally by drugs. Earth series data are applied to deep learning networks without any special filter. The only filter used is the 50 Hz notch filter of the utility power. After studying and comparing, convolutional networks were selected and used to classify the data of this research. The best result was obtained with 95.22% accuracy and 17.98% error. The designed network produced promising results for the construction of personalized seizure detectors. Not enough data was available to increase accuracy and reduce error.


Convolutional Neural Network (CNN) for Classification using TensorFlow and Keras

Introduction

This repository contains a Python script that demonstrates the implementation of a Convolutional Neural Network (CNN) for classification using TensorFlow and Keras. CNNs are widely used in deep learning for image classification tasks, and this script serves as an example for building and training a CNN model.

Code Overview

The Python script provided in this repository performs the following tasks:

  1. Data Loading: The script loads a dataset from a specified file, in this case, a MATLAB file containing data for a classification task.

  2. Data Preprocessing: The input data is preprocessed, including resizing images, reshaping, and converting to appropriate data types.

  3. Model Building: A CNN model is defined using Keras. The model consists of convolutional layers, max-pooling layers, batch normalization, dropout, and fully connected layers.

  4. Model Training: The model is compiled and trained on the preprocessed data. Training parameters such as batch size and the number of epochs are specified.

  5. Model Evaluation: The script evaluates the trained model's performance using metrics such as accuracy, precision, sensitivity, specificity, and F1-score.

  6. Confusion Matrix Visualization: The confusion matrix is displayed to visualize the model's performance in classifying data.

  7. Model Saving: The trained model and its weights are saved for future use.

Usage

To use this code for building and training a CNN model:

  1. Ensure you have TensorFlow, Keras, NumPy, and OpenCV installed in your Python environment.

  2. Replace the dataset path with your dataset file in the line: dataset = io.loadmat('/content/drive/MyDrive/uni project/2_Class/2sec(1sec_overlap)/D_2c_shuffle_normal_2s(1sec overlap).mat')

  3. Modify the CNN model architecture, training parameters, and evaluation metrics based on your specific task.

  4. Run the script to load, preprocess, train, and evaluate the CNN model.

Contribution and Modification

You are welcome to use, modify, and contribute to this code for your classification tasks. If you find it valuable, consider giving this repository a star.

Feel free to explore the code, experiment with different datasets, and adapt it to your specific use cases. We hope this implementation helps you better understand and apply CNNs in your deep learning projects.

Acknowledgment

We acknowledge the open-source community and the contributions of TensorFlow, Keras, and other libraries that make it possible to share and collaborate on code like this.


my_thesis's People

Contributors

mostafapiran avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.