This end to end project showcases the potential of using pre-trained models such as ResNet50 for image classification tasks, especially in the medical field, where the correct diagnosis can make a significant impact on patient outcomes. The dataset used in this project is sourced from Kaggle, which consists of retinal OCT images categorized into four classes: Normal, CNV, DME, and DRUSEN.
The project's main goal was to classify the images into their respective categories using the pre-trained ResNet50 model. The final model achieved an accuracy of 97% and an F1 score of 25%. The model's architecture consists of a ResNet50 base model with pre-trained weights and four dense layers with varying numbers of neurons and activation functions, ending with a softmax activation function. The model was trained using the stochastic gradient descent optimizer with a learning rate of 0.001 and momentum of 0.9.
In addition to using the ResNet50 model for image classification, this project also includes a web page with the integration of Flask, a lightweight Python web framework that enables the creation of web applications with minimal coding. The web page allows users to upload an image and receive a prediction of the image's category from the trained model. The image is first preprocessed to fit the input shape of the ResNet50 model before being passed through the model for prediction. The predicted category is then displayed to the user on the web page.
The integration of Flask in this project demonstrates the potential of deploying machine learning models in web applications for practical use. It provides a user-friendly interface that can be easily accessed by medical professionals or patients who require quick and accurate diagnoses. Overall, this project highlights the versatility and effectiveness of pre-trained models and their integration into web applications for real-world use.