Skip to content

Commit

Permalink
Merge pull request #982 from IkkiOcean/malaria
Browse files Browse the repository at this point in the history
Added Malaria Cell Classification Using CNN and Transfer Learning
  • Loading branch information
UTSAVS26 authored Nov 5, 2024
2 parents d981f68 + ce69fee commit 0fffe58
Show file tree
Hide file tree
Showing 7 changed files with 84 additions and 0 deletions.
28 changes: 28 additions & 0 deletions Deep_Learning/Malaria-Classification/dataset/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Malaria Cell Images Dataset

This dataset contains cell images for detecting malaria in human blood samples. It can be used for building and testing machine learning and deep learning models that classify cell images as either infected or uninfected with malaria parasites.

**Dataset Link:** [Kaggle - Malaria Cell Images Dataset](https://www.kaggle.com/datasets/iarunava/cell-images-for-detecting-malaria)

## Dataset Structure

The dataset is organized into two folders, each containing labeled images for malaria-infected and uninfected cells:

- **Infected:** Contains 13,800 images of cells infected with malaria.
- **Uninfected:** Contains 13,758 images of cells that are uninfected.

**Total Images:** 27,558

## Folder Structure
```
malaria_cell_images/
├── Infected/
│ ├── C1_thinF_IMG_20150604_104722a_cell_180.png
│ ├── C1_thinF_IMG_20150604_104722a_cell_181.png
│ └── ...
└── Uninfected/
├── C2_thinF_IMG_20150604_104722b_cell_99.png
├── C2_thinF_IMG_20150604_104722b_cell_100.png
└── ...
```

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Large diffs are not rendered by default.

48 changes: 48 additions & 0 deletions Deep_Learning/Malaria-Classification/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Malaria Cell Classification

This project involves classifying malaria-infected and uninfected cells using different machine learning and deep learning approaches. The primary goal is to automate the identification of parasitized and uninfected cells using microscopic images.

## Overview

Malaria is a critical disease caused by parasites, and detecting it in cells is a time-consuming process for healthcare workers. This project aims to automate the process by using machine learning and deep learning models to classify cells as parasitized or uninfected from microscope images.

## Dataset

- [Dataset](https://www.kaggle.com/datasets/iarunava/cell-images-for-detecting-malaria)
## Models

### MLP
- **Performance**:
- Accuracy on training data: ~65%
- Accuracy on test data: ~65%

While the model performs consistently on both train and test sets, the accuracy is too low to depend on for classification.

### CNN
- **Performance**:
- Accuracy on training data: 96%
- Accuracy on test data: 94%

The CNN model performs well with high accuracy on both training and test datasets.

### CNN with Regularization
- **Performance**:
- Accuracy on training data: 96%
- Accuracy on test data: 94%

Adding regularization to the CNN model had no significant effect on the performance, resulting in similar accuracy to the base CNN model.

### Hyperparameter Tuning
- **Performance**:
- Improved model performance, but hyperparameter tuning was time-consuming due to the large number of permutations tried. It was challenging to achieve faster training times with exhaustive tuning.

### Transfer Learning (VGG19)
- **Performance**:
- Using transfer learning with the VGG19 architecture was applied for 1 epoch due to high computational cost.
- The model shows promise, but training for more epochs is needed for better performance.

## Signature

Vivek Prakash

[Linkedin](https://www.linkedin.com/in/vivek-prakash-b46830283/)
5 changes: 5 additions & 0 deletions Deep_Learning/Malaria-Classification/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
numpy==1.25.3
pandas==2.0.3
matplotlib==3.8.1
tensorflow==2.15.0
scikit-learn==1.3.2
2 changes: 2 additions & 0 deletions Project-Structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,8 @@
* Model
* [Ann Handwritten Digit Classification](Deep_Learning/MNIST%20Digit%20Classification%20using%20Neural%20Networks/model/ANN_Handwritten_Digit_Classification.ipynb)
* [Cnn Handwritten Digit Recogniser](Deep_Learning/MNIST%20Digit%20Classification%20using%20Neural%20Networks/model/CNN_handwritten_digit_recogniser.ipynb)
* Malaria-Classification
* [Malaria-Classification](Deep_Learning/Malaria-Classification/model/malaria-classification.ipynb)
* Medical Diagnoser
* [Medical](Deep_Learning/Medical_diagnoser/medical.ipynb)
* Nn From Scratch
Expand Down

0 comments on commit 0fffe58

Please sign in to comment.