Giter Club home page Giter Club logo

multimodule-ecg-classification's Introduction

multimodule-ecg-classification

RESEARCH-PAPER:{

  TITLE: "Multi-module Recurrent Convolutional Neural Network with Transformer Encoder for ECG Arrhythmia Classification",

  CITE:  "https://ieeexplore.ieee.org/abstract/document/9508527",
  
  YEAR: 2021,
  
  CONFERENCE: "IEEE EMBS",
  
  AUTHORS: ["Duc Le^",
                "Vidhiwar Singh Rathour^",
                      "Sang Truong", 
                               "Quan Mai^, 
                                        Patel Brijesh; 
                                                Ngan Le"],
                                                      ^: Equal Contribution}  

DIRECTORY-TREE:{

 data: "Directory: Datasets for training are stored here.",

 utils: "Directory: Utility based files",
 
 examples: {"Directory: github/awni/ecg/":[
        "Cardiologist-level arrhythmia detection and classification in ambulatory electrocardiograms using a deep neural network"]},

 models:{ "Directory: DNN Models": {
        resnet_cnn.py: "Python: Pytorch implememntation of Multimodal-ecg-classification, CNN, Word2Vec",
        resnet_lstm_phy2017.py: "Python: Pytorch implememntation of Multimodal-ecg-classification, LSTM, CNN",
        resnet_lstm.py: "Python: Pytorch implememntation of Multimodal-ecg-classification, LSTM, CNN",
        resnet_w2v.py: "Python: Pytorch implememntation of Multimodal-ecg-classification, LSTM, CNN, Word2Vec",
        resnet_lstm_mitbih.py: "Python: Pytorch implememntation of Multimodal-ecg-classification, LSTM, CNN, Word2Vec, Attention AYN"}},

 ecg_cnn.py: "Python: Pytorch implememntation of Multimodal-ecg-classification, CNN, Resnet",
 ecg_w2v.py: "Python: Pytorch implememntation of Multimodal-ecg-classification, Word2Vec, Resnet",
 ecg_lstm.py: "Python: Pytorch implememntation of Multimodal-ecg-classification, LSTM, CNN, LSTM",
 ecg_phy2017.py:"Python: Pytorch implememntation of Multimodal-ecg-classification, LSTM, CNN",
 ecg_mitbih.py: "Python: Pytorch implememntation of Multimodal-ecg-classification, LSTM, CNN, Word2Vec, Attention AYN",
 transform_data.ipynb: "Jupyter Notebook: Python implementation for Data Generation, and Preprocessing"}

HOW-TO-USE:{

  Uno: "Make sure the required libraries (Torch, Panda, Tqdm, ... etc.,). are installed",
  Dos: : "Use the examples directory to download and preprocess data.",
  Tres: "Follow transform_data.ipyn to get data ready for training.",
  Cuatro: "Run python ecg_###.py to train on training data, and validate on validation data",
  Cinco: "By default results are saved in checkpoints directory"}

IMAGES:{

Model.png Results.png}

EOF

multimodule-ecg-classification's People

Contributors

vidhiwar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

multimodule-ecg-classification's Issues

About the dataset

Hi Vidhiwar :
Thank you for reading!
I am a second-year graduate student at ECUST University, China.
My research is focused on Signal Classification. I have recently read your paper: " Multi-module Recurrent Convolutional Neural Network with Transformer Encoder for ECG Arrhythmia Classification".
I am wondering if you could kindly send me the dataset and the necessary information about it,especially ECG_Data_Collect.xlsx. I promise they will be used only for research purposed.
Thank you very much for your kind consideration and I am looking forward to your early reply.

All the best,

Emial:
[email protected]

An Error: RuntimeError: 0D or 1D target tensor expected, multi-target not supported

Traceback (most recent call last):
File "ecg_mitbih.py", line 431, in
main()
File "ecg_mitbih.py", line 288, in main
train_loss, train_acc = train(trainloader, model, criterion, optimizer, epoch, use_cuda)
File "ecg_mitbih.py", line 337, in train
loss = criterion(outputs, targets)
File "D:\Miniconda3\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "D:\Miniconda3\envs\pytorch\lib\site-packages\torch\nn\modules\loss.py", line 1150, in forward
return F.cross_entropy(input, target, weight=self.weight,
File "D:\Miniconda3\envs\pytorch\lib\site-packages\torch\nn\functional.py", line 2846, in cross_entropy
return torch._C._nn.cross_entropy_loss(input, target, weight, _Reduction.get_enum(reduction), ignore_index, label_smoothing)
RuntimeError: 0D or 1D target tensor expected, multi-target not supported

I recived this error when I tried to run ecg_mitbih.py. I try to output the shape of outputs and targets, where cause the error. I found that outputs is batch_size * 6 with targets is batch_size * 10.
(Before that, I follow the transform_data.ipynb, and get the dataset as ecg signal partitioned into 10 segments. Maybe the error is caused by that?)

Two questions about the ecg-mitbih.py and the ecg_labels.json file

Q1: X is partitioned into n=10 segments, and the length of each segment is 360. In the ecg_labels.json contains two keys (images , image_full). I wonder what the usage of “image_full" is, since img_full was defined in the ecg_mitbih.py but never be used.

Q2: what should the ecg_labels.json be like? the value of the label shoud be scalar or a list contains 10 elements?

Details are as shown in the figures below.

FIG_1
FIG_2
FIG_3

some qustion about extract mitdb

hello,I'm trying to use python-wfdb instead of the wfdb package to run my code, but the “split” in this code doesn't work for wfdb.
image

"wfdb.rdann" returns an object instead of a string. So I'm wondering what the contents of labels _l(0) l(1) (2)(6) were when you wrote the original code?
image

ecg_phy2017.py in each epoch have the same result

Hello,thanks for your excellent work.I've already finished the dataset(STFT transform with phy2017).
Then i use "python ecg_phy2017.py"in my terminal.I set the batchsize to 10(because I have only 20GB gpu memory,otherwise will out of memory).
But the results of every epoch always the same. Do you know what is wrong?

about some question in extract.py

Sorry, I have some questions.
In my way, I pip installed wfdb python package without downloading the software(?)
But I couldn't use wfdb package in subprocess...
Do you have any suggestions~~
Thank you !
image
image

STFT

Hello, I would like to ask, when I use your code for this step of STFT transform with MiT-BiH dataset, why the generated spectrograms are all the same? Do you know what is wrong? Thank you very much!

ECG_Data_Collect.xlsx

Hello, I want to run this code, but this file(ECG_Data_Collect.xlsx) is missing. Could you please upload it? Or send it to my e-mail, my e-mail is [email protected], or could you please tell me what data and format are in this xlsx file? Thank you for your trouble! Gods bless kind people

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.