Skip to content

The main aim of the project is to scan the X-rays of human lungs and classify them into 3 given categories like healthy patients, patients with pre-existing conditions, and serious patients who need immediate attention using Convolutional Neural Network. The provided dataset of Grayscale Human Lungs X-ray is in the form of a numpy array and has …

Notifications You must be signed in to change notification settings

Tirth8038/Multiclass-Image-Classification-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Multiclass-Image-Classification-

The main aim of the project is to scan the X-rays of human lungs and classify them into 3 given categories like healthy patients, patients with pre-existing conditions, and serious patients who need immediate attention using Convolutional Neural Network. The provided dataset of Grayscale Human Lungs X-ray is in the form of a numpy array and has dimensions of (13260, 64, 64, 1). Similarly, the corresponding labels of X-ray images are of size (13260, 2) with classes (0) if the patient is healthy, (1) if patient has pre-existing conditions or (2) if patient has Effusion/Mass in the lungs. During data exploration, I found that the class labels are highly imbalanced. Thus, for handling such imbalanced class labels, I used Data augmentation techniques such as horizontal & vertical flips, rotation, altering brightness and height & width shift to increase the number of training images to prevent overfitting problem. After preprocessing the data, the dimension of the dataset is (31574, 64, 64, 1). For Model Selection, I built 4 architectures of CNN Model similar to the architecture of LeNet-5, VGGNet, AlexNet with various Conv2D layers followed by MaxPooling2D layers and fitted them with different epochs, batch size and different optimizer learning rate. Moreover, I also built a custom architecture with comparatively less complex structure than previous models. Further to avoid Overfitting, I also tried regularizing Kernel layer and Dense layer using Absolute Weight Regularizer(L1) and to restrict the bias in classification, I used Bias Regularizer in the Dense layer. In addition to this, I also tried applying Dropout with a 20% dropout rate during training and Early Stopping method for preventing overfitting and evaluated that Early Stopping gave better results than Dropout. For evaluation of models, I split the dataset into training,testing and validation split with (60,20,20) ratio and calculated Macro F1 Score , AUC Score on test data and using the Confusion Matrix, I calculated the accuracy by dividing the sum of diagonal elements by sum of all elements. In addition to this, I plotted training vs. validation loss and accuracy graphs to visualize the performance of models. Interestingly, the CNN model similar to VGGNet with 5 Conv2D and 3 MaxPooling layers and 2 Dense layers performed better than other architecture with Macro F1 score of 0.773 , AUC score of 0.911 and accuracy of 0.777.

About

The main aim of the project is to scan the X-rays of human lungs and classify them into 3 given categories like healthy patients, patients with pre-existing conditions, and serious patients who need immediate attention using Convolutional Neural Network. The provided dataset of Grayscale Human Lungs X-ray is in the form of a numpy array and has …

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published