Fundus image diagnosis method and system based on fusion attention mechanism

By employing a fundus image diagnostic method that integrates attention mechanisms, this method utilizes Attention U-Net and ResNet networks for optic disc segmentation and classification. This addresses the issues of segmentation and classification separation and insufficient information fusion in existing technologies, achieving efficient and accurate diagnosis of fundus diseases.

CN120953602APending Publication Date: 2025-11-14EYE & ENT HOSPITAL SHANGHAI MEDICAL SCHOOL FUDAN UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510927981.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-07
Publication Date
2025-11-14

AI Technical Summary

Technical Problem

Existing fundus image analysis methods suffer from problems such as separation of segmentation and classification, insufficient fusion of local and global information, and poor robustness across datasets, resulting in low diagnostic efficiency, high cost, and poor accessibility.

Method used

A fundus image diagnostic method employing an attention-integrated mechanism is proposed. Optic disc segmentation is performed using Attention U-Net, combined with dynamic weighted feature fusion and ResNet classification network, and end-to-end training is conducted using a joint optimization loss function to enhance attention to local pathological features while preserving global context.

Benefits of technology

It achieves multi-task collaborative optimization in fundus image analysis, significantly improves classification and segmentation accuracy, enhances the ability to identify pathological regions, improves robustness and clinical applicability across datasets, and meets the needs of real-time diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120953602A_ABST
    Figure CN120953602A_ABST
Patent Text Reader

Abstract

The invention discloses a fundus image diagnosis method based on a fusion attention mechanism, and the method comprises the following steps: obtaining a to-be-processed fundus image, and carrying out the normalization processing of the fundus image; performing optic disc segmentation on the fundus image through an encoder-decoder network Attention U-Net embedded with an attention mechanism, and generating a segmentation mask; inputting the segmented mask and the original fundus image into a dynamic weighted feature fusion module to generate a fused image; performing feature extraction on the fused image through a ResNet classification network, and outputting an eye disease classification result; wherein the segmentation and classification tasks are subjected to end-to-end training through joint optimization of a loss function.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence medical technology, and in particular to an eye image processing technology. Background Technology

[0002] In recent years, blinding eye diseases such as pathological myopia (PM), glaucoma, and diabetic retinopathy (DR) have become major challenges in global public health. According to the World Health Organization (WHO), approximately 2.2 billion people worldwide have visual impairment, of which at least 1 billion cases could be prevented from irreversible damage through early diagnosis and intervention. Fundus imaging, as a non-invasive and cost-effective screening method, can provide crucial evidence for disease diagnosis through quantitative analysis of the optic disc (OD), macula, and vascular morphology. However, current clinical diagnosis relies heavily on physician experience, resulting in low efficiency, high cost, and poor accessibility, necessitating the assistance of automated tools.

[0003] Traditional fundus image analysis methods primarily rely on manual feature extraction (such as edge detection and histogram equalization) combined with machine learning algorithms (such as support vector machines and random forests). For example, Aquino et al. (2010) achieved optic disc segmentation through morphological operations and edge detection, but this method relies on manual initialization and is sensitive to noise; Tan et al. (2009) extracted peripapillary atrophy features based on variational level sets for PM classification, but this method only relies on a single feature, limiting its generalization ability. These methods suffer from the following drawbacks: limitations of manual features: reliance on expert experience, difficulty in capturing complex pathological features, and susceptibility to image quality and noise; task isolation: segmentation and classification tasks are optimized independently, leading to information fragmentation and an inability to synergistically improve performance; insufficient generalization ability: sensitivity to differences in data distribution, significant performance degradation across datasets, and difficulty adapting to diverse clinical scenarios.

[0004] In recent years, deep learning technology has significantly improved the accuracy of medical image analysis by automatically learning high-dimensional features. For example, U-Net (Ronneberger et al., 2015) achieves optic disc segmentation through an encoder-decoder structure and skip connections; models such as ResNet (He et al., 2016) are widely used for eye disease classification. However, existing deep learning solutions still have the following problems:

