Diabetic retinopathy grading method based on improved SG-Former

Through the improved SG-Former network, combined with the Group-Focal module, channel adaptive attention module and Swin-Transformer module, combined with the sixteen grid input and dynamic data enhancement methods, the problem of diabetic retinopathy grading relying on doctor experience is solved , improving the detection capability and grading accuracy of small-scale lesions.

CN118736302APending Publication Date: 2024-10-01TAIYUAN UNIVERSITY OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410845915.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-27
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

The grading of diabetic retinopathy relies on doctors' personal experience and subjective judgment, resulting in high difficulty in diagnosis and high misdiagnosis rate, and the existing models have insufficient ability to detect small-scale lesions.

Method used

Using the improved SG-Former network, through the Group-Focal module, the channel adaptive attention module and the Swin-Transformer module, combined with the sixteen-square input and dynamic data enhancement methods, a deep learning model is constructed to achieve automatic grading of diabetic retinopathy. .

Benefits of technology

It significantly improves the detection ability of small-scale lesions, enhances the model's ability to identify and locate important features, reduces the subjectivity of diagnosis, and improves the accuracy and consistency of grading.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118736302A_ABST
    Figure CN118736302A_ABST
Patent Text Reader

Abstract

The invention relates to the field of computer vision and the technical field of medical treatment, in particular to a diabetic retinopathy grading method based on improved SG-Former, solves the technical problems that an existing diabetic retinopathy grading method depends too much on personal experience and subjective judgment and is low in grading accuracy, and comprises the steps of data acquisition and data processing. Model building is carried out based on an SG-Former network, on one hand, a Group-Focal module is used for improving a mixed attention mechanism of the SG-Former network, on the other hand, a channel self-adaptive attention module is introduced between stages of the SG-Former network, and on the third hand, a Transform in the last stage is replaced with a Swing-Transform module so as to build a deep learning model; and automatically grading the diabetic retinopathy of the test set by using a deep learning model. According to the method, the grading accuracy of the FFA images is high, and reliable imaging support for clinical aid decision making can be provided for doctors.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of computer vision and medical technology, and in particular to a diabetic retinopathy grading method based on an improved SG-Former. Background Art

[0002] Diabetic retinopathy (DR) is a chronic microvascular complication caused by diabetes. Its occurrence and development involve a variety of complex biological processes. For diabetic patients, regular fundus examinations are essential for timely detection and treatment. Fundus Fluorescein Angiography (FFA), as the gold standard for DR diagnosis, can clearly show abnormalities in retinal blood vessels, providing valuable diagnostic evidence for clinicians.

[0003] Although it has been widely used in clinical practice, the grading of diabetic retinopathy is still highly dependent on the personal experience and subjective judgment of doctors. Different doctors may have different interpretations of the same FFA image, which undoubtedly increases the difficulty of diagnosing diabetic retinopathy (DR) and the misdiagnosis rate. At the same time, manual diagnosis of DR is time-consuming, expensive, and inaccurate, and there are problems in DR grading, such as small differences in lesions between different stages of the disease, and large differences in lesion size between the same stages of the disease, and small lesions are easily ignored by existing models.

[0004] Therefore, developing a DR grading and classification model based on fundus fluorescein angiography using deep learning methods has very important clinical application value in improving its ability to detect small-scale lesions. Summary of the invention

[0005] In order to overcome the technical defects of existing diabetic retinopathy grading methods that are overly dependent on personal experience and subjective judgment and have low grading accuracy, the present invention provides a diabetic retinopathy grading method based on an improved SG-Former, aiming to provide doctors with imaging support for clinical decision-making.

[0006] The present invention provides a diabetic retinopathy grading method based on an improved SG-Former, comprising the following steps: S1. Data acquisition: Use fundus cameras to collect FFA images of patients with diabetic retinopathy, and then grade and label the samples according to the severity of the lesions; S2, data processing: a set of FFA image data of each patient collected in step S1 is stitched using a sixteen-square grid input method, and then preprocessed using a dynamic data enhancement oversampling method; S3, Model Implementation: The model is built based on the SG-Former network. First, the Group-Focal module is used to improve the hybrid attention mechanism of the SG-Former network. Second, a channel adaptive attention module is introduced between each stage of the SG-Former network. Third, the Transformer in the last stage is replaced by the Swin-Transformer module to build a deep learning model. S4. Model application: Use the data set obtained in step S2 to train and verify the deep learning model built in step S3, and finally use the deep learning model to realize automatic classification of diabetic retinopathy on the test set.

