Diabetic retinopathy (DR) is a prevalent complication of diabetes that is responsible for causing visual impairment on a global scale. Detecting and treating this condition early is crucial in order to prevent vision loss. Our study focused on developing a highly effective approach for DR detection using YOLOv5 and YOLOv8 pre-trained models. To enhance the performance of these models, we employed augmentations, automatic learning rate optimization, and AMP for acceleration during the training and evaluation process using an eye fundus image dataset.
For validation purposes, a total of 823 images from the dataset were taken. The YOLOv5 model showed a mean Average Precision (mAP) of 0.232, with a precision (P) of 0.208 and a recall (R) of 0.685. On the other hand, the YOLOv8 model achieved a precision (P) of 0.233 and a recall (R) of 0.296, resulting in an mAP of 0.056. When comparing these results, it is clear that the YOLOv5 model performs much better than YOLOv8, especially in terms of the mean Average Precision (mAP). Therefore, based on these performance measures, the YOLOv5 model is the superior choice for detecting diabetic retinopathy (DR). The YOLOv5 model's classifications were as follows: No DR, Mild DR, Moderate DR, Severe DR, and Proliferative DR. The YOLOv5 model outperformed the YOLOv8 model in terms of overall mean Average Precision (mAP). Therefore, the YOLOv5 model is used for detection. Afterwards, the "best.pt" file, which contains the weights of the YOLOv5 model, was loaded into an interface (like Flask) to make the detection of different levels of diabetic retinopathy severity (No DR, Mild, Moderate, Severe, Proliferative DR) using fundus images more convenient.