[0005] Segmentation and classification are separated: Existing methods usually treat segmentation and classification as independent processes (such as Freire using the Xception model for classification and U-Net for segmentation), lacking end-to-end joint optimization, resulting in the segmentation results not being effectively used for classification tasks;

[0006] Insufficient fusion of local and global information: Most classification models ignore the localization information of key anatomical structures (such as the optic disc) and rely only on global features, making it difficult to distinguish diseases with similar pathological features (such as glaucoma and other retinal diseases).

[0007] Poor robustness across datasets: Existing models show significant performance degradation on datasets with large distribution differences, limiting their clinical applicability. Summary of the Invention

[0008] To address the problems in the background technology, this application aims to propose a converged attention-based diagnostic network, achieving a technological leap through the following innovations: Task-coordinated optimization: By simultaneously optimizing segmentation and classification tasks through a joint loss function, the model's focus on pathological regions is enhanced; Dynamically weighted feature fusion: A fusion mechanism is designed to dynamically weight the optic disc segmentation mask onto the original image, strengthening local pathological features while preserving global context; Cross-dataset robustness: U-Net based on the attention mechanism (CBAM) improves segmentation accuracy, and combined with the ResNet classification network, the generalization ability is verified in heterogeneous datasets (such as iChallenge-PM and Retina Dataset).

[0009] This application discloses a fundus image diagnosis method based on a fusion attention mechanism, comprising the following steps: acquiring a fundus image to be processed and performing normalization processing; segmenting the fundus image into the optic disc using an AttentionU-Net encoder-decoder network with an embedded attention mechanism to generate a segmentation mask; inputting the segmentation mask and the original fundus image into a dynamic weighted feature fusion module to generate a fused image; extracting features from the fused image using a ResNet classification network to output an ocular disease classification result; wherein, the segmentation and classification tasks are trained end-to-end by jointly optimizing a loss function.

[0010] Optionally, the Attention U-Net includes an encoder, a decoder, and skip connections, and embeds a Convolutional Block Attention Module (CBAM) in each skip connection to enhance feature representation in the channel and spatial dimensions; the CBAM includes:

[0011] The channel attention submodule performs global average pooling and max pooling on the input feature map to generate channel weights.

[0012] The spatial attention submodule performs channel-level average pooling and channel-level max pooling on the input feature map to generate spatial weights.

[0013] The channel weights and spatial weights are multiplied element-wise with the input feature map to optimize feature selection.

[0014] Optionally, the dynamic weighted feature fusion module is implemented using the following formula:

[0015] I fused =w·M pred ·I input +(1-w)·I input

[0016] Among them, I fused M represents the fused image. pred It is the predicted segmentation mask, I input This is the original fundus image, where w is the weight parameter, and the segmentation mask is dynamically adjusted through backpropagation. M pred For fused image I fused The proportion of contribution.

[0017] Optionally, the dynamic weighted feature fusion module introduces a confidence map C. conf Its value is the predicted confidence score of each pixel in the segmentation mask, used to locally adjust the fusion weights to preferentially retain pathological features in high-confidence regions. The confidence map is generated from the predicted probabilities of the segmentation mask, and the fusion formula is adjusted as follows:

[0018] I fused =C conf ·w·M pred +(1-C conf )·I input ;

[0019] The fused image output by the dynamic weighted feature fusion module is processed by an adaptive normalization layer to adapt to the input requirements of the classification network.

[0020] Optionally, the ResNet-based classification network adopts the ResNet-34 architecture, which includes residual blocks and global average pooling layers; its input is a fused image, the output layer is replaced with a fully connected layer that matches the number of disease categories, and the final output layer uses the Softmax function to calculate the disease category probability.

[0021] Optionally, the joint optimization loss function is the segmentation loss L. seg With classification loss L cls The weighted sum is expressed as:

[0022] L total =λ s ·L seg +λ c ·L cls

[0023] The segmentation loss uses the Dice loss function to calculate the overlap between the predicted segmentation mask and the true mask.

[0024]

[0025] Among them, |M pred ∩M gt | Indicates the number of pixels overlapping between the predicted and ground truth masks; |M pred | and | M gt | represents the total number of pixels in the predicted mask and the true mask, respectively;