[0007] The traditional SG-Former network adopts a four-stage pyramid architecture, each stage contains a certain number of Transformer blocks. For the first three stages, it is composed of two types of Transformer blocks alternately used, one of which is a Transformer module based on mixed scale attention and the other is a Transformer module based on self-guided attention, and the traditional Transformer module is used in the last stage.

[0008] Preferably, the processing process of the Group-Focal module in step S3 is as follows: the input feature X is projected onto Query, Key and Values, Query, Key and Values ​​are first uniformly divided into 4 different segments, and Agg(·) with different kernel sizes is used to generate group agents on 3 of the segments, and then each group agent is sent to the focal modulation network (FocalNets) for multi-scale hierarchical context aggregation; the focal modulation network consists of three parts: Hierarchicalcontextualization, Gated aggregation and Element-wise modulation. The instantiation formula of the focal modulation network is: (1) where q(·) is the query projection function, ⊙ is the element-wise multiplication, M(·) is the context aggregation function, and its output is called the modulator. After the focus-modulated context aggregation, attention can be calculated on a mixture of single tokens and group agents of different sizes. Finally, a linear mapping layer is used to fuse the outputs of the attention branch and the non-attention branch.

[0009] Preferably, the channel adaptive attention module in step S3 first uses adaptive average pooling (H, 1) along the height direction of each channel to compress each channel of the input feature map X into a feature vector with a height of 1. This step is shown in formula (2): (2) in is the input feature map, It is the result after pooling in the height direction, and W is the feature vector in the width direction of each channel; its purpose is to reduce the computational complexity while retaining the key vertical position information; Secondly, it is further processed through the one-dimensional convolution layer F1D to extract the pooled features, which can be expressed as formula (3): (3) in, represents the sigmoid function, M CH is the final channel attention map; F 1D (·) is a one-dimensional convolution operation; this step aims to weight the features of different channels through the learned convolution kernel, thereby enhancing the model’s understanding of the internal structure of the channel; In the final stage of the channel adaptive attention module, M CH Multiplying and adding the original input feature map X can deepen the weighted effect of the channel adaptive attention module, which is beneficial to the extraction of fine-grained features of DR lesions, expressed as formula (4): (4).

[0010] The channel-adaptive attention module not only focuses on which channels of the input features are more important, but also considers the spatial distribution within the channels, allowing the network to capture important features in the image more accurately.

[0011] Preferably, the Swin-Transformer module in step S3 is composed of a multi-head self-attention module and a feedforward neural network; the input features are first sent to the multi-head self-attention module, the input features are divided into multiple subspaces to calculate the self-attention in parallel, and then the results are merged to capture long-distance dependencies and obtain rich feature representations; then, the results of the multi-head self-attention module are input into the feedforward neural network, which is composed of two fully connected layers with a nonlinear activation function in the middle to further transform and enhance the features. The innovation of the Swin-Transformer module is to introduce a sliding window mechanism, divide the input feature map into multiple non-overlapping windows, and perform self-attention calculations in each window. Through the sliding window, the model realizes information transfer between different windows and captures global dependencies.

[0012] Preferably, in step S2, the sixteen-grid input method is to select 10 FFA images of each eye of a patient, and fill them into 10 positions arranged from left to right in the 4×4 sixteen-grid in chronological order, and then randomly select 6 images from the remaining images to fill in the remaining 6 vacancies of the sixteen-grid, and finally splice them into an image containing 16 images. The "sixteen-grid input" structure thus constructed not only completely contains all the time series information of the fundus blood vessels, but also emphasizes the key information in the images at different time points by random selection, thereby improving the efficiency and accuracy of the analysis.

