A difficult sample processing algorithm in medical image segmentation

By combining the non-invasive target region Cutout algorithm with the hard sample recall loss function, the problem of poor segmentation of hard samples in cardiac MRI images is solved, improving the segmentation accuracy and reliability of the model.

CN116740346BActive Publication Date: 2026-02-10NANJING UNIV OF POSTS & TELECOMM
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310620968.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-30
Publication Date
2026-02-10
Estimated Expiration
2043-05-30

AI Technical Summary

Technical Problem

In cardiac MRI images, segmentation of difficult samples is hampered by their small proportion and the significant influence of redundant features, resulting in poor model training performance, which is difficult to effectively address with existing technologies.

Method used

The non-invasive target region Cutout algorithm is used for data augmentation. Combined with the hard sample recall loss function and the binary crossover loss function, redundant region feature learning is reduced, and the model's segmentation accuracy for small target regions is improved.

Benefits of technology

By reducing the influence of redundant region features, the accuracy and reliability of the model for segmenting cardiac MRI images are improved, especially for segmenting difficult samples.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116740346B_ABST
    Figure CN116740346B_ABST
Patent Text Reader

Abstract

The application provides a kind of difficult sample processing algorithm in medical image segmentation, comprising the following steps: the medical image to be segmented is preprocessed, and the foreground and background are obtained by label, the foreground is regarded as positive sample, and the background is regarded as negative sample;Medical image data set is trained using a medical image segmentation network model based on contrast learning and post-processing algorithm;Difficult sample recall loss function and non-invasive target region Cutout algorithm are used to specially process difficult samples in the image.Difficult sample recall loss function can focus on small target regions under difficult samples and effectively locate, and non-invasive target region Cutout algorithm can reduce the feature pixels of redundant regions while ensuring that the region to be segmented is not damaged, reduce the segmentation pressure of the model on the redundant region, thereby improve the reliability of the model, to a certain extent, solve the segmentation problem of difficult samples in the cardiac medical image data set, and better improve the accuracy of cardiac medical image segmentation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a hard sample processing algorithm for medical image segmentation, belonging to the field of medical image processing. Background Technology

[0002] When tackling image semantic segmentation tasks, the training set can be categorized based on learning difficulty, consisting of hard and easy samples. Hard samples are generally those that are difficult to learn from, corresponding to imbalanced samples. They typically exhibit a larger loss function value and poorer segmentation metrics. When building a model, if hard samples constitute a small proportion of the training set, their contribution to the loss function and gradient descent is relatively small. Therefore, the loss function needs to handle these different types of hard samples differently, such as through weight allocation and coefficient adjustments. For cardiac MRI images, the displayed image is a tomographic scan, so there will always be the last few images in the scan layer. These images typically represent the apex of the heart, where the area to be segmented will appear very small. For cardiac MRI images, hard samples are defined as pixel-level hard samples.

[0003] There are many specific approaches to solving the hard sample problem. These include (1) Hard sample data augmentation. Hard sample data augmentation has two advantages: first, it is consistent with the above-mentioned increase in data volume, which increases the absolute number of hard samples; second, it can reduce the ratio of simple samples to hard samples, so that in each batch, hard samples have a greater impact on the gradient, and the training effect is biased towards hard samples. (2) Improvement of loss function. The core starting point of all loss function improvements for hard samples is to increase the contribution of samples with large loss functions to the gradient. You can choose to reduce the weight of other samples or perform special term processing on hard samples. For example, Focal Loss can make hard samples contribute more to the loss function, thereby making the training effect better for hard samples. (3) Online hard sample mining strategy. The core idea of ​​the online hard sample mining strategy is that during the training process, every few epochs, the value of the loss function of each sample is calculated, and then more hard samples are added. In practice, in addition to the training data, there is a data pool used to store additional data and to filter the data pool of hard samples. Alternatively, a resampling approach can be adopted, where the training data is the same as the data in the data pool, and each time difficult samples are selected from the data pool and added to the training dataset for final training. Summary of the Invention

[0004] The purpose of this invention is to provide a hard sample processing algorithm for medical image segmentation, which solves the problem of difficult-to-segment target regions in cardiac MRI image datasets containing hard samples.

[0005] To achieve the above objectives, this invention provides a hard sample processing algorithm for medical image segmentation, comprising the following steps:

[0006] Step 1: Split the dataset into training, validation, and test sets in a 4:3:3 ratio;

[0007] Step 2: Determine the positive samples as the regions to be segmented and the negative samples as the background. Identify the sample images with smaller regions to be segmented in the dataset as the difficult samples.