[0026] The classification loss uses the cross-entropy loss function to calculate the difference between the predicted probability and the true label:

[0027]

[0028] Where C is the total number of disease categories, and P(y=c∣x) represents the predicted probability of category c.

[0029] Optionally, the encoder extracts features through multiple convolutional modules, each module containing 3×3 convolution, ReLU activation and max pooling operations, progressively reducing the feature map resolution;

[0030] The decoder restores the feature map resolution through upsampling operations and fuses it with the skip connection features of the encoder to reconstruct spatial details;

[0031] The ResNet-34 network adopts a residual block structure, in which each residual block contains a convolutional layer, a batch normalization layer, and a ReLU activation function, and solves the gradient vanishing problem through identity mapping.

[0032] This application also provides a fundus image diagnostic system based on a fusion attention mechanism, including:

[0033] The segmentation module, using an Attention U-Net structure, receives the input fundus image, performs optic disc segmentation on the fundus image, and generates a segmentation mask.

[0034] The dynamic weighted feature fusion module is used to input the segmentation mask and the original fundus image into the dynamic weighted feature fusion module to generate a fused image;

[0035] The classification module is used to extract features from the fused image using a ResNet classification network and output the classification results of eye diseases.

[0036] The joint optimization module is configured to perform end-to-end training for segmentation and classification tasks by jointly optimizing the loss function.

[0037] This application also provides a computer device, including: a processor coupled to a memory, the memory storing computer execution instructions, and the processor executing the computer execution instructions stored in the memory, causing the processor to perform the method described above.

[0038] This application also provides a computer-readable storage medium for storing a computer program, the computer program including instructions for implementing the methods described above.

[0039] The framework proposed in this application achieves significant performance improvements and breakthroughs in clinical applicability in fundus image analysis through end-to-end joint optimization and dynamic feature fusion mechanisms. The specific technical effects are as follows:

[0040] (1) Multi-task collaborative optimization significantly improves performance indicators.

[0041] Breakthrough in classification accuracy: In the binary classification task for pathological myopia (iChallenge-PM dataset), the model achieved an accuracy of 97.1% (a 0.6% improvement over the best baseline EfficientNet), with precision and F1 score of 96.2% and 96.5%, respectively; in the four-class classification task for retinal diseases (Retina Dataset), the accuracy reached 90.4% (a 1.3% improvement over the baseline model), validating the effectiveness of cross-task collaborative optimization.

[0042] Enhanced segmentation accuracy: The U-Net segmentation module with integrated attention mechanism (CBAM) achieves a Dice coefficient of 0.942 in the visual disc segmentation task, which is 4.7% higher than the traditional U-Net, providing high-precision region localization support for classification tasks.

[0043] (2) Dynamic feature fusion enhances pathological region identification

[0044] Local-global information complementarity: By using a dynamic weighted feature fusion mechanism, the segmentation mask is fused with the original image, which improves the sensitivity of the classification network to pathological regions (such as optic disc lesions) by 23% (verified by Grad-CAM visualization), while preserving global features such as vascular distribution. In the task of distinguishing glaucoma from other retinal diseases, the misdiagnosis rate is reduced by 12%.

[0045] Adaptive weight learning: Learnable parameters (weight w) dynamically adjust the contribution of the segmentation mask, automatically focusing on key regions in complex lesions (such as concurrent PM and glaucoma), improving classification confidence by 9.8%.

[0046] (3) Excellent robustness across datasets

[0047] Generalization capability of heterogeneous data: On iChallenge-PM (single pathology) and RetinaDataset (multiple diseases) with significant distribution differences, the model classification performance fluctuation was only 2.1%, which is significantly lower than that of traditional models (such as VGG-16 with a fluctuation of 8.6%), indicating that the dynamic fusion mechanism effectively alleviates the data bias problem.

[0048] Small sample adaptability: In the ablation experiment with only 300 training images (a subset of Retina Dataset), the model still maintained an accuracy of 85.2%, which is 6.8% higher than the independently trained classification model (78.4%), verifying the robustness of joint optimization in data-scarce scenarios.

[0049] (4) Balancing computational efficiency with clinical applicability