[0013] Preferably, the dynamic data enhancement oversampling method generates new samples by random rotation, flipping, affine and perspective transformation. This method not only helps the model learn more diverse features, but also improves its adaptability to different scenarios.

[0014] Preferably, in step S1, the acquisition of the fluorescent fundus angiography image FFA is performed using Heidelberg retinal angiography with a 55° field of view. Subjects with other fundus diseases (such as ischemic optic neuropathy, age-related macular degeneration, and optic disc edema) are excluded.

[0015] Preferably, in step S1, at least three ophthalmologists mark all images separately without communication during the grading and labeling. If the marking results of all ophthalmologists are consistent, the grading standard is determined; otherwise, all ophthalmologists need to discuss until a consistent grading and labeling result is reached. This makes the grading more accurate and reasonable.

[0016] Compared with the prior art, the technical solution provided by the present invention has the following technical effects: in the above technical solution, the present invention adopts the "sixteen-square grid input" method to process data, fully utilizes the information of FFA in different time and dimensions, and solves the sample imbalance problem through the dynamic data enhancement oversampling method; in the model construction, the Group-Focal module is integrated to capture feature information at different granularity levels, significantly improving the detection ability of the deep learning model for small-scale lesions, and at the same time, the channel adaptive attention module is embedded between each stage, and the channel and spatial information are comprehensively utilized to enhance the recognition and positioning ability of the deep learning model for important features; the Swin-Transformer module is used to introduce the sliding window mechanism, the input feature map is divided into multiple non-overlapping windows, and self-attention calculation is performed in each window; through the sliding window, the model realizes information transmission between different windows, and captures global dependencies to bring many benefits to medical staff and patients, and has broad application prospects and huge development potential in fields such as medical image processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0018] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0019] Figure 1 This is a flow chart of a diabetic retinopathy grading method based on an improved SG-Former according to an embodiment of the present invention; Figure 2 This is a flow chart of step S2 of the diabetic retinopathy grading method based on the improved SG-Former described in an embodiment of the present invention; Figure 3 A deep learning model structure diagram of step S3 of the diabetic retinopathy grading method based on the improved SG-Former described in an embodiment of the present invention; Figure 4 It is a structural diagram of the Group-Focal module of the diabetic retinopathy grading method based on the improved SG-Former described in an embodiment of the present invention. DETAILED DESCRIPTION

[0020] In order to more clearly understand the above-mentioned objectives, features and advantages of the present invention, the scheme of the present invention will be further described below. It should be noted that the embodiments of the present invention and the features in the embodiments can be combined with each other without conflict.

[0021] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present invention, rather than all of the embodiments.

[0022] The following is combined with Figures 1 to 4 The specific embodiments of the present invention are described in detail.

[0023] In one embodiment, a method for grading diabetic retinopathy based on an improved SG-Former is disclosed, comprising the following steps: S1. Data acquisition: FFA images of patients with diabetic retinopathy were collected using a fundus camera, and the samples were graded and labeled according to the severity of the lesions; Two experienced ophthalmologists used Heidelberg retinal angiography (Heidelberg Engineering, Heidelberg, Germany) with a 55° field of view to collect fluorescent fundus angiography images FFA, excluding subjects with other fundus diseases (such as ischemic optic neuropathy, age-related macular degeneration, and optic disc edema); During the graded labeling, at least three ophthalmologists marked all images separately without communication. If the labeling results of all ophthalmologists were consistent, the grading standard was determined; otherwise, all ophthalmologists were required to discuss until a consistent graded labeling result was reached. In a specific embodiment, 15,930 FFA images of 1,593 eyes (793 right eyes and 800 left eyes, 10 images per eye) of 924 diabetic patients who underwent FFA examination at Shanxi Eye Hospital from June 2022 to January 2024 were collected. All phases of fluorescein angiography and images of different retinal angles are included in this dataset. Since the 10 images of each eye are finally spliced ​​into 1 after preprocessing, the total number of the final dataset is 1593. The images are in JPG format with a resolution of 768*868.

[0024] Combining international standards and the clinical diagnostic experience of many ophthalmologists, a concise and practical four-level DR staging standard based on FFA was proposed. The grading labeling in step S1 adopts the four-level DR staging standard based on FFA.

