A multi-scale diabetic retinopathy grading method based on beta modulation

By constructing a multi-scale coding network and a feature fusion module, combined with Transformer and CNN, the problem of insufficient fusion of global and local features was solved, achieving high-precision grading of diabetic retinopathy and improving the accuracy and adaptability of medical image analysis.

CN122156072APending Publication Date: 2026-06-05HARBIN INSTITUTE OF TECHNOLOGY (SHENZHEN) (INSTITUTE OF SCIENCE AND TECHNOLOGY INNOVATION HARBIN INSTITUTE OF TECHNOLOGY SHENZHEN)

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HARBIN INSTITUTE OF TECHNOLOGY (SHENZHEN) (INSTITUTE OF SCIENCE AND TECHNOLOGY INNOVATION HARBIN INSTITUTE OF TECHNOLOGY SHENZHEN)
Filing Date
2026-01-30
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively integrate global structure and local details across different resolutions and lesion severity levels, resulting in an incomplete understanding of lesion features in medical image analysis, especially leading to misjudgments of disease severity in complex lesions.

Method used

A parallel multi-scale encoding network is constructed. By combining the advantages of Transformer and CNN, a global-local fusion module and a feature aggregation module based on Beta modulation are used to achieve the fusion of global and local features. Dilated convolution and attention mechanisms are employed for multi-scale feature fusion.

Benefits of technology

It significantly improves the accuracy and adaptability of medical image grading, especially in complex lesion scenarios, enabling precise assessment of lesion severity and providing high-precision five-level classification results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122156072A_ABST
    Figure CN122156072A_ABST
Patent Text Reader

Abstract

The application provides a multi-scale diabetic retinopathy grading method based on Beta modulation, and relates to the fields of medical image processing, computer vision, deep learning and the like. By collecting fundus images of diabetic retinopathy and performing pretreatment, a multi-scale image dataset containing complete images, large-scale image blocks and small-scale image blocks is generated; the multi-scale image dataset is input into the multi-scale grading model based on Beta modulation, global features are fused into local features through a global-local fusion module, the global features and the local features are aggregated through a feature aggregation module based on Beta modulation, the aggregated features are fused through a multi-scale fusion module, and a five-level grading probability of the diabetic retinopathy is output through a classifier; and the parameters of the multi-scale grading model based on Beta modulation are iteratively optimized to generate a final grading model. The method significantly enhances the feature extraction capability for different sizes of lesions, and simultaneously has good computational efficiency and generalization performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of medical image processing and computer vision technology, and in particular to an automatic grading method for diabetic retinopathy based on deep learning. Background Technology

[0002] Medical image analysis, as a crucial pillar of modern clinical diagnosis, plays an irreplaceable role in the early detection and precision treatment of diseases. This field, through in-depth interpretation of image data, helps doctors identify lesion characteristics and assess disease progression, directly impacting patients' health and lives. However, despite continuous technological advancements, medical image analysis still faces numerous challenges when dealing with complex lesions, urgently requiring more refined and intelligent solutions to improve diagnostic accuracy.

[0003] Diabetic retinopathy (DR) is one of the most common and serious microvascular complications in diabetic patients and a leading cause of blindness in working-age adults worldwide. Early screening and accurate grading are crucial for slowing disease progression and preventing vision loss. Currently, the clinical diagnosis of DR mainly relies on ophthalmologists manually interpreting fundus color photographs and assessing them according to international clinical grading standards (classified as normal, mild non-proliferative DR, moderate non-proliferative DR, severe non-proliferative DR, and proliferative DR). This method is highly dependent on the doctor's professional experience and subjective judgment, and the process is time-consuming and labor-intensive, making it difficult to implement on a large scale in areas with limited medical resources.

