Author: Zhennong Chen, PhD
This repo is for the paper:
Detection of Left Ventricular Wall Motion Abnormalities from Volume Rendering of 4DCT Cardiac angiograms Using Deep Learning
Authors: Zhennong Chen, Francisco Contijoch, Elliot McVeigh
Citation: Zhennong Chen, Francisco Contijoch, Gabrielle Colvert, Ashish Manohar, Andrew M. Kahn, Hari K. Narayan, Elliot McVeigh. "Detection of Left Ventricular Wall Motion Abnormalities from Volume Rendering of 4DCT Cardiac Angiograms Using Deep Learning", Frontiers in Cardiovascular Medicine, May 2022, doi: 10.3389/fcvm.2022.919751
The clinical problem we tackle is to screen 4DCT cases for LV wall motion abnormality (WMA) in a simple and automatic way. We hypothesize that the deep learning (DL) technique can be useful to fulfill this mission.
4DCT data size is usually too large to fit into the current GPU. We solve this problem by leveraging the dynamic volume rendering technique. We convert 4DCT into 6 videos of volume-rendered left ventricle beating across one cardiac cycle. 6 videos have 6 different projection angles corresponding to every 60 degree rotation around the LV axis. Such volume rendering videos can accurately represent the LV wall motion in the high-resolution 4DCT using highly-compressed data memory.
We then develope a deep learning framework with a pre-trained Inception V3 to extract image features from multiple frames of the volume rendering video, a LSTM to incorporate the temporal information and fully-connected layers to regress a binary classification of the WMA presence/absense in the volume rendering video.
In conclusion, this github repo enables the users to prepare 4DCT data into volume rendering videos and train the DL model to detect WMA from the videos.
The entire code is containerized. This makes setting up environment swift and easy. Make sure you have nvidia-docker and Docker CE installed on your machine before going further.
- You can build your own docker from provided dockerfile
Dockerfile_DL_WMA.txt
.
To start the experiment, you should have your 4DCT data with the LV blood-pool segmentation ready. We highly recommend you to prepare the segmenation automatically by U-Net. (you can use the github repo here: https://github.com/zhennongchen/2DUNet_CT_Seg_Final_v_ZC).
The scripts in folder Data_Preparation_Matlab
includes:
- Image rotation: rotate CT volume so LV long axis correspond to image z-axis. This is done by
find_rotation_angle.m
(by clicking anatomical landmarks) andmake_rotated_data.m
(rotate the image and segmentation data with pre-defined rotaiton angles) - Volume Rendering Generation: Generate 6 volume rendering videos for 6 different view angles. This is done by
Main_Volume_Rendering.m
automatically with pre-defined rendering parameters. - RSct Map: The "ground-truth" WMA presence/absence of the video is labeled by measuring regional shortening (RSct) of the endocardium using validated surface feature tracking technique. Run
Main_RSct.m
to obtain the RSct map. Then project the RSct map onto each projection angle using the method introduced in paper. A video is labeled as abnormal if >35% voxels with projected RSct > -0.20. You should record the labels into a spreadsheet.- see folder
Ground_Truth_Label_Sheets
for examples
- see folder
Use a deep learning framework to detect WMA from prepared volume rendering videos. Follow the steps indicated by file names to run the deep learning framework:
- step 0A: define default parameters by
./defaults.sh
. - step 0B: prepare the spreadsheets that can be read by deep learning models by
DLWMA_pre1.py
(organize the spreadsheet) andDLWMA_pre2.py
(select input frames). - step 0C: partition the data if you need to do the n-fold cross-validation by
DLWMA_pre3.py
. - step 1: obtain frames of the video by
python DLWMA_main_1_extract_video_frame_images.py
. - step 2: extract image features from each frame by running
python DLWMA_main_2_extract_features.py
. - step 3: train the model (n-fold cross_validation) by running
./DLWMA_main_3_train.py --batch N
. - step 4: predict WMA on new data by
./DLWMA_main_4_predict.py
.
see comments in the script
Please contact zhc043@eng.ucsd.edu or chenzhennong@gmail.com for any further questions.