CN117408939A - Method for detecting diabetic retinopathy based on counter-facts mixed attention - Google Patents

Method for detecting diabetic retinopathy based on counter-facts mixed attention Download PDF

Info

Publication number
CN117408939A
CN117408939A CN202310510017.0A CN202310510017A CN117408939A CN 117408939 A CN117408939 A CN 117408939A CN 202310510017 A CN202310510017 A CN 202310510017A CN 117408939 A CN117408939 A CN 117408939A
Authority
CN
China
Prior art keywords
attention
loss
model
diabetic retinopathy
prediction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310510017.0A
Other languages
Chinese (zh)
Inventor
邹洋
吴甲明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chongqing University of Post and Telecommunications
Original Assignee
Chongqing University of Post and Telecommunications
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chongqing University of Post and Telecommunications filed Critical Chongqing University of Post and Telecommunications
Priority to CN202310510017.0A priority Critical patent/CN117408939A/en
Publication of CN117408939A publication Critical patent/CN117408939A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0012Biomedical image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/40Image enhancement or restoration using histogram techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30004Biomedical image processing
    • G06T2207/30041Eye; Retina; Ophthalmic

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Evolutionary Computation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Artificial Intelligence (AREA)
  • Quality & Reliability (AREA)
  • Biophysics (AREA)
  • Radiology & Medical Imaging (AREA)
  • Nuclear Medicine, Radiotherapy & Molecular Imaging (AREA)
  • Multimedia (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Databases & Information Systems (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Molecular Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Image Analysis (AREA)

Abstract

The invention belongs to the field of medical image processing of computer vision, and particularly relates to a method for detecting diabetic retinopathy based on counter fact attention, which comprises the following steps: obtaining a retina image dataset, preprocessing a retina image, and then inputting image data and tag data into an improved counter fact mixed attention model to obtain a retina pathological change detection result; wherein the inverse fact mixed attention model comprises: reconstructing an original ResNet structure into a mixed attention model based on CBAM, adding a layer of spatial attention to the model, obtaining a counter fact feature and a counter fact prediction through attention force obtained through dry pre-learning in model training, constructing a loss function according to the difference between the real prediction and the counter fact prediction, calculating loss and back-propagating parameters of an adjustment model. By using the inverse fact mixed attention model to detect the diabetic retinopathy, the method has better effect than the original ResNet model, can provide high-efficiency and convenient detection service for patients in areas with relatively tight medical resources in practical application, simplifies the detection flow of the patients, reduces the hospitalization cost, reduces the workload of medical staff and improves the detection efficiency of the diabetic retinopathy.

Description

Method for detecting diabetic retinopathy based on counter-facts mixed attention
Technical Field
The invention belongs to the field of medical image processing, and relates to a method and a device for detecting diabetic retinopathy based on improved CBAM (cubic boron nitride) inverse facts attention.
Background
Medical image processing is an image processing technology applied to the medical field, and aims to extract information of various diseases, focuses, tissue structures and the like contained in medical images and help doctors to carry out diseases diagnosis, treatment scheme design and the like. In recent years, deep learning techniques have been widely used in the field of medical image processing. Deep neural networks exhibit excellent performance in medical image processing. In medical images, the method can automatically learn the characteristics of different tissue structures and different focuses, thereby realizing accurate segmentation and identification of the images. In medical imaging diagnostics, the deep neural network may also classify and evaluate diseases based on the characteristics and location of lesions.
Because medical images generally have the characteristics of rich details, large noise, limited sample size and the like, deep neural networks face some challenges in medical image processing. In processing fine-grained images, conventional deep neural networks are prone to misjudging background information and noise information as useful feature information, resulting in segmentation and recognition inaccuracy. Therefore, how to design a more effective deep neural network model aiming at different medical image characteristics in medical image processing becomes a hot spot and a difficulty of research.
Currently, the attention mechanism is used as a mechanism capable of adaptively giving different weights to different parts in an input, and can help the deep neural network to better focus on a region of interest, so that the accuracy and efficiency of medical image processing are improved. In the field of medical image processing, as medical images generally have complex structures and features of different levels, the use of an attention mechanism can help a deep neural network to better capture local details and key features in the images, thereby improving the segmentation and recognition effects of the medical images.
In the medical image processing field, the existing attention-based improvement work mostly focuses on different combinations of attention modules, and the attention quality is only supervised by the final predictive loss, so that the learned attention quality cannot be measured, so we further use the anti-facts attention method to improve the existing model so that it supervises the attention quality by the anti-facts loss, thereby learning better attention.
Disclosure of Invention
In order to solve the defects existing in the prior work, the invention provides a method for detecting the diabetic retinopathy based on the improved CBAM anti-facts, which is characterized in that the method for detecting the diabetic retinopathy improves the recognition and classification accuracy of a neural network to the diabetic retinopathy through multi-step processing and optimization, and the following is a detailed explanation of each step in detection:
firstly, obtaining a retina image to be processed and a corresponding label value, and then carrying out histogram equalization and normalization processing on the image, wherein the histogram equalization and normalization processing is a common preprocessing method in image processing, and the image is easier to learn by a neural network by enhancing the contrast, brightness and other characteristics of the image. And then, inputting the preprocessed image into an improved spatial attention model for calculation and prediction, wherein the model can adaptively learn the importance of different areas in the image, and weight the output of the neural network, so that the recognition capability of the model on the important areas is improved.
In the second step, the preprocessed image data is input to an intervening anti-facts attention module for calculation and prediction, and the module outputs a group of anti-facts attention features by randomly weighting feature graphs output in the neural network through attention force graphs obtained through manual dry pre-learning. The inverse facts attention feature is used to calculate predictions, resulting in inverse facts predictions. The key to this step is to improve the quality of the attention and thus the contribution of the model to the neural network prediction. To this end, a loss function can be constructed by the difference between the inverse facts prediction and the true predictions, optimizing the model by maximizing the quality of attention.
And thirdly, the attention from the neural network is input to the neural network for recalculating the prediction after enhancing the sample, so as to obtain enhanced image prediction, and further, the enhanced prediction loss is obtained. In the step, attention force is enhanced, so that the attention of the neural network to an important area is increased, and the recognition capability and accuracy of the model are further improved.
In the fourth step, the model adds center loss, and the difference of the model to the interior of the category is enhanced by taking the distance from the center point as a punishment item, so that the classification accuracy is improved. The loss function is based on the distance measurement of the class center, so that the problem of overlarge intra-class difference can be effectively relieved, and the performance of the model is further improved.
Drawings
FIG. 1 is a block diagram of a diabetic retinopathy model of the present invention;
FIG. 2 is a block diagram of a counter fact attention module of the present invention;
Detailed Description
The technical solutions according to the embodiments of the present invention will be fully and clearly described below with reference to the accompanying drawings in the embodiments of the present invention, in which the described embodiments are only some, but not all embodiments of the method according to the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The invention provides a method for detecting diabetic retinopathy based on anti-facts attention, which comprises the steps of acquiring an image to be processed, preprocessing, acquiring attention characteristics through a mixed attention module, acquiring the anti-facts characteristics through the anti-facts attention module, constructing model total loss through various losses and the like.
Example 1
The embodiment provides a method for detecting diabetic retinopathy based on counterfacts attention, and the method comprises the following steps as shown in the figure: the method comprises the steps of acquiring an image to be processed, preprocessing, calculating real prediction through a mixed attention module, and obtaining inverse prediction through an inverse attention module, wherein the method comprises the following steps:
s1: acquiring a diabetic retina image, preprocessing the diabetic retina image, unifying the size of the diabetic retina image and highlighting the focus structure of the diabetic retina image;
s2: inputting the preprocessed sample image into the improved neural network model to obtain attention force diagram and attention prediction;
s3: generating a false attention map by an intervention operation, and generating a negative fact attention feature and a negative fact prediction;
s4: enhancing the sample image by the attention feature and inputting the sample image into the model to calculate enhanced prediction;
s5: and (5) comprehensively enhancing the prediction and the real prediction to give a final prediction of the model.

Claims (6)

1. A method for mixed attention-based detection of diabetic retinopathy, comprising: the retina image data of the patient is obtained and preprocessed, the obtained retina image data is input into a CBAM-based inverse facts mixed attention model, a diabetic retinopathy detection result is obtained, and a doctor can be assisted to further formulate a treatment scheme according to the specific detection result of the pathological changes, so that the blindness risk of the patient is reduced.
The process of training the counterfactual mixed attention model includes:
s1: acquiring a diabetic retinopathy public data set, and performing data enhancement pretreatment on the original data set to obtain an enhanced data set; the preprocessing operation mainly comprises the steps of removing black background of an image, unifying resolution, and smoothing the image through Gaussian blur;
s2: dividing the enhanced data set to obtain a training set, a verification set and a test set;
s3: inputting the sampled retinal image data to an input of a counter-fact hybrid attention model;
s4: inputting the feature map obtained by the mixed attention model into a spatial attention module to obtain an attention weighted feature map;
s5: manually generating an intervention attention map, and mixing a feature map obtained by the attention model with the intervention attention map to generate a counterfactual feature map;
s6: obtaining real prediction and inverse fact prediction respectively through the attention weighted feature map and the inverse fact feature map;
s7: constructing total loss through cross entropy loss of real prediction and label value, difference loss of real prediction and inverse fact prediction;
s8: and (3) calculating a loss function of the model according to the detection result to perform back propagation, continuously adjusting parameters, and completing model training when the loss is reduced to the minimum.
2. The method for diabetic retinopathy detection based on improved CBAM anti-facts attention of claim 1, wherein the process of improving the res net model based on CBAM comprises: the method comprises the steps of firstly modifying an original CBAM module, improving a serial connection mode of channel attention and space attention into parallel connection of channel attention and space attention, enabling a model to weight image features in a channel dimension and a space dimension at the same time, and integrating the improved CBAM module after a first convolution block and a last convolution block of a ResNet model.
3. A method of diabetic retinopathy detection based on improved CBAM counter-facts attention as claimed in claim 2, wherein: improving the attention weighted dynamic process of CBAM includes: first, feature F of the previous layer is first added i Input to the spatial attention module and the channel attention module, respectively, the final output can be expressed as:
F PCBAM =M SAM (F)·M CAM (F)
4. a method of diabetic retinopathy detection based on improved CBAM anti-facts attention as claimed in claim 3 wherein the process of channel attention and spatial attention includes: the feature map is passed through a spatial attention module and a channel attention module, respectively, where the weighting process can be expressed as:
M SAM =σ(f conv ([f avg (F),f max (F)]))
wherein f avg And f max Respectively representAverage pooling and maximum pooling. The weighting process in the channel attention module can be expressed as
M CBM =σ(MLP(f avg (F))+MLP(f max (F)))
Where MLP represents a shared multi-layer perceptron.
5. The method for diabetic retinopathy detection based on improved CBAM countermeasures as recited in claim 1, wherein the process of computing the countermeasures attention profile comprises: after the feature map output by the base network is obtained, an erroneous attention map is generated through an intervening operation, the feature map is weighted spatially through the erroneous attention map, an erroneous attention weighted feature map, also called a counterfactual feature map, is obtained, and a full-connection layer is further input to obtain a counterfactual prediction.
6. The method for diabetic retinopathy detection based on improved CBAM anti-facts attention of claim 1, wherein the model total loss construction process includes: the total loss includes the basic cross entropy loss and the inverse predictive loss, which can be expressed as:
Loss=Loss r +Loss a
wherein, loss r Representing true predictive cross entropy Loss, loss a Indicating a negative fact of attention loss. Wherein the countering attention loss can be expressed as:
Loss a =Loss ce (P diff ,y)
p in the formula diff Representing the difference of the inverse fact prediction from the real prediction, y represents the tag value.
CN202310510017.0A 2023-05-08 2023-05-08 Method for detecting diabetic retinopathy based on counter-facts mixed attention Pending CN117408939A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310510017.0A CN117408939A (en) 2023-05-08 2023-05-08 Method for detecting diabetic retinopathy based on counter-facts mixed attention

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310510017.0A CN117408939A (en) 2023-05-08 2023-05-08 Method for detecting diabetic retinopathy based on counter-facts mixed attention

Publications (1)

Publication Number Publication Date
CN117408939A true CN117408939A (en) 2024-01-16

Family

ID=89487700

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310510017.0A Pending CN117408939A (en) 2023-05-08 2023-05-08 Method for detecting diabetic retinopathy based on counter-facts mixed attention

Country Status (1)

Country Link
CN (1) CN117408939A (en)

Similar Documents

Publication Publication Date Title
Li et al. Automatic detection of diabetic retinopathy in retinal fundus photographs based on deep learning algorithm
CN108389201B (en) Lung nodule benign and malignant classification method based on 3D convolutional neural network and deep learning
WO2018120942A1 (en) System and method for automatically detecting lesions in medical image by means of multi-model fusion
Wu et al. U-GAN: Generative adversarial networks with U-Net for retinal vessel segmentation
CN105809125A (en) Multi-core ARM platform based human face recognition system
Song et al. Deep relation transformer for diagnosing glaucoma with optical coherence tomography and visual field function
CN111738363B (en) Alzheimer disease classification method based on improved 3D CNN network
CN104424386A (en) Multi-parameter magnetic resonance image based prostate cancer computer auxiliary identification system
CN113378791B (en) Cervical cell classification method based on double-attention mechanism and multi-scale feature fusion
CN111260639A (en) Multi-view information-collaborative breast benign and malignant tumor classification method
CN112001894B (en) Thyroid gland boundary smoothness detection device
CN110135506A (en) A kind of seven paracutaneous neoplasm detection methods applied to web
CN115880523A (en) Image classification model, model training method and application thereof
Miao et al. Classification of diabetic retinopathy based on multiscale hybrid attention mechanism and residual algorithm
CN117036288A (en) Tumor subtype diagnosis method for full-slice pathological image
CN117408939A (en) Method for detecting diabetic retinopathy based on counter-facts mixed attention
CN114494952B (en) Mammary gland MRI image time sequence generation method based on perception loss
CN114418999B (en) Retinopathy detection system based on lesion attention pyramid convolution neural network
Bhuvaneshwari et al. An internet of health things-driven skin cancer classification using progressive cyclical convolutional neural network with ResNexT50 optimized by exponential particle swarm optimization
Chen et al. Cardiac motion scoring based on CNN with attention mechanism
CN112001896B (en) Thyroid gland border irregularity detection device
Srivardhini et al. A deep learning based multi-model for early prognosticate of Alzheimer’s dementia using MRI dataset
CN112132790A (en) DAC-GAN model construction method and application in mammary gland MR image
CN110969117A (en) Fundus image segmentation method based on Attention mechanism and full convolution neural network
CN117975170B (en) Medical information processing method and system based on big data

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination