A bladder tumor image segmentation method and system based on detail-enhanced reverse attention network
Through the method of detail-enhanced reverse attention network, combined with multi-scale efficient channel attention and detail enhancement modules, the challenge of bladder tumor segmentation algorithms in the existing technology in the recovery of global information and local boundary information is solved, and the bladder tumor segmentation algorithm is realized. Accurate and robust segmentation, improving segmentation performance and generalization ability.
Patent Information
- Application Number
- CN202410175058.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-07
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2044-02-07
AI Technical Summary
Existing bladder tumor segmentation algorithms have challenges in recovering global information and local boundary information. In particular, they have limited adaptability to multi-scale features of lesions, and are computationally intensive and complex.
Using a method based on detail-enhanced inverse attention network, through multi-scale efficient channel attention module, dense aggregation module, similarity aggregation module, detail-enhanced inverse attention module and efficient channel spatial attention module, combined with PVT v2 encoder, the bladder is captured Multi-scale global features of tumors and enhanced local feature representation to achieve accurate and robust bladder tumor segmentation.
It improves the network's ability to understand complex scenes and its versatility, can adapt to changes in the size and shape of various bladder tumors, enhances its ability to process detailed information, and significantly improves segmentation performance and generalization capabilities.
Smart Images

Figure CN117975011B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of bladder tumor image segmentation, and more specifically to a bladder tumor image segmentation method and system based on detail enhanced reverse attention network. Background Art
[0002] Bladder cancer is one of the most common malignant tumors of the urinary system. However, patients with early bladder tumors have a high cure rate after timely treatment. The 5-year survival rate of patients with early bladder cancer is over 80% after treatment. Therefore, early screening of bladder tumors is of great significance for patient treatment. Cystoscopy is currently the main method for bladder tumor screening. Under cystoscopy, bladder tumors can be clearly found, and all visible tumors in the bladder can be completely removed through urethral bladder tumor resection. However, the detection of bladder tumors relies heavily on the doctor's visual inspection, which is tedious and subjective and may lead to missed diagnosis. It is estimated that up to 20% of bladder tumors are overlooked during cystoscopy.
[0003] As an important technology for medical auxiliary diagnosis, tumor segmentation of cystoscopic images based on deep learning algorithms can accurately detect and segment tumors, help doctors improve the accuracy of detection, and save time costs. However, it is a challenging task to achieve automatic and accurate segmentation of bladder tumors in cystoscopic images. These challenges mainly come from the morphology and size of bladder tumors. First, some bladder tumors are irregular in shape and have blurred boundaries. Second, bladder tumors vary in morphology, such as papillary, waterweed, cauliflower, flat ulcers, and uneven textures. Figure 1 As shown, the boundaries of the first two images are blurred, and by comparing the last four images, it can be found that the tumors show significant morphological heterogeneity.
[0004] Existing bladder tumor segmentation algorithms use the CNN architecture, focusing on the extraction of local feature information while ignoring global information; Transformer-based medical image segmentation algorithms show good performance in recovering global information, but there are challenges in recovering fine-grained detail information and local boundary information of features, and limited adaptability to multi-scale features of lesions. Alternatively, CNN and Transformer backbones are directly combined to achieve medical image segmentation. However, this is just a simple structural combination of CNN and Transformer, ignoring the interaction between the two semantics, with large amount of calculation and high computational complexity.
[0005] Therefore, how to propose a bladder tumor image segmentation method and system based on detail-enhanced inverse attention network, and perform accurate and robust bladder tumor segmentation based on multi-scale feature parallelism and detail-enhanced inverse attention network is a problem that technical personnel in this field urgently need to solve. Summary of the invention
[0006] In view of this, the present invention provides a bladder tumor image segmentation method and system based on detail enhanced reverse attention network, which performs accurate and robust bladder tumor segmentation based on multi-scale feature parallelism and detail enhanced reverse attention network. In order to achieve the above purpose, the present invention adopts the following technical solutions:
[0007] A bladder tumor image segmentation method based on detail enhanced inverse attention network, comprising:
[0008] Acquire bladder tumor images, construct a bladder tumor image dataset, and divide the bladder tumor image dataset into a training set and a test set;
[0009] Constructing a bladder tumor image segmentation model based on a self-attention mechanism, and performing multi-scale parallel processing and detail enhancement processing on the bladder tumor image segmentation model;
[0010] The bladder tumor image segmentation model is trained using the training set, and the bladder tumor image segmentation model is tested using the test set to obtain the optimal bladder tumor image segmentation model;
[0011] Real-time bladder tumor images are acquired and input into the optimal bladder tumor image segmentation model to obtain bladder tumor prediction results.
[0012] Optionally, performing multi-scale parallel processing and detail enhancement processing on the bladder tumor image segmentation model includes:
[0013] Performing multi-level feature extraction on the image data and converting it to obtain multi-scale features;
[0014] Aggregate the multi-scale features, integrate the aggregated multi-scale features with the bottom-level multi-scale features, and generate the top-level global feature map;
[0015] After upsampling the bottom layer features, they are fused with the features of the remaining layers, and then the fused information is integrated into the global feature map of the previous layer;
[0016] After optimizing the features of the bottom layer, the global feature map of the previous layer is coupled and input into the reverse attention module to extract information, and the extracted information is integrated into the global feature map of the previous layer to obtain the final prediction result.
[0017] Optionally, the bladder tumor image is an RGB image and a binary image, and the bladder tumor image dataset is divided into a training set and a test set in a 4:1 format.
[0018] Optionally, performing multi-level feature extraction on the image data includes: using a visual transformer PVT v2 as an encoder to extract global information, and obtaining four different levels of pyramid features X from the visual transformer PVT v2.i (i=1,2,3,4), where X1 is a low-level feature, containing rich texture, color and edge detail information, as well as noise and irrelevant information; X2, X3, and X4 are high-level features, containing feature information for locating bladder tumors.
[0019] Optionally, performing multi-level feature extraction on the image data and converting the multi-scale features includes:
[0020] The multi-scale feature information of the input feature map is extracted through convolutions with three different convolution kernel sizes;
[0021] Apply trainable weight parameters to the features extracted by the convolution of two larger convolution kernels;
[0022] Through the local cross-channel interaction strategy, the weights of multi-scale features are reallocated to obtain multi-scale feature information with channel weight information;
[0023] The input feature map is subjected to 1×1 convolution and batch normalization operations and then residually connected with the multi-scale feature information with channel weight information to obtain multi-scale features that can adapt to changes in the size and morphology of bladder tumors.
[0024] Optionally, the optimization processing of the bottom-level features includes: refining the feature map by using linear efficient channel attention and spatial attention in series; linear efficient channel attention determines the feature map that needs to be paid attention to, and increases the assigned weight to enhance the feature; spatial attention determines the position in the feature map that needs to be paid attention to, and increases the assigned weight in the spatial direction to enhance the feature.
[0025] Optionally, a polyp dataset is also included, on which the polyp segmentation capability of the bladder tumor image segmentation model is verified.
[0026] Optionally, the loss function of the bladder tumor image segmentation model is:
[0027]
[0028] L i =L wiou (P i ,G)+L wbce (P i ,G);
[0029] Among them, L i (i=1,2,3,4,5,6) represents the loss function of each stage, which is composed of weighted cross-link loss L wiou and weighted binary cross entropy loss L wbce Composition, L wiou and Lwbce The predicted mask is constrained from the perspective of global structure (object level) and local details (pixel level), P i To predict the mask, G represents the ground truth.
[0030] Optional, also includes: mDice indicator, mIoU indicator, MAE indicator, Accuracy indicator, F β ω The performance of the optimal bladder tumor image segmentation model was quantitatively evaluated by the index and HD index.
[0031] Optionally, a bladder tumor image segmentation system based on detail enhanced inverse attention network, comprising:
[0032] Acquisition module: used for acquiring bladder tumor images, constructing a bladder tumor image dataset, and dividing the bladder tumor image dataset into a training set and a test set;
[0033] Model building module: used to build a bladder tumor image segmentation model based on the self-attention mechanism, and perform multi-scale parallel processing and detail enhancement processing on the bladder tumor image segmentation model;
[0034] Model training module: used to train the bladder tumor image segmentation model through the training set, and to test the bladder tumor image segmentation model through the test set to obtain the optimal bladder tumor image segmentation model;
[0035] Prediction module: used to obtain real-time bladder tumor images, input them into the optimal bladder tumor image segmentation model, and obtain bladder tumor prediction results.
[0036] Optionally, model building modules include:
[0037] Feature extraction module: used for performing multi-level feature extraction on the image data;
[0038] Multi-scale efficient channel attention module: used to convert the multi-level features into multi-scale features;
[0039] Dense aggregation module: used to aggregate multi-scale features;
[0040] Similarity aggregation module: used to integrate the aggregated multi-scale features with the bottom-level multi-scale features to generate the top-level global feature map;
[0041] Detail enhancement reverse attention module: used to upsample the bottom-level features and fuse them with the remaining multi-level features, and then integrate the fused information into the global feature map of the previous layer;
[0042] Efficient channel space attention module: used to optimize the bottom-level features and couple the global feature map of the previous layer to input into the reverse attention module to extract information;
[0043] Reverse attention module: used to integrate the refined information into the global feature map of the previous layer to obtain the final prediction result.
[0044] It can be seen from the above technical solutions that, compared with the prior art, the present invention discloses a bladder tumor image segmentation method and system based on detail-enhanced reverse attention network, which has the following beneficial effects:
[0045] The present invention proposes a bladder tumor image segmentation method based on detail-enhanced reverse attention network, which uses PVT v2 encoder and multi-scale efficient channel attention module, dense aggregation module, similarity aggregation module, detail-enhanced reverse attention module, efficient channel space attention module and reverse attention module to capture the multi-scale global features of bladder tumors and enhance local feature representation, so as to effectively and accurately locate bladder tumors under cystoscopy;
[0046] The multi-scale efficient channel attention module uses convolutions with different convolution kernel sizes to obtain multi-scale information at different levels, and reduces the imbalance of information under different receptive fields through trainable weight parameters. It allocates channel attention weights through local cross-channel interaction strategies to achieve rapid convergence, improve the network's global feature extraction capabilities, enhance the network's ability to understand complex scenes and versatility, enable the network to adapt to changes in the size and morphology of various bladder tumors, and improve the network's generalization ability.
[0047] The detail enhancement reverse attention module combines high-level features with low-level features that reduce background interference, then deletes the currently predicted tumor area, extracts local feature details of each level of enhanced features, and gradually adds them to the global feature map of the previous layer to restore the fine-grained detail information and local boundary information of the features, obtains a clear bladder tumor boundary, and improves the network's ability to process detail information;
[0048] The efficient channel spatial attention module can reduce the influence of noise and irrelevant information in low-level features, more effectively retain the bladder tumor details of different dimensions in low-level features, and improve the segmentation performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0050] Figure 1 An example diagram of bladder tumor segmentation provided as background technology for the present invention.
[0051] Figure 2 A schematic diagram of the structure of a bladder tumor image segmentation method based on a detail-enhanced reverse attention network provided by the present invention.
[0052] Figure 3 Schematic diagram of the structure of the multi-scale efficient channel attention module provided by the present invention.
[0053] Figure 4 Schematic diagram of the detail enhancement reverse attention module structure provided by the present invention.
[0054] Figure 5 This is a schematic diagram of the structure of the efficient channel space attention module provided by the present invention.
[0055] Figure 6 This is a schematic diagram of the qualitative results of the segmentation performance provided by the present invention. DETAILED DESCRIPTION
[0056] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0057] The embodiment of the present invention discloses a bladder tumor image segmentation method based on detail enhanced reverse attention network, comprising:
[0058] Acquire bladder tumor images, construct a bladder tumor image dataset, and divide the bladder tumor image dataset into a training set and a test set;
[0059] Constructing a bladder tumor image segmentation model based on a self-attention mechanism, and performing multi-scale parallel processing and detail enhancement processing on the bladder tumor image segmentation model;
[0060] The bladder tumor image segmentation model is trained using the training set, and the bladder tumor image segmentation model is tested using the test set to obtain the optimal bladder tumor image segmentation model;
[0061] Real-time bladder tumor images are acquired and input into the optimal bladder tumor image segmentation model to obtain bladder tumor prediction results.
[0062] Furthermore, performing multi-scale parallel processing and detail enhancement processing on the bladder tumor image segmentation model includes:
[0063] Performing multi-level feature extraction on the image data and converting it to obtain multi-scale features;
[0064] Aggregate the multi-scale features, integrate the aggregated multi-scale features with the bottom-level multi-scale features, and generate the top-level global feature map;
[0065] After upsampling the bottom-level features, they are fused with the remaining multi-level features, and then the fused information is integrated into the global feature map of the previous layer;
[0066] After optimizing the features of the bottom layer, the global feature map of the previous layer is coupled and input into the reverse attention module to extract information, and the extracted information is integrated into the global feature map of the previous layer to obtain the final prediction result.
[0067] In a specific implementation, a bladder tumor image segmentation method based on detail enhancement reverse attention network is proposed. In order to automatically and accurately segment bladder tumors in cystoscopic images, a bladder tumor image segmentation model (MDER-Net) based on Transformer is proposed, which aims to capture the multi-scale global features and local detail features of bladder tumors. Select PVT v2 is used as an encoder to model global context information and establish long-range dependencies; a multi-scale efficient channel attention module (MECA) is used to process the features of four different levels extracted by the encoder, and multi-scale feature information is extracted through convolutions of different kernel sizes. Trainable weight parameters and the ECA module (a local cross-channel interaction strategy that achieves no dimensionality reduction through 1D convolution) are used to suppress information gaps caused by different receptive fields, fuse feature information and strengthen valuable information, and obtain multi-scale features with channel weight information to adapt to changes in bladder tumor size and morphology; a dense aggregation module (DA) is used to aggregate the second, third, and fourth layer multi-scale high-level features in a step-by-step manner to locate the approximate location of the bladder tumor and generate a rough initial segmentation map; since low-level features contain rich texture, color, and edge detail information, a similar aggregation module (SAM) is used to integrate the feature map that can locate the approximate location of the bladder tumor with the bottom-level features , complement each other in position and detail information, generate a global feature map containing detail information, which is used for subsequent context guidance, calculation of model loss and optimization of the model; in order to solve the problem that Transformer is not capable of restoring local detail features, a detail enhanced reverse attention module (DERA) is proposed. In order to provide more underlying detail information to each high-level feature, the low-level features that have been removed from background information interference are upsampled and fused with the high-level features, and then the fine-grained detail information and local boundary information contained in the fused features at all levels are gradually integrated into the global feature map of the previous layer to refine the edge structure details of the bladder tumor; in addition, before extracting the local detail features of the lowest-level features, an efficient channel space attention module (ECSA) is used to suppress irrelevant information in the underlying features, capture bladder tumor details of different dimensions, enhance local context, and then input into a reverse attention module (RA) to further refine the edge detail information. MDER-Net achieves the goal of locating the approximate position of the tumor, supplementing detail information, and repairing the boundary information of the tumor by mixing 6 deep supervision modules, and finally accurately locates the bladder tumor.
[0068] In a specific embodiment, the bladder tumor image segmentation model (MDER-Net) includes: a multi-scale efficient channel attention module (MECA), a dense aggregation module (DA), a similarity aggregation module (SAM), a detail enhanced reverse attention module (DERA), an efficient channel spatial attention module (ECSA) and a reverse attention module (RA), specifically, as Figure 2 As shown:
[0069] Given an input image X∈R H×W×3 , extract 4 pyramid features from PVT v2 backbone where i∈{1,2,3,4},M i ∈{4,8,16,32}, C i ∈{64,128,320,512} is the number of channels in the i-th layer, i represents the four stages of PVT v2 backbone extraction, H, W represent the height and width of the feature map, M i Indicates the multiple of the feature map size of the i-th stage and the input image size. PVT v2, as an encoder, can model global context information and establish long-range dependencies; the four pyramid features X i Input into the MECA module to obtain the multi-scale feature X with channel weight information Mi , and X i In comparison, X Mi More adaptable to changes in bladder tumor size and morphology; DA module receives 3 advanced features X M2 , X M3 , X M4 , and aggregate them to generate the initial global map D6, which can only capture the relative rough location of the bladder tumor without structural details; the coarse segmentation result D6 and the low-level feature X containing rich texture, color and edge detail information are combined M1 Send it to the SAM module to generate a global feature map D5 containing detailed information; X1,X i ,D i+1 (i=2,3,4) are input into the three DERA modules in sequence, and X1 is used to provide more low-level detail information to each high-level feature X i , the DERA module uses the global feature map D of the previous layer i+1 , delete the currently predicted bladder tumor area in turn, capture fine-grained detail information and local boundary information, and then integrate this information into D i+1In the training process, the prediction graph D2 containing the edge structure details of the bladder tumor is obtained; the underlying feature X1 is input into the ECSA module, and the low-level features that suppress noise and irrelevant information and D2 are input into the RA module to further refine the edge detail information, and then integrate it into D2 to obtain the final prediction graph D1. During the training process, the prediction graph D generated in the six stages i (i=1,2,3,4,5,6) for mixed supervision.
[0070] The overall network structure of the bladder tumor image segmentation model (MDER-Net) is defined as follows:
[0071] X i =PVT v2(X),(i=1,2,3,4);
[0072] X Mi =MECA(X i )(i=1,2,3,4);
[0073] D6=DA(X M2 ,X M3 ,X M4 );
[0074] D5=SAM(X M1 ,D6);
[0075] D i =D i+1 +DERA(X1,X i ,D i+1 )(i=2,3,4);
[0076] D1=D2+RA(ECSA(X1),D2).
[0077] In a specific embodiment, the encoder PVT v2 is used as an encoder to extract global information, and four different levels of pyramid features X are obtained from PVT v2. i (i=1,2,3,4), where X1 is considered a low-level feature, which contains rich texture, color and edge detail information, but also contains more noise and irrelevant information; X2, X3, and X4 are considered high-level features, which contain more feature information that can locate bladder tumors.
[0078] In a specific embodiment, a multi-scale efficient channel attention module (MECA), such as Figure 3 As shown, including:
[0079] Through 3 convolutions with different kernel sizes from X i(i=1,2,3,4). Since different convolution kernel sizes determine the range of the receptive field on the cystoscopic image, convolutions with three different convolution kernel sizes can better capture global and local features compared to using a single convolution kernel. Next, when splicing the feature information extracted by convolutions with different convolution kernel sizes in the channel dimension, in order to suppress the information gap caused by the receptive fields of different sizes, two trainable weight parameters are designed and applied to the features extracted by the convolutions with two larger convolution kernels. The ECA (Efficient Channel Attention) module is a local cross-channel interaction strategy that achieves no dimensionality reduction through 1D convolution, which can strengthen valuable features and suppress irrelevant features. The ECA module is used to reallocate weights for feature maps, so that feature information that is beneficial to the segmentation of bladder tumors is paid attention to by the network. At the same time, the input feature map X is i (i=1,2,3,4) uses 1×1 convolution and batchnormalization operation. The 1×1 convolution reduces the number of feature channels to 32 to reduce computing resources. Finally, it is residually connected with the multi-scale feature information with channel weight information to enhance the original feature, so that the output feature X of the MECA module is Mi Able to adapt to changes in the size and shape of bladder tumors. This process can be summarized as the following formula:
[0080] X Mi =R(BN(Conv1(X i ))+ECA(Conv1(Cat(M conv1 (X i ),w1×M conv2 (X i ),
[0081] w2×M conv3 (X i )))));
[0082] Among them, M convi (i=1, 2, 3) represent convolutions with kernel sizes of 3, 5, and 7, respectively, w i (i=1,2) represent two trainable weight parameters, Cat(·) represents the connection operation in the channel dimension, Conv1(·) represents the convolution with kernel 1, BN(·) represents batch normalization, and R(·) represents the ReLU activation function.
[0083] In a specific embodiment, the detail enhanced reverse attention module (DERA), such as Figure 4 As shown, including:
[0084] The detail enhanced reverse attention module (DERA) consists of two parts: detail enhancement and boundary detail extraction;
[0085] Detail enhancement: In order to supplement the fine-grained detail information contained in the low-level feature X1 to the high-level feature X i (i=2,3,4), using the prediction graph D obtained in the previous stage i+1 To reduce the influence of background information, the morphological dilation operation is used to expand the prediction area to retain as much fine-grained detail information as possible; then the generated prediction mask is multiplied by the low-level feature X1 to obtain the feature map X'1 with background noise removed; then the feature map X'1 is resized to the same size as the high-level feature X by downsampling. i (i=2,3,4) is the same, and then a series operation is performed to supplement the fine-grained features into the high-level features; then a 3×3 convolution layer is used to extract and denoise the features, and finally a 1×1 convolution layer is used to restore the number of feature channels to obtain a feature map with enhanced details. This process can be summarized as the following formula:
[0086]
[0087] Among them, σ(·) represents the Sigmoid activation function, which is used to generate the prediction mask, Dilate(·) represents the morphological dilation operation, Cat(·) represents the connection operation in the channel dimension, Conv3(·) represents the convolution with a kernel of 3, BN(·) represents batch normalization, and Conv1(·) represents the convolution with a kernel of 1.
[0088] Boundary detail extraction: The prediction map D5 generated by the SAM module lacks boundary details, and the reverse attention module RA is used to extract feature maps from detail enhancement. To explore local boundary clues, the reverse attention module RA first uses the prediction map D obtained in the previous stage i+1 Generate reverse attention weights R i :
[0089] R i =1-σ(D i+1 );
[0090] The feature map with enhanced details Multiply by the reverse attention weight R i , delete the tumor area predicted in the previous stage, explore the detailed information of the tumor boundary, and then perform subsequent feature exploration through 3 convolution units to extract the edge detail information to generate the feature map DR i :
[0091]
[0092] DR i Integrated into the prediction graph D from the previous stage i+1 The DERA module enriches the detailed information of tumor boundaries and helps the network generate prediction masks containing clear tumor boundaries.
[0093] In a specific embodiment, an efficient channel spatial attention module (ECSA), such as Figure 5 As shown, it includes: refining the feature map by cascading linear efficient channel attention LECA(·) and spatial attention SA(·):
[0094] ECSA(X1)=SA(ECA(X1));
[0095] S1: Linear efficient channel attention determines which feature maps need to be paid attention to, and then assigns larger weights to these feature maps to enhance these features. The process of Efficient channel attention ECA(·) is summarized as follows:
[0096] LECA(X1)=σ(R t (Conv1d(R(AVG(X1)))*X1);
[0097] Among them, AVG(·) represents the global average pooling layer, which is used to perform global information statistics per channel, R(·) represents the feature reshaping operation, which converts the 2D tensor into 1D for subsequent processing, Conv1d(·) is a 1D convolutional layer with kernel size k=5 and stride s=1, and R t (·) represents the inverse operation of R(·), which is used to map the obtained statistical vector back to the 2D space, and σ(·) represents the Sigmoid activation function, which is used to generate the channel attention map.
[0098] S2: Spatial attention determines which locations in the feature map need to be paid attention to and gives these areas greater weights in the spatial direction to enhance the features. The process of Space attention SA(·) is summarized as follows:
[0099] SA(x)=σ(Conv7(Cat(C m (x),C a (x))))*x;
[0100] Among them, σ(·) represents the Sigmoid activation function, which is used to generate the spatial attention map, Conv7(·) is a 7×7 convolutional layer with padding 3, which is used to enhance the spatial context information, Cat(·) represents the connection operation in the channel dimension, and C m (·)andC a(·) denotes the maximum and average values obtained along the channel dimension, respectively, and x denotes the input tensor LECA(X1).
[0101] In a specific embodiment, the loss function of the bladder tumor image segmentation model (MDER-Net) includes: 6 prediction heads are used for the 6 stages in the proposed MDER-Net, including D i (i=1,2,3,4,5,6), use additive aggregation to get the final prediction mask:
[0102]
[0103] Where P i (i=1,2,3,4,5,6) is for D i (i=1,2,3,4,5,6) The prediction mask obtained by applying the Sigmoid activation function, output is the final prediction mask.
[0104] In order to supervise the prediction quality of the 6 stages of the network, a multi-stage joint loss function is designed:
[0105]
[0106] L i =L wiou (P i ,G)+L wbce (P i ,G);
[0107] Among them, L i (i=1,2,3,4,5,6) represents the loss function of each stage, which consists of the weighted cross-linking loss (wiou) and the weighted binary cross-entropy loss (wbce). The weighted cross-linking loss wiou and the weighted binary cross-entropy loss wbce constrain the predicted mask from the perspective of global structure (object level) and local details (pixel level), respectively; G represents the ground truth.
[0108] In a specific embodiment, the proposed bladder tumor image segmentation model (MDER-Net) is implemented based on the PyTorch framework, and a graphics card with 24GB memory and a graphics card configuration of NVIDIA GeForce RTX 3090 is used to accelerate the calculation. The optimizer is set to AdamW, and the learning rate is set to 10 -4 , the weight decay coefficient (decayrate) is set to 0.1, the batch size is set to 16, and a total of 100 epochs are trained. In addition, the input image is resized to 352×352, and a multi-scale strategy [0.75, 1, 1, 25] is used for training to reduce the model’s sensitivity to scale changes.
[0109] In a specific embodiment, there are 6 data sets, namely, bladder tumor data set BT-AMU, polyp data set Kvasir-SEG, CVC-ClinicDB, CVC-ColonDB, ETIS and CVC-300.
[0110] (1) BT-AMU: This dataset comes from 4K cystoscopic surgery videos provided by the Urology Department of the Second Affiliated Hospital of Anhui Medical University. It contains bladder tumor image samples of different sizes and shapes, as well as ground truth images annotated by professional urology experts. Specifically, the BT-AMU dataset consists of 1948 bladder tumor images in jpg format and 1948 ground truth images (binary images) in png format, with an image resolution of 1920×1080.
[0111] (2) Kvasir-SEG: Kvasir-SEG consists of 1,000 polyp images extracted from colonoscopy videos, with image resolution ranging from 332×487 to 1920×1072.
[0112] (3) CVC-ClinicDB: ClinicDB is a polyp segmentation dataset provided by the Barcelona Hospital Clinic. It first captures 31 frame sequences with polyp tissue from 23 colonoscopy videos. Then, 25 frame sequences with good quality after screening are retained, and finally 612 polyp images with a resolution of 576×768 are obtained.
[0113] (4) CVC-ColonDB: The ColonDB dataset contains 380 polyp images extracted from 15 colonoscopy videos with a fixed image resolution of 500×574.
[0114] (5) ETIS: ETIS is an early polyp segmentation dataset consisting of 196 images with a resolution of 1225×996.
[0115] (6) CVC-300: CVC-300 is a polyp dataset from EndoScene, containing 60 images with a resolution of 574×500.
[0116] In the bladder tumor segmentation experiment, 1562 images from the BT-AMU dataset were randomly selected as the training dataset at a ratio of 8:2, and the remaining 386 images were used as the test dataset. In the polyp segmentation experiment, the same ratio of training and test datasets was used. Table 1 shows the information of all datasets used.
[0117] Table 1
[0118]
[0119] In the specific embodiment, the evaluation indicators are mDice, mIoU, MAE, Accuracy, HD has 6 evaluation indicators to quantitatively evaluate the performance of the segmentation model. Among them, mDice and mIoU measure similarity at the regional level. The higher the mDice and mIoU values, the better the segmentation effect; MAE is a pixel-by-pixel comparison indicator, indicating that the predicted value P R With the true value G T The average absolute error between the two. The lower the MAE value, the better the segmentation effect. Accuracy indicates the proportion of pixels correctly judged by the algorithm to the actual pixels. The index value is between [0, 1]. The closer the Accuracy is to 1, the better the segmentation effect. Weighted F-measure Taking Precision and Recall into consideration, The higher the value, the better the segmentation effect. Hausdorff distance HD is used to measure the accuracy of boundary segmentation. The lower the HD value, the better the segmentation effect. The calculation formula is as follows:
[0120]
[0121] H(A,B)=max(h((A,B),(B,A)));
[0122] h(A,B)=max a∈A {min b∈B ||ab||};
[0123] h(B,A)=max b∈B {min a∈A ||ba||};
[0124] Among them, TP represents true positive, FP represents false positive, FN represents false negative, and n represents the number of test images. and p i They represent the predicted value and true value of the i-th pixel among n pixels respectively, β is the coefficient, and the values of β are 1, 2 and 3; a and b represent two point sets.
[0125] In a specific embodiment, the bladder tumor image segmentation model (MDER-Net) is analyzed by experiment results:
[0126] Verification of bladder tumor segmentation ability: Table 2 shows the quantitative results of its segmentation performance on the bladder tumor dataset BT-AMU. As can be seen from Table 2, the most critical indicators of MDER-Net on the bladder tumor dataset BT-AMU, mDice and mIoU, reached 0.9108 and 0.9162 respectively, proving that MDER-Net has excellent ability to segment bladder tumors and can accurately locate the location of bladder tumors. In addition, HD reached 10.4058, proving that MDER-Net has excellent performance in restoring bladder tumor boundaries and can obtain prediction masks containing clear bladder tumor boundaries. Figure 6 The qualitative results of the segmentation performance of the proposed MDER-Net on the bladder tumor dataset BT-AMU are shown. The first row shows the bladder tumor images of different shapes and sizes under cystoscopic observation, the second row is the bladder tumor mask predicted by MDER-Net, and the third row is the ground truth image of the bladder tumor dataset BT-AMU. Figure 6 It can be seen that the segmentation results of the proposed MDER-Net are close to the ground truth (GT) of bladder tumors, and can accurately and effectively predict bladder tumors and maintain stable segmentation performance.
[0127] Table 2
[0128]
[0129] Ablation experiment: In MDER-Net, MECA, DERA and ECSA modules are proposed to improve network performance. In order to verify the effectiveness of each module, the role of each module in the whole framework is verified by ablation experiments. Specifically, taking PVT v2 as the baseline, for the MECA module, a 1×1 convolution is used to replace it for comparison; for the verification of the DERA module, compared with the original RA module, all DERA modules are replaced by 3 RA modules to verify its effectiveness; for the ECSA module, it is directly removed for comparative verification. In Table 3, the ablation experiments of the above MECA, DERA and ECSA modules are marked as "w / o MECA", "w / o DERA" and "w / o ECSA", respectively. It can be seen that each module plays a vital role in the bladder tumor segmentation framework, and removing or replacing any of them will lead to a significant decrease in segmentation performance.
[0130] Table 3
[0131]
[0132] Verification of polyp segmentation ability: In order to verify the effectiveness of the proposed MDER-Net in medical image segmentation, experiments were conducted on 5 public polyp datasets. Table 4 shows the quantitative results of the segmentation performance of the proposed MDER-Net on the polyp datasets. As can be seen from Table 4, the Dice of MDER-Net on Kvasir-SEG and CVC-ClinicDB reached 0.9265 and 0.9219 respectively, verifying the effectiveness of the proposed algorithm for intestinal polyps; the model trained on Kvasir-SEG and CVC-ClinicDB was used to predict polyps in CVC-ColonDB, ETIS, and CVC-300, and the Dice reached 0.8338, 0.7848, and 0.9052 respectively, proving that MDER-Net has excellent generalization performance.
[0133] Table 4
[0134]
[0135] In a specific embodiment, a bladder tumor image segmentation system based on detail-enhanced reverse attention network includes:
[0136] Acquisition module: used for acquiring bladder tumor images, constructing a bladder tumor image dataset, and dividing the bladder tumor image dataset into a training set and a test set;
[0137] Model building module: used to build a bladder tumor image segmentation model based on the self-attention mechanism, and perform multi-scale parallel processing and detail enhancement processing on the bladder tumor image segmentation model;
[0138] Model training module: used to train the bladder tumor image segmentation model through the training set, and to test the bladder tumor image segmentation model through the test set to obtain the optimal bladder tumor image segmentation model;
[0139] Prediction module: used to obtain real-time bladder tumor images, input them into the optimal bladder tumor image segmentation model, and obtain bladder tumor prediction results.
[0140] In a specific embodiment, a model building module of a bladder tumor image segmentation system based on detail enhanced reverse attention network includes:
[0141] Feature extraction module: used for performing multi-level feature extraction on the image data;
[0142] Multi-scale efficient channel attention module: used to convert the multi-level features into multi-scale features;
[0143] Dense aggregation module: used to aggregate multi-scale features;
[0144] Similarity aggregation module: used to integrate the aggregated multi-scale features with the bottom-level multi-scale features to generate the top-level global feature map;
[0145] Detail enhancement reverse attention module: used to upsample the bottom-level features and fuse them with the remaining multi-level features, and then integrate the fused information into the global feature map of the previous layer;
[0146] Efficient channel space attention module: used to optimize the bottom-level features and couple the global feature map of the previous layer to input into the reverse attention module to extract information;
[0147] Reverse attention module: used to integrate the refined information into the global feature map of the previous layer to obtain the final prediction result.
[0148] The present invention processes the four different levels of features extracted by the PVTv2 encoder through a multi-scale efficient channel attention module to adapt to the multi-scale changes of bladder tumors; secondly, a dense aggregation module is used to aggregate multi-scale high-level semantic feature information and output a feature map that can locate the approximate location of the bladder tumor; then a similarity aggregation module is used to fuse multi-scale high-level and low-level features, complement each other in position and detail information, and generate a global feature map with detail information; finally, a detail enhancement reverse attention module is used to capture boundary insignificant features, gradually explore and supplement tumor boundary feature information and fine-grained detail information; through an efficient channel space attention module, redundant information in low-level features is suppressed to enhance local context and improve segmentation performance. It realizes the process from locating the approximate location of the tumor to supplementing detail information to repairing the boundary information of the tumor, and finally effectively and accurately locates the bladder tumor. A large number of experiments on the cystoscopic tumor dataset BT-AMU and 5 public polyp datasets show that MDER-Net performs well in both effectiveness and generalization ability.
[0149] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0150] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A bladder tumor image segmentation method based on detail-enhanced reverse attention network, characterized in that: include: Acquire bladder tumor images, construct a bladder tumor image dataset, and divide the bladder tumor image dataset into a training set and a test set; Constructing a bladder tumor image segmentation model based on a self-attention mechanism, and performing multi-scale parallel processing and detail enhancement processing on the bladder tumor image segmentation model; The multi-scale parallel processing and detail enhancement processing of the bladder tumor image segmentation model includes: Perform multi-level feature extraction and conversion on image data to obtain multi-scale features, including: The visual transformer PVT v2 is used as the encoder to extract global information, and four different levels of pyramid features X are obtained from the visual transformer PVT v2. i , i = 1, 2, 3, 4, where X1 is a low-level feature, including texture, color and edge detail information, as well as noise and irrelevant information; X2, X3 and X4 are high-level features, including feature information for locating bladder tumors; the four pyramid features X i Input into the multi-scale efficient channel attention module to obtain the multi-scale feature X with channel weight information Mi ; Aggregate the multi-scale features, integrate the aggregated multi-scale features with the bottom-level multi-scale features, and generate the top-level global feature map, including: The dense aggregation module receives three high-level features X M2 , X M3 , X M4 , and aggregate them to generate the initial global map D6; the initial global map D6 and the low-level features X containing rich texture, color and edge detail information are combined M1 Send it to the similarity aggregation module to generate a global feature map D5 containing detailed information; After upsampling the bottom layer features, they are fused with the features of the remaining layers, and then the fused information is integrated into the global feature map of the previous layer, including: X1,X i ,D i+1 , i = 2, 3, 4, and are input into three detail enhancement reverse attention modules in sequence. X1 is used to provide underlying detail information to each high-level feature X i , the detail enhancement reverse attention module uses the global feature map D of the previous layer i+1 , delete the currently predicted bladder tumor area in turn, capture fine-grained detail information and local boundary information, and then integrate this information into D i+1 The predicted image D2 containing the details of the bladder tumor edge structure is obtained, that is, D i =D i+1 +DERA(X1,X i , D i+1 ), i=2, 3, 4; After optimizing the bottom-level features, the global feature map of the previous layer is coupled and input into the reverse attention module to extract information. The extracted information is integrated into the global feature map of the previous layer to obtain the final prediction results, including: The underlying feature X1 is input into the efficient channel space attention module, and the low-level features that suppress noise and irrelevant information and D2 are input into the reverse attention module to extract edge detail information and integrate it into D2 to obtain the final prediction map D1. During the training process, the prediction map D generated in the six stages is i , i=1,2,3,4,5,6, for mixed supervision, DERA is the detail enhanced reverse attention module; The bladder tumor image segmentation model is trained using the training set, and the bladder tumor image segmentation model is tested using the test set to obtain the optimal bladder tumor image segmentation model; Real-time bladder tumor images are acquired and input into the optimal bladder tumor image segmentation model to obtain bladder tumor prediction results.
2. The bladder tumor image segmentation method based on detail enhanced inverse attention network according to claim 1, characterized in that: The bladder tumor images are RGB images and binary images, and the bladder tumor image data set is divided into a training set and a test set in a 4:1 format.
3. The bladder tumor image segmentation method based on detail enhanced inverse attention network according to claim 1, characterized in that: The multi-scale features obtained by conversion include: The multi-scale feature information of the input feature map is extracted through convolutions with three different convolution kernel sizes; Apply trainable weight parameters to the features extracted by the convolution of two larger convolution kernels; Through the local cross-channel interaction strategy, the weights of multi-scale features are reallocated to obtain multi-scale feature information with channel weight information; The input feature map is subjected to 1×1 convolution and batch normalization operations and then residually connected with the multi-scale feature information with channel weight information to obtain multi-scale features that can adapt to changes in bladder tumor size and morphology.
4. The bladder tumor image segmentation method based on detail enhanced inverse attention network according to claim 1, characterized in that: The optimization processing of the bottom-level features includes: refining the feature map by using linear efficient channel attention and spatial attention in series; linear efficient channel attention determines the feature map that needs to be paid attention to, and increases the assigned weight to enhance the feature; spatial attention determines the position in the feature map that needs to be paid attention to, and increases the assigned weight in the spatial direction to enhance the feature.
5. The bladder tumor image segmentation method based on detail enhanced inverse attention network according to claim 1, characterized in that: Also included is a polyp dataset, on which the polyp segmentation capability of the bladder tumor image segmentation model is verified.
6. The bladder tumor image segmentation method based on detail enhanced inverse attention network according to claim 1, characterized in that: The loss function of the bladder tumor image segmentation model is: L i =L wiou (P i ,G)+L wbce (P i ,G); Among them, L i , i = 1, 2, 3, 4, 5, 6, representing the loss function of each stage, which is composed of the weighted cross-link loss L wiou and weighted binary cross entropy loss L wbce Composition, L wiou and L wbce Respectively, we restrict the prediction mask from the perspective of global structure and local details. i To predict the mask, G represents the ground truth.
7. The bladder tumor image segmentation method based on detail enhanced inverse attention network according to claim 1, characterized in that: Also includes: Using mDice indicator, mIoU indicator, MAE indicator, Accuracy indicator, The performance of the optimal bladder tumor image segmentation model was quantitatively evaluated by the index and HD index.
8. A bladder tumor image segmentation system based on detail-enhanced reverse attention network, characterized in that: include: Acquisition module: used for acquiring bladder tumor images, constructing a bladder tumor image dataset, and dividing the bladder tumor image dataset into a training set and a test set; Model building module: used to build a bladder tumor image segmentation model based on the self-attention mechanism, and perform multi-scale parallel processing and detail enhancement processing on the bladder tumor image segmentation model; The multi-scale parallel processing and detail enhancement processing of the bladder tumor image segmentation model includes: Perform multi-level feature extraction and conversion on image data to obtain multi-scale features, including: The visual transformer PVTv2 is used as the encoder to extract global information, and four different levels of pyramid features X are obtained from the visual transformer PVT v2. i , i = 1, 2, 3, 4, where X1 is a low-level feature, including texture, color and edge detail information, as well as noise and irrelevant information; X2, X3 and X4 are high-level features, including feature information for locating bladder tumors; the four pyramid features X i Input into the multi-scale efficient channel attention module to obtain the multi-scale feature X with channel weight information Mi ; Aggregate the multi-scale features, integrate the aggregated multi-scale features with the bottom-level multi-scale features, and generate the top-level global feature map, including: The dense aggregation module receives three high-level features X M2 , X M3 , X M4 , and aggregate them to generate the initial global map D6; the initial global map D6 and the low-level features X containing rich texture, color and edge detail information are combined M1 Send it to the similarity aggregation module to generate a global feature map D5 containing detailed information; After upsampling the bottom layer features, they are fused with the features of the remaining layers, and then the fused information is integrated into the global feature map of the previous layer, including: X1,X i ,D i+1 , i = 2, 3, 4, and are input into three detail enhancement reverse attention modules in sequence. X1 is used to provide underlying detail information to each high-level feature X i , the detail enhancement reverse attention module uses the global feature map D of the previous layer i+1 , delete the currently predicted bladder tumor area in turn, capture fine-grained detail information and local boundary information, and then integrate this information into D i+1 The predicted image D2 containing the details of the bladder tumor edge structure is obtained, that is, D i =D i+1 +DERA(X1,X i , D i+1 ), i=2, 3, 4; After optimizing the bottom-level features, the global feature map of the previous layer is coupled and input into the reverse attention module to extract information. The extracted information is integrated into the global feature map of the previous layer to obtain the final prediction results, including: The underlying feature X1 is input into the efficient channel space attention module, and the low-level features that suppress noise and irrelevant information and D2 are input into the reverse attention module to extract edge detail information and integrate it into D2 to obtain the final prediction map D1. During the training process, the prediction map D generated in the six stages is i , i=1,2,3,4,5,6, for mixed supervision, DERA is the detail enhanced reverse attention module; Model training module: used to train the bladder tumor image segmentation model through the training set, and to test the bladder tumor image segmentation model through the test set to obtain the optimal bladder tumor image segmentation model; Prediction module: used to obtain real-time bladder tumor images, input them into the optimal bladder tumor image segmentation model, and obtain bladder tumor prediction results.
