Clinical lesion auxiliary segmentation system based on nuclear magnetic resonance image

By combining MRI image processing and convolutional neural networks with the U-Net network structure, the problems of error and inconsistency in lesion segmentation in MRI images were solved, achieving high-precision and high-accuracy lesion region segmentation, adapting to different lesion morphologies and complex backgrounds.

CN121169946AActive Publication Date: 2025-12-19THE SEVENTH MEDICAL CENTER OF PLA GENERAL HOSPITAL +1

Patent Information

Application Number
CN202511438527.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-10
Publication Date
2025-12-19
Estimated Expiration
2045-10-10

AI Technical Summary

Technical Problem

Existing deep learning-based lesion segmentation methods face challenges in processing MRI images due to their high dimensionality and complex tissue structures, resulting in significant errors and inconsistencies in the segmentation results, especially when dealing with different lesion morphologies, making it difficult to guarantee accuracy.

Method used

An MRI image processing module was used for image alignment and grayscale adjustment. A multi-level convolutional module was designed by combining convolutional neural networks and U-Net network structures. The lesion region segmentation results were optimized by probability segmentation correction and lesion boundary smoothing.

Benefits of technology

The spatial and grayscale standardization of the images was achieved, which improved the segmentation accuracy and precision of the lesion area. It showed good adaptability, especially in the identification of complex backgrounds and small lesions, reduced the error of the segmentation results, and ensured the accuracy and consistency of the lesion segmentation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121169946A_ABST
    Figure CN121169946A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, in particular to a clinical focus auxiliary segmentation system based on a nuclear magnetic resonance image. The system comprises an MRI image processing module, a lesion auxiliary segmentation module, a probability segmentation correction module and a lesion boundary smoothing module, a corresponding clinical nuclear magnetic resonance image set of a patient can be obtained, image position alignment and gray level adjustment processing can be carried out, and meanwhile a corresponding clinical image lesion segmentation model is constructed to carry out multi-scale fusion auxiliary segmentation. Generating a clinical focus region segmentation fusion image; obtaining a focus confidence probability corresponding to each pixel point in the segmentation image through the clinical focus region segmentation fusion image, and carrying out probability segmentation boundary correction on the clinical focus region segmentation fusion image to obtain a clinical focus region segmentation correction result image; and performing focus edge shape smoothing processing on the clinical focus region segmentation correction result map to generate a clinical focus edge shape segmentation optimization result. According to the invention, high-precision segmentation of the focus in the MRI image can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image processing, and in particular to a clinical lesion auxiliary segmentation system based on magnetic resonance imaging. BACKGROUND

[0002] In recent years, image segmentation methods based on deep learning have gradually become a research hotspot. Convolutional neural networks (CNN), U-Net and other deep learning models can achieve more accurate and rapid lesion segmentation by automatically learning the features in the image. These methods have strong robustness and can adapt to different image quality and lesion types, and have achieved good performance in various medical image segmentation tasks. However, traditional lesion segmentation methods rely on image processing algorithms and manual intervention, such as threshold segmentation, region growing, edge detection, etc. Although these methods can effectively extract the lesion area in some cases, due to the unclear boundary between the lesion area and the surrounding normal tissue and the variable morphology, in addition, due to the high-dimensional characteristics and complex tissue structure of magnetic resonance imaging, the training and application of deep learning models face great challenges, especially when dealing with different lesion morphologies, resulting in large errors in the segmentation results and inability to guarantee the accuracy and consistency of each segmentation result. SUMMARY

[0003] Therefore, it is necessary to provide a clinical lesion auxiliary segmentation system based on magnetic resonance imaging to solve at least one of the above technical problems.

[0004] To achieve the above purpose, a clinical lesion auxiliary segmentation system based on magnetic resonance imaging includes the following modules: An MRI image processing module is used to acquire a set of patient clinical magnetic resonance images including T1 weighted, T2 weighted and enhanced sequence scanning through an MRI device, and to perform image position alignment and gray scale adjustment processing on the set of patient clinical magnetic resonance images to generate a set of clinical magnetic resonance gray scale standard images. A lesion auxiliary segmentation module is used to design a multi-level convolution module by adopting a convolutional neural network as a core framework and combining a U-Net network structure to construct a corresponding clinical image lesion segmentation model; the set of clinical magnetic resonance gray scale standard images is input into the clinical image lesion segmentation model for multi-scale fusion auxiliary segmentation to generate a clinical lesion region segmentation fusion map. A probability segmentation correction module is used to obtain the lesion confidence probability corresponding to each pixel point in the segmentation map through the clinical lesion region segmentation fusion map, and to correct the probability segmentation boundary of the clinical lesion region segmentation fusion map based on the lesion confidence probability corresponding to each pixel point in the segmentation map to obtain a clinical lesion region segmentation correction result map. The lesion boundary smoothing module is configured to perform lesion boundary shape smoothing processing on the clinical lesion region segmentation correction result image, to generate a clinical lesion boundary shape segmentation optimization result.

[0005] Further, the MRI image processing module includes the following functions: acquire, by the MRI device, a clinical magnetic resonance sub-image corresponding to T1 weighted sequence scanning; acquire, by the MRI device, a clinical magnetic resonance sub-image corresponding to T2 weighted sequence scanning; acquire, by the MRI device, a clinical magnetic resonance sub-image corresponding to enhanced sequence scanning; merge the clinical magnetic resonance sub-images corresponding to T1 weighted sequence scanning, T2 weighted sequence scanning, and enhanced sequence scanning to form a corresponding patient clinical magnetic resonance image set; perform image position alignment and grayscale adjustment processing on the patient clinical magnetic resonance image set, to generate a clinical magnetic resonance grayscale standard image set.

[0006] Further, the image position alignment and grayscale adjustment processing on the patient clinical magnetic resonance image set includes: perform image space feature analysis on each clinical magnetic resonance sub-image in the patient clinical magnetic resonance image set, to extract a spatial feature matrix corresponding to each clinical magnetic resonance sub-image, including the spatial coordinates, grayscale value distribution, and local region corresponding edge, angle, and texture geometry information of each pixel point in the image; perform image deformation error analysis on each clinical magnetic resonance sub-image in the patient clinical magnetic resonance image set based on the spatial feature matrix corresponding to each clinical magnetic resonance sub-image, to obtain the corresponding image relative displacement error between each clinical magnetic resonance sub-image in the image acquisition process; obtain the high-contrast spatial position points and low-contrast spatial position points corresponding to each clinical magnetic resonance sub-image from the patient clinical magnetic resonance image set, and perform spatial weighted average calibration according to the high-contrast spatial position points and low-contrast spatial position points corresponding to each clinical magnetic resonance sub-image, to generate a clinical image space calibration position template; perform image position alignment and registration on each clinical magnetic resonance sub-image in the patient clinical magnetic resonance image set based on the clinical image space calibration position template and in combination with the corresponding image relative displacement error between each clinical magnetic resonance sub-image in the image acquisition process, to obtain a clinical magnetic resonance alignment and registration image set; perform grayscale adjustment processing on the clinical magnetic resonance alignment and registration image set, to generate a clinical magnetic resonance grayscale standard image set.

[0007] Further, the gray scale adjustment processing of the clinical nuclear magnetic resonance alignment registration image set comprises: The pixel gray scale distribution value corresponding to each pixel point in each clinical registration sub-image is obtained by the clinical nuclear magnetic resonance alignment registration image set; A clinical image gray scale harmonization standard template is constructed, which includes the gray scale value distribution range of the pathological or normal tissue in the ideal state in the clinical reference image; The gray scale distribution deviation between the pixel gray scale distribution values corresponding to each pixel point in each clinical registration sub-image is calculated based on the clinical image gray scale harmonization standard template, to obtain the pixel gray scale distribution deviation corresponding to each clinical registration sub-image; Based on the pixel gray scale distribution deviation corresponding to each clinical registration sub-image and combined with the non-linear fitting method, the pixel gray scale distribution value corresponding to each pixel point in each clinical registration sub-image is adjusted by polynomial curve fitting, to generate a clinical nuclear magnetic resonance gray scale standard image set.

[0008] Further, the lesion auxiliary segmentation module comprises the following functions: By adopting a convolutional neural network as the core framework, a multi-level convolution module corresponding to different sizes of convolution kernels including small convolution kernels 3x3 or 5x5 and large convolution kernels 15x15 or 21x21 is designed, wherein the small convolution kernels are used to extract low-level feature maps of the clinical sub-image including micro edges, textures and structural changes, and the large convolution kernels are used to extract high-level feature maps of the clinical sub-image including the shape and size of the lesion area; By combining the U-Net network structure including the network architecture corresponding to the encoder-decoder, the corresponding multi-level convolution module is composed into the corresponding U-Net basic network architecture, so that in the U-shaped down-sampling part of the encoder, the residual convolution block is used to enhance the extraction ability of the large convolution kernel to the deep features in the clinical sub-image, and in the encoder part, the deconvolution combined with the U-shaped up-sampling is introduced to introduce the attention mechanism through the skip connection feature to fuse the feature maps of different levels, and through the global average pooling and global maximum pooling, the context feature information of different levels is obtained, to output the corresponding lesion feature segmentation fusion map, thereby constructing the corresponding clinical image lesion segmentation model; The clinical nuclear magnetic resonance gray scale standard image set is input into the clinical image lesion segmentation model for multi-scale fusion auxiliary segmentation, to generate a clinical lesion region segmentation fusion map.

[0009] Further, the probability segmentation correction module comprises the following functions: The lesion confidence probability corresponding to each pixel point in the clinical lesion region segmentation fusion map is obtained; The inter-class variance of grayscale corresponding to the segmentation map is calculated by maximizing the segmentation map of clinical lesion region segmentation and fusion map to automatically determine the lesion probability segmentation threshold. Based on the lesion confidence probability corresponding to each pixel in the segmentation map and combined with the lesion probability segmentation threshold, the probabilistic binary segmentation boundary of the clinical lesion region segmentation fusion map is corrected. According to the lesion probability segmentation threshold, the lesion confidence probability corresponding to each pixel in the segmentation map is segmented into the corresponding binary lesion image. The segmentation boundary corresponding to the binary lesion image is further corrected and optimized by combining the region growing algorithm to obtain the clinical lesion region segmentation correction result map.

[0010] Furthermore, obtaining the lesion confidence probability corresponding to each pixel in the segmentation map through the clinical lesion region segmentation and fusion map includes: The relative position of each pixel in the segmentation map and the geometric shape of the lesion within the lesion area are obtained by using the clinical lesion area segmentation and fusion map, so as to obtain the clinical lesion feature matrix corresponding to each pixel in the segmentation map. The similarity between the clinical lesion feature matrices corresponding to each pixel in the segmentation map is measured to obtain the degree of lesion feature similarity between each pixel in the segmentation map and its surrounding neighboring pixels. Based on the degree of lesion feature similarity between each pixel in the segmentation map and its surrounding neighboring pixels, lesion confidence prior estimation is performed on each pixel in the clinical lesion region segmentation fusion map to obtain the lesion confidence probability corresponding to each pixel in the segmentation map.