[0050] End-to-end real-time processing: The processing time for a single fundus image (224×224 resolution) is only 0.15 seconds (GPU environment), which meets the needs of real-time clinical diagnosis; the number of model parameters (ResNet-34 backbone) is controlled at 21.3M, which is 47% less than DenseNet-121, while taking into account deployment efficiency.

[0051] Enhanced interpretability of pathology: By using heatmaps generated through fusion masks, the visual disc regions on which classification decisions are based are visually displayed, assisting doctors in verifying AI results and increasing clinical adoption rate by 35% (simulated doctor evaluation experiment).

[0052] This application achieves a simultaneous breakthrough in segmentation and classification performance in fundus image analysis through task collaboration, dynamic fusion, and cross-dataset optimization. It significantly outperforms existing technologies in terms of accuracy, efficiency, and clinical applicability, providing a reliable solution for automated screening and accurate diagnosis of ophthalmic diseases. Attached Figure Description

[0053] Figure 1 This is a schematic diagram of the method flow provided in the embodiments of this application;

[0054] Figure 2 The overall flowchart provided for the embodiments of this application illustrates the process from raw fundus photographs to classification results;

[0055] Figure 3 This is a schematic diagram of the network structure of the Attention U-Net provided in an embodiment of this application; Detailed Implementation

[0056] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0057] like Figure 1 and Figure 2 As shown, this application provides a fundus image diagnostic method based on a fusion attention mechanism, including the following steps:

[0058] Acquire the fundus image to be processed and perform normalization processing (including size normalization and pixel value standardization);

[0059] The fundus image is segmented into an optic disc using an Attention U-Net encoder-decoder network with an embedded attention mechanism to generate a segmentation mask;

[0060] The segmentation mask and the original fundus image are input into the dynamic weighted feature fusion module to generate a fused image;

[0061] The fused image is used to extract features through a ResNet classification network, and the results of eye disease classification are output.

[0062] The segmentation and classification tasks are trained end-to-end by jointly optimizing the loss function.

[0063] like Figure 3 As shown, it illustrates the structure of the Attention U-Net, including an encoder, a decoder, and skip connections, with a convolutional block attention module (CBAM) embedded in each skip connection to enhance the feature representation of the channel and spatial dimensions.

[0064] The convolutional block attention module (CBAM) includes:

[0065] The channel attention submodule performs global average pooling and max pooling on the input feature map to generate channel weights.

[0066] The spatial attention submodule performs channel-level average pooling and channel-level max pooling on the input feature map to generate spatial weights.

[0067] The channel weights and spatial weights are multiplied element-wise with the input feature map to optimize feature selection.

[0068] Optionally, the dynamic weighted feature fusion module is implemented using the following formula:

[0069] Ifused =w·M pred ·I input +(1-w)·I imput

[0070] Among them, I fused M represents the fused image. pred It is the predicted segmentation mask, I input This is the original fundus image, where w is the weight parameter, and the segmentation mask is dynamically adjusted through backpropagation. M pred For fused image I fused The proportion of contribution.

[0071] Optionally, the dynamic weighted feature fusion module introduces a confidence map C. conf Its value is the predicted confidence score of each pixel in the segmentation mask, used to locally adjust the fusion weights to preferentially retain pathological features in high-confidence regions. The confidence map is generated from the predicted probabilities of the segmentation mask, and the fusion formula is adjusted as follows:

[0072] I fused =C conf ·w·M pred +(1-C conf )·I input ;

[0073] The fused image output by the dynamic weighted feature fusion module is processed by an adaptive normalization layer to adapt to the input requirements of the classification network.

[0074] Optionally, the ResNet-based classification network adopts the ResNet-34 architecture, including residual blocks and global average pooling layers; its input is a fused image, the output layer is replaced with a fully connected layer matching the number of disease categories, and the final output layer uses the Softmax function to calculate the disease category probability.

[0075] Among them, Z c This represents the logit value of category c, where C is the total number of categories.

[0076] The ResNet classification network structure is shown in the table below:

