Currently, in the field of medical image detection, there is no authoritative public data set for the detection of hemorrhagic lesions of Diabetic Retinopathy for reference. To solve this problem, this paper originally planned to collect fundus photo data of patients in a hospital for nearly one year. However, due to the patient's eye rotation, light problems, different photographic items and other factors in the process of fundus photography, there are a lot of useless data in the collected fundus image data. In addition, due to the wide variety of diseases in hospital patients, the total number of images collected and the limitation of manual screening effort, the collected data further resulted in a small number of Diabetic Retinopathy samples, which could not meet the needs of this study.
Therefore, in order to test and verify the feasibility of the proposed network, the method of self-made data set is adopted in this paper. The data source was fundus photographic database of a hospital. Canon digital fundus camera was used to take fundus photographs of both eyes. Under the guidance of fundus experts in the hospital, 15,000 photos taken from July 2016 to June 2022 were screened, and 2,600 photo samples containing fundus Microaneurysms and bleeding were finally made, and the fundus lesions were labeled with labelimg, as shown in the Fig. 5.
Fig. 5
The alternative text for this image may have been generated using AI.Marked map of fundus lesions
Fig. 6
The alternative text for this image may have been generated using AI.Fundus image data enhancement map
Dataset category: mixed microaneurysm and Hemorrhage dataset; volume of data photos: 2,600,of which 1,700 are Hemorrhages and 900 are Microaneurysms; partition ratio: training:validation:test = 8:1:1; number of category labels: Hemorrhage: 5,824, microaneurysm: 2,121.
To thoroughly assess the generalization performance of the proposed ERep-YOLO network, we performed supplementary validation using the publicly available Messidor dataset (Methods to Evaluate Segmentation and Indexing Techniques in the Field of Retinal Ophthalmology) [30]. This dataset consists of 1,200 retinal fundus images, each carefully annotated by clinical experts, and is widely regarded as a standard benchmark for automated Diabetic Retinopathy (DR) screening. To facilitate a fair and reproducible evaluation, the dataset was randomly divided into training, validation, and test subsets in an 8:1:1 ratio. This partitioning approach aligns with the protocol employed for our proprietary dataset, thereby minimizing potential biases in performance comparison that may result from differing data-splitting methodologies.
Data EnhancementIn order to further increase the complexity of the dataset and reduce the probability of overfitting of the deep learning network during training,several data enhancement methods were utilized to enrich the fundus lesion dataset.
After screening the dataset, the selected fundus images were placed into a folder and a script was clutched to extract every image in that folder, firstly by randomly rotating the fundus images by 90°,180°,and 270° to generate fundus images with different angles, and then doubling the dataset again by brightness enhancement as well as flipping the images, and then storing the data-enhanced fundus images in another folder and using it as the final data used for the the final data set of Diabetic Retinopathy fundus lesions for detection.
The generated fundus images are shown in Fig. 6, where Fig. a is the original image, Fig. b to Fig. d are the rotated images, Fig. e and f are the horizontally flipped and vertically flipped images, and Fig. g is the luminance enhanced image.
Experimental SettingsTo ensure the comparability of experimental results and to evaluate the detection performance of the ERep-YOLO model, all experiments for the proposed ERep-YOLO and the comparison models were conducted under a unified experimental environment and evaluation protocol. All experiments were performed on a computer equipped with an Intel® Core™ i5—12400KF processor and an NVIDIA RTX 3070 Ti GPU. Except for differences in model architecture, all models were trained and tested using the same self-constructed dataset, identical dataset splits, consistent data augmentation strategies, uniform input image sizes, and the same evaluation metrics.
For training, YOLOv8n was adopted as the baseline network and subsequently improved. For all YOLO-series models, SGD was used as the optimizer with an initial learning rate of 0.001, a batch size of 16, and a total of 200 epochs. Early stopping was applied if the training accuracy did not improve for 70 consecutive epochs. For other comparison models, such as the DETR series, their core network structures were preserved, while dataset splits, input sizes, data augmentation strategies, and evaluation protocols were standardized to minimize experimental condition differences and ensure fair comparison.
The algorithm was evaluated using the number of parameters(params), Frames Per Second (FPS) and mean Average Precision (mAP). The number of parameters (Params) indicates the model’s complexity and scale. A lower parameter count generally implies a lighter model with reduced memory footprint and computational cost, which is favorable for deployment on resource-constrained devices. Frames Per Second (FPS) quantifies the inference speed of the model, representing the number of images it can process per second under standardized hardware conditions. Mean Average Precision (mAP) measuring the model’s overall detection effectiveness. It is computed as the mean of the Average Precision (AP) across all object categories, with AP calculated over a range of Intersection over Union (IoU) thresholds (typically from 0.5 to 0.95 with a 0.05 step). A higher mAP indicates better performance in both localization and classification.. In addition, we also employ the Precision(P) and Recall(R) to evaluate the model’s capacity compared to segmentation-based methods.
where TP, FP and FN are the number of correct, wrong and missed detections respectively; AP is the area under PR curve; N is the number of detection categories; Figure Number is the number of images detected; Total Time is the time consumed for detection.
Model ComparisonsTo evaluate the effectiveness of ERep-YOLO, YOLOv5s, YOLOv7-tiny [31] YOLOv8n, and YOLOv9 [17] were selected as representative single-stage object detection baseline models. These models represent typical lightweight detection frameworks at different stages of the YOLO series and can comprehensively reflect the performance of the proposed method in terms of detection accuracy, inference speed, and parameter scale.
To ensure fair comparison, all baseline models were trained and tested under the unified experimental protocol described above. Table 1 presents the performance of each baseline model, as well as the improved ERep-YOLO trained on the same dataset, in detecting fundus lesions. Here, HA and MA represent the two lesion features of fundus hemorrhage and microaneurysm lesions respectively. The AP detection rates measure the model's detection accuracy for these two lesions separately, while mAP comprehensively reflects the overall performance.
Table 1 Comparison of detection effects of different algorithmsAs can be seen from Table 1, The overall metrics are both greatly improved compared to the previous models, YOLOv5 and YOLOv7.Compared with the new YOLOv9 network, the ERep-YOLO algorithm proposed in this paper still maintains a certain degree of performance improvement. Compared with the original YOLOv8n algorithm before the improvement, the ERep-YOLO algorithm obtained the highest accuracy and maintained the fastest detection speed while reducing the number of parameters. The algorithm improved the detection of Microaneurysm(MA) by 9.9% and the detection of Hemorrhage (HA) by 14.7%, which proved that ERep-Block improved the acquisition ability of small targets in YOLOv8 network, and demonstrated the robustness of the network to detect targets of different scales.
As can be seen from Fig. 7, in the detection of the first group of fundus data, YOLOv5s and YOLOv7-tiny both missed detection, YOLOv8n showed false detection, and only ERep-YOLO correctly detected microaneurysm lesions. In the second group of data detection, all algorithms can detect the bleeding location well, and the algorithm in this paper obtains the highest accuracy; In the third row of multi-focal mixed fundus data detection, except for the false detection of YOLOv5s algorithm, other networks correctly detected bleeding, while YOLOv7-tiny and YOLOv8n ignored microaneurysm lesions. The algorithm proposed in this paper achieved the highest accuracy and well covered the two focal areas. From the above results, the results above indicate that single-stage YOLO-based object detection algorithms still exhibit certain limitations in identifying microaneurysms, occasionally confusing them with small hemorrhages. In contrast, ERep-YOLO can more effectively distinguish microaneurysms from hemorrhagic lesions, achieving higher detection accuracy and faster inference speed while maintaining a relatively small number of parameters.
Fig. 7
The alternative text for this image may have been generated using AI.From a clinical screening perspective, the balance between precision and recall is critical for DR detection. For hemorrhagic lesions (HA), misclassifying vascular structures or local background textures as hemorrhages increases false positives, which may lead to unnecessary patient anxiety, additional examinations, and waste of medical resources; therefore, high precision is particularly important in HA detection. Microaneurysms (MA), as early indicators of DR, may be missed, delaying timely intervention. Consequently, high recall is more crucial in MA detection. Experimental results show that ERep-YOLO improves HA detection precision while simultaneously enhancing MA recognition, demonstrating that the method effectively balances the precision-recall requirements for different lesion types in clinical screening. This capability further highlights its potential value for automated diabetic retinopathy screening.
Ablation StudyTo verify the validity of the key components, we propose the following five variant models to compare with ERep-YOLO on the dataset.
No attention: In this model, the ECA attention mechanism is removed from the ERep-Block module.
No generalized high efficiency layer aggregation network: This model does not use generalized high efficiency layer aggregation network RepNCSPELAN.
ELAN: We judged the effectiveness of ERep-Block using both the ELAN(Effective Long-Range Aggregation Network) module alone and the block that combines ELAN with ECA's attention mechanism.
No-GIoU: In this model, the embedding layer is removed to evaluate the performance of the proposed model without dynamic spatial semantic embedding.
In this paper, 300 rounds of training were conducted, and the best training results were selected as comparison objects to judge the influence of RepNCSPELAN, ECA and GIoU three improvements on detection targets. The results of ablation experiments are shown in Table 2.
Experiment Group 0 used the original YOLOv8 network for the detection of Microaneurysms and Hemorrhages, serving as a reference experiment to facilitate comparison with subsequent experiments.
To verify the effectiveness of the RepNCSPELAN module,Group 1 substituted YOLOv8's original C2f module with the RepNCSPELAN module. The result showed a 4.14% mAP improvement over Group 0, demonstrating the module's efficacy.
To verify the effectiveness of the ERep-Block combination module,Group 2 integrated the ECA attention mechanism into the feature extraction module to form an ERep-Block for detection. Compared with Group 0 and Group 1,the mAP increased by 10.53% and 6.39% respectively, demonstrating the effectiveness of the ERep-Block combination module.
To verify the effectiveness of GIoU, Group 3 replaced CIoU with GIoU for object detection, building upon the setup of Group 2. This resulted in a 1.77% increase in mAP compared to Group 2, confirming GIoU's effectiveness.
To verify the effectiveness of the RepNCSPELAN module's combination with GIoU, Group 5 conducted a test by combining the RepNCSPELAN module with GIoU. Compared with Group 0 and Group 1, the mAP increased by 5.96% and 1.82% respectively, confirming the effectiveness of the RepNCSPELAN module's combination with GIoU.
In order to verify the effectiveness of combining GIoU and ECA, Groups 8 and 9 respectively tested ECA alone and the modified ECA combined with GIoU. Compared to Group 8, Group 9 achieved a 2.15% increase in mAP, verifying the effectiveness of combining GIoU and ECA.
According to the experimental results shown in Table 2, the mAP of the first group of experiments increased by 4.14% compared with the reference experiment, 2.97% higher than that of the fifth group, and the FPS of the fifth group was 7 frames/s higher than that of the first group, proving that the convolutional layer stacked by the generalized high-efficiency layer aggregation network enhanced the network's receptor field.The feature maps of different scales were obtained and the multi-scale feature fusion capability of the feature extraction module was improved. The comparison proved the feasibility of introducing CSPNet segmentation and recombination concept on the basis of ELAN, which improved the detection accuracy and accelerated the detection speed. The second group of experiments increased by 6.39% compared with the first group and 4.29% compared with the fifth group, indicating that the local cross-channel interaction of the efficient channel attention mechanism can effectively suppress background information and enhance the network's ability to acquire effective information. Moreover, due to its simple structure, the network detection speed is also improved. ERep-Block can also improve the detection accuracy more than ELAN and ECA combination;The third group of experiments increased by 1.77% compared with the second group,The eighth group of experiments improved by 2.15% compared to the seventh group, proving that focusing on quantifying the non-overlapping regions of the real frame and the prediction frame is conducive to improving the detection accuracy.Overall consistent with experimental expectations.
Building upon the results of Group 2, Group 3 replaced CIoU with GIoU, resulting in a 1.77% increase in mAP, while Group 4 replaced CIoU with SIoU, yielding only a 0.51% improvement. These results indicate that, for small lesion detection, GIoU provides more robust gradient signals for bounding box regression than CIoU and SIoU, thereby achieving higher detection accuracy.
Comparison with the DETR ModelTo further evaluate the performance differences between the proposed ERep-YOLO and end-to-end object detection methods, DETR [32] and its improved variants, MobileNet-DETR and SD-DETR [33] were selected as comparison models. Under the unified experimental protocol described above, all models were trained and tested using the same dataset splits, input configurations, and evaluation metrics. The detailed comparison results are presented in Table 3.
Table 3 Comparative Analysis of Detection Performance between ERep-YOLO and DETR Series ModelsAs presented in Table 3, the original DETR model, characterized by a large number of parameters (40 million) and a relatively low inference speed (79 FPS), is unsuitable for real-time clinical screening. Its lightweight variants, MobileNet-DETR and SD-DETR, achieve improved efficiency by reducing the parameter count to 2.7 M and 10.9 M, respectively, and achieving inference speeds of 90 FPS and 91 FPS. However, these improvements in speed are accompanied by a decline in detection accuracy within the complex multi-lesion Diabetic Retinopathy (DR) task, where mutual interference among lesions results in suboptimal mAP scores of 60.65% and 62.8%, respectively. In contrast, the ERep-YOLO network introduced in this study is specifically designed to address this challenge. It employs an efficient layer aggregation network to improve multi-scale feature representation and integrates a cross-channel interaction mechanism to enhance feature discrimination. This architectural design effectively suppresses background noise and disentangles overlapping lesion features, thereby directly mitigating the interference issues observed in prior models. Empirical evaluations substantiate the efficacy of this approach. ERep-YOLO achieves a superior mAP of 73.45% alongside a high inference speed of 155 FPS, surpassing DETR-based models in both accuracy and computational efficiency. These findings demonstrate that ERep-YOLO offers a more optimal trade-off between detection accuracy and inference speed.
Generalizability TestingTo rigorously assess the generalization capability of the ERep-YOLO network, evaluations were performed on two computing systems with different configurations: one featuring an Intel® Core™ i5—12400KF processor and an NVIDIA RTX 3070 Ti GPU, and the other featuring an Intel® Core™ i5—13600KF processor and an NVIDIA RTX 4070 SUPER GPU. All comparison models, including the baseline models and the proposed ERep-YOLO, were evaluated under cross-environment testing using the same training configurations, hyperparameters, and data preprocessing procedures as in the original experimental setup to ensure consistency with the comparison mode. The test results are summarized in Table 4.
Table 4 Model generalization testingThe table indicates that, when all models adhere to the aforementioned consistent training and evaluation protocols, detection accuracy remains largely stable. However, the frame rate is notably higher on the 4070 SUPER hardware. While different hardware configurations influence training speed, they do not affect detection outcomes, thereby demonstrating the generalization capability of the ERep-YOLO network across various training devices. Furthermore, a comparative analysis between the ERep-YOLO network, YOLOv9-extended, and YOLOv8 reveals that the ERep-YOLO network achieves robust detection accuracy on both the self-constructed dataset and public datasets, further substantiating its generalizability.
Comments (0)