[0008] Step 3: Use the non-invasive target region Cutout algorithm preprocessing method to perform data augmentation on the segmented MRI images to obtain an initial training model with high correlation to the region to be segmented; divide the obtained cropped images into datasets to obtain training set data, validation set data and test set data;

[0009] Step 4: Add the loss function of the medical image segmentation network based on contrastive learning to the hard sample recall loss function, and use the medical image segmentation network to train the MRI image dataset to obtain the final training model; if there are semi-supervised tasks or other downstream tasks in the training task, use pseudo-labels to train the unlabeled dataset under the self-training framework to obtain the final training model.

[0010] As a further improvement of the present invention, step 3 specifically includes:

[0011] Step 31: Determine the nearest cut point in the training set using the non-intrusive target region Cutout algorithm. The nearest cut point is determined by the largest area in the region to be segmented in all training sets, and is the point in that region that is closest to the image edge.

[0012] Step 32: Using the nearest cut point as the vertex, form a rectangle together with the image edge without intruding into the foreground region. Cut the rectangle, and the remaining part is the augmented data obtained by the non-intrusive target region Cutout algorithm.

[0013] Step 33: Put the segmented training set into the initial training model for training, so that the initial training model can reduce the learning of features of redundant regions without affecting the model's learning of the location information and feature texture of the region to be segmented.

[0014] As a further improvement of the present invention, the hard sample recall loss function in step 4 is as follows:

[0015]

[0016] Here, TP represents positive samples that are correctly predicted by the model, and FN represents positive samples that are incorrectly predicted by the model.

[0017] As a further improvement of the present invention, step 4 also includes:

[0018] When using the hard sample recall loss function, if the positive sample is a small target, the hard sample loss function is added to the binary crossover loss function to jointly guide the model's gradient descent. The formula for combining the hard sample recall loss function and the binary crossover loss function is shown below:

[0019] L total =L BCE +L Recall ;

[0020] Among them, L BCE L represents the binary crossover loss function. Recall This represents the recall loss function for hard samples.

[0021] Compared with existing technologies, the hard sample processing algorithm in medical image segmentation of this invention focuses on small target regions under hard samples and effectively locates them. By using the non-invasive target region cutout algorithm, it reduces the feature pixels of redundant regions while ensuring that the region to be segmented is not invaded or damaged, thereby reducing the segmentation pressure of the model on redundant regions and improving the reliability of the model. To a certain extent, it solves the segmentation problem of hard samples in cardiac medical image datasets and improves the accuracy of cardiac medical image segmentation. Attached Figure Description

[0022] Figure 1 This is a schematic diagram of the non-intrusive target region Cutout algorithm in a specific embodiment of the present invention.

[0023] Figure 2 This is a schematic diagram of the algorithm for handling difficult samples in medical image segmentation in a specific embodiment of the present invention.

[0024] Figure 3 This is a network structure diagram of the hard sample recall loss function and the non-intrusive target region Cutout algorithm in a specific embodiment of the present invention. Detailed Implementation

[0025] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0026] A hard sample processing algorithm for medical image segmentation, wherein the non-invasive target region cutout algorithm is as follows: Figure 1 This includes the following steps:

[0027] S1. Divide the dataset into training set, validation set and test set in a 4:3:3 ratio.

[0028] S2. Determine the positive samples as the regions to be segmented and the negative samples as the background. Determine the sample images with smaller regions to be segmented in the dataset as difficult samples.

[0029] S3. The segmented cardiac medical images are augmented using the non-invasive target region Cutout algorithm preprocessing method. The Cutout algorithm does not intrude on the target region and does not affect the features of the region to be segmented. It effectively reduces irrelevant features from redundant background regions, making it easier to obtain a better model related to the region to be segmented. The resulting cropped images are then divided into training, validation, and test sets.

[0030] S31. Traverse all training datasets and, in conjunction with the labels, determine the nearest cut point. The purpose of the nearest cut point is to minimize the chance that the target region will be selected by the segmentation rectangle, thus preventing the region to be segmented from being cut by the Cutout algorithm, and reducing the proportion of feature pixels of the region to be segmented to the total image feature pixels.

[0031] S32. Using the cut point as the vertex and finding the image vertex closest to the cut point to form a rectangle, perform non-invasive target region cutout on the samples in the dataset.

[0032] S33. The segmented training set is put into the initial training model for training, so that the initial training model can reduce the learning of features of redundant regions without affecting the model's learning of the location information and feature texture of the region to be segmented.