[0025] Level 0: normal fundus, no diabetic retinopathy.

[0026] Grade 1 (mild to moderate NPDR): mild microaneurysms (a few fluorescent spots), mild intraretinal hemorrhage.

[0027] Grade 2 (severe NPDR): severe microaneurysms (obvious fluorescence leakage); multiple or large areas of non-perfusion; severe intraretinal hemorrhage and preretinal hemorrhage; no neovascularization.

[0028] Grade 3 (proliferative PDR): Mainly depends on the presence or absence of neovascularization, sometimes accompanied by vitreous / preretinal hemorrhage.

[0029] This set of standards aims to make the FFA-based DR diagnostic results more consistent and stable, and to facilitate clinical diagnosis reference for ophthalmologists.

[0030] S2, data processing: crop, clean, and adjust the FFA image data of each patient collected in step S1 to a specific resolution to make it suitable for network input; use the sixteen-grid input method for single splicing, integrate the dimensional information of each set of input FFA images, and then use the dynamic data enhancement oversampling method for category balance, which helps to eliminate bias and improve classification performance, and does not provide additional actual information for the model; the sixteen-grid input method is to select 10 FFA images of each eye of a patient, and fill them into the 10 positions arranged from left to right in the 4×4 sixteen-grid in chronological order, and then randomly select 6 from the remaining images to fill in the remaining 6 vacancies in the sixteen-grid, and finally splice them into an image containing 16 pictures. The imbalanced distribution of data set categories is an important factor limiting the DR grading performance. To solve this problem, in addition to using multiple transformation methods such as flipping, rotation, translation and normalization to process the training images before training, the present invention also uses dynamic data enhancement oversampling technology to balance the categories of the data set. This technology generates new samples through random rotation, flipping, affine and perspective transformations, which not only helps the model learn more diverse features, but also improves its adaptability to different scenarios.

[0031] S3, Model Implementation: The model is built based on the SG-Former network. First, the Group-Focal module is used to improve the hybrid attention mechanism of the SG-Former network. Second, a channel adaptive attention module is introduced between each stage of the SG-Former network. Third, the Transformer in the last stage is replaced by the Swin-Transformer module to build a deep learning model. The traditional SG-Former network adopts a four-stage pyramid architecture, each stage contains a certain number of Transformer blocks. For the first three stages, it is composed of two types of Transformer blocks alternately used, one of which is a Transformer module based on mixed scale attention and the other is a Transformer module based on self-guided attention, and the traditional Transformer module is used in the last stage.

[0032] The deep learning model in this method embeds the Group-Focal module into the mixed-scale attention-based Transformer module, aiming to extract global and fine-grained information of mixed scales and provide saliency guidance for self-guided attention. It does this by dividing the multi-head self-attention into multiple groups and assigning different attention scales to each group. This approach allows the model to capture information from local to global ranges within a self-attention layer, providing mixed-scale information for the entire Transformer.

[0033] The channel-adaptive attention module models global information while focusing on the fine-grained nature of salient regions based on the dynamic saliency map passed from the previous multi-scale Transformer block. The block uses the saliency map to guide the aggregation of tokens to achieve self-guided attention. This means retaining more tokens in salient regions for fine-grained information, while reducing the number of tokens in less important regions for computational efficiency. The self-guided Transformer block achieves this through an Importance-Guided Aggregation Module (IAM), which aggregates key and value tokens based on the saliency map. The saliency map is estimated through mixed-scale self-attention and contains regional saliency information at multiple granularities. This map is used to guide the aggregation of tokens in the self-guided Transformer block, allowing the model to adaptively redistribute tokens based on the saliency of the input image and the model's own predictions. The predictions of the saliency map gradually become more accurate during training as it evolves as training progresses.