[0077] Layer name Output size layer Input 224×224×3 Input image Convl 112×112×64 A 7×7 filter with 64 filters and a step size of 2 is followed by a 3×3 max pooling filter with a step size of 2. Conv2_x 56×56×64 3×3 convolutional residual block (3 layers) with 64 filters Conv3x 28×28x128 3×3 convolutional residual block (4 layers) with 128 filters Conv4_x 14×14×256 3×3 convolutional residual block (6 layers) with 256 filters Conv5_x 7×7×512 3×3 convolutional residual block (3 layers) with 512 filters Global average pooling 1x1×512 Global average pooling in a 7×7 spatial dimension Fully connected layer 1×1×C A fully connected layer with C output categories.

[0078] The residual block structure consists of a 3x3 convolutional layer, batch normalization, ReLU activation function, another 3x3 convolutional layer, and batch normalization. After the batch normalization output of the last layer, the features of the input residual block and the output features of the residual block are summed and then output through the ReLU activation function.

[0079] Optionally, the joint optimization loss function is the segmentation loss L.seg With classification loss L cls The weighted sum is expressed as:

[0080] L total =λ s ·L seg +λ c ·L cls

[0081] The segmentation loss uses the Dice loss function to calculate the overlap between the predicted segmentation mask and the true mask.

[0082]

[0083] Among them, |M pred ∩M gt | Indicates the number of pixels overlapping between the predicted and ground truth masks; |M pred | and | M gt | represents the total number of pixels in the predicted mask and the true mask, respectively;

[0084] The classification loss uses the cross-entropy loss function to calculate the difference between the predicted probability and the true label:

[0085]

[0086] Where C is the total number of disease categories, and P(y=c∣x) represents the predicted probability of category c.

[0087] Optionally, the encoder extracts features through multiple convolutional modules, each module containing 3×3 convolution, ReLU activation and max pooling operations, progressively reducing the feature map resolution;

[0088] The decoder restores the feature map resolution through upsampling operations and fuses it with the skip connection features of the encoder to reconstruct spatial details;

[0089] The ResNet-34 network adopts a residual block structure, in which each residual block contains a convolutional layer, a batch normalization layer, and a ReLU activation function, and solves the gradient vanishing problem through identity mapping.

[0090] The above technical solution will be verified and analyzed experimentally below:

[0091] Dataset and Experiment Setup

[0092] Dataset: iChallenge-PM: 1,200 fundus images (PM and non-PM binary classification), 960 images in the training set and 240 images in the test set.

[0093] Retina Dataset: 601 images (four categories: normal, cataract, glaucoma, and other retinal diseases), 480 images in the training set and 121 images in the test set.

[0094] Preprocessing: Image scaled to 224×224 pixels, no data augmentation, only pixel normalization ([0,1] range).

[0095] Baseline models: VGG-16, ResNet-50, DenseNet-121, Inception-V3, EfficientNet.

[0096] The performance comparison is as follows:

[0097] iChallenge-PM (Binary Classification):

[0098] Model Accuracy (%) Accuracy (%) F1 score (%) VGG-16 93.7 91.6 92.2 EfficientNet 96.5 95.5 95.8 This application 97.1 96.2 96.5

[0099] Retina Dataset (Four Categories):

[0100] Model Accuracy (%) Accuracy (%) F1 score (%) DenseNet-121 88.7 86.1 85.7 EfficientNet 89.1 87.0 86.3 This application 90.4 88.6 88.1

[0101] The above comparison shows that the architecture of this application has advantages in classification performance and robustness across datasets: it significantly outperforms the benchmark model in both binary and quadruple classification tasks, with accuracy improvements of 0.6% and 1.3%, respectively; on heterogeneous datasets (iChallenge-PM and Retina Dataset), the classification performance fluctuation of this application is only 2.1% (97.1%→90.4%), which is far lower than VGG-16 (8.6%).

[0102] The ablation experiment is as follows:

[0103]

[0104]

[0105] It can be seen that the dynamic fusion mechanism contributes: removing the fusion module leads to a 1.3% decrease in classification accuracy, verifying its role in enhancing pathological regions.

[0106] Necessity of the attention module: Replacing it with a regular U-Net reduced the segmentation Dice coefficient by 4.7%, demonstrating the criticality of CBAM for feature selection.

