Home

Awesome

Coronary Artery Stenosis Level Classification

This is an implementation of the CNN-CASS: CNN for Classification of Coronary Artery Stenosis Score in MPR Images by Maria Dobko, Bohdan Petryshak, and Oles Dobosevych

In CVWW 2020 proceedings

Overview

To decrease patient waiting time for di-agnosis of the Coronary Artery Disease, automaticmethods are applied to identify its severity in Coro-nary Computed Tomography Angiography scans orextracted Multiplanar Reconstruction (MPR) im-ages, giving doctors a second-opinion on the pri-ority of each case. The main disadvantage of pre-vious studies is the lack of large set of data thatcould guarantee their reliability. Another limitationis the usage of handcrafted features requiring man-ual preprocessing, such as centerline extraction. Weovercome both limitations by applying different au-tomated approach based on ShuffleNet V2 networkarchitecture and testing it on the proposed collecteddataset of MPR images, which is bigger than anyother used in this field before. We also omit cen-terline extraction step, and train and test our modelusing whole curved MPR images of 708 and 105 pa-tients, respectively. The model predicts one of threeclasses: ‘no stenosis’ for normal, ‘non-significant’— 1-50% of stenosis detected, ‘significant’ — morethan 50% of stenosis. We demonstrate model’s in-terpretability through visualization of most importantfeatures selected by the network. For stenosis scoreclassification, the method showed improved perfor-mance comparing to previous works, achieving 80%accuracy on the patient level. We will make our codepublicly available.

<img src="imgs_for_readme/visres.png" alt="Res Vis"> <p align=center> <img src="imgs_for_readme/results_table.PNG" alt="Results Table" width=500 height=250> <img src="imgs_for_readme/conf_matrixes.PNG" alt="Confusion Matrixes" width=500 height=500> </p>

General Pipeline

<img src="imgs_for_readme/prediction.png" alt="General Pipeline" align="middle">

Usage

Dependencies

All necessary modules are in the requirements.txt

pip install -r requirements.txt

Also, this code should be compatible with Python versions 2.7-3.5.

Training

  1. Set parameters for the experiment config.yaml (for detailed explanation of the config file see config section below)
  2. Run the following command:
python train.py

Testing

For the evaluating of the trained models you should use the jupyter notebooks, which are located in the notebooks folder.

Dataset structure

The dataset has the following structure:

|-- RootDir
|     |-- Train
|           |-- labels.csv/.xlsx
|           |-- imgs
|                 |--  patient_1
|                       |-- LAD
|                       |-- RCA
|                       ...
|                 ...
|     |-- Val
|           |-- labels.csv/.xlsx
|           |-- imgs
|                 |--  val_patient_1
|                       |-- LAD
|                       |-- RCA
|                       ...
|                 ...
|     |-- Test
|           |-- labels.csv/.xlsx
|           |-- imgs
|                 |--  test_patient_1
|                       |-- LAD
|                       |-- RCA
|                       ...
|                 ...
|

Config

Our config organized as follows:

  1. experiments_path - relative or absolute path to output of the TensorBoard.
experiments_path: experiments_lenet/

  1. device - device, where to run on.
device: cuda
  1. random_state - fix random seed.
random_state: 42
  1. dataloader - parameters for the dataloader class:
dataloader:
  batch_size: 16
  sampler: BalancedBatchSampler
  accumulation_steps: 1
  1. data - parameters for the input data:
data:
  root_dir: data/all_branches_with_pda_plv_with_new_test
  filters:
    arteries: [ 'LAD', 'D-1', 'D-2', 'D-3','PLV_RCA', 'LCX',  'OM-2', 'RCA', 'PLV_LCX', 'OM-3', 'PDA_LCX','OM-1', 'OM' ]
    viewpoint_index_step: 1
  groups:
    0: [ 'NORMAL','-']
    1: ['250%', '<25%', '<35%', '25-50%', '25%', '<50%']
    2: ['50%', '70%','*50%', '50-70%', '70-90%', '90-100%', '>50%', '>70%', '90%', '>90%','75%', '>75%']
  augmentation:
    name: MediumAugFixed
    parameters:
      p: 0.8
  dataset: MPR_Dataset
  1. model - choose the model, which you want for training:
model:
  name: ShuffleNetv2
#  parameters:
#    pretrained: True
  1. optimizer - parameters for the optimizer:
  optimizer:  # as in paper
  name:  Adam
  parameters:
    lr: 0.0001
#    weight_decay: 0.00001
#    momentum: 0.9
  1. loss - parameters for the loss function
loss:
  name: CrossEntropyLabelSmooth #CrossEntropyLabelSmooth #CrossEntropyLoss OHEMLoss
  parameters:
     num_classes: 3
#    k: 40

Data & model weights access

For the data and the trained models' weights access request use the following email petryshak@ucu.edu.ua

Citation

If you use this code for your research, please cite our paper.

​```
@InProceedings{DobkoPetryshakDobosevych_2020,
author = {Maria Dobko and Bohdan Petryshak and Oles Dobosevych},
title = {CNN-CASS: CNN for Classification of Coronary Artery Stenosis Score in MPR Images},
booktitle = {The Computer Vision Winter Workshop (CVWW)},
month = {Feb},
year = {2020}
}
​```