Intelligent auxiliary detection method and system for infant hemangioma
Patent Information
- Application Number
- CN202611145645.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-30
- Publication Date
- 2026-10-20
AI Technical Summary
[0006]本发明要解决的技术问题包括:1. IH在照片中所占比例较小,直接对图像进行分类准确率低;2. IH可以长在身体不同的软组织部位,背景多变,极易受到不同背景的影响;3. 提高算法运行速度,以便于临床实际应用
[0067]1、本发明利用位置和通道自注意力模块自适应融合不同位置和通道的长距离语义特征,增强了网络的学习能力。
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This invention relates to an intelligent auxiliary detection method and system for infantile hemangiomas, belonging to the field of image processing technology. Background Technology
[0002] Infantile hemangiomas (IHs) are benign tumors that develop from the proliferation of blood vessels and surrounding tissues during embryonic development, with an incidence rate of approximately 3% to 10%. IHs can occur in any part of the skin and soft tissue of the body, most commonly in the head and neck (60%), followed by the trunk (25%), limbs (15%), and even the perineal area (2%). A typical IH develops in three phases: proliferative, involutional, and final involution. IHs usually appear within the first few weeks after birth, with the fastest growth occurring between 5 and 8 weeks, and the early proliferative phase lasting 3 to 5 months. During the early proliferative phase, the IH typically grows to 80% of its final size. Growth slows down during the late proliferative phase, generally completing between 9 and 12 months, although growth may continue beyond 36 months. The involutional phase begins around the 12th month and typically lasts 3 to 9 years. Although most cases of hemangioma (IH) can resolve spontaneously, the degree of regression varies greatly among individuals. Many children have more severe cases, with prolonged spontaneous regression periods or even incomplete resolution, leading to sequelae such as skin pigmentation, severely affecting their appearance and causing physiological and psychological impacts. IH shares similarities in clinical features and imaging manifestations with other types of vascular abnormalities or benign and malignant non-vascular tumors, such as congenital hemangioma (CH), vascular malformations (VM), benign soft-tissue tumors, and malignant tumors. This, to some extent, increases the difficulty and challenge of diagnosing IH.
[0003] Currently, the diagnosis of impaired hemorrhage (IH) is primarily performed manually by highly qualified pediatricians. However, there is a severe shortage of pediatricians with such expertise in my country, and some parents' neglect of the risks of IH can easily lead to delayed treatment for children with IH. Furthermore, existing diagnostic methods are mainly based on clinical experience and observation, lacking objective and standardized assessment criteria, resulting in significant subjectivity and uncertainty in the assessment results. Therefore, designing algorithms to assist clinicians in identifying IH is of great significance. Summary of the Invention
[0004] To address the shortcomings of existing technologies, this invention provides an intelligent auxiliary detection method for infantile hemangiomas;
[0005] This invention also provides an intelligent auxiliary detection system for infantile hemangiomas;
[0006] The technical problems to be solved by this invention include: 1. IH occupies a small proportion in photos, resulting in low accuracy in direct image classification; 2. IH can grow in different soft tissue parts of the body, with varied backgrounds, making it highly susceptible to the influence of different backgrounds; 3. Improving the algorithm's running speed to facilitate practical clinical applications.
[0007] Terminology Explanation:
[0008] ResNet18, proposed in 2015 by He Kaiming et al., is a classic lightweight deep convolutional neural network in the Residual Network (ResNet) series and is a well-known existing technology model in the field of computer vision. This network consists of 18 trainable layers. Its core innovation is the introduction of a residual shortcut connection structure, which solves the gradient vanishing and network degradation problems that easily occur in traditional deep convolutional neural networks as the number of layers increases. The lightweight 18-layer design allows it to possess excellent deep image feature extraction capabilities while also having strong training stability and high inference efficiency, making it widely used in various computer vision tasks such as image classification, object recognition, and feature extraction.
[0009] The technical solution of this invention is as follows:
[0010] The intelligent auxiliary detection method for infantile hemangiomas includes the following steps:
[0011] The preprocessed IH lesion images are input into the trained segmentation model Resnet-Unet to identify the IH lesion regions.
[0012] The IH lesion area is input into the trained IH detection model transfer-Resnet to detect whether it is IH.
[0013] According to a preferred embodiment of the present invention, the segmentation model ResNet-UNet is constructed as follows:
[0014] The pre-trained ResNet18 network has its last fully connected classification layer removed, and a dual self-attention module for position and channel is added to further fuse semantic features from different positions and channels.
[0015] By adding a UNet network decoder and skip connections, the ResNet18 network is constructed into a segmentation model, ResNet-UNet.
[0016] The ResNet-UNet segmentation model was trained on the IH segmentation dataset. The IH segmentation dataset consists of paired-matched raw IH image data and corresponding lesion region segmentation annotation mask data.
[0017] According to a preferred embodiment of the present invention, the IH detection model transfer-Resnet is constructed as follows:
[0018] The decoder part of the trained segmentation model ResNet-UNet is replaced with a three-layer fully connected layer. The last layer of the fully connected layer includes two neurons, which are divided into two classes: IH class and other classes. The training parameters of the feature extraction part of the segmentation model ResNet-UNet are loaded into the IH detection model transfer-ResNet using the transfer learning method. The model is then trained on the IH classification dataset to obtain the final training parameters.
[0019] Further optimized ResNet18 network output features , Represents the real number field; Represents the number of feature channels; Represents the height of the feature map; Represents the width of the feature map; The features obtained from the location self-attention module and the channel self-attention module are respectively input into the location self-attention module and the channel self-attention module. The final global semantic features are obtained by fusion.
[0020] Further preferred features The image is generated by layer-by-layer forward propagation of the preprocessed input image through a ResNet18 network. The specific generation process includes:
[0021] Step 1: Input image standardization preprocessing;
[0022] The RGB visible light images of infantile hemangioma lesions in the IH segmentation dataset are uniformly scaled to a preset fixed size. ,in The height of the input image. 3 represents the width of the input image, 3 represents the three color channels of the RGB image, and pixel value normalization is performed to obtain a standardized input image that meets the input requirements of the ResNet18 network.
[0023] Step 2: Low-level feature extraction and downsampling of the initial module;
[0024] The standardized input image first enters the initial feature extraction module of the ResNet18 network:
[0025] After passing through one convolutional layer, the low-level features are extracted, and the first spatial downsampling is completed to obtain the low-level feature map;
[0026] After passing through one more max pooling layer, the second spatial downsampling is completed, resulting in the initial feature map;
[0027] Step 3: Deep semantic feature extraction of multi-level residual modules;
[0028] The initial feature map is sequentially passed through the four-level cascaded residual modules of the ResNet18 network. Each residual module includes two BasicBlock residual blocks with residual jump connection structures, extracting the mid-to-high-level semantic features of the image step by step.
[0029] All four levels of cascaded residual modules are connected via a residual jumper structure;
[0030] Step 4: Final Feature Tensor The output;
[0031] The final output of the fourth-level residual module of the ResNet18 backbone network is the feature. .
[0032] A further preferred approach is to perform the following operations in the location self-attention module:
[0033] First, input features Input to two The convolutional layer produces two new feature maps. and ,in ;
[0034] Then, and Shape adjustment ,in ;
[0035] Then transpose and Multiply, then use the softmax activation function to calculate the spatial attention map. :
[0036] ( );
[0037] in, Indicates the first The position and the first Location relevance; Representation of feature map The Middle Each spatial location corresponds to 3D feature vectors Representation of feature map The Middle Each spatial location corresponds to 3D feature vectors It is a natural exponential function;
[0038] At the same time, Input to another A new feature map is generated in the convolutional layer. and the new feature map Shape adjustment ;
[0039] Finally, and Perform matrix multiplication, then combine the product with the features. The output feature map is obtained by adding them together. :
[0040] ( ).
[0041] A further preferred approach is to perform the following operations in the channel self-attention module:
[0042] First, input features Shape adjustment ,in ;
[0043] Then, and Multiplying the transposes of the matrix yields the channel self-attention map. :
[0044] ( );
[0045] in, Indicates the first The first channel and the first The correlation of each channel; Representation of feature map The OK, This represents the j-th column of feature map X;
[0046] Finally, and Perform matrix multiplication, then combine the product with the input features. The output feature map is obtained by adding them together. :
[0047] ( ).
[0048] Further preferred, the feature maps obtained by the location self-attention module and the channel self-attention module are compared with the input features. The sums are then used to obtain the final global semantic fusion feature map. That is, the final global semantic features:
[0049] ( ).
[0050] According to a preferred embodiment of the present invention, the preprocessed IH lesion image is input into the trained segmentation model ResNet-UNet to identify the IH lesion region; including:
[0051] The UNet network decoder transforms low-resolution global semantic features Y into a binary segmentation mask with the same size as the input image through progressive upsampling, skip connections, and pixel-level classification. The UNet network decoder employs a 4-layer structure symmetrical to the ResNet18 encoder, with each layer corresponding to the encoder's residual module. Skip connections enable deep fusion of high- and low-level features, specifically including:
[0052] The first layer of the UNet network decoder, which is also the third-level residual module of the ResNet18 encoder, uses a transposed convolution with a stride of 2 to upsample the global semantic feature Y by a factor of 2. The resulting new feature map is then concatenated with the feature map output from the third-level residual module. Finally, the concatenated feature map is processed by two... Convolution + batch normalization + ReLU outputs the feature map of the first layer of the UNet network decoder.
[0053] The second layer of the UNet network decoder, which is also the second-stage residual module of the ResNet18 encoder, upsamples the feature map output from the first layer of the UNet network decoder by a factor of 2 using a transposed convolution with a stride of 2. The resulting new feature map is then concatenated with the feature map output from the second-stage residual module. Finally, the concatenated feature map is processed by two... Convolution + batch normalization + ReLU outputs the feature map of the second layer of the UNet network decoder.
[0054] The third layer of the UNet network decoder, which is also the first-stage residual module of the ResNet18 encoder, uses a transposed convolution with a stride of 2 to upsample the feature map output from the second layer of the decoder by a factor of 2. The resulting new feature map is then concatenated with the feature map output from the first-stage residual module. Finally, the concatenated feature map is processed by two... Convolution + batch normalization + ReLU outputs the feature map of the third layer of the UNet network decoder.
[0055] The fourth layer of the UNet network decoder, i.e., the initial module of the ResNet18 encoder, uses a transposed convolution with a stride of 2 to upsample the feature map output from the third layer of the UNet network decoder by a factor of 2. The resulting new feature map is then concatenated with the feature map output from the initial module. Finally, the concatenated feature map is processed by two... Convolution + batch normalization + ReLU outputs the feature map of the fourth layer of the UNet network decoder.
[0056] use Convolution compresses the number of channels in the feature map of the fourth layer of the UNet network decoder to 2, outputting the final feature map with a size of [size missing]. For the probability channel of IH category, a segmentation threshold of 0.5 is set. In the final output feature map, pixels with a probability greater than 0.5 are assigned a value of 1 and marked as IH region, i.e. IH lesion region, and pixels with a probability less than 0.5 are assigned a value of 0 and marked as background region.
[0057] A further preferred method involves inputting the IH lesion area into the trained IH detection model transfer-ResNet to detect whether it is IH; including:
[0058] Model loading and initialization: Load the optimal IH detection model transfer-Resnet weight file saved during the training phase, set the IH detection model transfer-Resnet to evaluation mode, and turn off gradient calculation;
[0059] Network feature extraction: The tensor to be detected is first processed by the IH detection model transfer-Resnet to extract deep semantic features of the image, and the output is the final global semantic features with dimensions (1, 512).
[0060] Classification head prediction: The global semantic features are input into the fully connected layer at the end of the IH detection model transfer-Resnet, and the final output is a raw prediction logits vector with dimensions (1, 2), where the two dimensions correspond to the unnormalized prediction scores of "non-IH image" and "IH image" respectively.
[0061] A computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the above-described intelligent auxiliary detection method for infantile hemangiomas.
[0062] A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the above-described intelligent auxiliary detection method for infantile hemangiomas.
[0063] The intelligent auxiliary detection system for infantile hemangiomas includes:
[0064] The IH lesion region module is configured to: input the preprocessed IH lesion image into the trained segmentation model Resnet-Unet to identify the IH lesion region;
[0065] The IH detection module is configured to input the IH lesion image domain into the trained IH detection model transfer-Resnet to detect whether it is IH.
[0066] The beneficial effects of this invention are as follows:
[0067] 1. This invention utilizes a position and channel self-attention module to adaptively fuse long-distance semantic features from different positions and channels, thereby enhancing the network's learning ability.
[0068] 2. Existing classification networks directly classify IH lesion images with low accuracy and struggle to learn key lesion features from the images. Therefore, this invention employs transfer learning. First, the network's classification layer is replaced with a UNet segmentation decoder and trained on an IH segmentation dataset, enabling the network to learn the key features of IH lesions. Then, the segmentation decoder is replaced with the classification layer and trained on an IH classification dataset, further improving IH recognition accuracy. This invention's algorithm is simple in principle, easy to implement, highly accurate, and fast, meeting both the accuracy and real-time requirements of doctors. Attached Figure Description
[0069] Figure 1 This is a flowchart illustrating the intelligent auxiliary detection method for infantile hemangiomas according to the present invention.
[0070] Figure 2 This is a network architecture diagram of the IH detection model transfer-Resnet of this invention;
[0071] Figure 3 Here is a structural diagram of the location self-attention module;
[0072] Figure 4 Here is a structural diagram of the channel self-attention module;
[0073] Figure 5 Original image of the IH lesion;
[0074] Figure 6 This is the feature map learned by the last convolutional layer of the ResNet18 network.
[0075] Figure 7 Feature maps learned after adding a location channel self-attention module to the ResNet18 network;
[0076] Figure 8 This represents the feature map learned by the network after transfer learning. Detailed Implementation
[0077] The present invention will be further defined below with reference to the accompanying drawings and embodiments, but is not limited thereto.
[0078] Example 1
[0079] A smart-assisted detection method for infantile hemangiomas, based on a transfer convolutional neural network, such as... Figure 1 As shown, the steps are as follows:
[0080] The preprocessed IH lesion images are input into the trained segmentation model Resnet-Unet to identify the IH lesion regions.
[0081] The IH lesion area is input into the trained IH detection model transfer-Resnet to detect whether it is IH.
[0082] The ResNet-UNet segmentation model is constructed as follows:
[0083] The pre-trained ResNet18 network has its final fully connected classification layer removed, and a dual self-attention module for position and channel is added to further integrate semantic features from different positions and channels, thereby improving the network's learning ability.
[0084] By adding a UNet network decoder and skip connections, the ResNet18 network is constructed into a segmentation model, ResNet-UNet.
[0085] The ResNet-UNet segmentation model is trained on the IH segmentation dataset. The IH segmentation dataset, officially known as the Infantile Hemangioma (IH) image segmentation dataset, is a dedicated annotated medical image dataset used in this invention for training, validating, and testing the IH lesion region segmentation model. It includes paired-matched original IH image data and corresponding lesion region segmentation annotation mask data. This provides a training data source and a gold standard for performance evaluation of IH lesion image segmentation tasks.
[0086] like Figure 2 As shown, the IH detection model transfer-ResNet is constructed as follows:
[0087] The decoder part of the trained segmentation model ResNet-UNet is replaced with a three-layer fully connected layer. The last layer of the fully connected layer includes two neurons, divided into two classes: IH class and other classes. This model is named transfer-ResNet. Using transfer learning, the training parameters of the feature extraction part of the segmentation model ResNet-UNet are loaded into the IH detection model transfer-ResNet and trained on the IH classification dataset to obtain the final training parameters.
[0088] Example 2
[0089] The difference between the intelligent auxiliary detection method for infantile hemangiomas described in Example 1 and the following is:
[0090] ResNet18 network output characteristics ResNet18 network output characteristics For a three-dimensional real-valued feature tensor arranged in a channel-first format, the definitions of each symbol and dimension are as follows: Represents the real number field; indicating that all elements within this feature tensor are real values, used to characterize the deep semantic and spatial feature information of the input image; Represents the number of feature channels; corresponding to the semantic dimension of the feature tensor, each channel corresponds to the response mapping of a class of deep image features; Represents the feature map height; it corresponds to the pixel size of the feature tensor in the vertical space dimension, and has a fixed scaling ratio with the height of the input image. The width represents the feature map width; it corresponds to the pixel size of the feature tensor in the horizontal spatial dimension, and has a fixed scaling ratio with the width of the input image. This invention uses the well-known ResNet18 deep convolutional neural network as the feature extraction backbone network for the input image. For the infantile hemangioma (IH) lesion image recognition task of this invention, the native ResNet18 network is adapted: the global average pooling layer and fully connected classification layer used for image classification tasks in the native network are removed, and only its core convolutional feature extraction backbone network containing residual skip connections is retained. The final output is the deep semantic feature tensor extracted by the convolutional backbone, retaining the complete spatial dimension. .
[0091] Because directly training a pre-trained ResNet18 network on the IH classification dataset results in low IH recognition accuracy, and because convolutional operations focus on local information in the image, a dual self-attention module (position and channel self-attention) is added to the ResNet18 network to learn long-range global semantic features in both spatial and channel dimensions, in order to enable the network to learn global information in the image and improve IH recognition accuracy. The features obtained from the location self-attention module and the channel self-attention module are respectively input into the location self-attention module and the channel self-attention module. The final global semantic features are obtained by fusion.
[0092] feature The image is generated by layer-by-layer forward propagation through a ResNet18 network (ResNet18 feature extraction backbone network) from the preprocessed input image. The specific generation process includes:
[0093] Step 1: Input image standardization preprocessing;
[0094] The RGB visible light images of infantile hemangioma lesions in the IH segmentation dataset are uniformly scaled to a preset fixed size. ,in The height of the input image. 3 represents the width of the input image, 3 represents the three color channels of the RGB image, and pixel value normalization is performed to obtain a standardized input image that meets the input requirements of the ResNet18 network.
[0095] Step 2: Low-level feature extraction and downsampling of the initial module;
[0096] The standardized input image first enters the initial feature extraction module of the ResNet18 network:
[0097] After 1 floor A convolutional layer with a size of 2, a stride of 2, and 64 output channels is used to extract low-level features such as image edges and textures, while simultaneously performing the first spatial downsampling to obtain a result of size 2. The underlying feature map;
[0098] After passing through 1 more floor A max-pooling layer with a size and stride of 2 is used to perform the second spatial downsampling, compressing the spatial size while enhancing salient features, resulting in a layer with a size of [missing value]. The initial feature map is used as input for subsequent multi-level residual modules.
[0099] Step 3: Deep semantic feature extraction of multi-level residual modules;
[0100] The initial feature map is sequentially passed through a four-stage cascaded residual module of the ResNet18 network. Each residual module includes two BasicBlock residual blocks with residual skip connections, progressively extracting mid-to-high-level semantic features of the image. The feature transformation rules for each residual module are as follows:
[0101] Level 1 residual module: 64 input channels, 64 output channels, convolution stride of 1, no spatial downsampling, output feature map size is [size missing]. ;
[0102] Level 2 residual module: 64 input channels, 128 output channels, the first residual block convolution stride is 2, completing the 3rd spatial downsampling, output feature map size is... ;
[0103] Level 3 residual module: 128 input channels, 256 output channels, the first residual block convolution stride is 2, completing the 4th spatial downsampling, output feature map size is... ;
[0104] Level 4 residual module: 256 input channels, 512 output channels, the first residual block convolution stride is 2, completing the 5th spatial downsampling, output feature map size is... ;
[0105] All four cascaded residual modules utilize a residual skip connection structure, directly superimposing the module's input features onto the module's convolutional output features. This addresses the gradient vanishing and network degradation issues during deep network training, ensuring the effective extraction of deep semantic features.
[0106] Step 4: Final Feature Tensor The output;
[0107] The final output of the fourth-level residual module of the ResNet18 backbone network is the feature. Therefore, the characteristic tensor can be determined. Dimensional parameters:
[0108] Number of channels (The fixed number of output channels for the fourth-level residual module of ResNet18);
[0109] Feature height ( (The height of the preprocessed input image is determined by a total downsampling factor of 32x).
[0110] Feature width ( The width of the preprocessed input image is used; the network's cumulative total downsampling factor is 32x.
[0111] like Figure 3 As shown, the following operations are performed in the position self-attention module:
[0112] The Spatial Self-Attention Module is a global feature enhancement unit designed for the spatial dimension of the feature map. Its core function is to model the semantic dependency between any two spatial locations in the feature map, realize spatial feature interaction across the entire map, overcome the limitations of the local receptive field of convolution operations, and accurately capture the global morphology, boundary contour and spatial distribution features of IH lesion areas.
[0113] First, input features Input to two The convolutional layer produces two new feature maps. and ,in ;
[0114] Then, and Shape adjustment ,in ;
[0115] Then transpose and Multiply, then use the softmax activation function to calculate the spatial attention map. :
[0116] ( );
[0117] in, Indicates the first The position and the first Location correlation; the more similar two locations are, the stronger the correlation. Representation of feature map The Middle Each spatial location corresponds to 3D eigenvectors (i.e., matrices) The List), Representation of feature map The Middle Each spatial location corresponds to 3D eigenvectors (i.e., matrices) The List), The natural exponential function is defined by the natural constant. Exponential operations with a base of (a digital constant, approximately equal to 2.71828);
[0118] At the same time, Input to another A new feature map is generated in the convolutional layer. and the new feature map Shape adjustment ;
[0119] Finally, and Perform matrix multiplication, then combine the product with the features. The output feature map is obtained by adding them together. :
[0120] ( ).
[0121] like Figure 4 As shown, the following operations are performed in the channel self-attention module:
[0122] The Channel Self-Attention Module is a global feature enhancement unit that applies the self-attention computation paradigm to the feature channel dimension. Its core function is to model the semantic dependency between any two feature channels in the feature map, realize deep interaction and adaptive weight allocation between channels, strengthen the effective feature channels related to IH lesions, suppress the feature responses of irrelevant interference channels such as uneven lighting, skin wrinkles, and hair occlusion, and improve the discriminativeness and robustness of features.
[0123] First, input features Shape adjustment ,in ;
[0124] Then, and Multiplying the transposes of the matrix yields the channel self-attention map. :
[0125] ( );
[0126] in, Indicates the first The first channel and the first The correlation of each channel; Representation of feature map The OK, The j-th column of feature map X represents the channel. The more similar the two channels are, the stronger their correlation.
[0127] Finally, and Perform matrix multiplication, then combine the product with the input features. The output feature map is obtained by adding them together. :
[0128] ( ).
[0129] The feature maps obtained from the position self-attention module and the channel self-attention module are compared with the input features. The sums are then used to obtain the final global semantic fusion feature map. That is, the final global semantic features:
[0130] ( ).
[0131] The preprocessed IH lesion images are input into the trained segmentation model ResNet-UNet to identify IH lesion regions, including:
[0132] The UNet network decoder transforms low-resolution global semantic features Y into a binary segmentation mask with the same size as the input image through progressive upsampling, skip connections, and pixel-level classification. The UNet network decoder employs a 4-layer structure symmetrical to the ResNet18 encoder, with each layer corresponding to the encoder's residual module. Skip connections enable deep fusion of high- and low-level features, specifically including:
[0133] The first layer of the UNet network decoder, which is also the third level residual module of the ResNet18 encoder, uses a transposed convolution with a stride of 2 (convolution kernel). The global semantic feature Y is upsampled by a factor of 2. The resulting new feature map is concatenated with the feature map output by the third-level residual module. Then, the concatenated feature map is processed by two... Convolution + batch normalization (BN) + ReLU outputs the feature map of the first layer of the UNet network decoder;
[0134] The second layer of the UNet network decoder, which is also the second-level residual module of the ResNet18 encoder, uses a transposed convolution with a stride of 2 (the convolution kernel...). The feature map output from the first layer of the UNet network decoder is upsampled by a factor of 2. The resulting new feature map is then concatenated with the feature map output from the second-level residual module. The concatenated feature map is then processed by two... Convolution + batch normalization (BN) + ReLU outputs the feature map of the second layer of the UNet network decoder;
[0135] The third layer of the UNet network decoder, which is also the first stage residual module of the ResNet18 encoder, uses a transposed convolution with a stride of 2 (the convolution kernel...). The feature map output from the second layer of the decoder is upsampled by a factor of 2. The resulting new feature map is then concatenated with the feature map output from the first-level residual module. The concatenated feature map is then processed through two... Convolution + batch normalization (BN) + ReLU, outputting the feature map of the third layer of the UNet network decoder;
[0136] The initial module of the fourth layer of the UNet network decoder, i.e., the ResNet18 encoder, uses a transposed convolution with a stride of 2 (convolution kernel). The feature map output from the third layer of the UNet network decoder is upsampled by a factor of 2. The resulting new feature map is then concatenated with the feature map output from the initial module. The concatenated feature map is then processed by two... Convolution + batch normalization (BN) + ReLU, outputting the feature map of the fourth layer of the UNet network decoder;
[0137] use The convolutional operation compresses the number of channels in the feature map of the fourth layer of the UNet network decoder to 2 (corresponding to the IH and background classes), outputting the final feature map with a size of [size missing]. For the probability channel of IH category, a segmentation threshold of 0.5 is set. In the final output feature map, pixels with a probability greater than 0.5 are assigned a value of 1 and marked as IH region, i.e. IH lesion region, and pixels with a probability less than 0.5 are assigned a value of 0 and marked as background region.
[0138] This model employs a "segmentation-then-classification" transfer learning strategy. After the segmentation model is trained, its encoder and attention modules have learned fine-grained feature representations for hemangiomas. At this point, removing the UNet decoder and inputting the fused feature map Y into the fully connected classification network allows the use of lesion-specific features learned from the segmentation task to significantly improve the classification model's accuracy in recognizing hemangioma images and reduce false positives and false negatives.
[0139] The ResNet-UNet segmentation model was trained on the IH segmentation dataset. Specifically, all input images were scaled to (256, 256), a random horizontal flipping augmentation method was used to increase dataset diversity and prevent overfitting, the batch size was set to 8, and the AdamW optimizer was used with an initial learning rate of [missing information]. Weight decay = 5E-2, training for 150 epochs.
[0140] The segmentation model Resnet-Unet was trained on the IH segmentation dataset, enabling it to identify IH lesion features from complete images.
[0141] The IH detection model, transfer-ResNet, was trained on the IH classification dataset to obtain the final training parameters. These parameters included: scaling all input images to (256, 256) size; using a random horizontal flipping augmentation method to increase dataset diversity and prevent overfitting; setting the batch size to 8; employing the AdamW optimizer; and setting the initial learning rate. The weight decay was set to weight_decay = 5E-2, and the training lasted for 150 epochs. The ResNet18 part of the transfer-ResNet model used parameters from the ResNet18 model after ResNet-UNet training.
[0142] The IH lesion area is input into the trained IH detection model transfer-ResNet to detect whether it is IH; including:
[0143] Model loading and initialization: Load the optimal IH detection model transfer-Resnet weight file (.pth format) saved during the training phase, set the IH detection model transfer-Resnet to evaluation mode (model.eval()), and disable gradient calculation (torch.no_grad()) to accelerate inference and avoid GPU memory usage;
[0144] Network feature extraction: The tensor to be detected is first processed by the IH detection model transfer-Resnet (which includes convolutional layers, pooling layers, residual modules, and positional and channel self-attention modules) to extract deep semantic features of the image, and outputs the final global semantic features with dimensions (1, 512).
[0145] Classifier Head Prediction: The global semantic features are input to the fully connected layer (Classifier Head) at the end of the IH detection model transfer-Resnet. This is a two-layer fully connected layer or a single-layer linear layer that is re-adapted for the transfer learning stage. The final output is an original prediction logits vector with dimensions (1, 2), where the two dimensions correspond to the unnormalized prediction scores of "non-IH images" and "IH images", respectively.
[0146] This method does not require users to manually set parameters and can automatically recognize IH images. The recognition results can meet the needs of doctors, and the overall algorithm runs in about 0.5 seconds, which can meet the requirements of real-time performance.
[0147] Figure 5 The images are of the original IH lesions. Directly classifying these lesions using the ResNet18 network yields low accuracy. The ResNet18 network learns feature maps such as... Figure 6 As shown, the feature map learned after adding the location channel self-attention module is as follows: Figure 7 As shown. Figure 6 and Figure 7 Darker colors indicate a greater contribution to the prediction result. As shown in the figure, after adding the location channel self-attention module, the network focuses less on the surrounding background area. This indicates that adding the location channel self-attention module allows the network to focus more on the IH lesion area. After transfer learning, the feature map learned by the network is as follows... Figure 8 As shown, after transfer training, the model can accurately identify the IH lesion area, consistent with the diagnosis of clinicians, proving the effectiveness of the method.
[0148] This method does not require users to manually set parameters and can automatically identify IH. The identification results can meet the needs of doctors, and the overall algorithm runs in about 1 second, which can meet the requirements of real-time performance.
[0149] Example 3
[0150] A computer device includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of the intelligent auxiliary detection method for infantile hemangiomas described in Embodiment 1 or 2.
[0151] Example 4
[0152] A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the intelligent auxiliary detection method for infantile hemangiomas described in Embodiment 1 or 2.
[0153] Example 5
[0154] The intelligent auxiliary detection system for infantile hemangiomas includes:
[0155] The IH lesion region module is configured to: input the preprocessed IH lesion image into the trained segmentation model Resnet-Unet to identify the IH lesion region;
[0156] The IH detection module is configured to input the IH lesion image domain into the trained IH detection model transfer-Resnet to detect whether it is IH.
Claims
1. An intelligent auxiliary detection method for infantile hemangiomas, characterized in that, The steps include the following: The preprocessed IH lesion images are input into the trained segmentation model Resnet-Unet to identify the IH lesion region; The IH lesion area is input into the trained IH detection model transfer-Resnet to detect whether it is IH.
2. The intelligent auxiliary detection method for infantile hemangiomas according to claim 1, characterized in that, The ResNet-UNet segmentation model is constructed as follows: The pre-trained ResNet18 network has its last fully connected classification layer removed, and a dual self-attention module for position and channel is added to further fuse semantic features from different positions and channels. By adding a UNet network decoder and skip connections, the ResNet18 network is constructed into a segmentation model, ResNet-UNet. The ResNet-UNet segmentation model was trained on the IH segmentation dataset; the IH segmentation dataset includes paired matching raw IH image data and corresponding lesion region segmentation annotation mask data.
3. The intelligent auxiliary detection method for infantile hemangiomas according to claim 2, characterized in that, The IH detection model, transfer-Resnet, is constructed as follows: The decoder part of the trained segmentation model ResNet-UNet is replaced with a three-layer fully connected layer. The last layer of the fully connected layer includes two neurons, which are divided into two classes: IH class and other classes. The training parameters of the feature extraction part of the segmentation model ResNet-UNet are loaded into the IH detection model transfer-ResNet using the transfer learning method. The model is then trained on the IH classification dataset to obtain the final training parameters.
4. The intelligent auxiliary detection method for infantile hemangiomas according to claim 3, characterized in that, ResNet18 network output characteristics , Represents the real number field; Represents the number of feature channels; Represents the height of the feature map; Represents the width of the feature map; The features obtained from the location self-attention module and the channel self-attention module are respectively input into the location self-attention module and the channel self-attention module. The final global semantic features are obtained by fusing the features. feature The image is generated by layer-by-layer forward propagation of the preprocessed input image through a ResNet18 network. The specific generation process includes: Step 1: Input image standardization preprocessing; The RGB visible light images of infantile hemangioma lesions in the IH segmentation dataset are uniformly scaled to a preset fixed size. ,in The height of the input image. 3 represents the width of the input image, 3 represents the three color channels of the RGB image, and pixel value normalization is performed to obtain a standardized input image that meets the input requirements of the ResNet18 network. Step 2: Low-level feature extraction and downsampling of the initial module; The standardized input image first enters the initial feature extraction module of the ResNet18 network: After passing through one convolutional layer, the low-level features are extracted, and the first spatial downsampling is performed to obtain the low-level feature map. After passing through one more max pooling layer, the second spatial downsampling is completed, resulting in the initial feature map; Step 3: Deep semantic feature extraction of multi-level residual modules; The initial feature map is sequentially passed through a 4-level cascaded residual module of the ResNet18 network. Each residual module includes two BasicBlock residual blocks with residual jump connection structure, and the mid-to-high-level semantic features of the image are extracted step by step. All four cascaded residual modules are connected via a residual jumper structure. Step 4: Final Feature Tensor The output; The final output of the fourth-level residual module of the ResNet18 backbone network is the feature. .
5. The intelligent auxiliary detection method for infantile hemangiomas according to claim 4, characterized in that, Perform the following operations in the location self-attention module: First, input features Input to two The convolutional layer produces two new feature maps. and ,in ; Then, and Shape adjustment ,in ; Then, transpose and Multiply, then use the softmax activation function to calculate the spatial attention map. : ( ); in, Indicates the first The position and the first Locational relevance; Representation of feature map The Middle Each spatial location corresponds to 3D feature vectors Representation of feature map The Middle Each spatial location corresponds to 3D feature vectors It is a natural exponential function; At the same time, Input to another A new feature map is generated in the convolutional layer. and the new feature map Shape adjustment ; Finally, and Perform matrix multiplication, then combine the product with the features. The output feature map is obtained by adding them together. : ( ); Perform the following operations in the channel self-attention module: First, input features Shape adjustment ,in ; Then, and Multiplying the transposes of the matrix yields the channel self-attention map. : ( ); in, Indicates the first The first channel and the first The correlation of each channel; Representation of feature map The OK, This represents the j-th column of feature map X; Finally, and Perform matrix multiplication, then combine the product with the input features. The output feature map is obtained by adding them together. : ( ); The feature maps obtained from the position self-attention module and the channel self-attention module are compared with the input features. The sums are then used to obtain the final global semantic fusion feature map. That is, the final global semantic features: ( )。 6. The intelligent auxiliary detection method for infantile hemangiomas according to claim 3, characterized in that, The preprocessed IH lesion images are input into the trained segmentation model ResNet-UNet to identify IH lesion regions, including: The UNet network decoder transforms low-resolution global semantic features Y into a binary segmentation mask with the same size as the input image through progressive upsampling, skip connections, and pixel-level classification. The UNet network decoder employs a 4-layer structure symmetrical to the ResNet18 encoder, with each layer corresponding to the encoder's residual module. Skip connections enable deep fusion of high- and low-level features, specifically including: The first layer of the UNet network decoder, which is also the third-level residual module of the ResNet18 encoder, uses a transposed convolution with a stride of 2 to upsample the global semantic feature Y by a factor of 2. The resulting new feature map is then concatenated with the feature map output from the third-level residual module. Finally, the concatenated feature map is processed by two... Convolution + batch normalization + ReLU outputs the feature map of the first layer of the UNet network decoder. The second layer of the UNet network decoder, which is also the second-stage residual module of the ResNet18 encoder, upsamples the feature map output from the first layer of the UNet network decoder by a factor of 2 using a transposed convolution with a stride of 2. The resulting new feature map is then concatenated with the feature map output from the second-stage residual module. Finally, the concatenated feature map is processed by two... Convolution + batch normalization + ReLU outputs the feature map of the second layer of the UNet network decoder. The third layer of the UNet network decoder, which is also the first-stage residual module of the ResNet18 encoder, uses a transposed convolution with a stride of 2 to upsample the feature map output from the second layer of the decoder by a factor of 2. The resulting new feature map is then concatenated with the feature map output from the first-stage residual module. Finally, the concatenated feature map is processed by two... Convolution + batch normalization + ReLU outputs the feature map of the third layer of the UNet network decoder. The fourth layer of the UNet network decoder, i.e., the initial module of the ResNet18 encoder, uses a transposed convolution with a stride of 2 to upsample the feature map output from the third layer of the UNet network decoder by a factor of 2. The resulting new feature map is then concatenated with the feature map output from the initial module. Finally, the concatenated feature map is processed by two... Convolution + batch normalization + ReLU outputs the feature map of the fourth layer of the UNet network decoder. use Convolution compresses the number of channels in the feature map of the fourth layer of the UNet network decoder to 2, outputting the final feature map with a size of [size missing]. For the probability channel of IH category, a segmentation threshold of 0.5 is set. In the final output feature map, pixels with a probability greater than 0.5 are assigned a value of 1 and marked as IH region, i.e. IH lesion region, and pixels with a probability less than 0.5 are assigned a value of 0 and marked as background region.
7. The intelligent auxiliary detection method for infantile hemangiomas according to claim 3, characterized in that, The IH lesion area is input into the trained IH detection model transfer-Resnet to detect whether it is IH. include: Model loading and initialization: Load the optimal IH detection model transfer-Resnet weight file saved during the training phase, set the IH detection model transfer-Resnet to evaluation mode, and turn off gradient calculation; Network feature extraction: The tensor to be detected is first processed by the IH detection model transfer-Resnet to extract deep semantic features of the image, and the output is the final global semantic features with dimensions (1, 512). Classification head prediction: The global semantic features are input into the fully connected layer at the end of the IH detection model transfer-Resnet, and the final output is a raw prediction logits vector with dimensions (1, 2), where the two dimensions correspond to the unnormalized prediction scores of "non-IH image" and "IH image" respectively.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the intelligent auxiliary detection method for infantile hemangiomas as described in any one of claims 1-7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the intelligent auxiliary detection method for infantile hemangiomas as described in any one of claims 1-7.
10. An intelligent auxiliary detection system for infantile hemangiomas, characterized in that, include: The IH lesion region module is configured to: input the preprocessed IH lesion image into the trained segmentation model Resnet-Unet to identify the IH lesion region; The IH detection module is configured to input the IH lesion image domain into the trained IH detection model transfer-Resnet to detect whether it is IH.