[0004] Current methods often struggle to adapt to the diverse manifestations of lesion features at different degrees and image resolutions when processing medical images. Many existing techniques tend to overlook the correlation between global structure and local details when analyzing images, leading to an incomplete understanding of lesion features. This deficiency is particularly pronounced when dealing with complex lesions. For example, in some diseases, the lesion area may exhibit subtle local changes while being influenced by the overall tissue structure; focusing solely on one aspect often results in missing crucial information.

[0005] A deeper technical challenge lies in effectively integrating global and local features—a core factor. Global features reflect the overall structure and lesion distribution of an image, while local features reveal subtle lesion textures and edge information. An imbalance or separation between these two can lead to biased analysis results. For example, when analyzing a medical image containing multiple degrees of lesion, failing to simultaneously capture the overall trend of lesion distribution and subtle anomalies in local areas may result in misjudgments of disease severity. This inadequacy in feature fusion directly impacts the accurate assessment of lesion severity, especially in scenarios requiring a comprehensive judgment combining information from multiple scales.

[0006] Therefore, how to effectively integrate global structure and local details under different resolutions and lesion degrees has become a key problem that urgently needs to be solved in medical image analysis. Summary of the Invention

[0007] To address the aforementioned issues, this invention proposes a multi-scale diabetic retinopathy (DR) grading method based on Beta modulation. The core idea of ​​this invention is to construct a parallel multi-scale encoding network to learn features of lesions at different scales, and to fuse global and local features using a global-local fusion module based on fully connected and convolutional operations. Simultaneously, a nonlinear modulation mechanism inspired by probability distributions is introduced, and a feature enhancement module based on a Beta distribution modulation function is innovatively designed. Through learnable parameters, the distribution of different features is dynamically adjusted, thereby achieving precise enhancement of key features and suppression of redundant information. Finally, an adaptive fusion network combining dilated convolution and attention mechanisms is used to fuse features from different branches, achieving high-precision five-level DR classification, thus improving the model's feature representation ability and grading accuracy for multi-scale lesions.

[0008] This invention provides a multi-scale diabetic retinopathy grading method based on beta modulation, mainly comprising: Fundus images of diabetic retinopathy were acquired and preprocessed to generate a multi-scale image dataset containing complete images, large-scale image patches, and small-scale image patches. A multi-scale hierarchical model based on Beta modulation was constructed, which includes a global encoder branch, a local encoder branch, a global-local fusion module, a Beta modulation-based feature aggregation module, and a multi-scale fusion module. The global encoder branch encodes the complete image based on Transformer, while the local encoder branch encodes large-scale and small-scale image patches based on convolutional neural networks. The multi-scale image dataset was input into the Beta modulation-based multi-scale hierarchical model. The global-local fusion module integrated global features into local features, the Beta modulation-based feature aggregation module aggregated global and local features, and the multi-scale fusion module fused the aggregated features. The resulting data was then processed by a classifier to output the five-level hierarchical probability of diabetic retinopathy. The parameters of the Beta modulation-based multi-scale hierarchical model were iteratively optimized to generate the final hierarchical model.

[0009] Furthermore, the preprocessing includes: normalizing the size and enhancing the contrast of the fundus image to obtain a normalized fundus image; performing non-overlapping segmentation on the normalized fundus image to generate large-scale image patches and small-scale image patches, which together with the complete image constitute the multi-scale image dataset.

[0010] Furthermore, the global-local fusion module includes: processing global features at different depths of the global encoder branch through a fully connected layer to obtain processed global features; and performing dimensional transformation, dot product, and pixel summation on the processed global features and local features at corresponding depths of the local encoder branch to obtain fused local features as input for the next layer of local encoding.

[0011] Furthermore, the feature aggregation module based on Beta modulation includes: generating Beta-distributed modulation parameters α and β using the global features of the last layer of the global encoder branch through a parallel fully connected network; reshaping and broadcasting the modulation parameters α and β to the spatial dimension of the local features of the last layer of the local encoder branch; applying the modulation parameters α and β to the local features to perform element-wise nonlinear transformation and numerical pruning to obtain modulated local features; performing weighted average aggregation of the modulated local features along the sequence dimension; and fusing the aggregated features with the original local features through residual connections to obtain aggregated features.

