Skip to content

Latest commit

 

History

History
39 lines (30 loc) · 2.07 KB

README.md

File metadata and controls

39 lines (30 loc) · 2.07 KB

DeepECG

Using convolutional neural networks on ECG data to see if it is a valid candidate for biometric authentication.

Pre-Requisites

Make sure you have the following items installed:

  1. python2.7
  2. wfdb package using pip install wfdb
  3. keras
  4. pandas
  5. numpy

Usage

  1. python data_processing.py: Converts all .dat files in data/ to .csv. Extract labels and features from individual .csv files. Outputs the following files in the processed_data/ folder:
    • ecgdblabels.csv: labels [person, age, gender, date record was collected]
    • filecgdata.csv: filtered ecg signals
    • unfilecgdata.csv: unfiltered ecg signals [noisy]
    • new_data.csv: signals aligned by first positive maximum peak [so that all signals start at the same point]
    • rsampled_data.csv: signals aligned peak to peak and resampled to maintain width [generating more data to solve the problem of overfitting]
[Note]: If the folder, processed_data/, does not exist in your working directory on your local machine, create it. You can either run data_processing.py to generate the .csv files mentioned above or download them from the links provided.
  1. python model_personid.py: Train and evaluate model for person identification. See line 370 in data_processing.py on specific instructions for data setup.

  2. python model_genderid.py: Train and evaluate model for gender identification.

Database

This project uses the ECG-ID Database from Physionet. It can be found in the data/ folder. [Note: the original database does not include .csv files. See class csvGenerator in data_processing.py to learn more about how the .dat files were converted to csv using rdsamp]