Fuzzy edge enhanced skin lesion image segmentation method and system
By using residual pixel differential convolution and residual attention block methods in skin lesion image segmentation, the problem of difficult positioning of fuzzy edges and boundaries is solved, and better segmentation effect and lower computing resource requirements are achieved.
Patent Information
- Application Number
- CN202411960467.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-04-29
AI Technical Summary
The prior art when processing skin lesion images, especially the problem of blurred edges and boundaries being difficult to locate, resulting in poor segmentation effect, and the self-attention mechanism has redundancy in the calculation quantity and parameter quantity, affecting clinical promotion.
The blurred edge-enhanced skin lesion image segmentation method based on residual pixel differential convolution is adopted. The detailed edges of the target lesion area are extracted through the residual pixel convolution block, and spatial and channel features are extracted in combination with the residual attention block to solve the problems of blurred boundary and different sizes of the lesion site.
It effectively improves the boundary detection ability of skin lesions image segmentation, improves the segmentation effect of fuzzy edges, reduces the calculation amount and parameter amount of the model, and improves the clinical promotion value.
Smart Images

Figure CN119904633A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of artificial intelligence and medical image segmentation, and in particular to a method and system for segmenting skin lesion images with fuzzy edge enhancement. Background Art
[0002] There are thousands of different forms of skin diseases, which can be further classified clinically. The diagnosis of most skin lesions relies on specialized dermoscopic equipment. Dermoscopic imaging is a non-invasive (compared to tissue biopsy) imaging technique that can obtain magnified and bright images of local skin areas while eliminating skin surface reflections and enhancing the imaging clarity of skin lesions. The popularity of dermoscopic diagnosis has led to a surge in dermoscopic image data. However, manual screening of dermoscopic images is time-consuming and tedious, and is prone to inter- and intra-observer variability, which is exacerbated by the shortage of dermatologists. Computer-aided diagnosis (CAD) systems provide an alternative approach to dermoscopic image evaluation. They not only improve the efficiency and objectivity of diagnosis, but also free clinicians from tedious screening work to focus on challenging problems, ultimately improving clinical outcomes. Skin lesion segmentation is an important step in CAD. It classifies each pixel as part of the lesion or background, which facilitates the location of the region of interest and further analysis. Automatic skin lesion segmentation is challenging given that skin lesions vary greatly in appearance and size. In addition, lesion boundaries in dermoscopic images are irregular, and color distribution is uneven and irregular. In the early stage of malignant lesions, the contrast between lesions and normal skin areas is low and the boundary is blurred. In addition, some other tissues, such as hair, blood vessels, and bubble artifacts, make automatic skin lesion segmentation very challenging for computer systems.
[0003] In recent years, the emergence of Vision Transformers (ViT)[1] has led the field of image processing. Attention networks have also shown potential in medical image segmentation by viewing images as a series of patches and using self-attention mechanisms for global feature aggregation. For example, although TransUNet[2] and TransFuse[3] have achieved certain results in the field of skin lesion segmentation, they still have shortcomings. Some studies have attempted to improve Transformer-based networks and combine boundary information to improve performance, but have not yet fully explored the potential effectiveness of boundary information and global context. In addition, the convolutional modules contained in the Transformer network may have a certain impact on performance due to their limited receptive field. To solve this problem, XBound-Former[4] proposed a new cross-scale boundary-aware Transformer that combines boundary prior knowledge with self-attention mechanisms to effectively deal with the above problems. It roughly locates the lesion area by considering the global background, and pays special attention to the blurred area to accurately determine the lesion boundary. In PMJAF-Net[5], a pyramid multi-scale joint attention and adaptive fusion network is proposed, which is designed for interpretable skin lesion segmentation. The network first designs an adaptive spatial attention module to establish long-term correlations between pixels, enrich global and local context information, and refine feature details. However, the above methods currently ignore the gradient information in the image and have difficulty locating boundaries when processing fuzzy boundary images, resulting in poor segmentation results. In addition, the method integrating the self-attention mechanism has redundancy problems in terms of computational complexity and parameter quantity, which is not conducive to clinical promotion.
[0004] Papers [1], [2], [3], [4], [5] are about the application of image segmentation methods such as convolutional neural networks and Vision Transformer in the field of medical image segmentation:
[0005] [1]Dosovitskiy A.An image is worth 16x16 words:Transformers for imagerecognition at scale[J].arXiv preprint arXiv:2010.11929,2020.
[0006] [2]Chen J, Lu Y, Yu Q, et al. Transunet: Transformers make strong encoders for medical image segmentation [J]. arXiv preprint arXiv:2102.04306, 2021.
[0007] [3]Zhang Y, Liu H, Hu Q.Transfuse: Fusing transformers and cnns for medical image segmentation[C] / / Medical image computing and computer assisted intervention-MICCAI 2021:24th international conference,Strasbourg,France,September 27-October 1,2021,proceedings,Part I 24.Springer InternationalPublishing,2021:14-24.
[0008] [4]Wang J, Chen F, Ma Y, et al.
[0009] [5]Li H, Zeng P, Bai C, et al. PMJAF-Net: Pyramidal multi-scale joint attention and adaptive fusion network for explainable skin lesionsegmentation[J]. Computers in Biology and Medicine, 2023,165:107454. Summary of the invention
[0010] The technical problem to be solved by the present invention is to provide a fuzzy edge enhanced skin lesion image segmentation method and system in view of the deficiencies in the prior art, specifically a fuzzy edge enhanced skin lesion image segmentation method and system based on residual pixel differential convolution.
[0011] The technical solution of the present invention is as follows:
[0012] A fuzzy edge enhanced skin lesion image segmentation method comprises steps S110-S140:
[0013] S110: Collect clinical skin lesion image data, where the labeled data includes the original image and the corresponding segmentation mask, and form an original image dataset and a label dataset L respectively; and perform fine preprocessing on the dataset;
[0014] S120: Construct a fuzzy edge segmentation network ResPDCNet with residual pixel difference convolution, denoted as residual pixel difference convolution network for skin lesion segmentation; the ResPDCNet network structure includes an input end, an encoder, a jump connection, a bottleneck layer BottleNeck, a decoder and an output end; in the encoder, it includes five detail enhancement modules DEBlock and five maximum pooling layers. Each DEBlock consists of a 2D convolution layer, a horizontal pixel difference convolution, a RELU activation layer and a residual connection. The input feature map extracts spatial features through a 3×3 convolution kernel, keeping the input size unchanged, and calculating the horizontal difference of adjacent pixels on the feature map output by the convolution to extract edge detail information and emphasize the gradient change of the target area; the ReLU activation function is applied to the result of pixel difference to introduce nonlinear expression ability and suppress the influence of negative values; the activated result is added to the input feature of the module to form the final output feature map, which enhances local details while retaining global information; finally, the DEBlock module can highlight the detail changes in the image, especially the fuzzy boundary area, thereby improving the boundary detection ability of the image segmentation model;
[0015] S130: training the constructed ResPDCNet;
[0016] S140: Based on the network training results, a skin lesion area segmentation result is provided.
[0017] The segmentation method, the jump connection includes a residual attention perception module RAAM, RAAM is composed of a detail enhancement module DEBlock, channel attention, spatial attention and a residual connection.
[0018] The segmentation method, in the skip connection, first receives the input feature map F from the backbone network i , input feature map F i First, the detail enhancement module DEBlock extracts the detail edge information and outputs the enhanced feature map. The feature map after detail enhancement is input into the channel attention module CA to calculate the importance weight of each channel and generate a channel enhanced feature map. At the same time, the enhanced feature map will also pass through the spatial attention module SA to calculate the weight distribution of each pixel position and generate a spatial enhanced feature map. The outputs of the channel attention and spatial attention are multiplied to fuse the weight information of the channel and space to obtain a further optimized feature map F. p ;
[0019] The optimized feature map F p It passes through the detail enhancement module DEBlock again and then combines with the original input feature F i Add together to form the final output F of the module o .
[0020] In the segmentation method, the bottleneck layer BottleNeck is composed of two Swin Transformer modules connected in series, and a residual connection is also designed in the BottleNeck layer to calibrate the feature map information; the Swin Transformer module is constructed based on a shift window, and each Swin Transformer block is composed of a layer normalization LN, a multi-head self-attention module W-MSA, a residual connection and a 2-layer MLP with GELU nonlinearity.
[0021] The segmentation method, the specific algorithm steps in the bottleneck layer BottleNeck are: first, the input features are layer normalized to standardize the feature distribution, then the features are divided into windows of fixed size, and a multi-head self-attention W-MSA operation is performed in each window to efficiently capture the information of the local area; the output of the multi-head self-attention W-MSA is added to the original input features through a residual connection to retain the information of the input features; then, the features are layer normalized LN again, and nonlinear features are extracted through a multi-layer perceptron MLP with a GELU activation function to form the output of the first SwinTransformer module; the structure of the second Swin Transformer module is different from the first block in that the multi-head self-attention SW-MSA mechanism using a shifted window is used, and the global information is captured across windows by shifting the window division method to achieve richer feature interactions;
[0022] In the segmentation method, the decoder adopts five detail enhancement modules DEBlock; in the upsampling stage, in order to reduce the amount of parameters, bilinear interpolation is used to restore the spatial size of the feature map; in addition, the decoder also receives the feature map from the jump connection, and splices it with the feature map obtained by bilinear interpolation in the channel dimension to further integrate the multi-layer feature information; specifically, the fifth layer of the decoder receives the output features from BottleNeck and upsamples them; the upsampled feature map is spliced with the output features from the fourth RAAM and input into the fifth DEBlock for feature integration; the integrated feature map enters the fourth layer of the decoder, and after upsampling, it is spliced with the features from the third RAAM and then passed into the fourth DEBlock for processing; by analogy, the third layer of the decoder upsamples the integrated feature map, splices it with the features from the second RAAM, and sends it to the third DEBlock to complete feature fusion; the second layer of the decoder repeats the above operation, splices the upsampled features with the output of the first RAAM, and passes it into the second DEBlock for integration; finally, the first layer of the decoder upsamples the feature map and inputs the last DEBlock to complete the final feature extraction.
[0023] The segmentation method, the output end, and the segmentation head use a 1x1 convolution kernel and a Sigmoid activation function to obtain the final image segmentation result.
[0024] The segmentation method described above uses the original image training data set I prepared in step S110 in step S130. train And manually annotated label dataset L train Train the model.
[0025] The segmentation method described above has the following specific training process: first, the training image is input into the network to generate the prediction result of the current iteration; then, the prediction result is compared with the corresponding manual annotation, and the loss value is calculated through the loss function; then, the gradient is calculated using the stochastic gradient descent optimizer, and the network weight is updated through back propagation; the above steps are repeated until the preset error standard is met, thereby completing the model training; finally, the original image test dataset I is used test and the corresponding manually annotated test dataset L test Validate the model to assess its performance;
[0026] The loss function in the above steps Using the Dice Loss function, the specific loss definition is as follows:
[0027]
[0028]
[0029] Among them, TP, TN, FP, and FN represent true positive, true negative, false positive, and false negative, respectively.
[0030] A fuzzy edge enhanced skin lesion segmentation system based on residual pixel differential convolution, the system executes any of the methods described.
[0031] In view of the problems existing in current clinical skin lesion images, such as the small pixel difference between the foreground area and the background area and the different sizes of the lesions, which lead to blurred boundaries and difficulty in positioning, the present invention proposes a fuzzy edge enhanced skin lesion image segmentation method based on residual pixel differential convolution. This method extracts the edge details of the target lesion area through the residual pixel convolution block to solve the problem of small pixel difference between the foreground area and the background area in clinical medical images. Secondly, the residual attention block is used to extract spatial and channel features to perceive the size and position of the lesion, solving the problem of different lesion sizes and difficulty in locating the lesion. The contrast effect is as follows: Figure 1 The above problem can be effectively solved by the above method. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 : Detection comparison of the original algorithm (a) and ResPDNet (b) in the occluded target scene;
[0033] Figure 2 : Overall flow chart;
[0034] Figure 3 : ResPDCNet network structure diagram;
[0035] Figure 4 : Detail enhancement module structure diagram;
[0036] Figure 5 : Structure diagram of residual attention perception module;
[0037] Figure 6 : Swin Transformer Block structure diagram;
[0038] Figure 7 : Segmentation header structure diagram; DETAILED DESCRIPTION
[0039] The present invention is described in detail below in conjunction with specific embodiments.
[0040] This paper proposes a fuzzy edge enhancement skin lesion segmentation method based on residual pixel differential convolution. The overall process is as follows Figure 2 The method includes steps S110-S140, which are as follows:
[0041] S110: Collect clinical skin lesion image data, and the annotated data includes the original image and the corresponding segmentation mask, which are respectively composed of the original image data set and the label data set L; perform fine preprocessing on the data set, including uniformly adjusting the image size to adapt to the input requirements of the model, adopting a variety of data enhancement strategies (including rotation, flipping, and random cropping), and simulating a variety of clinical shooting conditions to improve the robustness of the model to complex scenes. Normalize the pixel values to ensure the consistency of feature distribution and optimize the training stability of the model. At the same time, according to the specific needs of medical image analysis, complete image format conversion and optimization to provide high-quality, standardized data input for subsequent segmentation tasks, thereby enhancing the model's ability to recognize the boundaries of lesion areas and its adaptability to different feature scales.
[0042] S120: Construct a fuzzy edge segmentation network of residual pixel differential convolution, denoted as Residual Pixel Differential Convolution Network For Skin Lesion Segmentation (ResPDCNet).
[0043] S130: Train the constructed ResPDNet.
[0044] S140: Based on the network training results, a skin lesion area segmentation result is provided.
[0045] In step S120, a residual pixel difference network for skin lesion segmentation (ResPDCNet) is constructed, and the network structure is as follows: Figure 3 As shown. It includes input end, encoder, skip connection, bottleneck layer (BottleNeck), decoder and output end, as follows:
[0046] 210 At the input end, the image after the original data is preprocessed is used as the input of the network.
[0047] 220 In the encoder, there are five detail enhancement blocks (DEBlock) and five maximum pooling layers. Figure 4As shown in the figure, each DEBlock block consists of a 2D convolution layer, a horizontal pixel difference convolution, a RELU activation layer, and a residual connection. First, the feature map is input, and the spatial features are extracted through a 3×3 convolution kernel. The input size is kept unchanged, and the horizontal difference of adjacent pixels is calculated on the feature map output by the convolution to extract edge detail information and emphasize the gradient changes in the target area. The ReLU activation function is applied to the result of the pixel difference to introduce nonlinear expression capabilities and suppress the influence of negative values. The activated result is added to the input features of the module to form the final output feature map, which enhances local details while retaining global information. Finally, the DEBlock module can highlight the detail changes in the image, especially the blurred boundary area, thereby improving the boundary detection ability of the image segmentation model.
[0048] The 230 skip connection includes a residual attention awareness module (RAAM), such as Figure 5 As shown in Figure 1, the module consists of a detail enhancement module, channel attention, spatial attention, and a residual connection. Its specific structure and operation steps are as follows: Receive the input feature map F from the backbone network i , input feature map F i First, the detail enhancement module (DEBlock) extracts the detail edge information and outputs the enhanced feature map. The feature map after detail enhancement is input into the channel attention module (CA), which calculates the importance weight of each channel and generates a channel enhanced feature map. Similarly, the enhanced feature map will also pass through the spatial attention module (SA) to calculate the weight distribution of each pixel position and generate a spatial enhanced feature map. The outputs of the channel attention and spatial attention are multiplied to fuse the weight information of the channel and space to obtain a further optimized feature map F. p .
[0049] F p =CA(DEBlock(F i ))*SA(DEBlock(F i ))
[0050] The optimized feature map F p It passes through the detail enhancement module (DEBlock) again and then combines with the original input feature F i Add together to form the final output F of the module o .
[0051] F o =DEBlock(F p )+F i
[0052] The 240 bottleneck layer (BottleNeck) consists of two Swin Transformer modules connected in series. In addition, a residual connection is designed in the BottleNeck layer to calibrate the feature map information. The specific Swin Transformer module (Swin Transformer Block) is as follows Figure 6 As shown in the figure, the Swin Transformer Block is built based on a shifted window. Each Swin Transformer block consists of a LayerNorm (LN) layer, a multi-head self-attention module (W-MSA), a residual connection, and a 2-layer MLP with GELU nonlinearity. The specific algorithm steps are as follows: First, the input features are layer-normalized (LayerNorm, LN) to standardize the feature distribution. Then, the features are divided into windows of fixed size, and a multi-head self-attention (W-MSA) operation is performed in each window to efficiently capture the information of the local area. The output of the multi-head self-attention module is added to the original input features through a residual connection to retain the information of the input features. Subsequently, the features are layer-normalized again, and nonlinear features are extracted through a multi-layer perceptron (MLP) with a GELU activation function to form the output of the first Swin Transformer block. The structure of the second block is similar to the first block, but uses a multi-head self-attention (SW-MSA) mechanism with a shifted window. By shifting the window division method, global information can be captured across windows, achieving richer feature interactions. Like the first block, this block includes layer normalization, shifted window multi-head self-attention module, residual connection, normalization layer, multi-layer perceptron, and finally forms the output of the second Swin Transformer block. The window-based multi-head self-attention (W-MSA) module and the shifted window-based multi-head self-attention (SW-MSA) module are applied to two consecutive Swin Transformer blocks respectively. The specific attention calculation formula is defined as follows:
[0053]
[0054] 250 On the decoder side, the structure of the decoder is similar to that of the encoder, and five detail enhancement blocks (DEBlock) are also used. In the upsampling stage, in order to reduce the number of parameters, bilinear interpolation is used to restore the spatial size of the feature map. In addition, the decoder also needs to receive the feature map from the jump connection and splice it with the feature map obtained by bilinear interpolation in the channel dimension to further integrate the multi-layer feature information. Specifically, the fifth layer of the decoder receives the output features from BottleNeck and upsamples them. After the upsampled feature map is spliced with the output features from the fourth RAAM, it is input into the fifth DEBlock for feature integration. The integrated feature map enters the fourth layer of the decoder, and after upsampling, it is spliced with the features from the third RAAM and then passed to the fourth DEBlock for processing. By analogy, the third layer of the decoder upsamples the integrated feature map, splices it with the features from the second RAAM, and sends it to the third DEBlock to complete the feature fusion. The second layer of the decoder repeats the above operation, splices the upsampled features with the output of the first RAAM, and passes it to the second DEBlock for integration. Finally, the first layer of the decoder upsamples the feature map and inputs it into the last DEBlock to complete the final feature extraction. This design makes full use of the multi-scale feature information in the jump connection, ensuring the consistency of global features while restoring image details layer by layer.
[0055] 260 output end, split head (Head) such as Figure 7 As shown in the figure, a 1x1 convolution kernel and a Sigmoid activation function are used to obtain the final image segmentation result.
[0056] In step S130, the original image training data set I prepared in step S110 is used. train And manually annotated label dataset L train The model is trained. The specific process is as follows: First, the training image is input into the network to generate the prediction result of the current iteration; then, the prediction result is compared with the corresponding manual annotation, and the loss value is calculated through the loss function; then, the gradient is calculated using the stochastic gradient descent optimizer, and the network weights are updated through back propagation. Repeat the above steps until the preset error standard is met, thus completing the model training. Finally, the original image test dataset I is used test and the corresponding manually annotated test dataset L test The model was validated to evaluate its performance.
[0057] The loss function in the above steps Using the Dice Loss function, the specific loss definition is as follows:
[0058]
[0059]
[0060] Among them, TP, TN, FP, and FN represent true positive, true negative, false positive, and false negative, respectively.
[0061] The implementation process of the fuzzy image segmentation of various skin lesion images officially provided by the ISIC 2018 Challenge of the present invention is described in detail below with reference to the accompanying drawings and embodiments.
[0062] Example 1: Image Segmentation for ISIC 2018 Challenge
[0063] The specific steps of this embodiment are as follows:
[0064] The image preprocessed data and the corresponding target manual annotation result data are used to construct training data set I in the proportion of 70%, 10% and 20% respectively. train , validation dataset I val And test dataset I test All image data is scaled using the resize() function in the PIL package, and the image size is scaled to 512×512.
[0065] Taking a skin lesion image as an example, a residual pixel difference convolutional network for skin lesion segmentation (ResPDCNet) is constructed and trained. The specific steps are as follows:
[0066] First, the encoder network is constructed. Image features are extracted in the encoder network. The encoder includes five detail enhancement blocks (DEBlock) and five maximum pooling layers. Figure 4 As shown in the figure, each convolution block consists of a 2D convolution layer, a horizontal pixel difference convolution, a RELU activation layer and a residual connection. The specific calculation process includes: the input image enters the first DEBlock, the first maximum pooling layer, the second DEBlock, the second maximum pooling layer, the third DEBlock, the third maximum pooling layer, the fourth DEBlock, the fourth maximum pooling layer, the fifth DEBlock, and the fifth maximum pooling layer, and finally obtains the deep feature map extracted by the encoder.
[0067] Secondly, the skip connection includes a residual attention awareness module (RAAM), such as Figure 5As shown in Figure 1, the module consists of a detail enhancement module, channel attention, spatial attention, and a residual connection. The specific calculation process includes: the first RAAM receives the output of the second DEBlock, the second RAAM receives the output of the third DEBlock, the third RAAM receives the output of the fourth DEBlock, and the fourth RAAM receives the output of the fifth DEBlock, and finally obtains four feature maps of different scales.
[0068] Again, the bottleneck layer (BottleNeck) consists of two Swin Transformer Blocks. In addition, a residual connection is designed in the BottleNeck layer to calibrate the feature map information. Further feature extraction is performed on the deep feature map from the encoder. Specifically, the feature map from the encoder is first flattened, sent to LN for normalization, and then the window attention is calculated. Then it passes through LN and MLP in sequence, and then enters the third LN normalization layer. Then it is sent to the sliding window attention calculation, and then passes through LN and MLP in sequence to reach the output. Finally, the flattened feature map is restored.
[0069] After that, it is sent to the decoder part. The decoder side is similar to the encoder, using five detail enhancement blocks (DetailEnhancement Block, DEBlock). In the upsampling stage, in order to reduce the number of parameters, bilinear interpolation is used to restore the image size. In addition, the decoder side needs to receive the feature map from the jump connection part and splice it with the feature map obtained by bilinear interpolation at the channel level. Specifically, the fifth layer of the decoder receives the output from BottleNeck for upsampling, and then splices the upsampled feature map with the output from the fourth RAAM and sends it to the DEBlock in the decoder for feature integration. The fourth layer of the decoder upsamples the integrated feature map, splices it with the output from the third RAAM and sends it to the DEBlock in the decoder for feature integration. The third layer of the decoder upsamples the integrated feature map, splices it with the output from the second RAAM and sends it to the DEBlock in the decoder for feature integration. The second layer of the decoder upsamples the integrated feature map, splices it with the output from the first RAAM and sends it to the DEBlock in the decoder for feature integration. The first layer of the decoder upsamples the feature map and extracts features through the last DEBlock.
[0070] Finally, at the output, a 1x1 convolution kernel and a Sigmoid activation function are used to obtain the final image segmentation result. train And the manually labeled training dataset L train Train the model. The specific steps are as follows:train Input into the network to calculate the result of this round of iteration, and compare the result with L train The corresponding manual annotation results are compared and the loss value is calculated using the loss function. The loss function uses Dice Loss. At the same time, the validation dataset I val and L val The performance of the current model is evaluated, and the next step of parameter optimization is performed based on the evaluation results. Next, the gradient is calculated by the stochastic gradient descent optimizer and the weights in the network are updated through back propagation. The above process is iterated until the error requirements are met to obtain the network training model. Finally, the test data set I test Input into the model to get the final detection result, and use the manual annotation result to test the dataset L test The model is verified. The experimental results of the ResPDNet algorithm in this embodiment are shown in Table 1.
[0071] Table 1 Experimental results of ResPDNet on the ISIC dataset
[0072]
[0073] Example 2: PH 2 Image Segmentation
[0074] The increasing incidence of melanoma has recently prompted the development of computer-aided diagnosis systems for dermoscopic image classification. 2 The dataset was developed for research and benchmarking purposes to facilitate comparative studies of segmentation and classification algorithms for dermoscopic images. 2 It is a dermoscopic image database obtained in the Dermatology Department of Pedro Hispano Hospital in Matosinhos, Portugal. The dataset contains 200 dermoscopic images and corresponding annotated images, all of which are stored in PNG format. Melanoma lesions have irregular boundaries and are difficult to locate. These characteristics result in a higher difficulty in image segmentation in this embodiment than in Example 1, which can better highlight the effectiveness of the present invention and has a better detection effect on skin lesion areas with blurred boundaries.
[0075] The specific steps of this embodiment are as follows:
[0076] The image preprocessed data and the corresponding target manual annotation result data are used to construct training data set I in the proportion of 70%, 10% and 20% respectively. train , Validation Dataset I val And test dataset I test All image data is scaled using the resize() function in the PIL package, and the image size is scaled to 512×512.
[0077] In this embodiment, the specific steps of constructing and training the residual pixel difference convolutional network for skin lesion segmentation (ResPDCNet) are the same as the model training steps in Example 1. The training process is iterated until the error requirement is met to obtain the network training model. Finally, the test data set I test Input into the model to get the final detection result, and use the manual annotation result to test the dataset L test The model is verified. The experimental results of the ResPDNet algorithm in this embodiment are shown in Table 2.
[0078] Table 2 ResPDNet in PH 2 Experimental results on
[0079]
[0080] It should be understood that those skilled in the art can make improvements or changes based on the above description, and all these improvements and changes should fall within the scope of protection of the appended claims of the present invention.
Claims
1. A fuzzy edge enhanced skin lesion image segmentation method, characterized in that: The method comprises steps S110-S140: S110: Collect clinical skin lesion image data, where the labeled data includes the original image and the corresponding segmentation mask, and form an original image dataset and a label dataset L respectively; and perform fine preprocessing on the dataset; S120: Construct a fuzzy edge segmentation network ResPDCNet of residual pixel differential convolution, denoted as residual pixel differential convolution network for skin lesion segmentation; the ResPDCNet network structure includes an input end, an encoder, a jump connection, a bottleneck layer BottleNeck, a decoder and an output end; in the encoder, it includes five detail enhancement modules DEBlock and five maximum pooling layers. Each DEBlock consists of a 2D convolution layer, a horizontal pixel differential convolution, a RELU activation layer and a residual connection. The input feature map extracts spatial features through a 3×3 convolution kernel, keeping the input size unchanged, and calculating the horizontal difference of adjacent pixels on the feature map of the convolution output to extract edge detail information and emphasize the gradient changes in the target area; Apply the ReLU activation function to the result of pixel difference to introduce nonlinear expression ability and suppress the influence of negative values. Add the activated result to the input feature of the module to form the final output feature map, which enhances local details while retaining global information. Finally, the DEBlock module can highlight the detail changes in the image, especially the fuzzy boundary area, thereby improving the boundary detection ability of the image segmentation model. S130: training the constructed ResPDCNet; S140: Based on the network training results, a skin lesion area segmentation result is provided.
2. The fuzzy edge enhanced skin lesion image segmentation method according to claim 1, characterized in that: The jump connection includes a residual attention perception module RAAM, which consists of a detail enhancement module DEBlock, channel attention, spatial attention and a residual connection.
3. The fuzzy edge enhanced skin lesion image segmentation method according to claim 2, characterized in that: In the skip connection, the input feature map F from the backbone network is first received i , input feature map F i First, the detail enhancement module DEBlock extracts the detail edge information and outputs the enhanced feature map. The feature map after detail enhancement is input into the channel attention module CA to calculate the importance weight of each channel and generate the channel enhanced feature map. At the same time, the enhanced feature map will also pass through the spatial attention module SA to calculate the weight distribution of each pixel position and generate a spatial enhanced feature map; the output of the channel attention and the spatial attention are multiplied to fuse the channel and space weight information to obtain a further optimized feature map F p ; The optimized feature map F p It passes through the detail enhancement module DEBlock again and then combines with the original input feature F i Add together to form the final output F of the module o .
4. The fuzzy edge enhanced skin lesion image segmentation method according to claim 1, characterized in that: The bottleneck layer BottleNeck is composed of two Swin Transformer modules in series. A residual connection is designed in the BottleNeck layer to calibrate the feature map information. The Swin Transformer module is built based on a shift window. Each swin Transformer block consists of layer normalization LN, a multi-head self-attention module W-MSA, a residual connection and a 2-layer MLP with GELU nonlinearity.
5. The method for skin lesion image segmentation with fuzzy edge enhancement according to claim 4, characterized in that: The specific algorithm steps in the bottleneck layer BottleNeck are as follows: first, the input features are layer normalized to standardize the feature distribution, then the features are divided into windows of fixed size, and the multi-head self-attention W-MSA operation is performed in each window to efficiently capture the information of the local area; the output of the multi-head self-attention W-MSA is added to the original input features through a residual connection to retain the information of the input features; Subsequently, the features are layer-normalized again, and nonlinear features are extracted through a multi-layer perceptron MLP with a GELU activation function to form the output of the first Swin Transformer module; the structure of the second Swin Transformer module differs from the first block in that it uses a multi-head self-attention SW-MSA mechanism with a shifted window. By shifting the window division method, global information is captured across windows to achieve richer feature interactions.
6. The fuzzy edge enhanced skin lesion image segmentation method according to claim 1, characterized in that: The decoder uses five detail enhancement modules DEBlock; in the upsampling stage, in order to reduce the number of parameters, bilinear interpolation is used to restore the spatial size of the feature map; in addition, the decoder also receives feature maps from the jump connection and splices them with the feature maps obtained by bilinear interpolation in the channel dimension to further integrate multi-layer feature information; specifically, the fifth layer of the decoder receives the output features from BottleNeck and upsamples them; the upsampled feature map is spliced with the output features from the fourth RAAM and input into the fifth DEBlock for feature integration; the integrated feature map enters the fourth layer of the decoder, and after upsampling, it is spliced with the features from the third RAAM and then passed to the fourth DEBlock for processing; Similarly, the third layer of the decoder upsamples the integrated feature map, concatenates it with the features from the second RAAM, and sends it to the third DEBlock to complete feature fusion; The second layer of the decoder repeats the above operation, concatenates the upsampled features with the output of the first RAAM, and passes them to the second DEBlock for integration; finally, the first layer of the decoder upsamples the feature map and inputs it into the last DEBlock to complete the final feature extraction.
7. The fuzzy edge enhanced skin lesion image segmentation method according to claim 1, characterized in that: At the output end, the segmentation head uses a 1x1 convolution kernel and a Sigmoid activation function to obtain the final image segmentation result.
8. The fuzzy edge enhanced skin lesion image segmentation method according to claim 1, characterized in that: In step S130, the original image training data set I prepared in step S110 is used. train And manually annotated label dataset L train Train the model.
9. The method for skin lesion image segmentation with fuzzy edge enhancement according to claim 8, characterized in that: The specific training process is as follows: First, the training image is input into the network to generate the prediction result of the current iteration; then, the prediction result is compared with the corresponding manual annotation, and the loss value is calculated through the loss function; then, the gradient is calculated using the stochastic gradient descent optimizer, and the network weights are updated through backpropagation; Repeat the above steps until the preset error standard is met, thus completing the model training; finally, use the original image test dataset I test and the corresponding manually annotated test dataset L test Validate the model to assess its performance; Loss Function Using the Dice Loss function, the specific loss definition is as follows: Among them, TP, TN, FP, and FN represent true positive, true negative, false positive, and false negative, respectively.
10. A fuzzy edge enhanced skin lesion segmentation system based on residual pixel differential convolution, characterized in that: The system executes the method according to any one of claims 1 to 9.
Citation Information
Cited By
Pathological image background non-uniformity correction method and device based on negative illumination component
CN120525775A
Clinical ultrasonic image auxiliary screening system based on deep learning
CN121190422A
Image restoration method and electronic equipment
CN121213426A