[0012] Furthermore, the generation of Beta distribution modulation parameters α and β includes: Given input features Through two parallel fully connected networks and Modulation parameters: in This is the weight matrix. For bias terms, It is the ReLU activation function. This is the Sigmoid function.

[0013] Furthermore, the multi-scale fusion module includes: upsampling the aggregated features of small-scale image blocks, performing channel transformation on the aggregated features of large-scale image blocks to obtain unified channel features; inputting the unified channel features into multiple dilated convolution branches with different dilation rates, and summing the pixel outputs of each branch after channel attention weighting; concatenating the summed features of all branches along the channels and compressing them through convolution to obtain fused features.

[0014] Furthermore, the classifier includes: performing global average pooling on the fused features to obtain pooled features; mapping the pooled features through a fully connected layer and processing them through a Softmax function to output the five-level hierarchical probabilities.

[0015] Furthermore, the iterative optimization includes: calculating the difference between the predicted probability and the hierarchical label using the cross-entropy loss function; and updating the parameters of each branch and module of the Beta-modulated multi-scale hierarchical model through backpropagation using the Adam optimizer.

[0016] Furthermore, the non-overlapping segmentation includes: segmenting the standardized fundus image into multiple small-scale image patches and multiple large-scale image patches; randomly flipping, rotating, and adjusting the brightness of the small-scale and large-scale image patches to generate enhanced image patches that together with the complete image constitute the multi-scale image dataset.

[0017] Furthermore, the classifier is composed of a fully connected layer and a Softmax function, which maps the fused high-dimensional features to a probability distribution of diabetic retinopathy from grade 0 to grade 4, and finally outputs the predicted probability of each category, supporting clinical grading decisions.

[0018] The technical solutions provided by the embodiments of the present invention have the following beneficial effects: 1. This invention discloses a multi-scale image analysis method based on a specific modulation scheme, addressing the challenge of accurately classifying complex lesion features in medical images, particularly the insufficient fusion of global and local features at different lesion degrees and image resolutions. It proposes an innovative solution. This invention constructs a multi-scale data input and multi-branch model structure, processing complete images, large-scale image patches, and small-scale image patches separately. Features are extracted by combining global and local coding branches, and feature integration is achieved through a global-local fusion module, a specific modulation feature aggregation module, and a multi-scale fusion module. This ensures collaborative analysis of global structure and local details, thereby accurately assessing the degree of lesion. The multi-level design of feature extraction and fusion in this invention significantly improves the adaptability to complex lesion patterns, especially demonstrating high accuracy and reliability in medical image classification, providing important auxiliary decision-making basis for clinical diagnosis. The overall technical effect reflects a promotion of the refinement and intelligence of medical image analysis.

[0019] 2. This invention effectively combines the advantages of Transformer in capturing global contextual information and CNN in extracting local detail features by constructing a parallel hybrid encoding network of Transformer and CNN. It solves the problem of the existing single architecture model's inability to take into account both global context and local details in DR classification, and significantly improves the model's ability to express features of multi-scale lesions.

[0020] 3. This invention innovatively designs a feature enhancement module based on the Beta distribution modulation function. By performing dynamic nonlinear transformation on multi-scale features through learnable distribution parameters, it realizes deep interaction and adaptive enhancement between features, solving the problems of coarse granularity and insufficient adaptive ability in traditional multi-scale feature fusion methods, thereby improving the accuracy of lesion grading.

[0021] 4. This invention employs a multi-scale feature fusion network that combines dilated convolution with different dilation rates and an attention mechanism. This network can adaptively capture lesion features in different receptive fields and assign weights to features at different scales, thereby enhancing the model's sensitivity to lesions at different scales and improving the accuracy of the five-level classification.