[0033] The flowchart of the hard sample recall loss function guiding model training and the structure diagram of the hard sample processing algorithm in medical image segmentation are as follows: Figure 2 , 3 As shown, it includes the following steps:

[0034] S4. A hard sample recall loss function is added to the loss function of the contrastive learning-based medical image segmentation network, and this network is used to train cardiac MRI images to obtain the final training model. If there are semi-supervised tasks or other downstream tasks in the training task, pseudo-labels are used to train the unlabeled dataset within the self-training framework to obtain the final model.

[0035] S41. After preprocessing the dataset using the non-intrusive target region Cutout algorithm in step S1, initialize the training model parameters and put the training set into the model for training.

[0036] S42. Use the encoder to extract features and the decoder to reconstruct the predicted image.

[0037] S43. Use the overall loss function, which is formed by adding the hard sample loss function and the binary cross loss function, to guide the model and find the updated gradient descent direction and parameters.

[0038] S44. After reaching the set number of training rounds, the final generated model can be obtained.

[0039] The hard sample recall loss function is shown below:

[0040]

[0041] Here, TP represents positive samples that are correctly predicted by the model, and FN represents positive samples that are incorrectly predicted by the model.

[0042] In step S43, when using the hard sample recall loss function, if the positive sample is a small target, the hard sample loss function is added to the binary crossover loss function to jointly guide the model gradient descent. The formula for combining the hard sample recall loss function and the binary crossover loss function is as follows:

[0043] L total =L BCE +L Recall ;

[0044] Among them, L BCE L represents the binary crossover loss function. Recall This represents the recall loss function for hard samples.

[0045] In summary, compared with existing technologies, the hard sample processing algorithm in medical image segmentation of this invention improves the problem of completely fair weight allocation for positive and negative samples in the crossover loss function by using a hard sample recall loss function. It can effectively locate small target regions under hard samples and reduce the feature pixels of redundant regions by using a non-invasive target region cutout algorithm, ensuring that the region to be segmented is not invasively damaged. This reduces the segmentation pressure on the model for redundant regions and improves the reliability of the model. To a certain extent, it solves the segmentation problem of hard samples in cardiac medical image datasets and improves the accuracy of cardiac medical image segmentation.

Claims

1. A hard sample processing algorithm for medical image segmentation, applied to segmenting hard samples in MRI images of specific tissue structures, characterized in that, Includes the following steps: Step 1: Divide the dataset into training, validation, and test sets in a 4:3:3 ratio. Step 2: Determine the positive samples as the regions to be segmented and the negative samples as the background. Identify the sample images with smaller regions to be segmented in the dataset as the difficult samples. Step 3: Use the non-invasive target region Cutout algorithm preprocessing method to perform data augmentation on the MRI image to be segmented to obtain an initial training model with high correlation to the region to be segmented; divide the obtained cropped image into datasets to obtain training set data, validation set data and test set data; Step 31: Determine the nearest cut point in the training set using the non-intrusive target region Cutout algorithm. The nearest cut point is determined by the largest area in the region to be segmented in all training sets, and is the point in that region that is closest to the image edge. Step 32: Using the nearest cutting point as the vertex, form a rectangle together with the image edge without intruding into the foreground area. Cut the rectangle, and the remaining part is the augmented data obtained by the non-intrusive target region Cutout algorithm. Step 33: Put the segmented training set into the initial training model for training, so that the initial training model can reduce the learning of features of redundant regions without affecting the model's learning of the location information and feature texture of the region to be segmented. Step 4: Add the hard sample recall loss function to the loss function of the medical image segmentation network based on contrastive learning, and use the medical image segmentation network to train the MRI image dataset to obtain the final training model. If there are semi-supervised tasks or other downstream tasks in the training task, the unlabeled dataset is trained using pseudo-labels within the self-training framework to obtain the final training model.

2. The hard sample processing algorithm for medical image segmentation according to claim 1, characterized in that, The hard sample recall loss function in step 4 is as follows: Here, TP represents positive samples that are correctly predicted by the model, and FN represents positive samples that are incorrectly predicted by the model.

3. The hard sample processing algorithm for medical image segmentation according to claim 2, characterized in that, Step 4 also includes: When using the hard sample recall loss function, if the positive sample is a small target, the hard sample loss function is added to the binary crossover loss function to jointly guide the model's gradient descent. The formula for combining the hard sample recall loss function and the binary crossover loss function is shown below: L total =L BCE +L Recall ; Among them, L BCE L represents the binary crossover loss function. Recall This represents the recall loss function for hard samples.

Citation Information

Patent Citations

  • Lung focus positioning device

    CN114820584A