• P-ISSN 0974-6846 E-ISSN 0974-5645

Indian Journal of Science and Technology


Indian Journal of Science and Technology

Year: 2023, Volume: 16, Issue: 6, Pages: 427-434

Original Article

Intermediate Learning-Based Attention Regulated Densenet for Diagnosis of Covid-19

Received Date:09 May 2022, Accepted Date:11 January 2023, Published Date:15 February 2023


Objectives: The AI-based Computer-Aided-Diagnosis of Chest X-Rays related to COVID-19 is very essential. Here we present an Attention regulated Pre-trained DenseNet-121with intermediate transfer learning as a Chest X-Ray image classifier to classify images according to three labels: COVID-19, pneumonia, and normal. Methods: We are proposing a new Attention regulated ImageNet pre-trained DenseNet-121 neural network architecture, which is retrained on NIH ChestX-ray14 data as an intermediate database before the actual COVID- 19 database. We also fine-tuned the last layer of this neural network with a suggested novelty called the output neuron-keeping technique. Before feeding the Covid-19 data we removed all other neurons corresponding to Chest X-ray14 pathology classes except the “No finding” and “Pneumonia” classes. A new third neuron with random weights and bias is created in the final layer to detect Covid-19 pathology. A DenseNet-121 is supported by a GRAD-CAM-based attention mechanism in achieving detection accuracy and localization of pathologies. The used Covid-19 dataset is a combination of 370 Pneumonia, 1255 Normal, and 439 COVID-19 Chest X-Ray images. We randomly took 50 pictures from each class for testing purposes, the remaining images are augmented more to improve DenseNet performance on a small COVID- 19 dataset. Findings: Our state-of-art model achieved 98.6% test accuracy since it misclassified one out of 50 Covid-19 images, and one out of 50 Pneumonia images, but all 50 normal Chest X-Ray images are classified with 100% accuracy. We compared our model with the other three state-of-theart models, particularly under three-class classification problems (Pneumonia,Covid-19, and Normal). The experimental result shows that the proposed model outperforms the existing three models by obtaining an accuracy of 98.6%. The GRAD-CAM generated heatmaps improved the interpretation of the infections. Novelty: The intermediate transfer learning, neuron keeping, and attention-regulated DenseNet are the highlight of the proposed work in achieving detection accuracy. The GRAD-CAM generated heatmaps indicate future research on COVID-19 diagnosis to analyze the severity of the infection. We believe this model may bridge the medical community and Artificial Intelligence gap.

