Giter VIP home page Giter VIP logo

dl_ecg_classification's Introduction

12-Lead ECG Classification with Optimal Subset Selection

This repository is an implementation of the papers:

We developed a multi-stage DL-based model to automatically detect heart rhythm types, which takes as input the raw 12-lead ECG data with variable length and outputs a heart rhythm interpretation for the whole signal. The model consists of three modules:

  1. a feature extraction module that automatically extracts features from each lead of the raw 12-lead ECG data,
  2. an optimal ECG-lead subset selection module that is used to find an optimal minimal lead subset, and
  3. a decision-making module that uses features extracted from the optimal ECG-lead subset to interpret heart rhythm types.

Code

Environment

A Dockerfile with requirements.txt is provided to configure a docker environment for the project.

Running

  1. Feature Extraction: train.py trains neural networks with configurations train_config.json for processing single-lead ECG signals. single_lead_ECG_features.py and single_lead_ECG_features_ext.py use trained models to extract features from ECG signals on the dataset.
  2. Subset Selection: subset_selection.py uses features extracted in the previous step and find an optimal ECG lead subset.
  3. Decision Making: train_decision_model.py trains decision making classifiers based on the optimal ECG-lead subset.

Finally, predict.py integrates all the steps with configuration predict_config.json and make predictions on new ECG data.

Demo

We provided the models with weights in /save, configurations in predict_config.json, and example data in /data/demo. To run a demo of the model making predictions, execute:

python predict.py /data/demo predict_config.json

Results will be save in a file named predict_result.mat.

dl_ecg_classification's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

cqulxh

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.