The program uses a convolutional neural network, using Keras, to identify and mark the R-waves, and produces relevant data on the heart rate variability on the sample. There is also an interface, using Matplotlib widgets, to check if the marks are correct. Our data is from the Ponemah software and has a specific format.
Contains the python programs to run the program.
Contains the ECG data as well as the R-peak markings produced by model_prediction.py.
Contains the sheets for the timestamps of the peaks.
Contains the data needed to train the program (numpy files as well as raw files of signals and markings)
Contains parameters for the program, adjusting the values in here will adjust the parameters in the other programs.
Reads from a file containing ECG data and a sheet containing the timestamps of markings, and produces 2 files which can be used to create a dataset from.
Creates .npy files of the train and test datasets, using the outputs from ecg_marking_matcher.py. The samples are (samples, datapoints, stack).
Trains a model using the datasets created from dataset.py. The model is a 1D convolutional network, and the one sample is (datapoints, stack), with stack adding a temporal dimension and allowing the model to incorporate data from previous signals.
Runs the previously trained model on a file of ECG data. It will output multiple files of the markings in case the file is too large so that the plotting program won't lag when displaying. These have the convention of inputfilename + number.txt, so for example, Sample.ascii might be split into Sample001.txt, Sample002.txt, and Sample003.txt.
Plots markings produced by model_prediction.py, and allows for user corrections if desired.
Converts the markings from model_prediction.py into a sheet of relevant information on the heart rate variability on the data. Allows for selecting of multiple files together and joins them afterwards.
Email me at: tonyzhao.davis@gmail.com or ayzhao7761@berkeley.edu








