Coder Social home page Coder Social logo

emganalyzer's Introduction

EMGAnalyzer

This is a Python based Software under development for the automation of EMG Signal analysis. The specifications for the software are as follows:

  1. Dataset Structure: a. The main dataset directory consists of two folders (train and test) where the 'test' folder contains patient records for testing the classifier and 'train' folder contains patient record for training the classifier. b. Each of the train/test directory consists of three folders(myopathy, ALS and normal) where each folder contains folders for different subjects who falls under the specified group. The record folders of each subject is stored in a folder(patient folder) bearing a unique ID number(e.g. a01_patient, c01_patient, etc.) for each individual patient. Each patient folder can have multiple EMG record folders obtained from the brachial biceps of the subject. Each record folder contains information related to each signal recorded from the specific patient. c. Each record folder of the subjects also bear a unique ID number(e.g. N2001A01BB05, N2001A01BB06, etc.) and each folder contains three files. They are 'data.npy' and 'data.hea'. d. data.npy: This file contains the EMG signal recorded from an electromyograph. The data is stored as a 'Numpy' one dimensional array where the length of array indicates the number of samples obtained at a specific sampling frequency. e. data.hea: This is a WFDB header file that contains all the information regarding subject under investigation and recorded EMG signal from the subject. As for example it contains the sampling frequency and total number of samples obtained from the signal, gender of the subject, period of diagnosis, duration of disease, location of placement of electrode, filters used, level of insertion of needle, etc. The data is stored as a text file (More documentation on WFDB header files: http://www.emglab.net/emglab/Tutorials/WFDB.html).
  2. Required Software Packages: PyQt5, pywt, Matplotlib, Scipy
  3. Software Description: a. EMG_Editor_new.py: This is the main python file that contains a Graphical User Interface in order to load and analyze data from the dataset directory. Path of the base 'dataset' directory can be updated in 'MyTableWidget' class of this file. The main UI currently contains two tabs: Preprocessing Tab and MUAP analysis Tab. The 'Preprocessing' Tab contains four sections: i) File information: This section contains buttons and options for loading EMG data from the dataset directory. The first button indicates the type of dataset which will be loaded for analysis which can be test(default), train(default) or any other directories included in the base 'dataset' directory folder. The second button indicates the type of subject for which the data should be loaded. The default directories in the sample dataset are records of subjects affected by ALS(als directory) and normal subjects(other directory). The third button specifies the ID of patient for which the data will be loaded. The fourth button specifies the EMG record directory for the specified patient from which data should be loaded. Selecting a record loads the data automatically. The fifth 'information' button displays information about the loaded record from its corresponding WFDB header file. ii) EMG Graph: This section contains a graph where the raw and preprocessed data are displayed. This section is used for data visualiation. iii) Buttons: This section contains Toolbar for manipulating the Graph and parameters for calculating the 'Peaks' of loaded EMG data. iv) Preprocessing: This section contains different options for preprocessing the EMG data. Currently included preprocessing parameters are: Butterworth Filtering(Lowpass, Highpass and Bandpass), Discrete Wavelet Transform and Fast Fourier Transform. The 'MUAP Analysis' tab contains two main sections: i) EMG Segmentation: This section provides option for filtering, cropping, detecting peaks and segmentation of the EMG signals two waveforms resembling MUAP action potentials(superimposed and basic) in the loaded EMG signal. It also contains a graph for visualiation of the processed data and parameters for manipulating the graph. Moreover, it has a 'Control' option where different parameters for the operations can be adjusted. ii) MUAP Classification: This section provides option for identifying potential MUAP waveforms and classification of superimposed waveforms and actual waveforms. Moreover, it provides option for viewing the firing pattern of the identified MUAP and decomposition of superimposed MUAP waveforms. Classification and Decomposition is currently done using a one dimensional Artificial Neural Network(ANN). The network uses decomposition algorithm developed by Christodoulos et al. in the paper "Unsupervided Pattern Recognition for the Classification of EMG Signals" (More documentation on the paper: https://ieeexplore.ieee.org/abstract/document/740879/). The weight adaptation of the network is done using Self Organizing Feature Map(SOFM) which is a form of unsupervised learning algorithm and Learning Vector Quantization(LVQ2) which is a form of supervised learning algorithm. Options for more automated classification and decomposition techniques will be included later.

(N.B: The 'Signal Classification' tab is under development which will contain options for classification of EMG signals. The functions for segmentation, classification and decomposition of EMG signal are included in 'segmentation_control_window.py' and 'classification_control_window.py' respectively).

  1. Screenshots: alt text alt text alt text

emganalyzer's People

Contributors

zuhairmhtb avatar

Stargazers

MD Mobassher Rashedi avatar  avatar Merve Deniz Şenelen avatar

Watchers

justiceli avatar  avatar Merve Deniz Şenelen 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.