Myeloma cell semantic segmentation method and system based on improved Unet

Through the improved semantic segmentation method of Unet myeloma cells, combined with multi-scale feature input and attention mechanism, the accuracy and small sample data processing capabilities in myeloma cell image segmentation are solved, and the precise segmentation and morphology of myeloma cells are achieved. Feature extraction ensures good performance under small sample data.

CN118898840APending Publication Date: 2024-11-05CHANGCHUN UNIV OF SCI & TECH

Patent Information

Application Number
CN202410896420.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-05
Publication Date
2024-11-05

AI Technical Summary

Technical Problem

The existing myeloma cell semantic segmentation methods have problems such as low accuracy, poor processing capabilities for noise and complex structures, relying on a large amount of labeled data, and difficulty in processing small sample data.

Method used

The improved Unet myeloma cell semantic segmentation method is adopted to enhance the feature extraction ability and segmentation accuracy of the model through testing time enhancement technology, multi-scale feature input, OutLooker attention mechanism, hollow space pyramid pooling and weighted mixed loss function.

Benefits of technology

The precise segmentation of myeloma cell images is achieved, the extraction ability of different scales and morphological features is improved, the good segmentation performance is ensured under small sample data, and the parameter adjustment problem of the mixed loss function is solved by automatically solving the weights.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118898840A_ABST
    Figure CN118898840A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of medical image recognition. The invention provides a novel Unet network which is based on test time enhancement and is combined with an OutLooker attention mechanism, cavity space pyramid pooling (ASPP) and multi-scale input fusion, and semantic segmentation is performed on myeloma cells by using a weight loss function which automatically evaluates weights by using same variance uncertainty. Through test time enhancement, the model has a good segmentation capability on small sample data, and an attention mechanism is introduced, so that the feature representation capability of the network can be enhanced. The cavity space pyramid pooling module can effectively capture feature information of different scales. Meanwhile, a multi-scale feature input method is adopted, and feature maps from different scales are input into the model. The weighting loss function can balance different types of samples in the training process, and the automatic solution of the weight omits the process of manual parameter adjustment. According to the method, the myeloma cells with different forms and sizes are accurately segmented by utilizing the semantic segmentation network model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of medical image recognition, and in particular relates to a myeloma cell semantic segmentation method and system based on an improved Unet. Background Art

[0002] Myeloma is a common malignant tumor of the blood system. It originates from hematopoietic stem cells or white blood cell progenitor cells. It can occur at any age, but is more common in middle-aged and elderly people. The incidence of myeloma has increased year by year worldwide and has become a serious public health problem. A large number of abnormal leukemia cells will be produced in the patient's bone marrow. These cells will inhibit normal hematopoietic function and spread and form tumors in the body. Since the bone marrow is an important organ for body hematopoiesis, myeloma has a serious impact on the patient's life, health and quality of life.

[0003] In the treatment of myeloma, accurate identification and segmentation of myeloma cells is very important. Traditional manual segmentation methods take a lot of time and effort and are susceptible to subjectivity and errors. In recent years, deep learning technology has been widely used in the field of medical image processing, especially in the successful application of semantic segmentation tasks.

[0004] Cell semantic segmentation is an important task in biomedical image processing. Its goal is to classify each pixel in a cell image into different organelles or components to obtain the internal structure and composition information of the cell. This task has important application value in fields such as cell biology, pathology and drug development.

[0005] Traditional cell image segmentation methods are usually based on manually designed feature extraction and classification algorithms, which require a lot of domain expert knowledge and experience and usually cannot handle noise, complex

[0006] With the development of deep learning technology, deep neural network has become a very effective tool for cell semantic segmentation.

