Project Title - Image Classification using Convolutional Neural Networks: A Deep Learning Approach for Diagnosing Eye Diseases
The task is Eye Diseases Classification using a Convolutional Neural Network (CNN). The goal is to develop a model capable of classifying retinal images into different categories of eye diseases.
The dataset used for this classification task comprises Normal, Diabetic Retinopathy, Cataract, and Glaucoma retinal images, with approximately 1000 images per class. These images are sourced from various datasets, including IDRiD, Oculur recognition, HRF, etc.
The dataset is loaded using the ImageFolder dataset from PyTorch, with images resized to (256, 256) pixels.
- The CNN model is designed with three convolutional layers, each followed by batch normalization, leaky ReLU activation, and max-pooling, to capture hierarchical features.
- Dense layers include dropout for regularization and two fully connected layers.
- The model is trained using the Adam optimizer and cross-entropy loss.
- The training loop consists of iterating through batches of data, performing forward and backward passes, and optimizing the model's parameters.
- The model is trained for 7 epochs, and training/test losses are recorded for analysis.
- Model predictions on the test set are used to generate a confusion matrix, providing insights into classification performance.
- Additional metrics such as accuracy, precision, recall, and F1-score are calculated for comprehensive evaluation.
- The CNN consists of three convolutional layers, progressively reducing spatial dimensions.
- Max-pooling layers help retain important features, and dense layers perform the final classification.
- Convolutional Layers: Extract hierarchical features.
- Batch Normalization: Normalizes activations, aiding convergence.
- Leaky ReLU Activation: Introduces non-linearity.
- Max-pooling: Down-samples spatial dimensions.
- Flatten and Dropout: Reduces overfitting.
- Fully Connected Layers: Perform classification.
Displaying predictions on a few test set images provides a qualitative assessment of the model's performance.
Utilizing metrics like accuracy, precision, recall, and F1-score provides a quantitative measure of the model's effectiveness.