An open API service indexing awesome lists of open source software.

https://github.com/realmir1/eyedisease-cnn-classifier

This deep learning model detects eye diseases using CNNs. Trained on an image dataset, it predicts conditions with high accuracy. Ideal for AI-driven medical diagnosis!
https://github.com/realmir1/eyedisease-cnn-classifier

cnn deep-learning eye-diseases healthcare healthcaretechnology image-processing machine-learning medicalai tensorflow

Last synced: 16 days ago
JSON representation

This deep learning model detects eye diseases using CNNs. Trained on an image dataset, it predicts conditions with high accuracy. Ideal for AI-driven medical diagnosis!

Awesome Lists containing this project

README

          

# โšก๏ธEye Dataset Classification with TensorFlow and Keras ๐Ÿš€

This project showcases the implementation of a Convolutional Neural Network (CNN) to classify eye images into predefined categories. The primary focus is to demonstrate the end-to-end workflow of image classification, starting from dataset preparation to training, evaluation, and visualization of results.

## Project Overview

Eye classification is an essential task in medical image analysis and computer vision. This project builds a deep learning model capable of identifying specific categories of eye images from a dataset. Using TensorFlow and Keras, the model leverages CNN layers to extract features, classify images, and deliver accurate predictions.

## Key Steps in the Project

### 1. Dataset Preparation ๐Ÿ“Š
The dataset is assumed to be organized into subfolders, each corresponding to a specific class. The project utilizes the following steps to prepare the dataset:
- **Image Resizing**: All images are resized to 200x200 pixels to ensure uniformity and compatibility with the model.
- **Data Normalization**: Pixel values are rescaled to the range [0, 1] for faster convergence during training.
- **Data Splitting**: The `ImageDataGenerator` class splits the dataset into training (90%) and validation (10%) subsets using its `validation_split` parameter.


### 2. Model Architecture ๐Ÿ›๏ธ
The CNN model is designed using the `Sequential` API, which allows layers to be stacked in order. The architecture consists of:
- **Convolutional Layers**: Extract spatial features from input images using 32, 64, and 128 filters.
- **MaxPooling Layers**: Reduce the dimensions of feature maps, minimizing computational cost and retaining critical information.
- **Dropout Layer**: Introduced after dense layers to reduce overfitting by randomly disabling neurons during training.
- **Dense Layers**: Fully connected layers are added for classification. The final layer uses the `softmax` activation function to output class probabilities for the 4 categories.




### 3. Model Compilation โœ…
The model is compiled with the following configurations:
- **Optimizer**: `Adam`, known for its efficient and adaptive learning rate.
- **Loss Function**: `categorical_crossentropy`, suitable for multi-class classification problems.
- **Metric**: `accuracy`, used to monitor the model's performance during training and validation.




### 4. Model Training ๐Ÿƒ๐Ÿฝ
The model is trained using the prepared training dataset for 10 epochs. During training:
- The model learns to recognize patterns in images using the convolutional layers.
- Validation data is used to monitor performance and prevent overfitting.




### 5. Evaluation and Visualization ๐Ÿ‘๏ธ
The model's performance is evaluated using several methods:
- **Accuracy and Loss Graphs**: Training and validation accuracy and loss are plotted to visualize the model's learning curve.
- **Predictions**: Sample predictions are generated using the test dataset, displaying the true labels alongside the predicted labels.




### 6. Examples for Project โšก๏ธ



Resim 1
Resim 2
Resim 3
Resim 3


### Where is Datasets ?
I use to kaggle datasets for my project. This program is has big data. Examples health, machine, computer science...


resim5


## Visualizations ๐Ÿ‘๏ธ
1. **Training Metrics**:
- Accuracy and loss plots provide insights into the model's learning behavior over epochs.
- Validation curves highlight the model's generalization ability to unseen data.
2. **Sample Predictions**:
- A set of 5 images from the test dataset is visualized, showing the true and predicted class labels. This provides a clear understanding of the model's practical performance.

## How to Use This Project ๐Ÿคจ


1. **Setup Dataset**:
Ensure the dataset is structured as follows:
```
Eye dataset/
โ”œโ”€โ”€ Class1/
โ”œโ”€โ”€ Class2/
โ”œโ”€โ”€ Class3/
โ””โ”€โ”€ Class4/
```
Replace `Class1`, `Class2`, etc., with actual class names.




3. **Install Dependencies**:
Install the required Python libraries:
```bash
pip install tensorflow matplotlib numpy
```

3. **Update the Dataset Path**:
Modify the `data_dir` variable in the code to point to your dataset's location.


4. **Run the Code**:
Execute the Python script to train the model, generate evaluation plots, and display predictions.


## Results and Insights
- The model achieves promising accuracy, demonstrating its ability to classify eye images into multiple categories.
- Visualization of training metrics and sample predictions helps understand the model's strengths and areas for potential improvement.




## Future Work ๐Ÿช
- Experiment with advanced data augmentation techniques to improve model generalization.
- Explore deeper architectures or pre-trained models (e.g., VGG16, ResNet) for enhanced accuracy.
- Evaluate the model on additional datasets or real-world data for broader applicability.

This project provides a foundational understanding of building CNN models for image classification tasks, enabling further exploration and improvements in medical imaging applications.




## Board of Library


| Technology | Where ? |
|--------------------|----------------------|
| TensorFlow | Deep Learning |
| Keras | Deep Learning |
| Matlpotlib | Graph Learning |
| ImageDataGenerator | Data Learning |


## Library ๐Ÿ“š๐Ÿ“’๐Ÿ“•๐Ÿ“™


Resim 1
Resim 2
Resim 3
resim4