[0022] 5. This invention utilizes a multi-scale image patch sampling and preprocessing strategy to fully extract local lesion information from images while maintaining computational efficiency. This alleviates the computational overhead of the Transformer model directly processing high-resolution images, enabling the model to maintain good generalization performance even with limited medical data.

[0023] 6. The overall architecture design of this invention balances model performance and practicality, maintains low computational complexity, and provides feasibility for practical deployment in scenarios with limited medical resources. Attached Figure Description

[0024] Figure 1 This is a schematic diagram of the method flow of the present invention; Figure 2 This is a schematic diagram of the network framework structure of the present invention; Figure 3 This is a schematic diagram of the global-local fusion module of the present invention; Figure 4 This is a schematic diagram of the multi-scale fusion module of the present invention. Detailed Implementation

[0025] The specific implementation process of the technical solution of the present invention will be described in detail below with reference to specific embodiments. It should be particularly noted that the embodiments listed herein are only for the purpose of helping to understand the technical concept and implementation method of the present invention, and do not constitute a limitation on the scope of protection of the present invention. Any obvious improvements or substitutions made by those skilled in the art based on the concept of the present invention after reading the technical content of the present invention should be included within the scope of protection of the present invention.

[0026] An embodiment of the present invention discloses a multi-scale diabetic retinopathy grading method based on Beta modulation, as shown in Figures 1-4. The specific steps are as follows: S1: Acquire fundus images of diabetic retinopathy and preprocess them to generate a multi-scale image dataset containing complete images, large-scale image patches, and small-scale image patches; In this embodiment, the fundus images are divided into five levels, representing normal, mild DR, moderate DR, severe DR, and proliferative DR, respectively. For the fundus images, the black borders are first automatically cropped, contrast is enhanced using Gaussian blur, and the image size is adjusted to... The image size is then determined. The image is then segmented non-overlapping into 9 blocks of 16 each, serving as both small-scale and large-scale image blocks. A series of random data augmentation operations are introduced to improve model robustness, including random horizontal or vertical flipping, ±15° random rotation, and slight brightness and contrast adjustments. Finally, the images are categorized into three types and used as network input: small-scale image blocks, large-scale image blocks, and the entire image.

[0027] In practice, publicly available datasets of diabetic retinopathy can be used, combined with newly acquired datasets as input to the network. Furthermore, the image resizing, the number of large- and small-scale image patches, and data augmentation methods can be customized according to the specific characteristics of the data.

[0028] S2: Construct a multi-scale hierarchical model based on Beta modulation. This model includes a global encoder branch, a local encoder branch, a global-local fusion module, a feature aggregation module based on Beta modulation, and a multi-scale fusion module. The global encoder branch encodes the complete image based on Transformer, and the local encoder branch encodes large-scale image patches and small-scale image patches based on convolutional neural networks. The designed diabetic retinopathy grading model was initialized. The Kaiming initialization method was used to initialize the weight parameters of the convolutional neural network branches to accommodate the characteristics of the ReLU activation function. The Xavier uniform distribution initialization method was used to initialize the parameters of the linear projection layer of the Transformer branch and the query, key, and value matrices in the self-attention mechanism to ensure gradient stability in the early stages of training. All bias terms were initialized to zero. After initialization, the preprocessed multi-scale image dataset was divided into training, validation, and test sets for subsequent model training and evaluation.

[0029] The hierarchical model consists of a multi-branch parallel network, comprising three parts: a local encoder branch for small-scale features, a local encoder branch for large-scale features, and a global encoder branch for full-image features. The three branches take small-scale image patches, large-scale image patches, and the entire image as input, respectively. Within the local branches, a global-local fusion module is included between two CNN encoding layers to fuse global features of different depths into local features; it also includes a Beta-modulated feature aggregation module to fuse the global features from the last layer of the encoder with the local features. Finally, the two local branches are fused using a multi-scale fusion module, and the fused result is passed through a classification head to obtain the final hierarchical result.