[0034] The processing process of the Group-Focal module in step S3 is as follows: the input feature X is projected onto Query, Key and Values, Query, Key and Values ​​are firstly uniformly divided into 4 different segments, and Agg(·) with different kernel sizes is used to generate group agents on 3 of the segments, and then each group agent is sent to the focal modulation network (FocalNets) for multi-scale hierarchical context aggregation; the focal modulation network consists of three parts: Hierarchical contextualization, Gated aggregation and Element-wise modulation. The instantiation formula of the focal modulation network is: (1) where q(·) is the query projection function, ⊙ is the element-wise multiplication, M(·) is the context aggregation function, and its output is called the modulator. After the focus-modulated context aggregation, attention can be calculated on a mixture of single tokens and group proxies of different sizes. Finally, a linear mapping layer is used to fuse the outputs of the attention branch and the non-attention branch.

[0035] The channel adaptive attention module in step S3 first uses adaptive average pooling (H, 1) along the height direction of each channel to compress each channel of the input feature map X into a feature vector with a height of 1. This step is shown in formula (2): (2) in is the input feature map, It is the result after pooling in the height direction, and W is the feature vector in the width direction of each channel; its purpose is to reduce the computational complexity while retaining the key vertical position information; Secondly, it is further processed through the one-dimensional convolution layer F1D to extract the pooled features, which can be expressed as formula (3): (3) in, represents the sigmoid function, M CH is the final channel attention map; F 1D (·) is a one-dimensional convolution operation; this step aims to weight the features of different channels through the learned convolution kernel, thereby enhancing the model’s understanding of the internal structure of the channel; In the final stage of the channel adaptive attention module, M CH Multiplying and adding the original input feature map X can deepen the weighted effect of the channel adaptive attention module, which is beneficial to the extraction of fine-grained features of DR lesions, expressed as formula (4): (4).

[0036] The Swin-Transformer module consists of a multi-head self-attention module and a feedforward neural network; the input features are first sent to the multi-head self-attention module, which divides the input features into multiple subspaces to calculate the self-attention in parallel, and then merges the results to capture long-distance dependencies and obtain rich feature representations; then, the results of the multi-head self-attention module are input into the feedforward neural network, which consists of two fully connected layers with a nonlinear activation function in the middle to further transform and enhance the features.

[0037] S4. Model application: Use the data set obtained in step S2 to train and verify the deep learning model built in step S3, and finally use the deep learning model to realize automatic classification of diabetic retinopathy on the test set.

[0038] In the model implementation, the Group-Focal module is integrated based on the SG-Former network. By capturing feature information at different granularity levels, the model's ability to detect small-scale lesions is significantly improved. At the same time, a channel adaptive attention module is embedded between the various stages of the network. The comprehensive use of channel and spatial information enhances the model's ability to recognize and locate important features, and realizes automatic grading of diabetic retinopathy, which helps doctors to judge diabetic retinopathy more accurately, thereby formulating more appropriate treatment plans and promoting interdisciplinary cooperation and communication in fields such as medicine and artificial intelligence.

[0039] On the collected fluorescein fundus angiography dataset, the improved SG-Former-based diabetic retinopathy grading method of the present invention was compared with 7 models, including 2 classic convolutional neural networks and 5 recently proposed innovative Transformer models with superior performance. The experimental results are shown in the following table, where the results of the method of the present invention are located in the last row of the table. The following data show that the improved SG-Former-based diabetic retinopathy grading method of the present invention has achieved the most advanced classification performance in all indicators.

[0040] Method Precision Recall F1-score Accuracy ResNet101 0.7237 0.7059 0.6838 0.7059 Inception_v3 0.9029 0.9029 0.9028 0.9029 Deit-B 0.9369 0.9364 0.9364 0.9364 ViT-B 0.9382 0.9378 0.9376 0.9378 Swin-B 0.9388 0.9378 0.9369 0.9378 PVT_v2 0.9015 0.8988 0.8979 0.8988 SG-Former-B 0.9420 0.9405 0.9404 0.9405 Ours 0.9469 0.9466 0.9467 0.9466 The above is only a specific implementation of the present invention, which enables those skilled in the art to understand or implement the present invention. Although detailed descriptions are given with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments, and they should all be covered by the protection scope of the claims.

Claims

