This project implements a convolutional neural network (CNN) model to classify retinal images into four categories. The model utilizes transfer learning with the pre-trained MobileNetV3Large architecture, fine-tuned on the retinal image dataset. The objective is to achieve high accuracy and F1 score on both training and validation datasets.
image_dataset_from_directory
method.python
CopyEdit
train_data = image_dataset_from_directory(
r"..\\data\\retina\\train",
labels="inferred",
label_mode="categorical",
color_mode="rgb",
batch_size=32,
image_size=(224, 224),
shuffle=True
)
valid_data = image_dataset_from_directory(
r"..\\data\\retina\\val",
labels="inferred",
label_mode="categorical",
color_mode="rgb",
batch_size=32,
image_size=(224, 224),
shuffle=True
)