Objective of this project is to create an image classification model that can predict Chest X-Ray scans that belong to one of the three classes: Normal, Viral Pneumonia, COVID-19 with a reasonably high accuracy using PyTorch.
Dataset used: COVID-19 Radiography Dataset
This dataset has more than 3500 Chest X-Ray scans which are categorized in four classes - Normal, Viral Pneumonia, COVID and Lung Opacity (not used here).
THis project uses the ResNet-18 model from PyTorch trained on the COVID-19 Radiography dataset. To take advantage of tranfer learning and use the pre-trained weights from training on the ImageNet dataset, the dataset needed to be normalized in the same way as the ImageNet dataset.
images, labels = next(iter(dl_train))
show_images(images, labels, labels)
images, labels = next(iter(dl_test))
show_images(images, labels, labels)
show_preds()
-
M.E.H. Chowdhury, T. Rahman, A. Khandakar, R. Mazhar, M.A. Kadir, Z.B. Mahbub, K.R. Islam, M.S. Khan, A. Iqbal, N. Al-Emadi, M.B.I. Reaz, M. T. Islam, “Can AI help in screening Viral and COVID-19 pneumonia?” IEEE Access, Vol. 8, 2020, pp. 132665 - 132676. Paper link
-
Rahman, T., Khandakar, A., Qiblawey, Y., Tahir, A., Kiranyaz, S., Kashem, S.B.A., Islam, M.T., Maadeed, S.A., Zughaier, S.M., Khan, M.S. and Chowdhury, M.E., 2020. Exploring the Effect of Image Enhancement Techniques on COVID-19 Detection using Chest X-ray Images. Paper link
-
Paszke A, Gross S, Massa F, Lerer A, Bradbury J, Chanan G, et al. PyTorch: An Imperative Style, High-Performance Deep Learning Library. In: Advances in Neural Information Processing Systems 32 [Internet]. Curran Associates, Inc.; 2019. p. 8024–35. Available from: Paper link
Contributions are welcomed. For major changes, kindly open an issue first to discuss the same before creating a pull request.
Please note that this dataset, and the model trained in the project, can not be used to diagnose COVID-19 or Viral Pneumonia. This data is only for educational purpose.
Leave a star in the GitHub repository if you found this project helpful!