A team of radiologists from New Orleans studied the usefulness of Chest Radiographs for diagnosing COVID-19 compared to the reverse-transcription polymerase chain reaction (RT-PCR) and found out they could aid rapid diagnosis, especially in areas with limited testing facilities [1].
Another study found out that the radiographs of different viral cases of pneumonia are comparative, and they overlap with other infectious and inflammatory lung diseases, making it hard for radiologists to recognize COVID‐19 from other viral pneumonia cases [2].
This project aims to make the former study a reality while dealing with the intricacies in the latter, with the help of Deep Learning.
Overview
The project uses the COVID-19 Radiography Database [3] as it's dataset.
It has a total of 21165 Chest X-Rays (CXRs) belonging to 4 different classes (COVID-19, Lung Opacity, Normal and Viral Pneumonia).
Three top scoring CNN architectures, VGG-16[4], ResNet-18[5] and DenseNet-121[6], trained on the ImageNet Dataset [7], were chosen for fine-tuning on the dataset.
The results obtained from the different architectures were then evaluted and compared.
Finally, with the help of Gradient weighted Class Activation Maps (Grad-CAM) [8] the affected areas in CXRs were localized.
Note: The dataset and the trained models can be found in here.
usage: GradCAM on Chest X-Rays [-h] [-i IMAGE_PATH]
[-l {covid_19,lung_opacity,normal,pneumonia}]
-m {vgg16,resnet18,densenet121}
[-o OUTPUT_PATH]
Overlays given label's CAM on a given Chest X-Ray.
optional arguments:
-h, --help show this help message and exit
-i IMAGE_PATH, --image-path IMAGE_PATH
Path to chest X-Ray image.
-l {covid_19,lung_opacity,normal,pneumonia}, --label {covid_19,lung_opacity,normal,pneumonia}
Choose from covid_19, lung_opacity, normal &
pneumonia, to get the corresponding CAM. If not
mentioned, the highest scoring label is considered.
-m {vgg16,resnet18,densenet121}, --model {vgg16,resnet18,densenet121}
Choose from vgg16, resnet18 or densenet121.
-o OUTPUT_PATH, --output-path OUTPUT_PATH
Format: "<path> + <file_name> + .jpg"
GradCAM generated for label "covid_19".
GradCAM masked image saved to "./assets/res_cam.jpg".
Conclusions
DenseNet-121 having only 7.98 Million parameters did relatively better than VGG-16 and ResNet-18, with 138 Million and 11.17 Million parameters respectively.
Increase in model's parameter count doesn’t necessarily achieve better results, but increase in residual connections might.
Oversampling helped in dealing with imbalanced data to a great extent.
Fine-tuning helped substantially by dealing with the comparatively small dataset and speeding up the training process.
GradCAM aided in localizing the areas in CXRs that decides a model's predictions.
The models did a good job distinguishing various infectious and inflammatory lung diseases, which is rather hard manually, as mentioned earlier.
请发表评论