[0107] Real-time testing:

[0108] Inference speed: End-to-end processing time for a single image is 0.15 seconds (NVIDIA A100 GPU), meeting real-time clinical needs.

[0109] Computational efficiency: The number of model parameters is 21.3M (ResNet-34 backbone), which is 47% less than DenseNet-121 (40.1M).

[0110] This application proposes a novel framework for eye disease classification, integrating optic disc segmentation and eye disease classification tasks in an end-to-end manner. Key innovations include the use of an attention-based U-Net for accurate segmentation, a dynamic weighted feature fusion mechanism to combine local and global information, and a joint optimization strategy to enhance synergy between segmentation and classification tasks. Experiments on the iChallenge-PM and retinal datasets demonstrate superiority over several widely used baseline models. Ablation studies further validate the contribution of each module to the overall performance, making the architecture both robust and efficient for eye disease classification. This research highlights the potential of combining segmentation and classification tasks within a unified framework, providing a reliable tool for automated ophthalmic diagnosis. By focusing on local features (e.g., the optic disc) and global contextual information, this application enhances diagnostic capabilities, paving the way for more comprehensive and accurate disease detection systems, which will bring hope to patients with pathological myopia and other eye diseases.

[0111] This application also provides a fundus image diagnostic system based on a fusion attention mechanism, including:

[0112] The segmentation module, using an Attention U-Net structure, receives the input fundus image, performs optic disc segmentation on the fundus image, and generates a segmentation mask.

[0113] The dynamic weighted feature fusion module is used to input the segmentation mask and the original fundus image into the dynamic weighted feature fusion module to generate a fused image;

[0114] The classification module is used to extract features from the fused image using a ResNet classification network and output the classification results of eye diseases.

[0115] The joint optimization module is configured to perform end-to-end training for segmentation and classification tasks by jointly optimizing the loss function.

[0116] It should be understood that specific limitations regarding the video disc splitting system can be found in the method limitations described above, and will not be repeated here. Each module / unit in the above system can be implemented entirely or partially through software, hardware, or a combination thereof. These modules / units can be embedded in hardware or independently of the processor in the computer device, or stored in software in the memory of the computer device, so that the processor can call and execute the operations corresponding to each module.

[0117] This application also provides a computer device, including: a processor coupled to a memory, the memory storing computer execution instructions, and the processor executing the computer execution instructions stored in the memory, causing the processor to perform the above-described method.

[0118] This application also provides a computer-readable storage medium for storing a computer program, the computer program including instructions for implementing the above-described method.

[0119] The memory stores computer program instructions, which, when executed, cause the processor to perform the steps of the above-described method.

[0120] It should be understood that the processor provided in the above embodiments of this application may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.

[0121] It should also be understood that the number of processors in the computer device in the above embodiments of this application can be one or more, and can be adjusted according to the actual application scenario. This is merely an illustrative example and is not intended to limit the scope. The number of memory in the embodiments of this application can be one or more, and can be adjusted according to the actual application scenario. This is merely an illustrative example and is not intended to limit the scope.

[0122] It should also be noted that when a computer device includes a processor (or processing unit) and a memory, the processor in this application may be integrated with the memory, or the processor and the memory may be connected through an interface. This can be adjusted according to the actual application scenario and is not limited.

[0123] This application provides a chip system including a processor for supporting a computer device (client or server) in implementing the functions of the controller involved in the above-described methods, such as processing data and / or information involved in the above-described methods. In one possible design, the chip system also includes a memory for storing necessary program instructions and data. This chip system can be composed of chips or may include chips and other discrete devices.

[0124] In another possible design, when the chip system is a chip within user equipment or an access network, the chip includes a processing unit and a communication unit. The processing unit may be, for example, a processor, and the communication unit may be, for example, an input / output interface, pins, or circuits. The processing unit can execute computer-executable instructions stored in the storage unit to cause the chip within the client or management server to perform the steps of a common-sense question-and-answer method. Optionally, the storage unit can be an on-chip storage unit, such as a register or cache, or it can be an external storage unit within the client or management server, such as read-only memory (ROM) or other types of static storage devices capable of storing static information and instructions, such as random access memory (RAM).

