Skip to content

Latest commit

 

History

History
38 lines (23 loc) · 2.07 KB

README.md

File metadata and controls

38 lines (23 loc) · 2.07 KB

COVID 19 Detection with Chest X-ray Images using CNN

This deep learning project uses Convolutional Neural Network (CNN) to detect COVID-19 from X-ray images of posteroanterior (PA) chest view.

Here are the sources of the images we use.

  1. Positive COVID-19 cases
  2. Negative COVID-19 cases but with Pneumonia
  3. Normal cases from ishantk
  4. Normal cases from Kaggle

Image Classification Model Creation & Preprocessing

For image preprocessing, we use image_dataset_from_directory provided by keras.utils to convert images into datasets.

We also carry out data augmentation. It generates additional training data from existing examples by augmenting them using random transformations that yield believable-looking images. This helps expose the model to more aspects of the data and generalize better. The data augmentation types that we use are RandomFlip, RandomRotation, RandomZoom, and Rescaling.

Model Training

Besides the two CNN layers and fully-connected layer, we also use the dropout layer which randomly sets input units to 0 with a frequency of rate at each step during training time, which helps prevent overfitting.

After training, we visualise the accuracy and loss of both training and validation sets.

Model Prediction

Here, we achieve 90% accuracy in detecting positive cases, 92% accuracy in detecting negative cases but with Pneumonia, and 93% accuracy in detecting normal cases.

Extra: Alternative Method for Image Input into the CNN

Here, we use cv2 library instead of image preprocessing library.

We obtain 91% accuracy in detecting negative cases but with Pneumonia.