[0030] In this embodiment, the four-layer CNN encoder is composed of a ResNet50 encoder structure. Specifically, the first CNN encoder uses ResNet's conv1 and conv2_x layers; the second CNN encoder uses ResNet's conv3_x layers; the third CNN encoder uses ResNet's conv4_x layers; and the fourth encoder uses ResNet's conv5_x layers.

[0031] In this embodiment, the Transformer encoder employs the classic Transformer encoder structure. First, the input sequence is embedded, converting each word into a vector representation and adding positional encoding to supplement the positional information in the sequence. Next, the encoder uses a multi-head self-attention mechanism to compute queries, keys, and values, capturing the relationships between elements in the input sequence to generate a weighted sum output. After each self-attention layer, the input passes through a feedforward neural network for further non-linear processing. Residual connections and layer normalization are used after each self-attention layer and feedforward neural network layer to stabilize the training process. The entire encoder consists of multiple stacked layers with the same structure, ensuring efficient capture and representation of complex contextual information in the input sequence.

[0032] In this embodiment, the global-local fusion module is as follows: Figure 3 As shown. For local features and global features The purpose of this module is to classify and label global features. Injected into local features In China. Specifically, for First, it goes through two fully connected layers to obtain... and After that, Perform dimensional transformation and channel broadcasting to obtain features. For local features, a convolution operation is performed to obtain new features. Simultaneously, dimensional transformation is performed to obtain And obtained through a fully connected layer .Will and ,as well as and New features are obtained by performing dot products separately. and This combines both of them with the original local features. New features are obtained by adding pixels together. The fused features serve as input to the next layer of the CNN encoder in the local branch.

[0033] In this embodiment, the feature aggregation module based on Beta modulation constructs a feature interaction mechanism based on deep learning, achieving adaptive fusion of global and local features through learnable Beta distribution parameters. The core of the module lies in utilizing global features. Feature generation dynamic spatial modulation factor, for local features Perform content-aware recalibration. The module's network structure contains two parallel fully connected network branches: the first fully connected layer of each branch will... of 3D feature mapping to The latent space is constructed and a ReLU activation function is used for nonlinear transformation; the second fully connected layer further transforms the features into... The channel modulation factor is constrained to the range [0,1] by the Sigmoid function, and then the parameter range is adjusted to [0.5, 2.5] through linear transformation to ensure the numerical stability of the modulation process. During forward propagation, the module first... Features are generated through two fully connected branches and Modulation factors, which reflect the characteristic importance of different channels. For For each feature vector in the dataset, a corresponding modulation parameter pair is generated. Then, through a dimension reshaping operation, the modulation parameters are broadcast to... The feature maps share the same spatial dimension. The final aggregation operation uses a weighted average along the feature sequence dimension. Compression is performed, retaining the most discriminative feature responses. This module enables cross-modal feature interaction, transforming structured features... Information effectively injected into image features The overall process can be represented by the following four sub-processes: First step: Beta modulation parameter generation. Given input features. Through two parallel fully connected networks and Modulation parameters: (1) (2) in This is the weight matrix. For bias terms, It is the ReLU activation function. This is the Sigmoid function.

[0034] Second process: Dimensional reshaping and parameter alignment. The modulation parameters are reshaped into spatial dimensions: (3) (4) The third process: Feature modulation and transformation. This involves modifying the input features... Perform Beta distribution modulation: (5) (6) (7) in This represents element-wise multiplication. To prevent numerical instability, use small constants. It is a numerical clipping function, and its mathematical definition is as follows: (8) Fourth process: Multi-feature aggregation and fusion. Along the sequence dimension. Perform weighted average aggregation and fuse it with the original features via residual connections: (9) (10) (11) in For learnable modulation intensity parameters, This represents a two-dimensional convolution operation.

