Adil Khan 11 months ago
AdiKhanOfficial #FYP Ideas

PATHOLOGY DETECTION BY IMAGE PROCESSING OF X-RAY IMAGES

An approach to solve the modern problem with deep learning tools. The radiologist often diagnoses lungs diseases by looking at the chest radiographs. Recently with the outbreak of COVID-19, a lot of people got infected. In such conditions, a fast diagnostic tool was required. Due to less n

Project Title

PATHOLOGY DETECTION BY IMAGE PROCESSING OF X-RAY IMAGES

Project Area of Specialization

Biomedical Engineering

Project Summary

An approach to solve the modern problem with deep learning tools. The radiologist often diagnoses lungs diseases by looking at the chest radiographs. Recently with the outbreak of COVID-19, a lot of people got infected. In such conditions, a fast diagnostic tool was required. Due to less number of PCR kits, there was a problem with diagnosis. A deep learning model is used here which provides fast diagnosis on the basis of chest radiographs and precisely distinguishes pneumonia from COVID and lung opacity from normal patients within a few minutes. a user-friendly interface is also developed for users testing. 

Project Objectives

  • A model which can distinguish chest radiograph pathologies precisely and accurately when an X-ray image is given as input.
  • Confusion matrix showing suitable accuracy of the model.
  • Research on features of different classes and the reasons for the models false predictions.
  • User-friendly Interface of our model to detect chest pathologies.

Project Implementation Method

Data Acquisition: Data is acquired from publicly available source kaggle for the study. Data contained 3616 images of COVID-19, 6012 images of lung opacity,10192 images of normal, and 1345 images of viral pneumonia infected X-rays. A team of researchers from Qatar University, Doha, and the University of Dhaka, Bangladesh along with collaborators from Pakistan and Malaysia contributed to the data collection.

Pre-processing: Data is fed into MATLAB using Image Data Store. All subfolders are included and each folder is assigned a name as the label to images in that folder. All samples are counted using:  All_samples=countEachLabel(imds).

Class imbalance is removed in data to avoid biases of the algorithm toward the majority class.1000 images for each sample are selected.

Applying a Pre-Trained Network: The transfer learning approach is applied using ResNet 50. ResNet-50 is a convolutional neural network that is 50 layers deep. Pre-trained ResNet 50 which is trained on more than a million images to classify 1000 images is loaded into MATLAB. The layer graph of ResNet 50 is analyzed using the MATLAB deep learning designer app. Used to analyze networks that gave us names and numbers of layers.

Network analysis of ResNet 50: The size of the input layer is checked which is 224 x 224 pixels. The last three output layers of the network are configured for 1000 classes. Using the Deep Analyser app of MATLAB, these three layers are replaced with a fully connected layer, a softmax layer, and a classification output layer. Options of the new fully connected layer are specified according to our data i.e. 4 classes (COVID-19, Pneumonia, lung opacity, and normal). The neural network is ready to be trained on X-Ray images.

Training options: The data is divided into 80% train and 20% test. The training data is used to train our model. We set training options before feeding the model i.e. adaptive moment estimation (adam) to minimize loss by updating biases and weights. We set the maximum Epoch to 5 Minibatches size to 20 and the initial learning rate to 0.0001. Small mini-batches are beneficial when GPU/CPU power is low. A small learning rate is also important for transfer learning.

Training: The training of the model for 3200 (800 from each class) images in 5 Epochs and 800 iterations. It took about 173 min to train the model.

Testing: Confusion matrix for 800 images (200 from each class) when tested with model trained on 3200 images (800 each class) with overall accuracy 91.8%

Benefits of the Project

  • Could be installed with X-Ray machine software to generate diagnosis reports immediately.
  • Research application in the analysis of common features of COVID pneumonia with other Viral Pneumonia
  • Research application in the Computer-Aided diagnosis
  • Reliable, in-expensive method for rapid diagnosis of chest pathologies
  • Fast and accurate results as compared to PCR and other methods.
  • Rapid differentiation of chest pathologies including pneumonia and COVID-19.
  • Immediate detection at airports and hospitals.
  • Overcome shortage of PCR reagents and specified laboratories in case of COVID-19.
  • Overcome the shortage of radiologists.

Technical Details of Final Deliverable

ResNet-50 a residual neural network that is 50 layers deep, is utilized and transfer learning is used. Pre-trained ResNet 50 which is trained on more than a million images to classify 1000 images. 

The size of the input layer is checked which is 224 x 224 pixels.

The last three output layers of the network are configured for 1000 classes

Using the Deep Analyser app of MATLAB, these three layers are replaced with a fully connected layer, a softmax layer, and a classification output layer. Options of the new fully connected layer are specified according to our data i.e. 4 classes (COVID-19, Pneumonia, lung opacity, and normal).

80% training and 20% testing split was done and adaptive moment estimation (adam) to minimize loss by updating biases and weights. The maximum Epoch to 5 Minibatches size to 20 and the initial learning rate to 0.0001.

Final Deliverable of the Project

Software System

Core Industry

Medical

Other Industries

Health

Core Technology

Artificial Intelligence(AI)

Other Technologies

Sustainable Development Goals

Good Health and Well-Being for People

Required Resources

Item Name Type No. of Units Per Unit Cost (in Rs) Total (in Rs)
Total in (Rs) 0
If you need this project, please contact me on contact@adikhanofficial.com
Smart E Diary

We are proposing an automated smart e-book system for the lawyers; the proposed system wil...

1675638330.png
Adil Khan
11 months ago
Smart Agriculture System

Approximately 95 % of Pakistan?s water is used for agriculture, with 60 % of its populatio...

1675638330.png
Adil Khan
11 months ago
IOT Based Home Automation

This project proposed the design of IOT based Home automation system using raspberry...

1675638330.png
Adil Khan
11 months ago
voice controlled prosthetic hand

The robotic arms are prototypes look similar to human arms and controlled by computer prog...

1675638330.png
Adil Khan
11 months ago
Comparison between Observed and Predicted MUF over Pakistan

The Maximum Usable Frequency (MUF) refers to the highest possible frequency value in the H...

1675638330.png
Adil Khan
11 months ago