/DeepECG

CNN for ECG Authentication, Low Complexity Exploration.

Primary LanguagePythonMIT LicenseMIT

Deep ECG

Introduction

Build a deep neural network for ECG authentication

Low Complexity ECG Biometric Authentication for IoT Edge Devices

The whole project contains 3 different methods to rebuild model and execute ECG authentication:

  • Original CNN

    This rebuilds model from a pre-trained CNN model and use its original weights. The best performance is 99.63%

  • Binary Neural Network

    This rebuilds model from a pre-trained CNN model and use binary weights. The weights are in this format:

    The best performance is 88.85%

  • Exponentiation Neural Network

    This rebuilds model from a pre-trained CNN model and use exponent weights. The weights are in this format:

    The performance increases with larger 'n' value

Requirements and Installation

  • Database

    PTB Diagnostic ECG Database

  • Libraries

    Install the necessary libraries:

    conda env create -n deepecg --file environment.yml

    Activate environment:

    conda activate deepecg

Usage

  • Step 1: Data Processing

    To precess data from original dataset manually, run:

    python DataGeneration.py \
        --data_path ${data_path} \
        --prefix ${prefix} \
        --output_path ${output_path}

    Or you can download the pre-processed dataset from the link:

    PTB Processed Dataset

  • Step 2: CNN Modelling

    To build CNN model for human recognition, run:

    python ModelCreation.py \
        --save_path ${save_path} \
        --data_path ${data_path}
  • Step 3: Authentication

    To execute authentication section, run:

    python Authentication.py \
        --model_path ${model_path} \
        --data_path ${data_path}

Update

  • 2021/01/20

    optimize structure, improve performance, test generalization ability

  • 2021/02/05

    optimize path search

  • 2021/03/16 *

    update path structure

  • 2021/05/10

    pruning