https://github.com/itaynir1/malaria-detection-by-neuralearn-tensorflow
This project utilizes TensorFlow to create a malaria detection model based on a modified LeNet architecture. It preprocesses the dataset, trains the model, and achieves accurate malaria detection with visualization.
https://github.com/itaynir1/malaria-detection-by-neuralearn-tensorflow
deep-learning image-classification machine-learning malaria-detection tensorflow
Last synced: about 2 months ago
JSON representation
This project utilizes TensorFlow to create a malaria detection model based on a modified LeNet architecture. It preprocesses the dataset, trains the model, and achieves accurate malaria detection with visualization.
- Host: GitHub
- URL: https://github.com/itaynir1/malaria-detection-by-neuralearn-tensorflow
- Owner: itaynir1
- Created: 2023-07-21T12:02:58.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-21T12:06:49.000Z (almost 3 years ago)
- Last Synced: 2025-05-16T10:09:51.852Z (about 1 year ago)
- Topics: deep-learning, image-classification, machine-learning, malaria-detection, tensorflow
- Language: Jupyter Notebook
- Homepage: https://github.com/itaynir1/Malaria-Detection-by-Neuralearn-TensorFlow
- Size: 477 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Malaria Detection by Neuralearn.ai
This project aims to detect malaria using a deep learning model implemented in TensorFlow. The model is based on a modified LeNet architecture and is trained on a dataset of malaria images.
## Getting Started
To run this project, you need the following dependencies:
- TensorFlow
- NumPy
- Matplotlib
- TensorFlow Datasets
- Google Colab (for the Colaboratory environment)
## Project Structure
The main file for this project is "Malaria Detection by Neuralearn.ai.ipynb".
It contains the code for downloading the dataset, visualizing the data, preprocessing it, creating the model, training, evaluation, and testing.
## Dataset
The malaria dataset is fetched using TensorFlow Datasets. The dataset is split into training, validation, and testing sets with ratios of 80%, 10%, and 10%, respectively.
## Data Visualization
Before preprocessing, some images from the training dataset are visualized using Matplotlib to get a better understanding of the data.
## Data Preprocessing
The images are resized and rescaled to a fixed size of 224x224 pixels and normalized to values between 0 and 1.
## Model Creation
The model architecture is based on the LeNet architecture with some modifications. It consists of convolutional layers, batch normalization layers, max-pooling layers, and fully connected layers with a sigmoid activation function in the output layer for binary classification.
## Model Training
The model is trained using the Adam optimizer and Binary Crossentropy loss function for 20 epochs. The training and validation accuracy and loss are plotted for visualization.
## Model Evaluation and Testing
The trained model is evaluated on the testing dataset to measure its performance. The evaluation metrics include loss and accuracy. Additionally, some sample images from the test dataset are visualized along with their predicted classes.
## Loading and Saving the Model
The model is saved in two formats: SavedModel and HDF5 format. Additionally, the model's weights are saved separately in a `"weights"` folder.
## Google Drive Integration
The project uses Google Drive to mount the Colaboratory environment for easy access to files and models.
## How to Use the Code
1. Make sure you have all the required dependencies installed.
2. Open the "Malaria Detection by Neuralearn.ai.ipynb" notebook in a Jupyter environment or Google Colab.
3. Run the notebook cells sequentially to download the dataset, preprocess it, create and train the model, evaluate it, and visualize the results.
**Note:** If you encounter any issues with dependencies or dataset download, please refer to the original Colab file link provided at the beginning of the notebook.