[0125] It should be understood that the methods and / or embodiments in this application can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowchart. When the computer program is executed by a processing unit, the functions defined in the methods of this application are performed.

[0126] It should be understood that the controller or processor mentioned in the above embodiments of this application may be a central processing unit (CPU), or one or more combinations of other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.

[0127] It should also be understood that the number of processors or controllers in the computer devices or chip systems in the above embodiments of this application may be one or more, and can be adjusted according to the actual application scenario. This is merely an illustrative example and is not intended to limit the scope. Similarly, the number of memories in the embodiments of this application may be one or more, and can be adjusted according to the actual application scenario. This is merely an illustrative example and is not intended to limit the scope.

[0128] It should be noted that the computer-readable medium described in this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0129] In this application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, capable of transmitting, propagating, or transmitting a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wireline, optical fiber, RF, etc., or any suitable combination thereof.

[0130] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0131] The flowcharts or block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of devices, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-specific system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0132] In another aspect, embodiments of this application also provide a computer-readable medium, which may be included in the device described in the above embodiments; or it may exist independently and not assembled into the device. The computer-readable medium carries one or more computer-readable instructions, which may be executed by a processor to implement the steps of the methods and / or technical solutions of the various embodiments of this application. The computer may be the aforementioned computer device (client or server or other computer network communication device).

[0133] In a typical configuration of this application, the terminal and the service network devices each include one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0134] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0135] Computer-readable media include both permanent and non-permanent, removable and non-removable media, which can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, read-only optical disc (CD-ROM), digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.

[0136] Furthermore, this application also provides a computer program stored in a computer device, which causes the computer device to execute the method for executing the control code.

[0137] It should be noted that this application can be implemented in software and / or a combination of software and hardware, for example, using an application-specific integrated circuit (ASIC), a general-purpose computer, or any other similar hardware device. In some embodiments, the software program of this application can be executed by a processor to implement the steps or functions described above. Similarly, the software program of this application (including related data structures) can be stored in a computer-readable recording medium, such as RAM memory, magnetic or optical drives, floppy disks, and similar devices. Furthermore, some steps or functions of this application can be implemented in hardware, for example, as circuitry that cooperates with a processor to perform the various steps or functions.

[0138] It will be apparent to those skilled in the art that this application is not limited to the details of the exemplary embodiments described above, and that this application can be implemented in other specific forms without departing from the spirit or essential characteristics of this application. Therefore, the embodiments should be considered illustrative and non-limiting in all respects, and the scope of this application is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be embraced within this application. No reference numerals in the claims should be construed as limiting the scope of the claims. Furthermore, the terminology used in the embodiments of this application is for the purpose of describing particular embodiments only and is not intended to limit the invention.

[0139] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. The singular forms "a," "the," and "the" used in the embodiments of this application are also intended to include the plural forms unless the context clearly indicates otherwise.

[0140] Furthermore, the terms “comprising” and “having”, and any variations thereof, are intended to cover non-exclusive inclusion, such that a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units that are explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to such process, method, product, or apparatus.

[0141] In the description of this application, unless otherwise stated, " / " indicates that the objects before and after are in an "or" relationship. For example, A / B can mean A or B. "And / or" in this application is merely a description of the relationship between the related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone, where A and B can be singular or plural. Depending on the context, the words "if" or "if" as used herein can be interpreted as "when," "when," "in response to determination," or "in response to detection." Similarly, depending on the context, the phrase "if determination" or "if detection (of the stated condition or event)" can be interpreted as "when determination," "in response to determination," "when detection (of the stated condition or event)," or "in response to detection (of the stated condition or event)."

[0142] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. A fundus image diagnostic method based on a fusion attention mechanism, characterized in that, Includes the following steps: Acquire the fundus image to be processed and perform normalization processing; The fundus image is segmented into an optic disc using an AttentionU-Net encoder-decoder network with an embedded attention mechanism to generate a segmentation mask; The segmentation mask and the original fundus image are input into the dynamic weighted feature fusion module to generate a fused image; The fused image is used to extract features through a ResNet classification network, and the results of eye disease classification are output. The segmentation and classification tasks are trained end-to-end by jointly optimizing the loss function.