[0007] The deep learning network structure has a large number of parameters, so in order to achieve high accuracy, a large amount of annotated data is required. Deep learning methods for semantic segmentation require large, usually pixel-based annotated datasets for training. This task relies on high-quality samples and domain experts to accurately annotate images. In addition, microscopic images present less information, complex biological tissue structures, low feature differentiation between cells, high density and large number of cell colonies, adhesion of cells to each other, and changes in cell morphology. Objective factors such as these make the semantic segmentation of cells still a very challenging topic. There is currently no good segmentation algorithm for cell images. Summary of the invention

[0008] 1. Technical issues to be solved

[0009] In view of the deficiencies of the prior art, the present invention provides a method and system for semantic segmentation of myeloma cells based on an improved Unet, which solves the problems raised in the above-mentioned background technology.

[0010] The technology of the present invention is aimed at semantic segmentation of myeloma cell images. The present invention is mainly designed for the details of the improved Unet algorithm. First, the present invention adopts test time enhancement technology to ensure segmentation accuracy while amplifying the data set. To improve the effect of semantic segmentation, it is necessary to capture more feature information during the segmentation process. Second, the deep layer of the neural network has more abstract and richer detail features. In order to obtain more detailed information of cell images in the segmentation process, four parts are introduced, namely multi-scale feature input, OutLooker attention mechanism, void space pyramid pooling and weighted mixed loss function, and an improved Unet with enhanced semantic segmentation is proposed for myeloma cell images.

[0011] Like segmentation.

[0012] (II) Technical solution

[0013] In order to achieve the above-mentioned purpose, the present invention specifically adopts the following technical solutions:

[0014] Based on the improved Unet myeloma cell semantic segmentation method and system, including:

[0015] The first part is the image enhancement module, and the second part is the image segmentation module. The first part of the image enhancement module can be divided into two steps: training image enhancement and test image enhancement. Training image enhancement can generate diverse data when the original data set is small, so that the model can learn different image change patterns, thereby improving the performance of the model. Test image enhancement combines the prediction results of multiple enhanced samples to obtain more reliable and stable semantic segmentation output.

[0016] The improved Unet myeloma cell semantic segmentation model includes an input layer, four encoding layers, four decoding layers, a channel mapping layer and an output layer connected in sequence;

[0017] A downsampling layer is respectively arranged between two of the three encoding layers, and an upsampling layer is respectively arranged between two of the three decoding layers.

[0018] Furthermore, the preprocessing of the original myeloma image includes:

[0019] Training time enhancement, that is, the dataset is divided into three parts: training set, test set and validation set, and each part is divided into 3 splits according to the uncropped images accounting for approximately 5%, 15% and 30% (named as 5, 15, 30). All data are processed proportionally using the same enhancement (horizontal and vertical flipping, 90°, 180° and 270° rotation). These images are randomly cropped to a size of 512×512 pixels. The generated images from the same image are only used in the training set, test set or validation set where the original image is located. These enhanced and cropped training data are used to train the model.

[0020] Test-time augmentation involves having each trained model predict augmented instances of the same predicted image and merging the predictions based on pixel majority voting and object matching majority voting strategies.

[0021] Further, the input layer functions to receive a color image of a myeloma cell image;

[0022] The multi-scale feature input strategy, that is, in the encoder part of Unet, adopts multi-scale feature extraction. By introducing branches of different scales before each pooling layer, features with different receptive fields and resolutions can be extracted on different branches. After the myeloma cell image is input, it first passes through a k-order pooling layer to reduce the size of the input features to the same size as the feature map generated by downsampling. After extracting features from downsampling, the downsampled feature inputs are fused, and considering efficiency issues, 3x 3 and 1x 1 convolutional layers are used to stack and refine the connection features.

[0023] The encoding layer is used to extract the image information of the color image of the myeloma cell image and capture the deep information of the image;

[0024] The decoding layer is used to restore the color image of the myeloma cell image based on the deep information of the color image of the myeloma cell image, and obtain the surface information of the image.

[0025] The purpose of integrating the OutLooker attention mechanism is to use the statistical information (mean and variance) of the input samples to generate a global attention weight matrix.