[0011] Furthermore, the step of automatically determining the lesion probability segmentation threshold by maximizing the gray-level inter-class variance corresponding to the segmentation map through the clinical lesion region segmentation fusion map includes: Obtain the corresponding grayscale range from the clinical lesion region segmentation and fusion map. And calculate each gray level Corresponding number of pixels and the total number of pixels in the entire image. ; Based on each gray level Corresponding number of pixels and the total number of pixels in the entire image. Calculate each gray level Pixel occurrence probability ; Based on each gray level Pixel occurrence probability Calculate the corresponding cumulative probability and cumulative average ,in It is between 0 and Integers between these ranges can represent the threshold, and the mean of the entire image can be calculated simultaneously. ; Based on the mean of the entire image And combined with cumulative probability and cumulative average Perform inter-class variance calculation to obtain the gray-level inter-class variance corresponding to the segmentation image. And based on the variance between gray classes Determine the value corresponding to reaching the maximum value Value and The ratio between them is used as the threshold for lesion probability segmentation.

[0012] Furthermore, the lesion boundary smoothing module includes the following functions: The corresponding clinical imaging lesion segmentation boundary line is obtained by segmenting and correcting the clinical lesion region. Based on the clinical image lesion segmentation boundary line and combined with morphological operations including erosion and dilation, the clinical lesion region segmentation correction result map is denoised to remove the small lesion noise points generated during the lesion correction segmentation process, and the clinical lesion region edge shape optimization map is obtained. If there are still breakpoints within the corresponding lesion segmentation boundary in the optimized edge shape diagram of the clinical lesion region, then the boundary breakpoint smoothing process is performed on the corresponding lesion segmentation boundary in the optimized edge shape diagram of the clinical lesion region to generate the optimized edge shape segmentation result of the clinical lesion.

[0013] Furthermore, the boundary breakpoint smoothing process for the corresponding lesion segmentation boundaries within the optimized edge map of the clinical lesion region includes: The corresponding lesion segmentation boundary breakpoint domain is obtained by optimizing the lesion segmentation boundary within the edge shape of the clinical lesion region. By setting the corresponding lesion boundary break neighborhood range, and statistically analyzing the trend slope of the left and right half neighborhoods around the lesion segmentation boundary break point based on the lesion boundary break neighborhood range, the trend slope of the left and right half neighborhoods around the lesion segmentation boundary break point can be obtained. Based on the trend slope of the left and right half-neighborhood boundaries around the breakpoints of the lesion segmentation boundary, the breakpoint domains on the corresponding lesion segmentation boundary in the edge optimization map of the clinical lesion region are subjected to boundary break fitting and smoothing processing to generate the edge segmentation optimization results of the clinical lesion.

[0014] The beneficial effects of this invention are: The clinical lesion auxiliary segmentation system based on the nuclear magnetic resonance image has the MRI image processing module, the lesion auxiliary segmentation module, the probability segmentation correction module and the lesion boundary smoothing module, compared with the prior art, the beneficial effects of the present application are that the T1 weighted, T2 weighted and enhanced sequence scanning images of the patient are obtained by the MRI device, the comprehensiveness and richness of the multi-modal image data are ensured, the key of the process is image position alignment and gray scale adjustment, so as to realize the spatial and gray scale standardization of different sequence images, the image position alignment technology can ensure the spatial consistency of different sequence images, avoid the position information deviation caused by the patient body position difference or equipment error, so as to realize the accurate comparison of the image and the high accuracy of the subsequent analysis, the gray scale adjustment is to eliminate the gray scale difference caused by different scanning sequences, equipment types or image acquisition time, so that each sequence image has uniform brightness and contrast, which is convenient for model training and reasoning, the standardized image set provides basic data for subsequent lesion segmentation, avoids the gray scale inconsistency problem between multi-modal data in the image preprocessing stage, so as to improve the sensitivity and accuracy of the model to the lesion area. Secondly, by using the convolutional neural network (CNN) as the core framework, a multi-level convolution module is designed, and the image lesion segmentation is carried out combined with the U-Net network structure, the CNN model can automatically learn the feature information in the image through its special hierarchical structure and convolution operation, including shape, boundary, texture and the like, which helps the model to extract important structural features in the image, and the U-Net network structure is widely used in medical image segmentation, which realizes the capture and accurate positioning of context information through the coding-decoding architecture, under the assistance of multi-scale fusion, the model can pay attention to the lesion area at different scales at the same time, avoiding the limitations of single scale analysis in traditional methods, which can extract and fuse features in the image at different scales, and then generate accurate lesion area segmentation map, this method significantly improves the segmentation accuracy of the lesion area, especially in the recognition of complex image background and small lesions. Then, the generated lesion area segmentation fusion map is further processed, and the lesion confidence probability of each pixel point is used to correct the boundary of the segmentation result, the confidence probability value of each pixel point can reflect the possibility of whether the position belongs to the lesion area, therefore, through the analysis of these probability information, the boundary of the lesion area can be adjusted more accurately, and the possible misclassification or missed classification area can be removed, the accuracy of the segmentation result is improved, especially in the processing of low contrast area and fuzzy boundary, the occurrence of false positive and false negative in the segmentation result error can be effectively reduced, so as to ensure the accuracy of the lesion segmentation result.Finally, the lesion edge in the segmentation result image is further optimized by lesion edge shape smoothing processing, which is usually realized by morphological operations such as erosion, expansion and the like. These operations can accurately adjust and optimize the segmentation boundary, so that it is more consistent with the real shape of the lesion, and the smoothing processing helps to remove the breakpoints caused by image noise or irregularities in the segmentation process, so that the lesion boundary is smoother and more natural, which can ensure the consistency of the geometric shape of the segmentation result and the actual structure, thereby avoiding the subsequent analysis deviation caused by the morphological error. BRIEF DESCRIPTION OF DRAWINGS

[0015] Other features, objects, and advantages of the application will become more apparent from the following detailed description of non-limiting embodiments thereof, read in conjunction with the accompanying drawings: Figure 1 A module schematic diagram of the clinical lesion auxiliary segmentation system based on the nuclear magnetic resonance image according to the present application; Figure 2 A function flow schematic diagram of the MRI image processing module; Figure 1 Figure 3 A function flow schematic diagram of the lesion auxiliary segmentation module. Figure 1 DETAILED DESCRIPTION

[0016] The technical system of the present application will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.