[0035] In this embodiment, the multi-scale fusion module is as follows: Figure 4 As shown. For small-scale features First, upsampling is performed using bilinear interpolation to obtain features aligned with the target size. .for and large-scale features Each input to a convolutional layer is subjected to channel dimension transformation to obtain features with a uniform number of channels. and The transformed features are then input into four shared, parallel dilated convolution branches. Each branch uses a different dilation rate. The corresponding dilated convolutional layer is defined as: (12) in Indicates the first One branch, .

[0036] For each branch's output features, channel attention is applied sequentially for feature enhancement. The calculation process for channel attention weights is as follows: (13) (14) in Indicates global average pooling. and For the weights of the fully connected layer, It is the ReLU activation function. For the Sigmoid function, This indicates element-wise multiplication.

[0037] For the output of each branch and First, perform pixel-level addition to obtain Finally, the features processed from the four branches are concatenated along the channel dimension and then processed by a convolution kernel with a kernel size of [size missing]. The convolutional operation compresses the features. The output is the fused feature. It also includes multi-scale information from different receptive fields and highlights key regional features related to the grading of diabetic retinopathy through an attention mechanism.

[0038] In this embodiment, the classification head adopts a simple structure of a global average pooling layer followed by a fully connected layer and a Softmax activation function, directly outputting the five-class probability distribution.

[0039] S3: Input the multi-scale image dataset into the multi-scale hierarchical model based on Beta modulation, integrate global features into local features through the global-local fusion module, aggregate global and local features through the feature aggregation module based on Beta modulation, fuse the aggregated features through the multi-scale fusion module, and output the five-level probability of diabetic retinopathy through the classifier. In this example, the specific training configuration is as follows: Cross-entropy loss is chosen as the optimization objective to quantify the difference between the model's predicted probability distribution and the true lesion grade label; the optimizer is AdamW, with an initial learning rate set to 1e-4, combined with a weight decay strategy to improve the model's generalization ability; cosine annealing is used for learning rate scheduling, allowing the learning rate to decrease smoothly with increasing training epochs, helping the model converge more stably to a local optimum. The entire training cycle is set to 100 epochs, with a batch size of 32. To effectively prevent overfitting and preserve the optimal model, an early stopping mechanism is introduced during training: after each training epoch, the model performance is evaluated on an independent validation set; if the validation set accuracy does not improve for five consecutive epochs, training is automatically terminated. Simultaneously, the loss and accuracy curves on the training and validation sets are continuously monitored to ensure stable convergence and no abnormal fluctuations during training. Finally, the optimal model parameters on the validation set are saved.

[0040] S4: Iteratively optimize the parameters of the Beta modulation-based multi-scale hierarchical model to generate the final hierarchical model; Based on the optimization framework defined by S3, the weight parameters of each branch and fusion module in the network are iteratively updated using the backpropagation algorithm. The continuous decrease in the loss function indicates that the model's ability to represent and grade diabetic retinopathy features is gradually improving. The training process terminates when the model's performance on the validation set reaches a preset standard, such as an accuracy threshold or when an early stopping condition is triggered. At this point, the best-performing model saved is the final generated multi-scale diabetic retinopathy grading model based on Beta modulation. This model fully integrates global contextual information and multi-scale local features, and utilizes the Beta modulation mechanism to enhance the representation ability of key lesion regions, enabling it to accurately handle lesion morphologies of different sizes, from microvascular abnormalities to large-scale exudates. The optimized model not only possesses high-precision grading performance but also maintains good robustness, serving as a reliable computer-aided diagnostic tool to provide effective support for the screening and grading of clinical diabetic retinopathy.

[0041] The above description is merely a preferred embodiment of one or more embodiments of this specification and is not intended to limit the scope of one or more embodiments of this specification. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of one or more embodiments of this specification should be included within the protection scope of one or more embodiments of this specification.

Claims