[0026] For each spatial position (i, j), OutLooker attention computes its similarity with all pixels in a local window of size K×K centered at (i, j). Unlike self-attention, it requires a Query-Key matrix multiplication to compute the attention (i.e. OutLooker attention simplifies this process through a reshape operation.

[0027] Given an input X, we first use two linear layers with weights and WV ∈R C×C Projection to foreground weight The sum value represents V∈R H×W×C .set up Represents all values ​​within the local window centered at (i, j), that is:

[0028]

[0029] The use of atrous spatial pyramid pooling (ASPP) at the jump connection of the Unet network can achieve semantic understanding of larger target areas and reduce the network's attention to background areas without increasing network parameters and reducing resolution, thereby improving segmentation effect.

[0030] The role of the weighted loss function is to take into account multiple sources of error to improve the performance of the model in various aspects.

[0031] Furthermore, the weighted loss function mainly derives a weight solution algorithm of the weighted loss function, and maximizes the Gaussian likelihood estimation by using homoscedastic uncertainty. The weighted loss function formula is as follows:

[0032]

[0033] First, define a probability model:

[0034] L(W,σ 1 ,σ 2 )

[0035] =-logp(y1,y2|f W (x)

[0036] Next, define the likelihood functions for multiple loss functions:

[0037] p(y1,…,y k |f W (x)

[0038] =p(y1|f W (x))…p(y k |f W (x)

[0039] Among them, y i is the output of each sub-loss function in multiple loss functions. Then, the maximum likelihood estimation of the two loss functions can be expressed as follows:

[0040]

[0041] W1 and W2 are defined as a set of parameters for the model's directional propagation process, and the ability to automatically calculate gradients through back-propagation is used to automatically solve the weights.

[0042] (III) Beneficial effects

[0043] Compared with the prior art, the present invention provides a method and system for semantic segmentation of myeloma cells based on an improved Unet, which has the following beneficial effects:

[0044] 1. The present invention uses a semantic segmentation network model to achieve accurate segmentation of myeloma cells. The semantic segmentation network enhances the ability to extract image features of myeloma cells of different scales, morphologies, and image quality changes, thereby improving the ability to segment myeloma cells. In clinical applications, the morphological characteristics of cells can be quantitatively analyzed, and the severity of the disease can be judged by the morphological characteristics, and the prognosis can be evaluated.

[0045] 2. The method and system proposed in the present invention utilize the data enhancement method enhanced during test time to fuse the prediction results of different voting strategies on the prediction results of the test enhanced data, thereby enhancing the characterization capability of myeloma cell samples and enabling the network model to still have good segmentation capabilities when facing small sample data.

[0046] 3. The myeloma cell semantic segmentation network proposed in the present invention automatically solves the weights based on the same variance uncertainty, solving the problem that the mixed loss function requires manual parameter adjustment. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 This is a flow chart of the semantic segmentation method of myeloma cells based on the improved Unet according to the present invention;

[0048] Figure 2 This is a schematic diagram of the structure of the semantic segmentation method of myeloma cells based on the improved Unet according to the present invention;

[0049] Figure 3 This is a schematic diagram of the test time enhancement technology of the present invention; DETAILED DESCRIPTION

[0050] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0051] Specific implementation method 1: Combination Figure 1 This embodiment is described as a semantic segmentation method of myeloma cells based on an improved Unet, comprising the following steps:

[0052] Step 1: Divide the dataset into three parts: training set, test set, and validation set. Then divide each part into 3 splits according to the uncropped images accounting for approximately 5%, 15%, and 30% (named as 5, 15, and 30).

[0053] All data were scaled using the same augmentation (horizontal and vertical flipping, 90°, 180°, and 270° rotations). The images were randomly cropped to a size of 512×512 pixels.

[0054] Then load the data and read the data by setting a fixed batch_size.

[0055] Step 2: Use the training samples obtained in step 1 as input data for training the deep semantic segmentation network.

[0056] The deep semantic segmentation network is an encoder-decoder structure. Figure 2 As shown in the figure, the network as a whole retains the U-shaped structure of Unet, which is mainly composed of three parts: encoder, decoder and skip connection structure.

[0057] The encoder includes a deep convolution module and an OutLooker attention module. The input data first enters the deep convolution module, which mainly extracts local features; then the features extracted by the deep convolution module are sent to the OutLooker attention module, which mainly extracts global features; finally, high-level features with excellent local and global features are obtained.

[0058] The deep convolution module consists of five layers of sub-modules. Each layer of sub-modules includes a convolution unit and a pooling unit. After the convolution unit calculates the features, it is sent to the pooling unit to increase the receptive field layer by layer.

[0059] Each layer of submodules uses a 3*3 convolution layer with a step size of 1, and a ReLU activation function is used after the convolution layer; the pooling unit uses a 2*2 maximum pooling with a step size of 1. The convolution unit of each layer of submodules contains two convolution layers. The number of input channels and output channels of the convolution unit of the first layer of submodules is (3, 64), the number of input channels and output channels of the convolution unit of the second layer of submodules is (64, 128), the number of input channels and output channels of the convolution unit of the third layer of submodules is (128, 256), the number of input channels and output channels of the convolution unit of the fourth layer of submodules is (256, 512), and the number of input channels and output channels of the convolution unit of the first layer of submodules is (512, 1024).

[0060] The present invention adopts multi-scale feature extraction in the encoder part of Unet. After the myeloma data is input, it first passes through a k-order pooling layer to reduce the size of the input features to the same size as the feature map generated by downsampling. After extracting features from downsampling, Feature Add is used to fuse the downsampled feature input. Considering the efficiency issue, 3x 3 and 1x 1 convolutional layers are used to stack and refine the connection features.

[0061] The present invention uses atrous spatial pyramid pooling (ASPP) at the jump connection of the Unet network. The ASPP module consists of a 1x1 convolution + pooling pyramid. The expansion factor (rate) of each layer of the pooling pyramid can be customized to achieve free multi-scale feature extraction. The module uses multiple parallel atrous convolution layers with rates of 3, 5, and 7. The features extracted for each rate are further processed in a separate branch and fused to generate the final result.

[0062] The present invention uses the OutLooker attention mechanism after each encoder and decoder of the Unet network, and transforms the input channel from [H, W, C] to [H, W, K] through the fully connected layer. 4 ], get Q and reshape the attention weight to [H*W, K*K, K*K], which represents the weight generated by each pixel. Softmax is used in the last dimension. Here, Softmax calculates the similarity of each pixel with all other pixels (including itself).

[0063] The high-level features extracted by the encoder enter the auxiliary upsampling structure and decoder, and the context information is fused by summing the features encoded by the encoder through the skip connection structure layer by layer, and then spliced ​​with the Unet decoder layer by layer;

[0064] Each submodule of the Unet decoder consists of an upsampling unit and a convolution unit. After upsampling, the upsampling unit performs feature connection with the Feature Add feature of the same layer, which is recorded as the Concatenation feature. The Concatenation feature is then sent to the convolution unit for processing.

[0065] The output of the last sub-module of the decoder passes through a 1*1 convolutional layer to obtain the final segmentation result.

[0066] The loss functions used by the deep semantic segmentation network are BinaryDiceLoss and CrossEntropyLoss. During the training process, the model with the best effect on the validation set is taken as the final deep semantic segmentation model.

[0067] Step 3. Finally, use the deep semantic segmentation model obtained in step 2 to segment the tested myeloma cell image and perform voting or averaging operations, and compare the semantic segmentation effects of myeloma cells under different strategies. Select the best one as the final voting strategy and use its result as the final prediction result.

[0068] Example:

[0069] The embodiment of the present invention includes the following steps:

[0070] Step 1. Preprocessing of myeloma cell image data. The data set used in this embodiment is part of the 2021 Challenge SegPC-2021, containing 774 images and corresponding labels. The data set is divided into training set, test set, and validation set, with 298 images in the training set, 277 images in the test set, and 199 images in the validation set. The divided data sets are processed proportionally using the same data augmentation (horizontal and vertical flipping, 90°, 180°, and 270° rotation). The images are randomly cropped to a size of 512×512 pixels. Generated images from the same image are used only in the training set, test set, or validation set where the original image is located.

[0071] Step 2: Training of deep semantic segmentation model. The myeloma cell image dataset described in step 1 is used as the input data of the deep semantic segmentation network for training. The loss functions in the deep semantic segmentation network are BinaryDiceLoss and CrossEntropyLoss. The number of samples per batch (batch size) is set to 16, the initial learning rate is set to 0.01, the number of iterations (epoch) is set to 50 times, the optimizer is Adam, and the evaluation indicators are MPA and MIOU. The model is trained for a total of 40,000 epochs, and the model is evaluated every 500 epochs, that is, the accuracy indicators such as MIOU. The log is recorded every 100 epochs of training, that is, the loss function. After the training is completed, the model with the best effect on the validation set is taken as the final model.

[0072] Step 3: Myeloma cell image segmentation: The final model obtained in step 2 is used to predict enhanced instances of the same predicted image, and the prediction results are merged according to the pixel majority voting and object matching majority voting strategies.

[0073] The present invention adopts a multi-scale feature input method so that the model can learn the semantic information of low-resolution feature maps and the detailed information of high-resolution feature maps, introduces the OutLooker attention mechanism to enhance the model's perception of the global structure of the input image, uses atrous spatial pyramid pooling (ASPP) to expand the receptive field while maintaining resolution, and finally, by weighted mixing different loss functions, the model can compare the gap between the predicted value and the true value from different aspects, thereby achieving a better network training effect, and enabling it to adaptively solve the weight parameters according to the model's homoscedastic uncertainty. The present invention still has good segmentation capabilities when facing small sample data. The present invention enhances the model's ability to extract features of myeloma cell images of different scales, morphologies and image quality changes, thereby improving the segmentation capability of myeloma cells.

[0074] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A myeloma cell semantic segmentation method based on an improved Unet network, characterized in that: include: Step 1: Preprocess the image by using the functions in the Torchvision library for processing images and videos in Pytorch to flip, scale, and rotate the image, and use the bilateral filtering method to remove noise from the myeloma cell image; Step 2: Divide the dataset into three parts: training set, validation set and test set. For each dataset, a separate Unet model is trained. The Unet model includes input layer, encoding layer, decoding layer, channel mapping layer and output layer. Multi-scale feature input is used in the input layer. The encoding layer and decoding layer both use the OutLooker attention mechanism to strengthen the network's attention to key areas. The channel mapping layer combines the Atrous Spatial Pyramid Pooling (ASPP) to capture semantic information of different scales, and a weighted loss function based on the automatic evaluation of weights based on homoscedastic uncertainty is designed. Step 3: Use each trained model to predict the enhanced instance of the same predicted image, and merge the prediction results according to the pixel majority voting and object matching majority voting strategies; Step 4: Evaluate the model segmentation effect.

2. The myeloma cell semantic segmentation method according to claim 1, characterized in that: The method of processing the original myeloma cell image using the test time enhancement technology includes: The dataset is divided into three parts: training set, test set and validation set, and each part is divided into 3 splits according to the uncropped images accounting for approximately 5%, 15% and 30% (named as 5, 15, 30). Use the same augmentation (horizontal and vertical flip, 90°, 180° and 270° rotation) to scale All data were processed. These images were randomly cropped to a size of 512 × 512 pixels. The generated images are only used in the training set, test set or validation set where the original images are located. These augmented and cropped training data were used to train the model. For each dataset (3 splits), a separate model was trained. Each trained model was used to predict augmented instances of the same prediction image and the results were merged using pixel majority voting and object matching majority voting strategies.

3. The myeloma cell semantic segmentation method according to claim 1, characterized in that: The Unet network includes an input layer, an encoding layer, a decoding layer, a channel mapping layer and an output layer connected in sequence; 3.1 A downsampling layer is set between each encoding layer to strengthen image dependencies and capture deep information; 3.2 An upsampling layer is set between each decoding layer to restore the image and capture surface information; 3.3 The function of the channel mapping layer is to restore the image pixel-level classification features to the image channel feature information, and restore the channel features into probability information and transmit it to the output layer.

4. The myeloma cell semantic segmentation method according to claim 1, characterized in that: The multi-scale feature input strategy includes: In the encoder part of Unet, multi-scale feature extraction is adopted. By introducing branches of different scales before each pooling layer, features with different receptive fields and resolution can be extracted on different branches. Rate characteristics. The input image of each branch is scaled or cropped at different scales to capture detailed features at different scales. In the feature extraction process, the resolution of the feature map is gradually reduced and rich feature representations are extracted at each scale, so that the network can perceive details of different scales.

5. The myeloma cell semantic segmentation method according to claim 1, characterized in that: The OutLookerAttention is a global self-attention mechanism that uses the statistical information (mean and variance) of the input samples to generate a global attention weight matrix. The OutLooker attention mechanism can better model global context dependencies and enhance the network's perception of the global structure of the input image. For each spatial position (i, j), OutLooker attention computes its similarity with all pixels in a local window of size K×K centered at (i, j). Unlike self-attention, it requires a Query-Key matrix multiplication to compute the attention (i.e. ), OutLooker attention simplifies this process through a reshaping operation. Given an input X, we first use two linear layers with weights and W V ∈R C×C Projection to foreground weight The sum value represents V∈R H×W×C .set up Represents all values ​​within the local window centered at (i, j), that is:

6. The myeloma cell semantic segmentation method according to claim 1, characterized in that: The Atrous Spatial Pyramid Pooling (ASPP) can improve the receptive field of the network, thereby expanding the network's field of view. range and better utilize the high-level semantic feature information in skip connections. ASPP uses convolutions with different dilation rates to simultaneously fuse multi-scale information, avoiding the limitation of a receptive field. Using ASPP in skip connections can semantically understand larger target areas without increasing network parameters and reducing resolution, and reduce the network's attention to background areas, thereby improving segmentation results.

7. The myeloma cell semantic segmentation method according to claim 1, wherein: The weighted loss function for automatic weight evaluation is based on homoscedastic uncertainty and has the following form: 7.1 The loss function is defined as the weighted loss function L(w), where w is the weight, that is: 7.2 Using homoscedastic uncertainty to automatically evaluate weights and improve the sensitivity of the loss function for myeloma cell segmentation; 7.3 The weighted loss function is used to effectively train the network, ensuring finer and more accurate learning of key areas.

8. A computer-readable storage medium, characterized in that: A computer program storing the myeloma cell semantic segmentation method according to any one of claims 1 to 7 is used to achieve efficient semantic segmentation of myeloma cells.

9. A myeloma cell semantic segmentation system, characterized in that: It includes an image acquisition module, a network model module, and an automatic weight evaluation module, which are used to realize semantic segmentation of myeloma cells based on a new Unet network with test time enhancement, OutLooker attention mechanism, ASPP, and multi-scale input fusion.

Citation Information

Patent Citations

  • Semantic map construction method based on visual SLAM

    CN110781262A

  • New crown focus segmentation method based on multi-scale feature fusion

    CN115375716A

  • Breast cancer cell image segmentation method based on U-Net

    CN116188455A

  • Systems and methods for image denoising using deep convolutional networks

    DE102020133963A1

Cited By

  • Multi-scale chip defect size measurement method based on UNet + +

    CN119723101A