This document describes a project to detect pneumonia from chest x-ray images using a convolutional neural network (CNN) model. It discusses collecting x-ray images from Kaggle, preprocessing the images by converting them to grayscale and performing data augmentation, and training a Keras sequential CNN model on the images. The model achieved 92% accuracy at detecting pneumonia in the test images. Additional data and hyperparameters may improve the model's performance further.
This document describes a project to detect pneumonia from chest x-ray images using a convolutional neural network (CNN) model. It discusses collecting x-ray images from Kaggle, preprocessing the images by converting them to grayscale and performing data augmentation, and training a Keras sequential CNN model on the images. The model achieved 92% accuracy at detecting pneumonia in the test images. Additional data and hyperparameters may improve the model's performance further.
This document describes a project to detect pneumonia from chest x-ray images using a convolutional neural network (CNN) model. It discusses collecting x-ray images from Kaggle, preprocessing the images by converting them to grayscale and performing data augmentation, and training a Keras sequential CNN model on the images. The model achieved 92% accuracy at detecting pneumonia in the test images. Additional data and hyperparameters may improve the model's performance further.
Pneumonia is a viral infection which take thousands
of life in world on yearly basis. It cause extreme cough with phlegm or puss in it. In the figure, you can see a difference between normal air sacs and inflamed sacs filled with fluid. The only way to check if a person is suffering from pneumonia is by examining an X-ray of the chest by some professional radiotherapist. WHY PERVASIVE COMPUTING MAY PROVIDE A SOLUTION? • Pervasive computing provides a quick way without the need for any doctor to examine a patient's chest X-ray. • A person can do his own examination using the ML model at home. • No need to wait for just an examination in a long queue. X-RAY IMAGE DATA COLLECTION FROM KAGGLE. • X-rays images are collected from www.kaggle.com • Normal X-ray Pneumonia X-ray
• The total number of images used is 5863.
WHAT MODEL WE WILL BE USING FOR OUR PROJECT? • We will be using Keras model for our project. • We will be using sequential keras model for the project. OPERATIONS ON IMAGES FOR BETTER PROCESSING • The first thing we did is that we plot the data and saw the difference in data set in terms of normal and pneumonia X-rays. IMAGE OPERATIONS • To reduce this Imbalance, we have to apply some image operations. • The first operation we did on images is that we convert them into greyscale[0,1] form so that the illuminations can be reduced. • Moreover, [0,1] form works best for CNN models. DATA AGUMENTATION • To expand the data and to form variations in given dataset of image we have used data augmentation. • Data augmentation involves randomly zooming, randomly rotate image to a certain angle. • Augmentation also involes normalization of inputs. • Augmentation also involves height shift, width shift ,vertical and horizontal flips. DATA AUGMENTATION For data augmentation, I have choosed the following operations • Randomly rotating some training images by 30 degree • Randomly Zoom by 20% some training images. • Randomly shift images horizontally by 10% of the width. • Randomly shift images vertically by 10% of the height. • Randomly flip images horizontally. Once our model is ready, we fit the training dataset. TRAIN A MODEL • We trained our keras sequential model for the given image datasets. MODEL FITTING I have used 12 Epoch to give our model 12 tries to learn the patterns in the data set. RESULTS OF MODEL As you can see model is giving 92 percent accurcy which very good. VISUALIZATION ANALYSIS AFTER MODEL FITING HEAT MAP CONFUSION MATRIX PROJECT APPLICATION ON USING GRADIO APP • Keras sequential model worked well and gave accuracy about 92 percent. • Additional images and different varieties can make this model more accurate. CONCLUDING • Using some other layers and better augmentation REMARKS can increase the accuracy as well. • I have used Epochs 12 due to limitation of my PC ,using mor Epochs can also give the model more tries to learn the pattern and give much more accurate resuts. • Ali Sharif Razavian, Hossein Azizpour, Josephine Sullivan and Stefan Carlsson, "CNN features off-the-shelf: an astounding baseline for recognition", Proceedings of the IEEE conference on computer vision and pattern recognition workshops, pp. 806813, 2014.
• Paras Lakhani and Baskaran Sundaram, "Deep learning at chest
radiography: automated classification of pulmonary tuberculosis by using convolutional neural networks", Radiology, vol. 284, no. 2, 2017. REFRENCES • Mohammad Click to add text Tariqul Islam, Md Abdul Aowal, Ahmed Tahseen Minhaz and Khalid Ashraf, "Abnormality detection and localization in chest x-rays using deep convolutional neural networks", 2017.
• Benjamin Antin, Joshua Kravitz and Emil Martayan, Detecting
Pneumonia in Chest X-Rays with Supervised Learning, 2017.