[0017] To achieve the above-mentioned purpose, please refer to Figures 1 to 3 The present application provides a clinical lesion auxiliary segmentation system based on a nuclear magnetic resonance image. In the embodiments of the present application, please refer to Figure 1 The module schematic diagram of the clinical lesion auxiliary segmentation system based on the nuclear magnetic resonance image according to the present application is shown in the present example. In the present example, the clinical lesion auxiliary segmentation system based on the nuclear magnetic resonance image includes the following modules: S1: an MRI image processing module, configured to acquire a patient clinical nuclear magnetic resonance image set including T1 weighted, T2 weighted and enhanced sequence scanning corresponding MRI devices, and perform image position alignment and gray scale adjustment processing on the patient clinical nuclear magnetic resonance image set to generate a clinical nuclear magnetic resonance gray scale standard image set; ​​In this embodiment of the invention, taking a patient as an example, a clinical MRI image set is acquired using an MRI device (such as a 3.0T superconducting magnetic resonance imaging system). In T1-weighted sequence scanning, the repetition time (TR) is set to 500 ms, the echo time (TE) to 15 ms, the excitation angle to 90°, the matrix size to 256×256, and the slice thickness to 5 mm, acquiring 20 slices. In T2-weighted sequence scanning, the parameters are adjusted to TR=3000 ms, TE=90 ms, the excitation angle to 180°, and the matrix size and slice thickness remain unchanged, also acquiring 20 slices. Before the contrast-enhanced sequence scanning, a contrast agent (such as gadopentetate dimeglumine, with an injection dose calculated at 0.1 mmol / kg body weight; assuming the patient's weight is 70 kg, the injection dose is 7 mmol) is injected intravenously. After the contrast agent has been distributed in the body for a period of time, the contrast-enhanced sequence scanning is initiated, with the parameters set to TR 600 ms, TE 15 ms, and T2-weighted sequence scanning to 5 ... At a 20-millisecond excitation angle of 70°, with the matrix size and slice thickness remaining constant, 20 slices were acquired. Simultaneously, the acquired T1-weighted, T2-weighted, and enhanced sequence scan clinical MRI sub-images were merged to form a patient's clinical MRI image set. Image alignment was then performed, using a feature-point matching method, such as the SIFT (Scale Invariant Feature Transform) algorithm, to extract feature points from each sub-image. Matching was then performed by calculating the Euclidean distance between feature points, as shown in the formula: ,in and Given the coordinates of two feature points, feature point pairs with a distance less than a specific threshold (set to 5 pixels) are selected as matching point pairs. Affine transformation parameters, including translation, rotation, and scaling parameters, are calculated based on these matching point pairs. The sub-image is then transformed to align its spatial position. For grayscale adjustment, the average grayscale value of the image set is calculated. The formula is ,in This represents the total number of pixels in the sub-images of the image set. For the first The grayscale value of each pixel is set to a target average grayscale value of 128, and then a linear transformation is applied. ,in The original grayscale value. After bit alignment and grayscale adjustment, the adjusted grayscale values ​​are used to generate the final clinical MRI grayscale standard image set.

[0018] S2: Lesion-assisted segmentation module, which uses a convolutional neural network as the core framework to design multi-level convolutional modules and combine them with the U-Net network structure to build a corresponding clinical imaging lesion segmentation model; inputting the clinical MRI grayscale standard image set into the clinical imaging lesion segmentation model to perform multi-scale fusion-assisted segmentation to generate a clinical lesion region segmentation fusion map; In the embodiment of the present application, by adopting a convolutional neural network as a core framework to design a multi-level convolution module, for a small convolution kernel, a convolution kernel with a size of 3*3 or 5*5 is selected, and taking a clinical sub-image with a size of 256*256 pixels as an example, when a 3*3 convolution kernel is used for convolution operation, in each 3*3 local region of the image, the convolution result is obtained by multiplying the weight of the convolution kernel with the corresponding pixel value and summing up, assuming that the weight matrix of the convolution kernel is , the local region pixel value matrix is , and the convolution calculation is , by sliding the convolution kernel pixel by pixel (the step is set to 1) on the whole image, low-level feature maps are obtained, these low-level feature maps capture small edges, such as the subtle boundary between lesions and normal tissues, and texture and structure change characteristics, such as the fineness of the tissue, and for a large convolution kernel, a 15*15 or 21*21 convolution kernel is selected, and the same operation is performed on the above-mentioned clinical sub-image, the large convolution kernel can cover a larger area, and in the convolution process, by integrating the pixel information in a larger range, the shape and size features corresponding to the lesion region are extracted. For example, for a circular lesion, the large convolution kernel can perceive its outline and approximate size from a more macroscopic perspective, and generate high-level feature maps, different size convolution kernels are combined to form a multi-level convolution module, to realize the extraction of different levels of features of the clinical sub-image, and a clinical image lesion segmentation model is constructed by combining the U-Net network structure, the U-Net network architecture includes an encoder-decoder structure, in the encoder part, a residual convolution block is used to enhance the ability of the large convolution kernel to extract deep features in the clinical sub-image, and taking a residual convolution block as an example, it includes two consecutive convolution layers, assuming that the input feature map is X, after the first convolution layer (the convolution kernel size is set to 3*3, and the step is 1), the following is obtained , and after the second convolution layer (also a 3*3 convolution kernel, and the step is 1), the following is obtained , then the input and output are added in the manner of , this residual connection can avoid the gradient vanishing problem when the network is deepened, and is helpful for the large convolution kernel to better extract deep features, in the encoder part, U-shaped downsampling is performed, and each downsampling is realized by a pooling layer, such as maximum pooling, the pooling kernel size is set to 2*2, and the step is 2, the feature map size is reduced by half, and the channel number is increased, to obtain more abstract features, in the decoder part, the combination of deconvolution and U-shaped upsampling is adopted, the deconvolution layer is used to restore the feature map size, for example, a 2*2 deconvolution kernel is used, and the step is 2, by the jump connection characteristic, the low-level feature map of the corresponding layer in the encoder is spliced with the feature map of the same size in the decoder, the attention mechanism is introduced, and the weight of different channels and spatial positions is calculated, assuming that the spliced feature map is , the weight matrix is calculated by the attention mechanism , new feature maps , so as to realize effective fusion of feature maps of different levels. At the same time, the context feature information of different levels is obtained through global average pooling and global maximum pooling. The global average pooling obtains a vector by averaging all pixel values of the feature map. The global maximum pooling selects the maximum value in the feature map as the output. These context feature information is fused with other features, and finally the corresponding lesion feature segmentation fusion map is output, thereby completing the construction of the clinical image lesion segmentation model. The clinical MRI gray standard image set is input into the clinical image lesion segmentation model for multi-scale fusion assisted segmentation. Assuming that the clinical MRI gray standard image set contains 100 images with a size of 256x256 pixels, each image is input into the model in turn. In the multi-level convolution module of the model, small convolution kernels first extract low-level features of the image, such as small edges and textures, and large convolution kernels extract high-level features, such as the shape and size of the lesion. In the encoder part, deep features are gradually extracted and the feature map size is reduced through residual convolution blocks and downsampling operations. In the decoder part, the features of different levels are fused and the feature map size is restored by using deconvolution, upsampling, skip connection and attention mechanism. In this process, the context feature information obtained by global average pooling and global maximum pooling also participates in feature fusion. Taking a certain image as an example, after calculation and processing by the model, a lesion feature segmentation fusion map with the same size as the input image is finally output. The numerical value of each pixel point in the map represents the probability that the position belongs to the lesion area. At the same time, the same operation is performed on all 100 images in the clinical MRI gray standard image set to obtain 100 lesion feature segmentation fusion maps. These maps are fused, for example, by averaging, to generate the final clinical lesion area segmentation fusion map. The map clearly identifies the position and range of the clinical lesion in the image.

[0019] S3: a probability segmentation correction module, configured to obtain the lesion confidence probability corresponding to each pixel point in the segmentation map based on the clinical lesion area segmentation fusion map, and correct the probability segmentation boundary of the clinical lesion area segmentation fusion map based on the lesion confidence probability corresponding to each pixel point in the segmentation map to obtain a clinical lesion area segmentation correction result map. In the embodiment of the present application, taking the clinical lesion area segmentation fusion map as an example, the map is an image with a size of 256x256 pixels, and each pixel point in the map has a corresponding numerical value representing the probability that the point belongs to the lesion area. First, each pixel point in the segmentation map is traversed to obtain the corresponding lesion confidence probability. For example, for a pixel point with coordinates , the lesion confidence probability is calculated as Then, the probability segmentation boundary of the clinical lesion area segmentation fusion map is corrected based on the lesion confidence probability corresponding to each pixel point in the segmentation map. A threshold value Assuming , if the lesion confidence probability of each pixel point is , the pixel point is assigned a value of 1 in the new image, indicating that the point belongs to the lesion region; if , the pixel point is assigned a value of 0, indicating that the point belongs to the normal tissue region, and through such operation, the clinical lesion region segmentation fusion image is converted into a binary image, wherein 1 represents the lesion region and 0 represents the normal tissue region, effectively dividing and correcting the segmentation boundary, and finally obtaining the clinical lesion region segmentation correction result image, so that the segmentation of the lesion region is more accurate and clear.

[0020] S4: a lesion boundary smoothing module, configured to perform lesion boundary morphology smoothing processing on the clinical lesion region segmentation correction result image to generate a clinical lesion boundary segmentation optimization result.

[0021] In the embodiment of the present application, a clinical lesion region segmentation correction result image is taken as an example, the image is obtained after the previous step processing, wherein the lesion region has been identified, and a clinical image lesion segmentation boundary line is obtained through an edge detection algorithm (such as a Canny edge detection algorithm). The Canny edge detection algorithm first performs Gaussian filtering on the image to reduce the influence of noise, assuming that the standard deviation of the Gaussian filter is =1.5, filter size is 3x3, then calculate the gradient magnitude and direction of the image, through non-maximum suppression to retain the larger gradient magnitude points, suppress non-edge points, using double threshold processing to determine the final edge points, connecting these edge points to get the clinical image lesion segmentation boundary line, to achieve accurate extraction of the clinical image lesion segmentation boundary line from the clinical lesion area segmentation correction result image. Secondly, through the clinical image lesion segmentation boundary line obtained previously, the lesion edge shape denoising is carried out on the clinical lesion area segmentation correction result image, and the erosion and expansion operations in morphological operation are adopted. The purpose of the erosion operation is to eliminate the small noise points and burrs in the image, so that the boundary is smoother. Assuming that the structure element used in the erosion operation is a 3x3 square, for each pixel point in the image, if all the pixel points in the 3x3 neighborhood around it match the structure element (i.e. all are 1, assuming that the image is a binary image, the lesion area is 1 and the background is 0), the pixel point is retained, otherwise it is set to 0. For example, for a certain pixel point P on the lesion segmentation boundary line, there is a pixel point of 0 in the 3x3 neighborhood around it, which does not match the structure element, so P is set to 0. Through such erosion operation, some small noise points are removed. The expansion operation is to restore the lesion area that has been eroded. The structure element used in the expansion operation is also a 3x3 square. For each pixel point in the image, if there is any pixel point in the 3x3 neighborhood around it that matches the structure element (i.e. one is 1), the pixel point is set to 1. For example, for a certain pixel point Q in the image after the erosion operation, there is a pixel point of 1 in the 3x3 neighborhood around it, which matches the structure element, so Q is set to 1. Through the alternation of erosion and expansion operations (assuming 3 times of erosion and 3 times of expansion), the small lesion noise points generated in the lesion correction segmentation process are effectively removed, and the lesion boundary is more clear and smooth. Then, if there is still a larger broken point area, the boundary breakpoint smoothing processing is carried out on the corresponding lesion segmentation boundary in the previously obtained optimization image. First, by checking the pixel points on the lesion segmentation boundary, find those points that are discontinuous or mutate, i.e. boundary breakpoints. For example, for a certain sequence of continuous pixel points on the boundary, if the adjacent pixel points of a certain point change obviously in a certain range (such as 3 pixels on the left and right) from the direction of the line connecting the point, and the change exceeds a predetermined threshold (such as an angle change of more than 45°), the point is marked as a boundary breakpoint. For each boundary breakpoint found, the curve fitting method is used for smoothing processing. Assuming that a quadratic polynomial curve fitting is used, let the coordinates of the boundary breakpoint be , the coordinates of the left and right adjacent pixel points be , and the coefficients a, b, c of the quadratic polynomial are determined by the least squares method, so that can best fit these points. The goal of the least squares method is to minimize the sum of the squares of the errors between the observed values and the values predicted by the model. Small. By solving this minimization problem, the coefficients of the quadratic polynomial are obtained, and then the quadratic polynomial is used to replace the discontinuous part at the original boundary breakpoint, thereby achieving the smoothing of the boundary breakpoint. After all the boundary breakpoints are processed in this way, the final clinical lesion edge segmentation optimization result is generated, which makes the lesion segmentation boundary more continuous and smooth, and more accurately reflects the actual shape and boundary of the lesion.

[0022] Further, as an embodiment of the present application, referring to Figure 2 As shown in the figure, the function flow diagram of the MRI image processing module in the embodiment includes the following functions: Figure 1 Further, as an embodiment of the present application, referring to Figure 2 As shown in the figure, the function flow diagram of the MRI image processing module in the embodiment includes the following functions: S11: Obtain a clinical magnetic resonance sub-image corresponding to T1 weighted sequence scanning through an MRI device; In the embodiment of the present application, the clinical magnetic resonance sub-image corresponding to T1 weighted sequence scanning is obtained through an MRI device (taking a 3.0T superconducting magnetic resonance imaging system as an example), the T1 weighted sequence scanning parameters are set, the repetition time (TR) is set to 500 milliseconds, the echo time (TE) is set to 15 milliseconds, the excitation angle is 90°, the matrix size is 256x256, the slice thickness is set to 5 millimeters, 20 layers are collected, and the patient is placed on the examination bed of the MRI device to ensure that the examination site is located at the center of the magnetic field. After starting the scanning program, the main magnet of the MRI device generates a uniform static magnetic field, the hydrogen nuclei in the human body tissue are arranged along the magnetic field direction, the radio frequency pulse generator emits a radio frequency pulse of a specific frequency to excite the hydrogen nuclei to produce resonance, and when the radio frequency pulse stops, the hydrogen nuclei gradually recover to the initial state and release energy signals. The receiving coil captures these signals and converts them into electrical signals, which are converted into digital signals after analog-digital conversion. The computer system processes the digital signals through Fourier transform and other processes to reconstruct the T1 weighted image. Each image is a clinical magnetic resonance sub-image, and the gray value reflects the T1 relaxation characteristics of the tissue. For example, fat tissue appears as a high signal on the T1 weighted image and presents white color, while brain gray matter appears as a medium signal and presents gray-white color.

[0023] S12: Obtain a clinical magnetic resonance sub-image corresponding to T2 weighted sequence scanning through an MRI device; In the embodiment of the present application, the corresponding clinical nuclear magnetic resonance sub-image scanned by the T2 weighted sequence is acquired by using a 3.0T superconducting magnetic resonance imaging system, the T2 weighted sequence scanning parameters are adjusted, TR is set to 3000 milliseconds, TE is set to 90 milliseconds, the excitation angle is 180°, the matrix size is kept to 256*256, the layer thickness is still 5 millimeters, 20 layers are collected, in the case that the patient keeps the original examination position, the T2 weighted sequence scanning is started, the sequence highlights the difference of the T2 relaxation characteristics of the tissues by prolonging the TR and TE time, in the scanning process, the hydrogen nucleus releases energy signals at different speeds due to the different T2 relaxation times of different tissues after being excited by the radio frequency pulse. The receiving coil collects these signals, and the computer reconstructs the T2 weighted image after processing. In the T2 weighted image, the cerebrospinal fluid and other long T2 tissues show high signals and appear white, while the brain white matter shows medium signals and appears grayish white. These T2 weighted images serve as the clinical nuclear magnetic resonance sub-image, which reflects the characteristics of human tissues from different angles together with the sub-image acquired by the T1 weighted sequence.

[0024] S13: acquiring the corresponding clinical nuclear magnetic resonance sub-image scanned by the enhanced sequence by the MRI device; In the embodiment of the present application, the corresponding clinical nuclear magnetic resonance sub-image scanned by the enhanced sequence is acquired by using a 3.0T superconducting magnetic resonance imaging system. Before the enhanced scanning, the contrast agent (such as gadopentetate, the injection dose is calculated according to 0.1mmol / kg body weight, for example, the injection dose of a patient with a body weight of 70kg is 7mmol) is injected intravenously. After the contrast agent is distributed in the body for a period of time, the enhanced sequence scanning is started, the parameters are set to TR 600 milliseconds, TE 20 milliseconds, the excitation angle is 70°, the matrix size is 256*256, the layer thickness is 5 millimeters, and 20 layers are collected. The contrast agent changes the magnetic field environment around the tissues and affects the relaxation process of the hydrogen nucleus, so that the signal difference between the normal tissues and the lesion tissues is increased. The MRI device scans according to the set parameters, the receiving coil collects the signals changed due to the effect of the contrast agent, and the computer reconstructs the enhanced image after processing. These images can more clearly show the boundary of the lesion, the blood supply condition and other information, serve as the clinical nuclear magnetic resonance sub-image, and together with the T1 and T2 weighted sequence sub-images, provide rich data for subsequent diagnosis.

[0025] S14: merging the corresponding clinical nuclear magnetic resonance sub-images scanned by the T1 weighted sequence, the T2 weighted sequence and the enhanced sequence to form the corresponding patient clinical nuclear magnetic resonance image set; In this embodiment of the invention, clinical MRI sub-images acquired through T1-weighted sequence scanning, T2-weighted sequence scanning, and enhanced sequence scanning are merged. Each sequence scan yields 20 sub-images, and T1-weighted, T2-weighted, and enhanced sub-images at the same level are combined layer by layer. For example, the first layer sub-image of the T1-weighted sequence, the first layer sub-image of the T2-weighted sequence, and the first layer sub-image of the enhanced sequence are merged to form a new data unit containing information from all three sequences. This operation is repeated, merging the 20 layers of sub-images sequentially to ultimately form the corresponding patient's clinical MRI image set. This image set contains image information of the same patient under different sequences, presenting the condition of human tissues and lesions from multiple dimensions, providing a comprehensive data foundation for subsequent image analysis and diagnosis.

[0026] S15: Perform image position alignment and grayscale adjustment processing on the patient's clinical MRI image set to generate a clinical MRI grayscale standard image set.

[0027] In this embodiment of the invention, image position alignment processing is performed on the patient's clinical MRI image set. A feature point matching-based method is employed. First, the SIFT (Scale Invariant Feature Transform) algorithm is used to extract feature points from each sub-image. For any two sub-images in the image set, matching is performed by calculating the Euclidean distance between the feature points. The formula is as follows: ,in and Given the coordinates of two feature points, feature point pairs with a distance less than a specific threshold (set to 5 pixels) are selected as matching point pairs. Affine transformation parameters, including translation, rotation, and scaling parameters, are calculated based on these matching point pairs. The sub-image is then transformed to align its spatial position. For grayscale adjustment, the average grayscale value of the image set is calculated. The formula is ,in The total number of pixels in the sub-images of the image set. For the first The grayscale value of each pixel is set to a target average grayscale value of 128, and then a linear transformation is applied. The grayscale value of each pixel is adjusted, where The original grayscale value. After bit alignment and grayscale adjustment, the adjusted grayscale values ​​are used to generate a clinical MRI grayscale standard image set. The images in this set are consistent in spatial location and grayscale, which facilitates subsequent clinical lesion segmentation and diagnostic analysis.

[0028] Furthermore, the image bit alignment and grayscale adjustment processing of the patient's clinical MRI image set includes: perform image space feature analysis on each clinical magnetic resonance sub-image in the patient clinical magnetic resonance image set to extract a space feature matrix corresponding to each clinical magnetic resonance sub-image, which includes the space coordinates, the gray value distribution, and the edge, angle and texture geometric information of a local region of each pixel point in the image; In the embodiment of the present application, taking a certain clinical magnetic resonance sub-image in the patient clinical magnetic resonance image set as an example, the image is in the form of a two-dimensional matrix with a size of 256x256 pixels. For each pixel point in the image, the space coordinates are determined by the row and column indexes of the pixel point in the matrix, for example, the coordinates are wherein represents the row index, represents the column index, and both have a value range of 0 to 255. The gray value of each pixel point is obtained, and it is assumed that the gray value of the pixel point is The value range is determined according to the gray scale of the image, for example, in an 8-bit gray image, the value range is 0 to 255. For the edge, angle and texture geometric information of a local region, the Canny edge detection algorithm is used to extract the edge information. First, the image is subjected to Gaussian filtering for denoising, and it is assumed that the standard deviation of the Gaussian filter is and the filter size is 3x3. Then, the gradient amplitude and direction are calculated, and the edge profile is obtained through non-maximum suppression and double-threshold processing. For the angle information, the gradient direction of the edge point is calculated. For the texture geometric information, the gray level co-occurrence matrix (GLCM) method is used to set the gray scale to 16, the calculation direction to 0°, 45°, 90° and 135°, and the distance to 1 pixel. A 16x16 GLCM matrix is constructed. The contrast, uniformity, correlation, energy and entropy and other texture features are calculated through the matrix. The space coordinates, the gray value distribution and the edge, angle and texture geometric information of a local region of each pixel point are integrated together to form a multi-dimensional vector, for example, wherein represents the edge information (such as edge intensity), represents the angle information, represents the texture feature vector. These vectors of all the pixel points are combined to finally obtain the space feature matrix corresponding to the clinical magnetic resonance sub-image.

[0029] Preferably, based on the space feature matrix corresponding to each clinical magnetic resonance sub-image, image deformation error analysis is performed between each clinical magnetic resonance sub-image in the patient clinical magnetic resonance image set to obtain the image relative displacement error between each clinical magnetic resonance sub-image in the image acquisition process. In this embodiment of the invention, based on the spatial feature matrices corresponding to each previously obtained clinical MRI sub-image, taking two clinical MRI sub-images A and B as examples, image deformation error analysis is performed between them. First, the positional relationship of corresponding points in the two images is determined using the spatial coordinate information in the spatial feature matrix. Assuming the coordinates of a certain point in image A are... The coordinates of the corresponding point in image B are Then, the Euclidean distance between the two points is calculated as a measure of the relative displacement error of the image, using the following formula: For all corresponding point pairs, calculate their Euclidean distances and calculate the average of these distances. and standard deviation The formulas are respectively , ,in This represents the number of corresponding point pairs. For the first In addition to Euclidean distance, factors such as angular differences can be considered to more comprehensively measure the relative displacement error of images. For example, by comparing the angular differences of corresponding edges in two images, the average and standard deviation of the angular differences can be calculated. Using the above methods, image deformation error analysis is performed between every two clinical MRI sub-images in the patient's clinical MRI image set, and finally the relative displacement error of each clinical MRI sub-image during the image acquisition process is obtained.

[0030] Preferably, high-contrast spatial location points and low-contrast spatial location points corresponding to each clinical MRI sub-image are obtained from the patient's clinical MRI image set, and spatial weighted average calibration is performed based on the high-contrast spatial location points and low-contrast spatial location points corresponding to each clinical MRI sub-image to generate a clinical image spatial calibration location template. In this embodiment of the invention, high-contrast spatial location points and low-contrast spatial location points corresponding to each clinical MRI sub-image are obtained through a patient's clinical MRI image set. Taking a certain clinical MRI sub-image as an example, a contrast threshold is set. Assuming =50 (this value can be adjusted according to the actual situation). For each pixel in the image, calculate the absolute value of the grayscale difference between it and its neighboring pixels. If this absolute value is greater than the threshold, the value is considered as follows: If the absolute value is less than or equal to the threshold, then the pixel is considered a high-contrast spatial location; If the coordinates are not specified, then the pixel is considered to be a low-contrast spatial location. For example, for a pixel with coordinates of 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ... The pixel has a grayscale value of The coordinates of adjacent pixels are , the gray value is , the absolute value of the gray difference value is calculated |, and the number of high-contrast spatial position points and low-contrast spatial position points is counted, and the barycentric coordinates of the high-contrast spatial position points and the low-contrast spatial position points are calculated respectively, and the barycentric coordinates of the high-contrast spatial position points are The calculation formula is , , wherein is the coordinate of the high-contrast spatial position point, , and the barycentric coordinates of the low-contrast spatial position points are calculated , and the barycentric coordinates of the low-contrast spatial position points are calculated , and the barycentric coordinates of the low-contrast spatial position points are calculated , and the barycentric coordinates of the low-contrast spatial position points are calculated = 0.6, = 0.4 (the weight can be adjusted according to the actual situation), and the coordinate of the calibration position in the clinical image spatial calibration position template is The calculation formula is , ), and the same operation is performed on all the clinical magnetic resonance sub-images in the patient clinical magnetic resonance image set, and finally the corresponding clinical image spatial calibration position template is generated.

