Malaria, a severe and widespread parasitic disease in humans, exhibits clinical symptoms as parasites infiltrate and multiply within human red cells. Transmission occurs when infected mosquitoes bite humans, releasing parasites into the bloodstream where they infect and destroy red blood cells.
- Google Colab
Link: https://www.kaggle.com/datasets/iarunava/cell-images-for-detecting-malaria
This dataset comprises 27,560 PNG images of malaria-infected and uninfected cells, grouped into two classes with 13,780 images each.
- Parasitized
- Uninfected
𝐓𝐚𝐬𝐤: 𝐁𝐢𝐧𝐚𝐫𝐲 𝐂𝐥𝐚𝐬𝐬𝐢𝐟𝐢𝐜𝐚𝐭𝐢𝐨𝐧 𝐏𝐫𝐨𝐣𝐞𝐜𝐭 𝐏𝐡𝐚𝐬𝐞𝐬:
- Library Importation
- Data Subset Creation (Training, Testing, Validation)
- Data Processing (Prepare Training and Testing Data)
- Visualization of Training Images
- Architecture Development
- Model Compilation
- Training
- Evaluation
- Model Saving
- Prediction
- Testing
- Visualization of Test Images
Segregation into three subsets: training, testing, and validation using the split folder library. 𝐃𝐚𝐭𝐚 𝐏𝐫𝐨𝐜𝐞𝐬𝐬𝐢𝐧𝐠: Training: 22,069 images across 2 classes. Validation: 2,758 images across 2 classes. Testing: 2,760 images across 2 classes.
Parasitized: Parasitized Image
-
Utilization of VGG19 transfer learning technique to construct a malaria cell detection architecture.
-
Total params: 20,074,562
-
Trainable params: 50,178
-
Non-trainable params: 20,024,384
Implementation of a flatten layer to convert output into a 1D array.
Application of sigmoid activation function in the last FCNN layer due to the presence of only 2 classes.
Utilization of binary cross-entropy and Adam optimizer for model compilation. Model trained over 50 epochs with plots for training and validation accuracy, loss, and validation loss.
Train Accuracy & Loss: [0.2546966075897217, 0.9057048559188843]
Testing Accuracy & Loss: [0.21056684851646423, 0.9217391014099121]
Model saved using h5 format.
Selection of image from testing data for prediction.
Conversion of the image into an array and expansion of its dimension.
Prediction made using if-else conditions based on maximum argument.