1. A multi-scale diabetic retinopathy grading method based on Beta modulation, characterized in that, include: S1: Acquire fundus images of diabetic retinopathy and preprocess them to generate a multi-scale image dataset containing complete images, large-scale image patches, and small-scale image patches; S2: Construct a multi-scale hierarchical model based on Beta modulation. This model includes a global encoder branch, a local encoder branch, a global-local fusion module, a feature aggregation module based on Beta modulation, and a multi-scale fusion module. The global encoder branch encodes the complete image based on Transformer, and the local encoder branch encodes large-scale image patches and small-scale image patches based on convolutional neural networks. S3: Input the multi-scale image dataset into the multi-scale hierarchical model based on Beta modulation, integrate global features into local features through the global-local fusion module, aggregate global and local features through the feature aggregation module based on Beta modulation, fuse the aggregated features through the multi-scale fusion module, and output the five-level probability of diabetic retinopathy through the classifier. S4: Iteratively optimize the parameters of the multi-scale hierarchical model based on Beta modulation to generate the final hierarchical model.

2. The method as described in claim 1, characterized in that, The preprocessing includes: The fundus image is normalized in size and enhanced in contrast to obtain a normalized fundus image; Standardized fundus images are segmented without overlap to generate large-scale and small-scale image patches, which, together with the complete images, constitute the multi-scale image dataset.

3. The method as described in claim 1, characterized in that, The global-local fusion module includes: The global features at different depths of the global encoder branches are processed through a fully connected layer to obtain the processed global features; The processed global features and the local features at the corresponding depths of the local encoder branches are subjected to dimensional transformation, dot product, and pixel summation to obtain fused local features, which are then used as inputs for the next layer of local encoding.

4. The method as described in claim 1, characterized in that, The feature aggregation module based on Beta modulation includes: The Beta-distributed modulation parameters α and β are generated through a parallel fully connected network using the global features of the last layer of the global encoder branch. The modulation parameters α and β are reshaped and broadcast to the spatial dimension of the last layer of local features in the local encoder branch; The modulation parameters α and β are applied to the local features to perform element-wise nonlinear transformation and numerical clipping to obtain the modulation local features; Weighted average aggregation of local modulation features along the sequence dimension; The aggregated features are obtained by fusing the aggregated features with the original local features through residual connections.

5. The method as described in claim 4, characterized in that, The generation of Beta distribution modulation parameters α and β includes: Given input features Through two parallel fully connected networks and Modulation parameters: in This is the weight matrix. For bias terms, It is the ReLU activation function. This is the Sigmoid function.

6. The method as described in claim 1, characterized in that, The multi-scale fusion module includes: Upsampling is performed on the aggregated features of small-scale image patches, and channel transformation is performed on the aggregated features of large-scale image patches to obtain unified channel features; The unified channel features are input into multiple dilated convolution branches with different dilation rates, and the outputs of each branch are summed after channel attention weighting. The features of all branches are summed and concatenated along the channels, and then compressed through convolution to obtain the fused features.

7. The method as described in claim 1, characterized in that, The classifier includes: The fused features are subjected to global average pooling to obtain pooled features; The pooled features are mapped through a fully connected layer and processed by the Softmax function to output the five-level hierarchical probabilities.

8. The method as described in claim 1, characterized in that, The iterative optimization includes: The difference between the predicted probability and the hierarchical label is calculated using the cross-entropy loss function. The Adam optimizer is used to update the parameters of each branch and module of the Beta-modulated multi-scale hierarchical model through backpropagation.

9. The method as described in claim 2, characterized in that, The non-overlapping segmentation includes: The standardized fundus image was segmented into multiple small-scale image patches and multiple large-scale image patches; The small-scale and large-scale image patches are randomly flipped, rotated, and their brightness adjusted to generate enhanced image patches that together with the complete image constitute the multi-scale image dataset.

10. The method as described in claim 7, characterized in that, The classifier consists of a fully connected layer and a Softmax function, which maps the fused high-dimensional features to a probability distribution of diabetic retinopathy from grade 0 to grade 4, and finally outputs the predicted probability for each category, supporting clinical grading decisions.