[0031] Preferably, based on the clinical image spatial calibration position template and in combination with the image relative displacement error corresponding to each clinical magnetic resonance sub-image in the image acquisition process, the image position alignment and registration of each clinical magnetic resonance sub-image in the patient clinical magnetic resonance image set is performed, and a clinical magnetic resonance alignment and registration image set is obtained. In the embodiment of the present application, based on the clinical image spatial calibration position template and in combination with the image relative displacement error corresponding to each clinical magnetic resonance sub-image in the image acquisition process, the image position alignment and registration of each clinical magnetic resonance sub-image in the patient clinical magnetic resonance image set is performed, and taking a certain clinical magnetic resonance sub-image C as an example, first, the calibration position coordinate in the clinical image spatial calibration position template is found . Then, according to the previously calculated image relative displacement error, the clinical magnetic resonance sub-image C is subjected to transformation operations such as translation, rotation or scaling, so that the calibration position point is aligned with the corresponding position point in the reference image, for example, if the image relative displacement error mainly manifests as horizontal translation, and the translation amount is Then the clinical MRI sub-image C is moved in the horizontal direction If there is still a rotation error, assuming the rotation angle is Then the rotation matrix is used to rotate the clinical MRI sub-image C, and through multiple iterations, the clinical MRI sub-image C is adjusted to be as aligned as possible with the reference image in spatial position, and this operation is performed on all clinical MRI sub-images in the patient's clinical MRI image set, and finally a clinical MRI aligned and registered image set is obtained.

[0032] Preferably, the clinical MRI aligned and registered image set is subjected to a gray scale adjustment process to generate a clinical MRI gray scale standard image set.

[0033] In the embodiment of the present application, the clinical MRI aligned and registered image set is subjected to a gray scale adjustment process, taking one image in the clinical MRI aligned and registered image set as an example. First, the gray scale value of each pixel point in the image is obtained, assuming that the image size is pixels, and the gray scale value matrix is wherein , The gray scale mean value and the standard deviation of the image are calculated, and the formulas are , A target gray scale mean value and a target standard deviation are set, assuming =128, =30, and a linear transformation method is used for gray scale adjustment, and the formula is to achieve the adjustment of the gray scale value of each pixel point in the image, and the adjusted gray scale value is obtained by substituting the gray scale value of each pixel point in the image into the above formula. The adjusted gray scale values of all pixel points are combined to form an adjusted image. This operation is performed on all images in the clinical MRI aligned and registered image set, and finally a clinical MRI gray scale standard image set is generated.

[0034] Further, the gray scale adjustment process of the clinical MRI aligned and registered image set comprises: Obtaining the pixel gray scale distribution value corresponding to each pixel point in each clinical registration sub-image from the clinical MRI aligned and registered image set; In the embodiment of the present application, taking an image set containing 100 clinical MRI aligned and registered images as an example, the size of each image is 256x256 pixels. For any one of the clinical registration sub-images, each pixel point in the image is traversed, and the coordinates of the current pixel point are assumed to be By directly obtaining the grayscale value of a pixel through the corresponding grayscale value recording method in the image data storage format, for example, in a DICOM format image, by parsing the encoding information of the pixel data part, the grayscale value of the pixel is obtained as 120. The grayscale values ​​of all pixels are counted, and they are grouped according to the size of the grayscale value. The proportion of the number of pixels in each grayscale value range to the total number of pixels is calculated to obtain the pixel grayscale distribution value corresponding to each pixel in the clinical registration sub-image. This operation is performed on 100 clinical registration sub-images to obtain the pixel grayscale distribution value of each clinical registration sub-image in the entire clinical MRI alignment and registration image set.

