A Capsule Network-based framework for identification of COVID-19 cases from chest X-ray Images
Novel Coronavirus disease 2019 pneumonia (COVID-19), with its relatively high intensive care unit (ICU) admission and mortality rate, is rapidly spreading all over the world. Early diagnosis of this disease is of paramount importance as it enables physicians to isolate the patients and prevent the further transitions. The current gold standard in COVID-19 diagnosis requires specific equipment, is timeconsuming, and has relatively low sensitivity. Computed tomography (CT) scans and X-ray images, on the other hand, reveal specific manifestations associated with this disease. However, the overlap between different bacterial and viral cases, makes the humancentered diagnosis difficult and challenging.
The capsule network-based model (COVID-CAPS), proposed in this study, for diagnosis of COVID-19, is capable of handling small datasets, which is of significant importance as this disease has been only recently identified and large datasets are not available.
So far, our results has shown that COVID-CAPS has competitive advantageous over
previous CNN-based models, on a public dataset of chest X-ray images.
The detailed COVID-CAPS's structure and methodology is explained in detail at https://doi.org/10.1016/j.patrec.2020.09.010
We used the same dataset as the one used here. This dataset is generated from the following two publicly available chest X-ray datasets.
As the main goal of this study is to identify positive COVID-19 cases, we binarized the labels as either positive or negative. In other words the three labels of normal, bacterial, and non-COVID viral together form the negative class.
Our pre-training dataset consists of 94323 frontal view chest X-ray images for common thorax diseases. This dataset is extracted from the NIH Chest X-ray dataset available online for public access here. Chest X-ray14 dataset originally contains 112120 X-ray images for 14 thorax abnormalities. This dataset also contains normal cases without specific findings in their corresponding images.
To reduce the number of categories, we classified these 15 groups into 5 categories based on the underlying relations between the abnormalities in each disease. The first four groups are dedicated to No findings, Tumors, Pleural diseases, and Lung infections categories. The fifth group encompasses other images without specific relations with the first four groups.
We then removed 17797 cases with multiple labels (appeared in more than one category) to reduce the complexity and downscaled all images from (1024,1024) to (224,224).
The code for the Capsule Network implementation is adopted from here. Codes to prepare the X-ray14 dataset are adopted from here. Codes are available as the following list:
If you found this code and the related paper useful in your research, please consider citing:
@article{Afshar2020,
author = {Afshar, Parnian and Heidarian, Shahin and Naderkhani, Farnoosh and Oikonomou, Anastasia and Plataniotis, Konstantinos N. and Mohammadi, Arash},
doi = {10.1016/j.patrec.2020.09.010},
issn = {01678655},
journal = {Pattern Recognition Letters},
month = {oct},
pages = {638--643},
title = {{COVID-CAPS: A capsule network-based framework for identification of COVID-19 cases from X-ray images}},
url = {https://linkinghub.elsevier.com/retrieve/pii/S0167865520303512},
volume = {138},
year = {2020}
}