Code Monkey home page Code Monkey logo

covit's Introduction

Application of Artificial Neural Networks in COVID-19 and pneumonia cases diagnosis via CXR images: A comprehensive analysis of Convolutional Neural Network and Vision Transformers

Abstract. At the end of 2019, humankind was faced with an epidemic—severe acute respiratory syndrome coronavirus 2 (SARS CoV-2) related pneumonia, referred to as coronavirus disease 2019 (COVID-19) that people did not expect to encounter in the current era of technology. Nowadays, the COVID-19 situation becomes more and more severe, as well as sophisticated. And our country, Vietnam is being severely affected by this pandemic. That is why we have to take our actions immediately in order to cope with this pandemic. And the very first step in extinguishing this pandemic is that we have to rapidly and precisely identify COVID-19 cases. One significant improvement of the industrial revolution 4.0 is the application of information technology to medical diagnosis as an automatic method. The advances in artificial intelligence (AI) have enabled the implementation of sophisticated applications that can meet clinical accuracy requirements. Thus, various works propose an AI-based solution via X-ray image diagnosis as a quick testing method, which has high productivity in a short time. They majorly employ the Convolutional neural networks as their base feature extractor module. Especially different from their works, our study proposes the Vision-Transformer-based method as the novel approach. In the experiment, our work covers the comprehensive analysis of both feature extraction approaches and the implementation of an AI diagnosis system for COVID-19 and Viral Pneumonia cases by the state-of-the-art Pyramid Vision Transformer. Along with the strong data augmentation based on the clinical consideration, our best PVTv2-b2-li model achieves 92.99%, 92.38% sensitivity and 97.55%, 89.81% positive predictive value respectively to the COVID-19 and pneumonia cases on COVIDx8A dataset in the COVID-Net. Our proposed solution can detect COVID-19 in a Chest X-Ray image, that may be a technical proof of the potential of the Transformers-based approach for the vision tasks. The heatmap and confidence score of the detection is also demonstrated, such that the doctors or common users can use them for a final diagnosis in practical usages.

Keywords: COVID-19, pneumonia, Deep Learning, Vision Transformer, Chest X-ray (CXR), medical diagnosis.

A. Paper and Seminar meterial

⭐ For detail of report, watch this paper.

⭐ For slide of the seminar, watch here.

B. Technial tool

Annotations for modules of the tecnical tool.

  • config: includes necessary libraries.
  • config: a configuration file used for both training and inference phase.
  • data: Data folder, includes image and annotation files for training, validation and test, including: all_images (storing all images) folder and train/ val/ test.txt (annotation files).
  • dataloader_n_aug: code for dataloader and 3 types of data augmentation.
  • logger: logger of the training phase.
  • metrics: specific module for calculating evaluation metric.
  • model: models, downloaded pretrained checkpoints and modelloader.
  • predict_n_visualizer: code for inference phase and visualizer.
  • pytorch_grad_cam: heatmap visualizer by GradCAM, code of this module taken from here.
  • trainer: code for training phase with the ability to track evaluation metrics during this progress.
  • utils: utility functions.
  • TEST notebook: Notebook for inference and heatmap visualizer.
  • TRAIN notebook: Notebook for training.
  • alternative_dataloader: alternative method for dataloader. Replace files which have the same name with files in this folder in these folders above.

C. Results

The Exp.5 model

Click here to download this model checkpoint.

Belows are the experimental results of the PVTv2-b2-li in the Exp.5, trained and tested on the COVIDx8A.

Experimental results on the test set including 214 COVID-19 test cases.

Sensitivity (%)
Pneumonia Normal COVID-19
92.38 93.0 92.99
PPV (%)
Pneumonia Normal COVID-19
89.81 86.91 97.55
Overall Acc. (%) Macro Avg. F1 (%)
92.84 92.05

Heatmap Genearation

photo not available
Heatmap generation and prediction confidence of 8 stochasitc samples from test set.

covit's People

Contributors

hoangtv2000 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.