Blogs

illustrations illustrations illustrations illustrations illustrations illustrations illustrations

FBK: Coronary Artery Disease Detection from Cardiac MRI

Published on May 26, 2022 by Samer Kharboush on DL Healthcare

FBK: Coronary Artery Disease Detection from Cardiac MRI

Early detection of coronary artery disease from cardiac MRI, built on custom PyTorch/TensorFlow augmentation, within a clinical decision-support analytics ecosystem.

Overview

Coronary artery disease (CAD) is the most common type of heart disease; for some people the first sign is a heart attack. CAD is caused by plaque buildup in the walls of the coronary arteries, narrowing them and reducing blood flow; this process is called atherosclerosis. A standard clinical tool for diagnosing CAD is angiography, but it carries dangerous side effects and high costs. This project explores artificial-intelligence methods to detect CAD patients from MRI images, as a clinical decision-support layer. The work was carried out at FBK and the code is published in the CAD repository.

Goals

The goal is automated CAD detection from cardiac MRI that reduces the need for invasive angiography, by finding good representations of the data and distinguishing CAD patients from non-CAD subjects. The motivation is that AI-based methods are a valuable way to diagnose disease when angiography is costly and risky.

My role

I built and evaluated the machine-learning pipeline myself: data loading and preparation, custom augmentation, model selection, training and evaluation, and a small deployment for demonstrating classification.

Architecture

Several machine-learning approaches were tried on the same data: convolutional neural networks (CNN classification), PyTorch and TensorFlow models, pre-trained ResNet18 transfer learning, and an autoencoder that learns the underlying data distribution and reconstructs CAD images (denoising concept) in an unsupervised way. The autoencoder consists of an encoder that compresses the input into a reduced latent representation, a code, and a decoder that reconstructs the original dimensions from the code. Custom data handling uses a dataset class exposing length and indexing, with preprocessing and augmentation. Training uses a standard supervised loop: cross-entropy loss for two outputs, the Adam optimizer, learning-rate finding, one-cycle learning, differential learning rates for fine-tuning, data augmentation, test-time augmentation, transfer learning from pre-trained weights, and callbacks such as early stopping. Evaluation uses confusion matrix, accuracy and ROC-AUC. Custom PyTorch/TensorFlow augmentation was developed to improve the data seen during training. A small Flask app loads a pretrained model and classifies an uploaded MRI image; a demo video walks through it. The repository also includes a fast.ai notebook applying the fast.ai training techniques (learning-rate finder, one-cycle, differential rates, augmentation, test-time augmentation, transfer learning) and a TensorFlow transfer-learning notebook using pre-built architectures with a custom output layer, global average pooling, dropout and callbacks.

Tech stack

Python, PyTorch, TensorFlow, fast.ai, scikit-learn, CNNs, ResNet18, autoencoders, Flask, PyTorch data utilities. The dataset used is the public CAD cardiac-MRI dataset.

Results & achievements

Reported results: 97% accuracy/AUC-ROC, with custom PyTorch/TensorFlow augmentation associated with a 32% improvement, on a dataset of approximately 42,800 MRI records, within a clinical decision-support analytics ecosystem. These are results reported for this project, not independently re-measured here. The delivered work includes the custom augmentation, CNN and transfer-learning classifiers, an autoencoder for distribution modelling and image generation, a Flask demo, and a published repository. The repository also documents the data-preparation and model-training workflow in notebooks, so the approach can be followed step by step: custom dataset and network classes, the training loop, the fast.ai experiment sequence, and the TensorFlow transfer-learning experiment.

Source code: github.com/SamerKharboush/CAD. Dataset: CAD cardiac MRI dataset. Demo video: Coronary artery disease prediction, web app demo.

Similar Stories