2. The method according to claim 1, characterized in that, The AttentionU-Net includes an encoder, a decoder, and skip connections, and embeds a Convolutional Block Attention (CBAM) module in each skip connection to enhance the feature representation of the channel and spatial dimensions. The convolutional block attention module (CBAM) includes: The channel attention submodule performs global average pooling and max pooling on the input feature map to generate channel weights. The spatial attention submodule performs channel-level average pooling and channel-level max pooling on the input feature map to generate spatial weights. The channel weights and spatial weights are multiplied element-wise with the input feature map to optimize feature selection.

3. The method according to claim 1, characterized in that, The dynamic weighted feature fusion module is implemented using the following formula: I fused =w·M pred ·I input +(1-w)·I input Among them, I fused M represents the fused image. pred It is the predicted segmentation mask, l input This is the original fundus image, where w is the weight parameter, and the segmentation mask is dynamically adjusted through backpropagation. M pred For fused image I fused The proportion of contribution.

4. The method according to claim 3, characterized in that, The dynamic weighted feature fusion module introduces confidence map C. conf Its value is the predicted confidence score of each pixel in the segmentation mask, used to locally adjust the fusion weights to preferentially retain pathological features in high-confidence regions. The confidence map is generated from the predicted probabilities of the segmentation mask, and the fusion formula is adjusted as follows: I fused =C conf ·w·M pred +(1-C conf )·I input ; The fused image output by the dynamic weighted feature fusion module is processed by an adaptive normalization layer to adapt to the input requirements of the classification network.

5. The method according to claim 1, characterized in that, The ResNet-based classification network adopts the ResNet-34 architecture, which includes residual blocks and global average pooling layers. Its input is a fused image, and the output layer is replaced with a fully connected layer that matches the number of disease categories. Finally, the output layer uses the Softmax function to calculate the disease category probability.

6. The method according to claim 1, characterized in that, The joint optimization loss function is the segmentation loss L. seg With classification loss L cls The weighted sum is expressed as: L total =λ s ·L seg +λ c ·L cls The segmentation loss uses the Dice loss function to calculate the overlap between the predicted segmentation mask and the true mask. Where |Mpred∩Mgt| represents the number of pixels overlapping between the predicted and ground truth masks; |Mpred| and |Mgt| represent the total number of pixels in the predicted mask and the ground truth mask, respectively. The classification loss uses the cross-entropy loss function to calculate the difference between the predicted probability and the true label: Where C is the total number of disease categories, and P(y=c|x) represents the predicted probability of category c.

7. The method according to claim 5, characterized in that, The encoder extracts features through multiple convolutional modules, each of which includes 3×3 convolution, ReLU activation, and max pooling operations to gradually reduce the feature map resolution. The decoder restores the feature map resolution through upsampling operations and fuses it with the skip connection features of the encoder to reconstruct spatial details; The ResNet-34 network adopts a residual block structure, in which each residual block contains a convolutional layer, a batch normalization layer, and a ReLU activation function, and solves the gradient vanishing problem through identity mapping.

8. A fundus image diagnostic system based on a fusion attention mechanism, characterized in that, include: The segmentation module, using an AttentionU-Net structure, receives the input fundus image, performs optic disc segmentation on the fundus image, and generates a segmentation mask. The dynamic weighted feature fusion module is used to input the segmentation mask and the original fundus image into the dynamic weighted feature fusion module to generate a fused image; The classification module is used to extract features from the fused image using a ResNet classification network and output the classification results of eye diseases. The joint optimization module is configured to perform end-to-end training for segmentation and classification tasks by jointly optimizing the loss function.

9. A computer device, characterized in that, include: A processor coupled to a memory storing computer-executable instructions, the processor executing the computer-executable instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, Used to store a computer program, the computer program including instructions for implementing the method as described in any one of claims 1 to 7.

Citation Information

Cited By

  • Space self-adaption and thermodynamic diagram guided retina image segmentation method

    CN121147532A