Keywords: Chest XRay14; Covid19 diagnosis; DenseNet121; GradCam; Neuron keeping


  1. Xie M, Chen Q. Insight into 2019 novel coronavirus — An updated interim review and lessons from SARS-CoV and MERS-CoV. International Journal of Infectious Diseases. 2020;94:119–124. Available from: https://doi.org/10.1016/j.ijid.2020.03.071
  2. Dong D, Tang Z, Wang S, Hui H, Gong L, Lu Y, et al. The Role of Imaging in the Detection and Management of COVID-19: A Review. IEEE Reviews in Biomedical Engineering. 2021;14:16–29. Available from: https://doi.org/10.1109/RBME.2020.2990959
  3. Castiglioni I, Ippolito D, Interlenghi M, Monti CB, Salvatore C, Schiaffino S, et al. Artificial intelligence applied on chest X-ray can aid in the diagnosis of COVID-19 infection: A first experience from Lombardy, Italy. MedRxiv. 2020. Available from: https://doi.org/10.1101/2020.04.08.20040907
  4. Tabrizchi H, Mosavi A, Vamossy Z, Varkonyi-Koczy AR. Densely Connected Convolutional Networks (DenseNet) for Diagnosing Coronavirus Disease (COVID-19) from Chest X-ray Imaging. IEEE International Symposium on Medical Measurements and Applications (MeMeA). 2021;p. 1–5. Available from: https://doi.org/10.1109/MeMeA52024.2021.9478715
  5. Shetty R, Sarappadi P. Self-Sequential Attention Layer based DenseNet for Thoracic Diseases Detection. International Journal of Intelligent Engineering and Systems. 2021;14(4):157–165. Available from: https://doi.org/10.22266/ijies2021.0831.15
  6. Liu H, Wang L, Nan Y, Jin F, Wang Q, Pu J. SDFN: Segmentation-based deep fusion network for thoracic disease classification in chest X-ray images. Computerized Medical Imaging and Graphics. 2019;75:66–73. Available from: https://doi.org/10.1016/j.compmedimag.2019.05.005
  7. Wang H, Jia H, Lu L, Xia Y. Thorax-Net: An Attention Regularized Deep Neural Network for Classification of Thoracic Diseases on Chest Radiography. IEEE Journal of Biomedical and Health Informatics. 2020;24(2):475–485. Available from: https://doi.org/10.1109/JBHI.2019.2928369
  8. Shetty R, Sarapadi PN. Adaptive Data Augmentation Training Based Attention Regularized Densenet For Diagnosis Of Thoracic Diseases. Indian Journal of Computer Science and Engineering. 2021;12(4):1055–1064. Available from: http://www.ijcse.com/docs/INDJCSE21-12-04-207.pdf
  9. Yang J, Zhang L, Tang X. CrodenseNet: An efficient parallel cross DenseNet for COVID-19 infection detection. Biomedical Signal Processing and Control. 2022;77:103775. Available from: https://doi.org/10.1016/j.bspc.2022.103775
  10. Li X, Li C, Zhu D. COVID-MobileXpert: On-Device COVID-19 Patient Triage and Follow-up using Chest X-rays. 2020 IEEE International Conference on Bioinformatics and Biomedicine (BIBM). 2020;p. 1063–1067. Available from: https://doi.org/10.1109/BIBM49941.2020.9313217
  11. Sethy PK, Behera SK, Ratha PK, Biswas PP. Detection of coronavirus Disease (COVID-19) based on Deep Features and Support Vector Machine. International Journal of Mathematical, Engineering and Management Sciences. 2021;5(4):643–651. Available from: https://doi.org/10.33889/IJMEMS.2020.5.4.052
  12. Sarker L, Islam MM, Hannan T, Ahmed Z. COVID-DenseNet: A Deep Learning Architecture to Detect COVID-19 from Chest Radiology Images. A Deep Learning Architecture to Detect COVID-19 from Chest Radiology Images. Preprints . 2020. Available from: https://doi.org/10.20944/preprints202005.0151.v1
  13. Cohen J, Morison P, Dao P, L. COVID-19 image data collection. 2020. Available from: https://doi.org/10.48550/arXiv.2003.11597
  14. Irvin J, Rajpurkar P, Ko M, Yu Y, Ciurea-Ilcus S, Chute C, et al. CheXpert: A Large Chest Radiograph Dataset with Uncertainty Labels and Expert Comparison. Proceedings of the AAAI Conference on Artificial Intelligence. 2019;33(01):590–597. Available from: https://doi.org/10.1609/aaai.v33i01.3301590
  15. Jaeger S, Candemir S, Antani S, W´ang YX, Lu PX, Thoma G. Two public chest x-ray datasets for computer-aided screening of pulmonary diseases. 2014. Available from: https://doi.org/10.3978/j.issn.2223-4292.2014.11.20
  16. Apostolopoulos ID, Mpesiana TA. Covid-19: automatic detection from X-ray images utilizing transfer learning with convolutional neural networks. Physical and Engineering Sciences in Medicine. 2020;43(2):635–640. Available from: https:// doi.org/10.1007/s13246-020-00865-4


© 2023 Shetty et al. This is an open-access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited. Published By Indian Society for Education and Environment (iSee)


Subscribe now for latest articles and news.