Academy & Industry Research Collaboration Center (AIRCC)

Volume 12, Number 20, November 2022

Classification of Viral, Bacterial, And Covid-19 Pneumonia
using Deep Learning Framework from Chest X-Ray Images


Muhammad E. H. Chowdhury, Tawsifur Rahman, Amith Khandakar and Sakib Mahmud, Qatar University, Qatar


The novel coronavirus disease (COVID-19) is a highly contagious infectious disease. Even though there is a large pool of articles that showed the potential of using chest X-ray images in COVID-19 detection, a detailed study using a wide range of pre-trained convolutional neural network (CNN) encoders-based deep learning framework in screening viral, bacterial, and COVID-19 pneumonia are still missing. Deep learning network training is challenging without a properly annotated huge database. Transfer learning is a crucial technique for transferring knowledge from real-world object classification tasks to domain-specific tasks, and it may offer a viable answer. Although COVID-19 infection on the lungs and bacterial and viral pneumonia shares many similarities, they are treated differently. Therefore, it is crucial to appropriately diagnose them. The authors have compiled a large X-ray dataset (QU-MLG-COV) consisting of 16,712 CXR images with 8851 normal, 3616 COVID-19, 1485 viral, and 2740 bacterial pneumonia CXR images. We employed image pre-processing methods and 21 deep pre-trained CNN encoders to extract features, which were then dimensionality reduced using principal component analysis (PCA) and classified into 4-classes. We trained and evaluated every cutting-edge pre-trained network to extract features to improve performance. CheXNet surpasses other networks for identifying COVID-19, Bacterial, Viral, and Normal, with an accuracy of 98.89 percent, 97.87 percent, 97.55 percent, and 99.09 percent, respectively. The deep layer network found significant overlaps between viral and bacterial images. The paper validates the network learning from the relevant area of the images by Score-CAM visualization. The performance of the various pre-trained networks is also thoroughly examined in the paper in terms of both inference time and well-known performance criteria.


Novel Coronavirus disease, COVID-19, viral pneumonia, bacterial pneumonia, deep learning, Convolutional neural network, Principal component analysis.