/Radiology_FSL

Primary LanguageJupyter Notebook

Few-Shot Learning - Radiology


Tables of Contents

Introduction

This GitHub repository is the codebase for the research paper titled - 'Few-shot Transfer Learning to Improve Chest X-Ray Pathology Detection using limited Triplets'. The paper discusses about the training of Few-Shot Learning coupled with triplet images to boost the classification of Chest X-Ray Images. The traning method proposed in the paper can be used in rapid re-training oppurtunities for human-in-the-loop systems, where a radiologist can relabel false inferences and the model can be quickly retrained.

Architecture

A DenseNet 121 pre-trained model is used as the baseline algorithm. The validation inference of baseline algorithm is used to create dataset (using image triplets) to train Few-Shot Learning algorithm. The data creation and further treatment of data is provided in the following flow chart.

Architectural Flowchart

Creating data for trianing and validation does involve same steps. Only 150 image triplets are collected for training the algorithm, whereas all the false inference images are used for validation.

Algorithm Modelling

The pre-trained model was modified to create 128-dimensional vectors for each image in a triplet. The few-Shot Learning model is trained using Adam optimizer for 5 epochs. PPV(Positive Prediction Value) and NPV (Negative Prediction Value) are used as evaluation metrics. We experimented by creating another Few-Shot Learning model where all the pahologies are trained and validated at once, which is referred as Incremental Training.

$$PPV = TP/(TP+FP)$$ $$NPV = TN/(TN+FN)$$

Dependencies

The whole script has been written in Python using PyTorch Package. There are only a couple of dependencies that have not been uploaded into the GitHub repository because of the memory limit -

  1. Pre-trained Model (model_ones_3epoch_densenet.tar) - The pre-trained model which has been used as the baseline model. The evaluation inference of the pre-trained model has been used to create image triplets.
  2. Training file (train.csv) - The initial training data, which has been derived from CheXpert database.
  3. All the dependencies other than pre-trainmed model and training file are provided in this GitHub repository.

Results

Results from Fine-tuned Algorithm, Few-Shot Learning and Incremental FSL Algorithm
Baseline Algorithm FSL Algorithm Incremental FSL Algorithm
S.No Pathology PPV NPV PPV NPV PPV NPV
1 No Finding 89.99 10.35 94.06 44.38 94.53 47.91
2 Enlarged Cardiomediastinum 100.0 0.0 100.0 40.0 100.0 53.28
3 Cardiomegaly 88.63 11.30 93.88 47.87 93.93 51.32
4 Lung Opacity 71.83 28.51 86.14 61.23 85.53 63.56
5 Lung Lesion 99.91 0.0 99.97 44.14 99.98 48.16
6 Edema 80.49 20.01 89.33 50.49 89.80 54.14
7 Consolidation 99.98 0.0 100.0 42.79 100.0 46.97
8 Pneumonia 99.48 0.57 99.82 48.48 99.70 47.69
9 Atelectasis 94.48 5.74 97.31 47.29 97.11 50.04
10 Pneumothorax 99.92 0.0 99.94 42.46 99.90 48.64
11 Pleural Effusion 79.94 20.25 89.70 52.08 88.56 55.85
12 Pleural Other 100.0 0.0 100.0 49.47 100.0 46.31
13 Fracture 100.0 0.0 100.0 50.0 100.0 50.73
14 Support Devices 75.19 23.31 87.49 57.63 86.96 58.13

The results from Baseline Model, FSL Algorithm and Incremental FSL Algorithm were subjected to statistical tests to check the significance of the improvements. By performing Paired T-tests on the results, we observed that the improvement between Basline Model and FSL Model are statistically significant. Whereas, the results between FSL and Incremental FSL Model are significant in the case of NPV improvements but are not significant in case of PPV improvements.

Acknowledgements

  1. CheXpert Competition Details
  2. Pre-trained Model