1. A diabetic retinopathy grading method based on improved SG-Former, characterized in that: The following steps are involved: S1. Data acquisition: Use fundus cameras to collect FFA images of patients with diabetic retinopathy, and then grade and label the samples according to the severity of the lesions; S2, data processing: a set of FFA image data of each patient collected in step S1 is stitched using a sixteen-square grid input method, and then preprocessed using a dynamic data enhancement oversampling method; S3, Model Implementation: The model is built based on the SG-Former network. First, the Group-Focal module is used to improve the hybrid attention mechanism of the SG-Former network. Second, a channel adaptive attention module is introduced between each stage of the SG-Former network. Third, the Transformer in the last stage is replaced by the Swin-Transformer module to build a deep learning model. S4. Model application: Use the data set obtained in step S2 to train and verify the deep learning model built in step S3, and finally use the deep learning model to realize automatic classification of diabetic retinopathy on the test set.

2. The diabetic retinopathy grading method based on improved SG-Former according to claim 1, characterized in that: The processing process of the Group-Focal module in step S3 is as follows: the input feature X is projected onto Query, Key and Values, Query, Key and Values ​​are first uniformly divided into 4 different segments, and Agg(·) with different kernel sizes is used to generate group agents on 3 of the segments, and then each group agent is sent to the focal modulation network for multi-scale hierarchical contextualization; the focal modulation network consists of three parts: Hierarchical contextualization, Gated aggregation and Element-wise modulation. The instantiation formula of the focal modulation network is: (1) where q(·) is the query projection function, ⊙ is the element-wise multiplication, M(·) is the context aggregation function, and its output is called the modulator.

3. The diabetic retinopathy grading method based on improved SG-Former according to claim 1, characterized in that: The channel adaptive attention module in step S3 first uses adaptive average pooling (H, 1) along the height direction of each channel to compress each channel of the input feature map X into a feature vector with a height of 1. This step is shown in formula (2): (2) in is the input feature map, is the result after pooling in the height direction, and W is the feature vector in the width direction of each channel; Secondly, it is further processed through the one-dimensional convolution layer F1D to extract the pooled features, which can be expressed as formula (3): (3) in, represents the sigmoid function, M CH is the final channel attention map; F 1D (·) is a one-dimensional convolution operation; In the final stage of the channel adaptive attention module, M CH Multiplying and adding the original input feature map X can deepen the weighted effect of the channel adaptive attention module, which is beneficial to the extraction of fine-grained features of DR lesions, expressed as formula (4): (4)。 4. The diabetic retinopathy grading method based on improved SG-Former according to claim 1, characterized in that: In step S3, the Swin-Transformer module consists of a multi-head self-attention module and a feedforward neural network. The input features are first fed into the multi-head self-attention module, which divides the input features into multiple subspaces and calculates the self-attention in parallel, and then merges the results to capture long-distance dependencies and obtain rich feature representations. Subsequently, the results of the multi-head self-attention module are input into a feed-forward neural network, which consists of two fully connected layers with a nonlinear activation function in the middle to further transform and enhance the features.

5. The diabetic retinopathy grading method based on the improved SG-Former according to any one of claims 1 to 4, characterized in that: In step S2, the sixteen-square grid input method is to select 10 FFA images of each eye of a patient, and fill them into 10 positions arranged from left to right in the 4×4 sixteen-square grid in chronological order, and then randomly select 6 images from the remaining images to fill in the remaining 6 empty positions of the sixteen-square grid, and finally splice them into an image containing 16 pictures.

6. The diabetic retinopathy grading method based on improved SG-Former according to claim 5, characterized in that: The dynamic data augmentation oversampling method generates new samples by random rotation, flipping, affine and perspective transformations.

7. The diabetic retinopathy grading method based on improved SG-Former according to claim 6, characterized in that: In step S1, the acquisition of the fluorescent fundus angiography (FFA) image is performed using Heidelberg retinal angiography with a 55° field of view.

8. The diabetic retinopathy grading method based on improved SG-Former according to claim 7, characterized in that: In step S1, during the graded labeling, at least three ophthalmologists label all images separately without communication. If the labeling results of all ophthalmologists are consistent, the grading standard is determined; otherwise, all ophthalmologists need to discuss until a consistent graded labeling result is reached.