A joint project by oapostrophe, gkenderova, soksamnanglim, syaa2018
For a high-level overview of this project, check out this blog post and 90-second demo. For a full presentation and more detailed writeup on our methodology, check out the report on our project website.
The trained model can be demoed by downloading app.py and demo_model.pkl, installing streamlit and fastai, then running:
streamlit run app.pyYou can then visit the provided url in your browser; for convenience, sample generated MI and Normal EKG images are provided in the /test files directory.
To use any of the other files, you'll have to download the PTB-XL dataset.
The important files are the following:
app.pyStreamLit-based web interface using a trained modeldataset generation/generate_imgset1.pyour first iteration generating a dataset directly with MatPlotLib; these images look rough.dataset generation/generate_imgset2.pyour second iteration that generates nicer-looking imagesdataset generation/generate_imgset3.pyadds random simulated shadows overlaying generated imagesdataset generation/generate_rnn_imgset.pygenerates individual images for each of 12 leads, for input into an RNN (rnn code currently fails to learn).dataset generation/automold.pylibrary with image augmentation code for adding shadowstraining/cnn_learner.pytrains and saves a cnn on generated images.
Feel free to email me with any questions!