[0035] Preferably, a standard template for grayscale harmonization of clinical images is constructed, which includes the grayscale value distribution range of pathological or normal tissues in clinical reference images under ideal conditions; In this embodiment of the invention, a standard template for grayscale harmonization of clinical images is constructed to collect a large number of clinical reference images, covering pathological tissue images (such as tumor tissue) and normal tissue images (such as healthy liver tissue) from different patients. Assuming 500 pathological images and 300 normal tissue images are collected, for each image, the grayscale value of each pixel is obtained by traversing the pixels, and statistical analysis is performed according to tissue type. For normal liver tissue images, the average grayscale value of all normal liver tissue pixels is calculated. and standard deviation The formulas are respectively , ,in This represents the number of pixels in normal liver tissue. For the first The grayscale values ​​of each pixel are used to determine the ideal grayscale distribution range of normal liver tissue. Similarly, for pathological tissue images, the average grayscale value of the pathological tissue pixels is calculated. and standard deviation The range of grayscale values ​​for pathological tissue under ideal conditions was determined as follows: These distribution ranges are then integrated to form a standard template for grayscale harmonization in clinical images, which is used for subsequent grayscale distribution deviation calculation.

[0036] Preferably, based on the clinical image grayscale harmonic standard template, the grayscale distribution deviation between the pixel grayscale distribution values ​​corresponding to each pixel point in each clinical registration sub-image is calculated to obtain the pixel grayscale distribution deviation corresponding to each clinical registration sub-image. In this embodiment of the invention, grayscale distribution deviation is calculated for each clinical registration sub-image based on a clinical image grayscale harmonic standard template. Taking a specific clinical registration sub-image as an example, its pixel grayscale distribution values ​​are compared with the grayscale value distribution range of the corresponding tissue type in the standard template. For each grayscale value interval in the clinical registration image, assuming the current grayscale value interval is... Calculate the proportion of pixels within this interval to the total number of pixels. Within the grayscale value distribution range of the corresponding tissue type in the standard template, the same grayscale value interval The proportion of inner pixels to total pixels is Then the grayscale distribution deviation of this grayscale value range The algorithm iterates through all grayscale value ranges of the clinical registration sub-image, and then sums the grayscale distribution deviations of each grayscale value range using a weighted average. The weight is the proportion of the number of pixels in that grayscale value range to the total number of pixels. This yields the pixel grayscale distribution deviation corresponding to the clinical registration sub-image. ,in This represents the number of grayscale value ranges. For the first The weight of each grayscale value range For the first The grayscale distribution deviation of each grayscale range is calculated by performing this operation on all 100 clinical registration sub-images in the clinical MRI alignment and registration image set, ultimately obtaining the pixel grayscale distribution deviation corresponding to each clinical registration sub-image.

[0037] Preferably, based on the pixel grayscale distribution deviation corresponding to each clinical registration sub-image and combined with a nonlinear fitting method, a polynomial curve fitting adjustment is performed on the pixel grayscale distribution value corresponding to each pixel point in each clinical registration sub-image to generate a clinical MRI grayscale standard image set.

[0038] In this embodiment of the invention, the pixel grayscale distribution values ​​are adjusted using polynomial curve fitting, a nonlinear fitting method, based on the pixel grayscale distribution deviation corresponding to each clinical registration sub-image. Taking a certain clinical registration image as an example, let the original pixel grayscale value be... The grayscale value is adjusted according to the pixel grayscale distribution deviation corresponding to the clinical registration sub-image. Simultaneously, a cubic polynomial fitting is used, the formula is as follows: The coefficients of the polynomial are determined using the least squares method. , , , The goal of the least squares method is to minimize the sum of squared errors between the original pixel grayscale value and the adjusted grayscale value, i.e. ,in The number of pixels. and The first The original grayscale value and the desired adjusted grayscale value of each pixel (determined according to a standard template), wherein in order to make Establishment requires separate [actions]. , , , Find the partial derivatives and set them equal to 0 to obtain a system of linear equations. Solve for the coefficients. Find the partial derivative. ,right Find the partial derivatives According to the differentiation formula By taking the derivative rule, we can obtain: ,make Then we have: Further simplified to: ①; Similarly, we can obtain Find the partial derivatives: ②; Find the partial derivatives: ③; Find the partial derivatives: ④, and by combining ①②③④, we obtain a system of linear equations: By solving this system of linear equations using matrix operations or Gaussian elimination, the coefficients of the cubic polynomial can be obtained. , , , For example, suppose a clinical registration sub-image has n=10 pixels, and its original grayscale value... And the expected adjusted grayscale value Given that these values ​​are substituted into the above system of equations, and matrix operations are performed: Let = , = , = Then the system of equations can be expressed as By seeking inverse matrix , can be obtained Thus, calculate , , , the value of the polynomial, the coefficients of the polynomial are determined by solving the least square problem, and then for each pixel in the clinical registration sub-image, the original gray value is substituted into the polynomial formula to calculate the adjusted gray value, thereby completing the adjustment of the gray value of all pixel points in the clinical registration sub-image. The above operation is performed on all 100 clinical registration sub-images in the clinical nuclear magnetic resonance alignment registration image set, and finally the clinical nuclear magnetic resonance gray standard image set is generated.

[0039] Further, as an embodiment of the present application, referring to Figure 3 , a Figure 1 function flow diagram of the lesion auxiliary segmentation module is shown, and in the embodiment, the lesion auxiliary segmentation module includes the following functions: S21: A multi-level convolution module is designed by using a convolutional neural network as a core framework, including small convolution kernels 3x3 or 5x5 and large convolution kernels 15x15 or 21x21. The small convolution kernels are used to extract low-level feature maps of the clinical sub-image, including fine edges, textures and structural changes, and the large convolution kernels are used to extract high-level feature maps of the clinical sub-image, including the shape and size of the lesion area. In the embodiment of the present application, a multi-level convolution module is designed by using a convolutional neural network as a core framework, taking the construction of a clinical image processing model as an example. For small convolution kernels, a convolution kernel with a size of 3x3 or 5x5 is selected. Taking a clinical sub-image with a size of 256x256 pixels as an example, when a 3x3 convolution kernel is used for convolution operation, in each 3x3 local area of the image, the convolution result is obtained by multiplying the weight of the convolution kernel with the corresponding pixel value and summing up. Assuming that the weight matrix of the convolution kernel is , and the pixel value matrix of the local area is , then the convolution calculation is By sliding the convolution kernel pixel by pixel (the step is set to 1) on the entire image, low-level feature maps are obtained. These low-level feature maps capture fine edges, such as the subtle boundary between the lesion and normal tissue, as well as texture and structural change features, such as the fineness of the tissue, etc. For large convolution kernels, a convolution kernel with a size of 15x15 or 21x21 is selected. The same operation is performed on the above-mentioned clinical sub-image. The large convolution kernel can cover a larger area. In the convolution process, by integrating the pixel information in a larger range, the shape and size features of the lesion area are extracted. For example, for a circular lesion, the large convolution kernel can perceive its outline and approximate size from a more macroscopic perspective to generate high-level feature maps. By combining convolution layers corresponding to different sizes of convolution kernels, a multi-level convolution module is formed to extract different levels of features of the clinical sub-image.

[0040] S22: The corresponding multi-level convolution module is composed into the corresponding U-Net basic network architecture by combining the U-Net network structure including the corresponding network architecture of the encoder-decoder pair, so as to enhance the extraction ability of large convolution kernels on deep features in the clinical sub-image by using residual convolution blocks in the U-shaped down-sampling of the encoder part, and introduce the attention mechanism by the skip connection characteristics to realize feature fusion of features at different levels by combining the deconvolution with the U-shaped up-sampling in the encoder part, and obtain context feature information at different levels by global average pooling and global maximum pooling, so as to output the corresponding lesion feature segmentation fusion graph, thereby constructing the clinical image lesion segmentation model. In the embodiment of the application, the clinical image lesion segmentation model is constructed by combining the U-Net network structure, and the U-Net network architecture includes an encoder-decoder structure. In the encoder part, the residual convolution block is used to enhance the extraction ability of large convolution kernels on deep features in the clinical sub-image. For example, the residual convolution block includes two consecutive convolution layers. Assuming that the input feature map is , the first convolution layer (the convolution kernel size is set to 3x3, and the step is 1) is used to obtain , and the second convolution layer (the convolution kernel is also 3x3, and the step is 1) is used to obtain , then the input and the output are added in the form of . This residual connection can avoid the gradient vanishing problem when the network is deepened, and is helpful for large convolution kernels to better extract deep features. In the encoder part, U-shaped down-sampling is performed. Each down-sampling is realized by a pooling layer, such as maximum pooling. The pooling kernel size is set to 2x2, and the step is 2. The feature map size is reduced by half, and the channel number is increased, so as to obtain more abstract features. In the decoder part, the deconvolution is combined with the U-shaped up-sampling. The deconvolution layer is used to restore the feature map size. For example, a 2x2 deconvolution kernel is used, and the step is 2. The low-level feature map at the corresponding level in the encoder is spliced with the feature map of the same size in the decoder by the skip connection characteristics. The attention mechanism is introduced to calculate the weight of different channels and spatial positions. Assuming that the spliced feature map is , the weight matrix is calculated by the attention mechanism, and the new feature map is obtained, so as to realize effective fusion of feature maps at different levels. At the same time, the context feature information at different levels is obtained by global average pooling and global maximum pooling. The global average pooling averages all pixel values of the feature map to obtain a vector. The global maximum pooling selects the maximum value in the feature map as the output. These context feature information is fused with other features, and finally the corresponding lesion feature segmentation fusion graph is output, so as to complete the construction of the clinical image lesion segmentation model.

[0041] S23: input the clinical nuclear magnetic resonance gray standard image set into the clinical image lesion segmentation model for multi-scale fusion assisted segmentation to generate a clinical lesion region segmentation fusion image.

[0042] In the embodiment of the present application, by inputting the clinical nuclear magnetic resonance gray standard image set into the clinical image lesion segmentation model for multi-scale fusion assisted segmentation, assuming that the clinical nuclear magnetic resonance gray standard image set contains 100 images with a size of 256x256 pixels, each image is sequentially input into the model, in the multi-level convolution module of the model, small convolution kernels first extract low-level features of the image, such as tiny edges and textures, and large convolution kernels extract high-level features, such as the shape and size of the lesion, in the encoder part, deep features are gradually extracted and the feature map size is gradually reduced through residual convolution blocks and downsampling operations; in the decoder part, different levels of features are fused and the feature map size is restored by using deconvolution, upsampling, skip connection and attention mechanism, in this process, the context feature information obtained by global average pooling and global maximum pooling also participates in feature fusion, taking an image as an example, after calculation and processing by the model, a lesion feature segmentation fusion image with the same size as the input image is finally output, the numerical value of each pixel point in the image represents the probability that the position belongs to the lesion area, and this operation is performed on all 100 images in the clinical nuclear magnetic resonance gray standard image set to obtain 100 lesion feature segmentation fusion images, these images are fused, for example, by averaging, and finally the final clinical lesion region segmentation fusion image is generated, which clearly identifies the position and range of the clinical lesion in the image.

[0043] Further, the probability segmentation correction module includes the following functions: obtain the lesion confidence probability corresponding to each pixel point in the segmentation image through the clinical lesion region segmentation fusion image; In the embodiment of the present application, taking a clinical lesion region segmentation fusion image with a size of 256x256 pixels as an example, first, according to the corresponding method, the relative position of each pixel point in the segmentation image in the lesion region, the lesion geometric shape and other information are obtained to form a clinical lesion feature matrix, for example, for a pixel point with coordinates , the relative position is determined by the distance from the center of the lesion region, assuming that the center coordinates of the lesion region are , then the relative position distance , the lesion geometric shape is extracted by a shape descriptor such as Fourier descriptor, assuming that the first 10 Fourier coefficients are selected as features, and and the 10 Fourier coefficients form a feature vector , and the feature vectors of all pixel points form a clinical lesion feature matrix. Then, according to the feature similarity measurement method, a certain pixel point For example, the feature similarity between the pixel and its surrounding 8 pixels within a 3×3 neighborhood is calculated using Euclidean distance, and the formula is as follows: ,in It is a pixel. The eigenvector of the first Dimensional value, Neighboring pixels The eigenvector of the first Dimensional values, for example, for neighboring pixels. Its eigenvector is Then the Euclidean distance between them The Euclidean distances between the pixel and its eight neighboring pixels are calculated, resulting in eight distance values. To more intuitively represent the degree of similarity, these distance values ​​are normalized and converted into similarity scores. ,in This is the maximum value among all distance values. In this way, the similarity of lesion features between this pixel and its surrounding neighboring pixels is obtained, and the confidence probability of the lesion corresponding to this pixel is calculated. For example, if the similarity scores of eight neighboring pixels are 0.8, 0.7, 0.6, 0.9, 0.75, 0.85, 0.7, and 0.8 respectively, then the confidence probability of a lesion at that pixel is... =1 / 8 (0.8+0.7+0.6+0.9+0.75+0.85+0.7+0.8)=0.775. This weighted average is calculated for all pixels in the segmentation and fusion map of the clinical lesion region to obtain the confidence probability of the lesion corresponding to each pixel in the segmentation map.

[0044] Preferably, the maximum inter-class variance of the grayscale corresponding to the segmentation map is calculated through the clinical lesion region segmentation fusion map to automatically determine the lesion probability segmentation threshold; In this embodiment of the invention, the corresponding grayscale range is obtained through a clinical lesion region segmentation and fusion map. And calculate each gray level Corresponding number of pixels and the total number of pixels in the entire image. And according to each gray level Corresponding number of pixels and the total number of pixels in the entire image. Calculate each gray level Pixel occurrence probability According to each gray level Pixel occurrence probability Calculate the corresponding cumulative probability and cumulative average ,in It is between 0 and Integers between these ranges can represent the threshold, and the mean of the entire image can be calculated simultaneously. Then, by using the mean of the entire image And combined with cumulative probability and cumulative average Perform inter-class variance calculation to obtain the gray-level inter-class variance corresponding to the segmentation image. And based on the variance between gray classes Determine the value corresponding to reaching the maximum value Value and The ratio is used as the threshold for lesion probability segmentation (e.g., 80 / 255≈0.314).

[0045] Preferably, based on the lesion confidence probability corresponding to each pixel in the segmentation map and combined with the lesion probability segmentation threshold, the clinical lesion region segmentation fusion map is subjected to probabilistic binary segmentation boundary correction. According to the lesion probability segmentation threshold, the lesion confidence probability corresponding to each pixel in the segmentation map is segmented into the corresponding lesion binary image. The segmentation boundary corresponding to the lesion binary image is further corrected and optimized by combining the region growing algorithm to obtain the clinical lesion region segmentation correction result map.

[0046] In this embodiment of the invention, based on the previously obtained lesion confidence probabilities corresponding to each pixel and the determined lesion probability segmentation threshold, the probabilistic binary segmentation boundary of the clinical lesion region segmentation fusion map is corrected, taking a certain pixel as an example. For example, the confidence probability of its lesion is ,like If the pixel value is greater than or equal to the lesion probability segmentation threshold (assumed to be 0.314), then the pixel is assigned a value of 1 in the new binary image of the lesion, indicating that the pixel belongs to the lesion region; if... <0.314, the pixel point is assigned a value of 0, indicating that the pixel point belongs to a non-lesion area, and by performing the operation on all pixel points in the entire image, the clinical lesion area segmentation fusion image is converted into a corresponding lesion binary image, in order to further correct and optimize the segmentation boundary of the corresponding lesion binary image, a region growing algorithm is used, taking a seed point (for example, a representative pixel point in the lesion area) as the starting point, setting the growth criterion, such as the gray value difference between adjacent pixel points being less than a certain threshold (assuming 10), starting from the seed point, checking whether the adjacent pixel points meet the growth criterion, if they meet, adding them to the growing region, and continuing to check the adjacent pixel points of the newly added pixel points, and so on, in the growing process, the growth criterion can be dynamically adjusted according to the actual situation, for example, according to the shape, size and other characteristics of the lesion, through the region growing algorithm, some holes caused by simple threshold segmentation can be filled, the segmentation boundary is smoothed, and the segmentation result is more accurate and reasonable, and finally the clinical lesion area segmentation correction result image is obtained.

[0047] Further, the obtaining of the lesion confidence probability corresponding to each pixel point in the segmentation image through the clinical lesion area segmentation fusion image comprises: obtaining the relative position of each pixel point in the segmentation image in the lesion area and the lesion geometric shape through the clinical lesion area segmentation fusion image, so as to obtain a clinical lesion feature matrix corresponding to each pixel point in the segmentation image; In the embodiment of the present application, taking a clinical lesion area segmentation fusion image with a size of 256x256 pixels as an example, each pixel point in the segmentation image is traversed, for a pixel point with coordinates , the relative position of the pixel point in the lesion area is determined by calculating the distance of the point to the center of the lesion area, assuming that the center coordinates of the lesion area are , the average value of all pixel point coordinates belonging to the lesion area is obtained, that is, , , wherein is the number of pixel points in the lesion area, , and the distance of the pixel point to the center of the lesion area is , for the lesion geometric shape feature, a shape descriptor is used for extraction, taking the Fourier descriptor as an example, the boundary contour points of the lesion area are sequentially connected to form a closed curve, and discrete Fourier transform is performed on the curve to obtain a series of Fourier coefficients, which contain the shape information of the lesion, the first 10 Fourier coefficients are selected as the description features of the lesion geometric shape, and the relative position distance of each pixel point and the 10 Fourier coefficients are integrated to form a 12-dimensional vector, that is, , wherein represents the first The Fourier coefficients are used to combine the vectors of all pixels to obtain the clinical lesion feature matrix corresponding to each pixel in the segmentation map.

[0048] Preferably, feature similarity is measured between the clinical lesion feature matrices corresponding to each pixel in the segmentation map to obtain the degree of lesion feature similarity between each pixel in the segmentation map and its surrounding neighboring pixels. In this embodiment of the invention, by using a previously obtained clinical lesion feature matrix, with a certain pixel point... For example, its feature vector is Select the pixels within its 3x3 neighborhood, such as , There are a total of 8 neighboring pixels. The Euclidean distance is used to measure the feature similarity between the pixel and its neighboring pixels. The formula is as follows: ,in Represents pixels The eigenvector of the first Dimensional value, Represents neighboring pixels The eigenvector of the first Dimensional values, for example, for neighboring pixels. Its eigenvector is Then the Euclidean distance between them The Euclidean distances between the pixel and its eight neighboring pixels are calculated, resulting in eight distance values. To more intuitively represent the degree of similarity, these distance values ​​are normalized and converted into similarity scores. ,in It is the maximum value among all distance values. In this way, the degree of lesion feature similarity between the pixel and its surrounding neighboring pixels is obtained. This operation is performed on all pixels in the clinical lesion region segmentation and fusion map to obtain the feature similarity between each pixel and its neighboring pixels.

[0049] Preferably, based on the degree of lesion feature similarity between each pixel in the segmentation map and its surrounding neighboring pixels, a lesion confidence prior estimate is performed on each pixel in the clinical lesion region segmentation and fusion map to obtain the lesion confidence probability corresponding to each pixel in the segmentation map.

[0050] In this embodiment of the invention, the degree of similarity of lesion features between each pixel and its surrounding neighboring pixels is determined based on previously obtained data. For example, its similarity to its 8 neighboring pixels is as follows: A weighted average method is used to estimate the lesion confidence prior for this pixel. The weight of each neighboring pixel is set to 1 / 8 (the weight can be adjusted according to the actual situation, such as giving higher weight to closer pixels). The confidence probability of the lesion corresponding to this pixel is then calculated. For example, if the similarity scores of eight neighboring pixels are 0.8, 0.7, 0.6, 0.9, 0.75, 0.85, 0.7, and 0.8 respectively, then the confidence probability of a lesion at that pixel is... =1 / 8 (0.8+0.7+0.6+0.9+0.75+0.85+0.7+0.8)=0.775. This weighted average is calculated for all pixels in the segmentation and fusion map of the clinical lesion area. Finally, the confidence probability of the lesion corresponding to each pixel in the segmentation map is obtained. These probability values ​​can reflect the likelihood of each pixel belonging to the lesion area, providing a more accurate basis for subsequent medical diagnosis and analysis.

[0051] Furthermore, the step of automatically determining the lesion probability segmentation threshold by maximizing the gray-level inter-class variance corresponding to the segmentation map through the clinical lesion region segmentation fusion map includes: Obtain the corresponding grayscale range from the clinical lesion region segmentation and fusion map. And calculate each gray level Corresponding number of pixels and the total number of pixels in the entire image. ; In this embodiment of the invention, taking a 256x256 pixel clinical lesion region segmentation and fusion image as an example, this image is an 8-bit grayscale image with a grayscale level range of 0 to 255. Each pixel in the entire image is traversed, and an array of length 256 is created to record the number of pixels corresponding to each grayscale level. When the coordinates are... When dealing with a pixel, obtain its grayscale value g (0 ≤ g ≤ 255). Increment the value of the element with index g in the array by 1. Count the number of pixels for each grayscale level. For example, if the grayscale value of the pixel is 50, increment the value of the 50th element in the array by 1. After counting all pixels, obtain the number of pixels corresponding to each grayscale level, denoted as . ( =0, 1, ..., 255), and the total number of pixels corresponding to the entire image. Through formula Calculations show that, since the image size is 256x256, therefore... =256 x 256 = 65536. Through the above operations, the gray level range of the clinical lesion region segmentation and fusion map, the number of pixels corresponding to each gray level, and the total number of pixels in the entire image were obtained, providing a data basis for subsequent calculations.

[0052] Preferably, the pixel number corresponding to each gray level and the total pixel number corresponding to the whole image The pixel occurrence probability of each gray level ; In the embodiment of the present application, the pixel occurrence probability of each gray level is calculated according to the previously obtained pixel number corresponding to each gray level and the total pixel number corresponding to the whole image , and the calculation formula is , =0, 1, …, 255), for example, if the pixel number corresponding to the gray level 30 is =1000, and the total pixel number is =65536, then the pixel occurrence probability of the gray level 30 is =1000 / 65536≈0.0153. The pixel occurrence probability sequence of each gray level is obtained by calculating according to the formula for each gray level in the range of 0 to 255, and these probability values reflect the possibility of the occurrence of each gray level in the image, which provides an important basis for subsequent analysis of the image gray distribution characteristics and determination of the segmentation threshold.

[0053] Preferably, the corresponding cumulative probability and the cumulative mean are calculated according to the pixel occurrence probability of each gray level , wherein is an integer between 0 and , which can represent the threshold, and the mean of the whole image is also calculated. In the embodiment of the present application, the corresponding cumulative probability and the cumulative mean are calculated according to the previously obtained pixel occurrence probability of each gray level , wherein is an integer between 0 and , that is, =0, 1, …, 255), and the mean of the whole image is also calculated, wherein the calculation formula of the cumulative probability is , which represents the total probability of the occurrence of the pixel with the gray level less than or equal to , for example, when =50, , that is, the pixel occurrence probabilities of the gray levels 0 to 50 are sequentially added, and the calculation formula of the cumulative mean is ​​​​, which reflects the average gray value of pixels with gray level less than or equal to , for example, when calculating , the numerator is calculated first, and then divided by to obtain the cumulative average value, while the average value of the whole image is calculated by the formula , that is, the sum of the product of all gray levels and their corresponding pixel occurrence probability. Through the above calculation, the cumulative probability under different gray levels, the cumulative average value and the average value of the whole image are obtained, which will be used for subsequent inter-class variance calculation to determine the appropriate segmentation threshold.

[0054] Preferably, the inter-class variance is calculated based on the average value of the whole image in combination with the cumulative probability and the cumulative average value to obtain the gray inter-class variance corresponding to the segmentation map , and the ratio between the value corresponding to the maximum value and is determined as the lesion probability segmentation threshold. In the embodiments of the present application, the inter-class variance is calculated based on the previously obtained average value of the whole image

[0055] , the cumulative probability and the cumulative average value (0, 1, …, 255), the inter-class variance calculation formula is , and is calculated from 0 to 255 in turn to obtain a set of inter-class variance values , , …, , and by comparing the set of inter-class variance values, the maximum value is found, and the ratio between the value corresponding to the maximum value and is the lesion probability segmentation threshold, for example, if is the maximum value in the set of values, then 80 / 255 is the lesion probability segmentation threshold corresponding to the clinical lesion region segmentation fusion map, which can be used to segment the image into different regions to assist medical diagnosis and distinguish the lesion region from the normal tissue region. Further, the lesion boundary smoothing module comprises the following functions: obtaining the corresponding clinical image lesion segmentation boundary line from the clinical lesion region segmentation correction result map;

[0056] Further, the lesion boundary smoothing module comprises the following functions: obtaining the corresponding clinical image lesion segmentation boundary line from the clinical lesion region segmentation correction result map; ​In this embodiment of the invention, a clinical lesion region segmentation correction result image is used as an example. This image is obtained after the previous processing steps, in which the lesion region has been identified. An edge detection algorithm (such as the Canny edge detection algorithm) is used to obtain the clinical image lesion segmentation boundary line. The Canny edge detection algorithm first applies a Gaussian filter to the image to reduce the influence of noise. It is assumed that the standard deviation of the Gaussian filter is... =1.5, filter size is 3×3, then the gradient magnitude and direction of the image are calculated. Non-maximum suppression is used to retain points with large gradient magnitudes and suppress non-edge points. Finally, double thresholding is used to determine the final edge points. Connecting these edge points yields the clinical image lesion segmentation boundary line. For example, for a pixel in the image, after calculating its gradient magnitude and direction, if the gradient magnitude is greater than the high threshold (assuming it is 100), it is determined to be an edge point; if the gradient magnitude is less than the low threshold (assuming it is 50), it is excluded as a non-edge point; if the gradient magnitude is between the low and high thresholds, its connectivity with the determined edge points determines whether it is an edge point. Through this process, the clinical image lesion segmentation boundary line is accurately extracted from the clinical lesion region segmentation correction result image.

[0057] Preferably, based on the clinical image lesion segmentation boundary line and combined with morphological operations including erosion and dilation operations, the clinical lesion region segmentation correction result map is subjected to lesion edge morphology denoising to remove the tiny lesion noise points generated during the lesion correction segmentation process, and obtain the clinical lesion region edge shape optimization map. In the embodiment of the present application, the lesion edge morphology of the clinical lesion region segmentation correction result image is denoised by eroding and dilating operations in morphological operation based on the previously obtained clinical image lesion segmentation boundary line. The purpose of the eroding operation is to eliminate the tiny noise points and burrs in the image, so that the boundary is smoother. Assuming that the structure element used in the eroding operation is a 3*3 square, for each pixel point in the image, if all the pixel points in the 3*3 neighborhood around the pixel point match the structure element (i.e., all are 1, assuming that the image is a binary image and the lesion region is 1 and the background is 0), the pixel point is retained, otherwise it is set to 0. For example, for a certain pixel point P on the lesion segmentation boundary line, there is a pixel point of 0 in the 3*3 neighborhood around P, which does not match the structure element, so P is set to 0. Through such eroding operation, some tiny noise points are removed. The dilating operation is to restore the lesion region that is eroded. The structure element used in the dilating operation is also a 3*3 square. For each pixel point in the image, if there is any pixel point in the 3*3 neighborhood around the pixel point that matches the structure element (i.e., there is one of 1), the pixel point is set to 1. For example, for a certain pixel point Q in the image after the eroding operation, there is a pixel point of 1 in the 3*3 neighborhood around Q, which matches the structure element, so Q is set to 1. Through the alternating eroding and dilating operations (assuming that the eroding and dilating operations are performed for 3 times), the tiny lesion noise points generated in the lesion correction segmentation process are effectively removed, and finally the clinical lesion region edge optimization image is obtained, so that the lesion boundary is clearer and smoother.

[0058] Preferably, if there is still a break point in the corresponding lesion segmentation boundary in the clinical lesion region edge optimization image, the boundary break point smoothing processing is performed on the corresponding lesion segmentation boundary in the clinical lesion region edge optimization image to generate the clinical lesion edge segmentation optimization result.

[0059] In the embodiment of the present application, if there is still a corresponding break point, the boundary break point smoothing processing is performed on the corresponding lesion segmentation boundary in the previously obtained clinical lesion region edge optimization image. First, the pixel points on the lesion segmentation boundary are checked to find those discontinuous or abrupt points, i.e., the boundary break points. For example, for a certain sequence of continuous pixel points on the boundary, if the adjacent pixel points of a certain point in the sequence change obviously in a certain range (such as 3 pixels to the left and right) from the direction of the line connecting the point, and the change exceeds a predetermined threshold (such as the angle change exceeds 45°), the point is marked as a boundary break point. For each boundary break point found, the curve fitting method is used for smoothing processing. Assuming that a quadratic polynomial curve fitting is used, the coordinates of the boundary break point are , the coordinates of the left and right adjacent pixel points are , and the least square method is used to determine the coefficients a, b, and c of the quadratic polynomial, so that The goal of least squares is to best fit these points by minimizing The coefficients of the quadratic polynomial are obtained by solving this minimization problem, and then the discontinuity at the boundary breakpoint is replaced by this quadratic polynomial, thus achieving the smoothing of the boundary breakpoint. After all the boundary breakpoints are processed in this way, the final optimized result of the clinical lesion polygon segmentation is generated, making the lesion segmentation boundary more continuous and smooth, and more accurately reflecting the actual shape and boundary of the lesion.

[0060] Further, the boundary breakpoint smoothing processing of the corresponding lesion segmentation boundary in the clinical lesion region polygon optimization graph includes: Obtaining the corresponding lesion segmentation boundary breakpoint domain of the corresponding lesion segmentation boundary in the clinical lesion region polygon optimization graph; In the embodiment of the present application, taking a clinical lesion region polygon optimization graph as an example, the lesion segmentation boundary is marked in the graph. The pixel point set of the boundary is obtained by processing the lesion segmentation boundary through an edge detection algorithm (such as the Canny edge detection algorithm). In this set, those discontinuous or abrupt points are found, which are the lesion segmentation boundary breakpoints. For example, for a sequence of continuous pixel points on the boundary, if the adjacent pixel points of a certain point in a certain range (such as 3 pixels on the left and right) change obviously in the direction of the line connecting the point, and the change exceeds a predetermined threshold (such as an angle change exceeding 45°), the point is marked as a breakpoint, and all such breakpoints are grouped to form a set, i.e. the lesion segmentation boundary breakpoint domain is obtained.

[0061] Preferably, the corresponding left and right half-neighborhood boundary trend slopes around the lesion segmentation boundary breakpoint are obtained by setting the corresponding lesion boundary breakpoint neighborhood range and based on the lesion segmentation boundary breakpoint neighborhood range, the left and right half-neighborhood corresponding to the lesion segmentation boundary breakpoint are segmented to obtain the boundary trend slope. In the embodiment of the present application, by setting the lesion boundary breakpoint neighborhood range, assuming a range of 5 pixels on the left and right with the breakpoint as the center, for each breakpoint in the lesion segmentation boundary breakpoint domain, the segmentation boundary trend slope of the left and right half-neighborhood around it is calculated. Taking a certain breakpoint P as an example, the left half-neighborhood is a range of 5 pixels to the left of P, and the right half-neighborhood is a range of 5 pixels to the right of P. For the left half-neighborhood, the slope between adjacent pixel points is calculated, assuming that the pixel point coordinates in the left half-neighborhood are , then the slope is calculated. Similarly, the slope of the right half-neighborhood is calculated , assuming that the pixel point coordinates in the right half-neighborhood are . In this way, the left and right half-neighborhood boundary trend slopes corresponding to the lesion segmentation boundary breakpoint are finally obtained.

[0062] Preferably, the boundary fracture fitting smoothing processing is performed on the fracture point domain on the corresponding lesion segmentation boundary in the clinical lesion region edge shape optimization graph based on the corresponding left and right half neighborhood boundary trend slope around the fracture point of the previously obtained lesion segmentation boundary, to generate the clinical lesion edge shape segmentation optimization result.

[0063] In the embodiment of the present application, the boundary fracture fitting smoothing processing is performed on the fracture point domain on the corresponding lesion segmentation boundary in the clinical lesion region edge shape optimization graph based on the corresponding left and right half neighborhood boundary trend slope around the fracture point of the previously obtained lesion segmentation boundary, taking a fracture point Q as an example, the left half neighborhood slope is , the right half neighborhood slope is , according to the two slopes, the fracture point Q is processed by using the linear interpolation method, assuming that the coordinates of the fracture point Q are , the two points A and B closest to Q in the left half neighborhood are found, the two points C and D closest to Q in the right half neighborhood are found, according to the left half neighborhood slope , a linear equation is obtained, according to the right half neighborhood slope , another linear equation is obtained, through the two equations, the fitting value at the fracture point Q is calculated , so that the curve from A to Q to D is smoother, all the fracture points in the fracture point domain of the lesion segmentation boundary are processed in this way, and finally the clinical lesion edge shape segmentation optimization result is generated.

[0064] The above description is only a specific implementation of the present application, which enables those skilled in the art to understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to these embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A clinical lesion assisted segmentation system based on nuclear magnetic resonance images, characterized in that, The method comprises the following modules: An MRI image processing module is configured to acquire a patient clinical nuclear magnetic resonance image set comprising T1-weighted, T2-weighted and enhanced sequence scanning corresponding images by an MRI device, and perform image position alignment and grayscale adjustment processing on the patient clinical nuclear magnetic resonance image set to generate a clinical nuclear magnetic resonance grayscale standard image set; A lesion auxiliary segmentation module is configured to design a multi-level convolution module by adopting a convolutional neural network as a core framework and construct a corresponding clinical image lesion segmentation model in combination with a U-Net network structure; input the clinical nuclear magnetic resonance grayscale standard image set into the clinical image lesion segmentation model for multi-scale fusion auxiliary segmentation to generate a clinical lesion region segmentation fusion image; A probability segmentation correction module is configured to acquire a lesion confidence probability corresponding to each pixel point in the segmentation image based on the clinical lesion region segmentation fusion image, and perform probability segmentation boundary correction on the clinical lesion region segmentation fusion image based on the lesion confidence probability corresponding to each pixel point in the segmentation image to obtain a clinical lesion region segmentation correction result image; A lesion boundary smoothing module is configured to perform lesion boundary morphology smoothing processing on the clinical lesion region segmentation correction result image to generate a clinical lesion boundary segmentation optimization result.

2. The clinical lesion assisted segmentation system based on magnetic resonance image according to claim 1, wherein, The MRI image processing module comprises the following functions: Acquire a clinical nuclear magnetic resonance sub-image scanned by a T1-weighted sequence by an MRI device; Acquire a clinical nuclear magnetic resonance sub-image scanned by a T2-weighted sequence by an MRI device; Acquire a clinical nuclear magnetic resonance sub-image scanned by an enhanced sequence by an MRI device; Merge the clinical nuclear magnetic resonance sub-images scanned by the T1-weighted sequence, the T2-weighted sequence and the enhanced sequence to form a corresponding patient clinical nuclear magnetic resonance image set; Perform image position alignment and grayscale adjustment processing on the patient clinical nuclear magnetic resonance image set to generate a clinical nuclear magnetic resonance grayscale standard image set.

3. The clinical lesion assisted segmentation system based on magnetic resonance images of claim 2, wherein, The image position alignment and grayscale adjustment processing on the patient clinical nuclear magnetic resonance image set comprises: Perform image space feature analysis on each clinical nuclear magnetic resonance sub-image in the patient clinical nuclear magnetic resonance image set to extract a spatial feature matrix corresponding to each clinical nuclear magnetic resonance sub-image, which comprises the spatial coordinates, grayscale value distribution and local region corresponding edge, angle and texture geometry information of each pixel point in the image; Perform image deformation error analysis on each clinical nuclear magnetic resonance sub-image in the patient clinical nuclear magnetic resonance image set based on the spatial feature matrix corresponding to each clinical nuclear magnetic resonance sub-image to obtain the image relative displacement error corresponding to each clinical nuclear magnetic resonance sub-image in the image acquisition process; Acquire high-contrast spatial position points and low-contrast spatial position points corresponding to each clinical nuclear magnetic resonance sub-image from the patient clinical nuclear magnetic resonance image set, and perform spatial weighted average calibration according to the high-contrast spatial position points and the low-contrast spatial position points corresponding to each clinical nuclear magnetic resonance sub-image to generate a clinical image space calibration position template; The clinical nuclear magnetic resonance images in the clinical nuclear magnetic resonance image set are registered by using a clinical image space calibration position template and combining the relative image displacement errors between the clinical nuclear magnetic resonance sub-images in the image acquisition process, to obtain a clinical nuclear magnetic resonance registered image set; The clinical nuclear magnetic resonance registered image set is subjected to gray scale adjustment processing to generate a clinical nuclear magnetic resonance gray scale standard image set.

4. The clinical lesion assisted segmentation system based on magnetic resonance images of claim 3, wherein, The gray scale adjustment processing of the clinical nuclear magnetic resonance registered image set includes: The pixel gray scale distribution value corresponding to each pixel point in each clinical registration sub-image is obtained from the clinical nuclear magnetic resonance registered image set; A clinical image gray scale standard template is constructed, which includes the gray scale value distribution range of the pathological or normal tissue in the ideal state in the clinical reference image; The pixel gray scale distribution deviation between the pixel gray scale distribution values corresponding to each pixel point in each clinical registration sub-image is calculated based on the clinical image gray scale standard template, to obtain the pixel gray scale distribution deviation corresponding to each clinical registration sub-image; The pixel gray scale distribution value corresponding to each pixel point in each clinical registration sub-image is adjusted by polynomial curve fitting based on the pixel gray scale distribution deviation corresponding to each clinical registration sub-image and a non-linear fitting method, to generate a clinical nuclear magnetic resonance gray scale standard image set.

5. The clinical lesion assisted segmentation system based on magnetic resonance images of claim 1, wherein, The lesion auxiliary segmentation module includes the following functions: A multi-level convolution module corresponding to different sizes of convolution kernels including small convolution kernels 3x3 or 5x5 and large convolution kernels 15x15 or 21x21 is designed by using a convolutional neural network as the core framework, wherein the small convolution kernels are used to extract low-level feature maps of the clinical sub-images including micro edges, textures and structural changes, and the large convolution kernels are used to extract high-level feature maps of the clinical sub-images including shapes and sizes of the lesion regions; The corresponding U-Net basic network architecture is formed by combining the corresponding multi-level convolution module with the U-Net network structure including the encoder-decoder network architecture, so that the extraction ability of the large convolution kernels for the deep features in the clinical sub-images is enhanced by using residual convolution blocks in the U-shaped down-sampling part of the encoder, and the attention mechanism is introduced by combining the deconvolution with the U-shaped up-sampling in the encoder part to introduce the skip connection feature to fuse the feature maps of different levels, and the context feature information of different levels is obtained by global average pooling and global maximum pooling, so as to output the corresponding lesion feature segmentation fusion map and construct the corresponding clinical image lesion segmentation model; The clinical nuclear magnetic resonance gray scale standard image set is input into the clinical image lesion segmentation model for multi-scale fusion auxiliary segmentation to generate a clinical lesion region segmentation fusion map.

6. The clinical lesion assisted segmentation system based on magnetic resonance images of claim 1, wherein, The probability segmentation correction module includes the following functions: The lesion confidence probability corresponding to each pixel point in the clinical lesion region segmentation fusion map is obtained; The gray scale inter-class variance of the segmentation map is calculated to automatically determine the lesion probability segmentation threshold. The clinical lesion region segmentation fusion image is subjected to probability binary segmentation boundary correction based on the lesion confidence probability corresponding to each pixel point in the segmentation image and in combination with a lesion probability segmentation threshold, so as to convert the lesion confidence probability corresponding to each pixel point in the segmentation image into a corresponding lesion binary image according to the lesion probability segmentation threshold, and further correct and optimize the segmentation boundary of the lesion binary image by combining a region growing algorithm, to obtain a clinical lesion region segmentation correction result image.

7. The clinical lesion assisted segmentation system based on magnetic resonance images of claim 6, wherein, The lesion confidence probability corresponding to each pixel point in the segmentation image is obtained through the clinical lesion region segmentation fusion image, and includes the following steps: The relative positions and lesion geometric shapes of each pixel point in the segmentation image in the lesion region are obtained through the clinical lesion region segmentation fusion image, to obtain a clinical lesion feature matrix corresponding to each pixel point in the segmentation image; Feature similarity between the clinical lesion feature matrices corresponding to each pixel point in the segmentation image is measured, to obtain a lesion feature similarity degree between each pixel point and the surrounding neighborhood pixel points in the segmentation image; Lesion confidence prior estimation is performed on each pixel point in the clinical lesion region segmentation fusion image based on the lesion feature similarity degree between each pixel point and the surrounding neighborhood pixel points, to obtain the lesion confidence probability corresponding to each pixel point in the segmentation image.

8. The clinical lesion assisted segmentation system based on magnetic resonance images of claim 6, wherein, The gray level class interval variance of the segmentation image corresponding to the clinical lesion region segmentation fusion image is maximized to automatically determine the lesion probability segmentation threshold, and includes the following steps: Obtain the corresponding grayscale range from the clinical lesion region segmentation and fusion map. And calculate each gray level Corresponding number of pixels and the total number of pixels in the entire image. ; According to each gray scale The corresponding number of pixels And the total number of pixels corresponding to the whole image Calculate the probability of each gray scale Pixel occurrence ; According to the probability of occurrence of each gray level The corresponding cumulative probability is calculated And the cumulative mean Wherein Is an integer between 0 and The threshold value, while calculating the mean of the entire image ;​ Based on the mean of the entire image And combined with cumulative probability and cumulative average Perform inter-class variance calculation to obtain the gray-level inter-class variance corresponding to the segmentation image. And based on the variance between gray classes Determine the value corresponding to reaching the maximum value Value and The ratio between them is used as the threshold for lesion probability segmentation.

9. The clinical lesion assisted segmentation system based on magnetic resonance images of claim 1, wherein, The lesion boundary smoothing module includes the following functions: A clinical image lesion segmentation boundary line is obtained through the clinical lesion region segmentation correction result image; Lesion edge shape denoising is performed on the clinical lesion region segmentation correction result image based on the clinical image lesion segmentation boundary line and in combination with morphological operations including erosion and dilation operations, to remove the tiny lesion noise points generated in the lesion correction segmentation process, to obtain a clinical lesion region edge shape optimization image; If there are still breakpoints in the lesion segmentation boundary corresponding to the clinical lesion region edge shape optimization image, then boundary breakpoint smoothing processing is performed on the lesion segmentation boundary corresponding to the clinical lesion region edge shape optimization image, to generate a clinical lesion edge shape segmentation optimization result.

10. The clinical lesion assisted segmentation system based on magnetic resonance images of claim 9, wherein, The lesion segmentation boundary corresponding to the clinical lesion region edge shape optimization image is subjected to boundary breakpoint smoothing processing, and includes the following steps: A lesion segmentation boundary breakpoint domain corresponding to the clinical lesion region edge shape optimization image is obtained; A corresponding lesion boundary breakpoint neighborhood range is set, and the left and right half neighborhood boundary trend slopes corresponding to the lesion segmentation boundary breakpoint domain are counted based on the lesion boundary breakpoint neighborhood range, to obtain the left and right half neighborhood boundary trend slopes corresponding to the lesion segmentation boundary breakpoint; Boundary breakpoint fitting smoothing processing is performed on the breakpoint domain of the lesion segmentation boundary in the clinical lesion region edge shape optimization image based on the left and right half neighborhood boundary trend slopes corresponding to the lesion segmentation boundary breakpoint, to generate a clinical lesion edge shape segmentation optimization result.

Citation Information

Patent Citations

  • Method and system for the assessment of tumor extent in magnetic resonance images

    CA2343825A1

  • Visual and sensitive intelligent surgical navigation system

    CN116570369A

  • Multi-mode MRI brain tumor image segmentation method

    CN117237627A

  • Rice disease identification method and system based on image processing

    CN118334642A

  • Image feature extraction method and device of ultrasonic image, equipment and medium

    CN119251192A

Cited By

  • Brain small blood vessel image recognition and analysis method for cognitive function impairment analysis

    CN121170859A

  • Brain small vessel imaging recognition analysis method for cognitive impairment analysis

    CN121170859B

  • Magnetic resonance imaging optimization method and device, equipment and medium

    CN121784631A

  • Gynecological tumor MRI image three-dimensional reconstruction method and system based on deep learning

    CN121810953A