Abstract
Diabetes and associated problems, such as diabetic retinopathy can present challenges in healthcare due to the potential for delayed diagnosis and management. Early detection of diabetic retinopathy and its complications is critical for improving patient outcomes. This project addresses the problem of accurately identifying diabetic retinopathy, specifically by detecting diabetic retinopathy by utilizing deep learning models and image analysis techniques. The data used in this study comes from four public retinal-image datasets commonly used for diabetic retinopathy research being, APTOS 2019, OIA-DDR, IDRiD and EyePACS via TFDS. These datasets come with images all labeled on a 0-4 DR severity scale ranging from no diabetic retinopathy to proliferate DR. To ensure robust generalization and prevent leakage we construct patient-aware train/validation/test splits. The deep learning architectures utilized were Convolutional Neural Networks (CNN), Transformer (ViT), and a Hybrid CNN-Transformer were trained and evaluated to determine the most effective model for detection. Additionally, preprocessing, augmentations and resizing techniques were applied to stabilize and optimize training. The outcome of this project is a web application that accepts retinal fundus images and returns class probabilities and predictions. A FastAPI backend serves the trained PyTorch models, while a React frontend provided a single-page interface for image upload. The entire stack is containerized with Docker for reproducible deployment as well as hosted and deployed online.