Skip to content

Sinem5/EyeDiseasesClassification

Repository files navigation

EyeDiseasesClassification

This project establishes a comprehensive training pipeline designed to evaluate and compare state-of-the-art image classification models using PyTorch. The primary objective is to automate the training, validation, and evaluation processes for multiple deep learning architectures on a custom dataset. Specifically, this project focuses on classifying eye diseases by utilizing various deep learning architectures, including ResNet, Vision Transformer (ViT), VGG, and DenseNet. The models were trained and evaluated on a dataset obtained from Kaggle.

📂 Dataset Source

The dataset used in this project can be found on Kaggle. It includes labeled images of different eye conditions suitable for image classification tasks.

🔍 Sample Data

Below is a preview of some example images from the dataset used in training:

Example images

🔧 Requirements for Classification_Models

  • Python
  • PyTorch
  • torchvision
  • OpenCV
  • pandas, numpy
  • matplotlib, seaborn
  • tqdm
  • scikit-learn

📂 Project Overview

The training script provided in this project allows training and evaluation of multiple pre-trained models from the torchvision model zoo including:

  • ResNet: resnet18, resnet34, resnet50
  • VGG: vgg11, vgg13, vgg16, vgg19
  • DenseNet: densenet121, densenet169
  • Vision Transformers (ViT): vit_b_16, vit_b_32, vit_l_16, vit_l_32

These models are fine-tuned on the user-provided dataset with training and validation splits.

📁 Output Directory Structure

modelPerformance/
├── resnet18/
│   ├── best_model_XXacc_25epochs.h5
│   ├── confusion_matrix.png
│   └── metrics.txt
├── vgg16/
...

🚀 Getting Started

  1. Prepare your dataset in the structure:
data/
├── train/
│   ├── class_1/
│   └── class_2/
└── val/
    ├── class_1/
    └── class_2/
  1. Load data using torchvision ImageFolder and DataLoader
  2. Call Classification_Models(data_loaders)

✅ Notes

  • You can selectively enable models based on your GPU memory.
  • Pretrained weights ensure better convergence on small datasets.
  • The script is modular and easy to extend for additional models or evaluation criteria.

📊 Experiment Settings

Epochs 10
Batch Size 4

Models Name Time Best ACC
Resnet 18 3m 48s 0.9385
Vit_b_16 35m 10s 0.9243
VGG_11 13m 4s 0.9349
Densenet 121 8m 52s 0.9290

Resnet18 Vit_b_16 VGG_11 Densenet 121

🧪 Long-Term Training Results

Epochs 50
Batch Size 4

Models Name Time Best ACC
Resnet 18 20m 19s 0.9254
Densenet 121 49m 13s 0.9349

Resnet 18 Densenet 121

I’m always excited to hear your thoughts and ideas! 💡✨ Please don’t hesitate to reach out with any feedback or suggestions that could help make this project even better. Your input means a lot to me! 😊

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors