A clinical lesion assisted segmentation system based on nuclear magnetic resonance images

By combining MRI image processing, convolutional neural networks, and U-Net networks, the problem of inaccurate lesion segmentation in MRI images was solved, achieving high-precision and consistent lesion region segmentation and improving the adaptability and accuracy of lesion identification.

CN121169946BActive Publication Date: 2026-02-17THE SEVENTH MEDICAL CENTER OF PLA GENERAL HOSPITAL +1
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing deep learning-based lesion segmentation methods have problems with inaccurate and inconsistent segmentation results in MRI images, especially when dealing with different lesion morphologies, making it difficult to guarantee the accuracy and consistency of lesion regions.

Method used

The MRI image processing module was used for image alignment and grayscale adjustment. A multi-level convolutional module with convolutional neural network (CNN) and U-Net network structure was used for lesion segmentation. The segmentation results of the lesion region were optimized by probability segmentation correction and lesion boundary smoothing.

Benefits of technology

It achieves high-precision segmentation of lesion areas, improves the model's sensitivity and accuracy to lesion areas, reduces false positives and false negatives, and ensures the accuracy and consistency of segmentation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121169946B_ABST
    Figure CN121169946B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of image processing, and particularly relates to a clinical lesion auxiliary segmentation system based on nuclear magnetic resonance images. The system comprises an MRI image processing module, a lesion auxiliary segmentation module, a probability segmentation correction module and a lesion boundary smoothing module, can obtain corresponding patient clinical nuclear magnetic resonance image sets and perform image position alignment and gray scale adjustment processing, simultaneously construct corresponding clinical image lesion segmentation models for multi-scale fusion auxiliary segmentation, and generate a clinical lesion region segmentation fusion image; through the clinical lesion region segmentation fusion image, obtain the lesion confidence probability corresponding to each pixel point in the segmentation image, and correct the probability segmentation boundary of the clinical lesion region segmentation fusion image, to obtain a clinical lesion region segmentation correction result image; perform lesion edge shape smoothing processing on the clinical lesion region segmentation correction result image, to generate a clinical lesion edge shape segmentation optimization result. The present application can realize high-precision segmentation of lesions in MRI images.
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 nuclear magnetic resonance images. 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 nuclear magnetic resonance images, 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 nuclear magnetic resonance images to solve at least one of the above technical problems.

[0004] To achieve the above purpose, a clinical lesion auxiliary segmentation system based on nuclear magnetic resonance images comprises the following modules:

[0005] An MRI image processing module is configured to acquire a set of patient clinical nuclear magnetic resonance images including T1 weighted, T2 weighted and enhanced sequence scanning through an MRI device, and to perform image position alignment and grayscale adjustment processing on the set of patient clinical nuclear magnetic resonance images to generate a set of clinical nuclear magnetic resonance grayscale standard images.

[0006] 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 to construct a corresponding clinical image lesion segmentation model in combination with a U-Net network structure; and to input the set of clinical nuclear magnetic resonance grayscale standard images into the clinical image lesion segmentation model for multi-scale fusion auxiliary segmentation to generate a clinical lesion region segmentation fusion map.

[0007] A probability segmentation correction module is configured to obtain lesion confidence probabilities corresponding to each pixel point in the segmentation map through the clinical lesion region segmentation fusion map, and to perform probability segmentation boundary correction on the clinical lesion region segmentation fusion map based on the lesion confidence probabilities corresponding to each pixel point in the segmentation map to obtain a clinical lesion region segmentation correction result map.

[0008] The 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.

[0009] Further, the MRI image processing module includes the following functions:

[0010] The MRI device is used to acquire a clinical nuclear magnetic resonance sub-image corresponding to T1 weighted sequence scanning;

[0011] The MRI device is used to acquire a clinical nuclear magnetic resonance sub-image corresponding to T2 weighted sequence scanning;

[0012] The MRI device is used to acquire a clinical nuclear magnetic resonance sub-image corresponding to enhanced sequence scanning;

[0013] The clinical nuclear magnetic resonance sub-images corresponding to the T1 weighted sequence scanning, the T2 weighted sequence scanning, and the enhanced sequence scanning are combined to form a corresponding patient clinical nuclear magnetic resonance image set;

[0014] The patient clinical nuclear magnetic resonance image set is subjected to image position alignment and grayscale adjustment processing to generate a clinical nuclear magnetic resonance grayscale standard image set.

[0015] Further, the image position alignment and grayscale adjustment processing of the patient clinical nuclear magnetic resonance image set includes:

[0016] The image space feature analysis is performed 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 includes the spatial coordinates, the grayscale value distribution, and the local region corresponding edge, angle, and texture geometric information of each pixel point in the image;

[0017] Based on the spatial feature matrix corresponding to each clinical nuclear magnetic resonance sub-image, the image deformation error analysis is performed between each clinical nuclear magnetic resonance sub-image in the patient clinical nuclear magnetic resonance image set, to obtain the corresponding image relative displacement error between each clinical nuclear magnetic resonance sub-image in the image acquisition process;

[0018] The high-contrast spatial position points and the low-contrast spatial position points corresponding to each clinical nuclear magnetic resonance sub-image are obtained from the patient clinical nuclear magnetic resonance image set, and the spatial weighted average calibration is performed 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;

[0019] 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.

[0020] 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.

[0021] Further, the gray scale adjustment processing of the clinical nuclear magnetic resonance registered image set comprises:

[0022] The pixel gray scale distribution value corresponding to each pixel point in each clinical registered sub-image is obtained by using the clinical nuclear magnetic resonance registered image set.

[0023] 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.

[0024] Based on the clinical image gray scale standard template, the gray scale distribution deviation between the pixel gray scale distribution values corresponding to each pixel point in each clinical registered sub-image is calculated to obtain the pixel gray scale distribution deviation corresponding to each clinical registered sub-image.

[0025] Based on the pixel gray scale distribution deviation corresponding to each clinical registered sub-image and combining a non-linear fitting method, the pixel gray scale distribution value corresponding to each pixel point in each clinical registered sub-image is adjusted by polynomial curve fitting to generate a clinical nuclear magnetic resonance gray scale standard image set.

[0026] Further, the lesion auxiliary segmentation module comprises the following functions:

[0027] 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.

[0028] The corresponding multi-level convolution module is combined with the network structure including the corresponding network architecture of the encoder-decoder pair to form the corresponding U-Net basic network architecture, so that the residual convolution block is used in the U-shaped down-sampling of the encoder part to enhance the extraction ability of the large convolution kernel to the deep features in the clinical sub-image, and the deconvolution combined with the U-shaped up-sampling is introduced in the encoder part to introduce the attention mechanism through the jump connection characteristics to fuse the feature maps of different levels, and the context feature information of different levels is obtained through the global average pooling and the global maximum pooling, so as to output the corresponding lesion feature segmentation fusion graph, thereby constructing the clinical image lesion segmentation model;

[0029] The clinical nuclear magnetic resonance gray scale standard image set is input into the clinical image lesion segmentation model for multi-scale fusion assisted segmentation to generate a clinical lesion region segmentation fusion graph.

[0030] Further, the probability segmentation correction module includes the following functions:

[0031] The lesion confidence probability corresponding to each pixel point in the segmentation graph is obtained through the clinical lesion region segmentation fusion graph;

[0032] The maximum gray scale inter-class variance of the segmentation graph is calculated through the clinical lesion region segmentation fusion graph to automatically determine the lesion probability segmentation threshold;

[0033] Based on the lesion confidence probability corresponding to each pixel point in the segmentation graph and combined with the lesion probability segmentation threshold, the probability binary segmentation boundary correction is performed on the clinical lesion region segmentation fusion graph, so that the lesion confidence probability corresponding to each pixel point in the segmentation graph is converted into the corresponding lesion binary image according to the lesion probability segmentation threshold, and the segmentation boundary of the lesion binary image is further corrected and optimized through the region growing algorithm, to obtain the clinical lesion region segmentation correction result graph.

[0034] Further, the lesion confidence probability corresponding to each pixel point in the segmentation graph is obtained through the clinical lesion region segmentation fusion graph, including:

[0035] The relative position of each pixel point in the segmentation graph in the lesion region and the lesion geometric shape are obtained through the clinical lesion region segmentation fusion graph to obtain the clinical lesion feature matrix corresponding to each pixel point in the segmentation graph;

[0036] The feature similarity between the clinical lesion feature matrices corresponding to each pixel point in the segmentation graph is measured to obtain the lesion feature similarity degree between each pixel point and the surrounding neighborhood pixel points in the segmentation graph;

[0037] Based on the similarity degree of the lesion feature between each pixel point in the segmentation graph and the surrounding neighborhood pixel points, the lesion confidence priori estimation is performed on each pixel point in the clinical lesion region segmentation fusion graph, so as to obtain the lesion confidence probability corresponding to each pixel point in the segmentation graph.

[0038] Further, the automatic determination of the lesion probability segmentation threshold by maximizing the inter-class variance of the corresponding gray scale of the segmentation graph based on the clinical lesion region segmentation fusion graph comprises:

[0039] The corresponding gray scale range is obtained by the clinical lesion region segmentation fusion graph , and the number of pixels corresponding to each gray scale is calculated , and the total number of pixels corresponding to the whole image is calculated

[0040] According to the number of pixels corresponding to each gray scale and the total number of pixels corresponding to the whole image , the pixel occurrence probability of each gray scale is calculated ;

[0041] According to the pixel occurrence probability of each gray scale , the corresponding cumulative probability and the cumulative mean are calculated , wherein is an integer between 0 and , which can represent the threshold, and the mean of the whole image is calculated

[0042] Based on the mean of the whole image and combined with the cumulative probability and the cumulative mean , the inter-class variance is calculated to obtain the inter-class variance of the corresponding gray scale of the segmentation graph , and according to the inter-class variance , the ratio between the value corresponding to the maximum value and is determined as the lesion probability segmentation threshold.

[0043] Further, the lesion boundary smoothing module comprises the following functions:

[0044] The corresponding clinical image lesion segmentation boundary line is obtained by the clinical lesion region segmentation correction result graph;

[0045] ​Based on the clinical image lesion segmentation boundary line and combining morphological operations including erosion and inflation operation, the lesion edge shape morphological denoising is carried out on the clinical lesion region segmentation correction result map, so as to remove the small lesion noise points generated in the lesion correction segmentation process, and obtain the clinical lesion region edge shape optimization map.

[0046] If the corresponding lesion segmentation boundary in the clinical lesion region edge shape optimization map still has a broken point, then the boundary broken point smoothing processing is carried out on the corresponding lesion segmentation boundary in the clinical lesion region edge shape optimization map, so as to generate the clinical lesion edge shape segmentation optimization result.

[0047] Further, the boundary broken point smoothing processing on the corresponding lesion segmentation boundary in the clinical lesion region edge shape optimization map comprises:

[0048] The corresponding lesion segmentation boundary broken point domain is obtained through the corresponding lesion segmentation boundary in the clinical lesion region edge shape optimization map;

[0049] The corresponding left and right half-neighborhoods around the lesion segmentation boundary broken point domain are segmented based on the lesion boundary broken neighborhood range, and the boundary trend slope of the left and right half-neighborhoods around the lesion segmentation boundary broken point is obtained.

[0050] Based on the boundary trend slope of the left and right half-neighborhoods around the lesion segmentation boundary broken point, the boundary broken fitting smoothing processing is carried out on the broken point domain on the corresponding lesion segmentation boundary in the clinical lesion region edge shape optimization map, so as to generate the clinical lesion edge shape segmentation optimization result.

[0051] The beneficial effects of the present application are:

[0052] 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 the segmentation boundary 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

[0053] Other features, objects, and advantages of the application will become more apparent from the following detailed description of non-limiting embodiments, when read in conjunction with the accompanying drawings:

[0054] Figure 1 A module schematic diagram of the clinical lesion auxiliary segmentation system based on the nuclear magnetic resonance image of the present application;

[0055] Figure 2 A function flow schematic diagram of the MRI image processing module; Figure 1

[0056] Figure 3 A function flow schematic diagram of the lesion auxiliary segmentation module. Figure 1 DETAILED DESCRIPTION

[0057] The technical system of the present application will be described in detail 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.

[0058] 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 nuclear magnetic resonance image. In the embodiments of the present application, please refer to Figure 1 Fig. 1 is a module schematic diagram of the clinical lesion auxiliary segmentation system based on the nuclear magnetic resonance image of the present application. In the present example, the clinical lesion auxiliary segmentation system based on the nuclear magnetic resonance image comprises the following modules:

[0059] S1: an MRI image processing module, configured to acquire a patient clinical nuclear magnetic resonance image set comprising T1 weighted, T2 weighted and enhanced sequence scanning corresponding to an MRI device, 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;

[0060] ​​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.

[0061] 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;

[0062] 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 form 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 map , so as to realize effective fusion of different levels of feature maps. At the same time, the global average pooling and the global maximum pooling are used to obtain context feature information at different levels. 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 map is output, and the construction of the clinical image lesion segmentation model is completed. The clinical magnetic resonance gray standard image set is input into the clinical image lesion segmentation model for multi-scale fusion assisted segmentation. Assuming that the clinical magnetic resonance 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 are used to extract low-level features of the image, such as small edges and textures, and large convolution kernels are used to 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 down-sampling operations. In the decoder part, the features at different levels are fused and the feature map size is restored by using deconvolution, up-sampling, jump connection and attention mechanism. In this process, the context feature information obtained by the global average pooling and the global maximum pooling also participates in the feature fusion. Taking an image as an example, after the calculation and processing of 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 magnetic resonance gray standard image set, and 100 lesion feature segmentation fusion maps are obtained. 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.

[0063] S3: a probability segmentation correction module, configured to obtain a 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.

[0064] In the embodiment of the present application, the clinical lesion area segmentation fusion map is taken as an example. The map is an image with a size of 256x256 pixels. 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 its corresponding lesion confidence probability. For example, for a pixel point with coordinates , the lesion confidence probability is calculated as Then, based on the lesion confidence probability corresponding to each pixel point in the segmentation map, the clinical lesion region segmentation fusion map is subjected to probability segmentation boundary correction, a threshold is set (hypothesis ), for each pixel point, if its lesion confidence probability , 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, through such operation, the clinical lesion region segmentation fusion map is converted into a binary image, wherein 1 represents the lesion region and 0 represents the normal tissue region, the segmentation boundary is effectively divided and corrected, and finally the clinical lesion region segmentation correction result map is obtained, so that the segmentation of the lesion region is more accurate and clear.

[0065] S4: a lesion boundary smoothing module, configured to perform lesion edge shape smoothing processing on the clinical lesion region segmentation correction result map to generate a clinical lesion edge shape segmentation optimization result.

[0066] In the embodiment of the present application, taking a clinical lesion region segmentation correction result map as an example, the map is obtained after the previous step processing, wherein the lesion region has been identified, and the 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 fitted equation. 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.

[0067] Further, as an embodiment of the present application, referring to Figure 2 Fig. 1 shows a functional flow diagram of an MRI image processing module in the embodiment, and the MRI image processing module includes the following functions: Figure 1

[0068] S11: acquiring a clinical magnetic resonance sub-image corresponding to T1 weighted sequence scanning through an MRI device;

[0069] In the embodiment of the present application, the clinical magnetic resonance sub-image corresponding to T1 weighted sequence scanning is acquired 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 T1 weighted images. Each image is a clinical magnetic resonance sub-image, and the gray value thereof 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, and brain gray matter appears as a medium signal and presents gray-white color.

[0070] S12: acquiring a clinical magnetic resonance sub-image corresponding to T2 weighted sequence scanning through an MRI device;

[0071] ​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 ms, TE is set to 90 ms, the excitation angle is 180°, the matrix size is kept to 256*256, the layer thickness is still 5 mm, 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 nuclei release 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 present white color, and the brain white matter shows medium signals and presents grayish white color. These T2 weighted images serve as the clinical nuclear magnetic resonance sub-image, and the sub-images acquired by the T1 weighted sequence reflect the characteristics of the human tissues from different angles.

[0072] S13: acquiring the corresponding clinical nuclear magnetic resonance sub-image scanned by the enhanced sequence by the MRI device;

[0073] 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.1 mmol / kg of body weight, for example, the injection dose of the patient with a body weight of 70 kg is 7 mmol) 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 ms, TE 20 ms, the excitation angle is 70°, the matrix size is 256*256, the layer thickness is 5 mm, and 20 layers are collected. The contrast agent changes the magnetic field environment around the tissues, affects the relaxation process of the hydrogen nuclei, and increases the signal difference between the normal tissues and the lesion tissues. The MRI device scans according to the set parameters, the receiving coil collects the signals changed due to the effect of the contrast agent, the computer processes, and the enhanced image is reconstructed. 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.

[0074] 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;

[0075] 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.

[0076] 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.

[0077] 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.

[0078] Furthermore, the image bit alignment and grayscale adjustment processing of the patient's clinical MRI image set includes:

[0079] 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, which includes the spatial coordinates, gray value distribution and local region corresponding edge, angle and texture geometric information of each pixel point in the image;

[0080] 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 spatial coordinates are determined by its row and column indexes in the matrix, for example, the coordinates are , wherein represents the row index, represents the column index, both of which have a value range of 0 to 255. The gray value of each pixel point is obtained, assuming that the gray value of the pixel point is , which has a value range 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 corresponding to the local region, the Canny edge detection algorithm is used to extract the edge information. First, the image is denoised by Gaussian filtering, assuming that the standard deviation of the Gaussian filter is and the filter size is 3x3. Then the gradient amplitude and direction are calculated. 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 to obtain it. For the texture geometric information, the gray level co-occurrence matrix (GLCM) method is used. The gray scale is set to 16, the direction is 0°, 45°, 90° and 135°, and the distance is 1 pixel. A 16x16 GLCM matrix is constructed. The contrast, uniformity, correlation, energy and entropy, etc. texture features are calculated through the matrix. The spatial coordinates, gray value distribution and local region corresponding edge, angle and texture geometric information of each pixel point are integrated together to form a multi-dimensional vector, for example, , wherein represents the edge information (such as edge strength), represents the angle information, represents the texture feature vector. These vectors of all pixel points are combined to finally obtain the spatial feature matrix corresponding to the clinical magnetic resonance sub-image.

[0081] Preferably, based on the spatial 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 corresponding image relative displacement error between each clinical magnetic resonance sub-image in the image acquisition process;

[0082] 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.

[0083] 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.

[0084] 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, indicates the number of high-contrast spatial position points. The barycentric coordinates of the low-contrast spatial position points are calculated in the same way , and the high-contrast spatial position points and the low-contrast spatial position points corresponding to each clinical nuclear magnetic resonance sub-image are spatially weighted and averaged, and the weight of the high-contrast spatial position point is , the weight of the low-contrast spatial position point is , assuming that = 0.6, = 0.4 (the weight can be adjusted according to the actual situation), the coordinate of the calibration position in the clinical image spatial calibration position template is The calculation formula is , ), and the operation is performed on all clinical nuclear magnetic resonance sub-images in the patient clinical nuclear magnetic resonance image set, and finally the corresponding clinical image spatial calibration position template is generated.

[0085] Preferably, based on the clinical image spatial calibration position template and in combination with the image relative displacement error corresponding to each clinical nuclear magnetic resonance sub-image in the image acquisition process, the image position alignment and registration of each clinical nuclear magnetic resonance sub-image in the patient clinical nuclear magnetic resonance image set is performed, and a clinical nuclear magnetic resonance alignment and registration image set is obtained.

[0086] 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 nuclear magnetic resonance sub-image in the image acquisition process, the image position alignment and registration of each clinical nuclear magnetic resonance sub-image in the patient clinical nuclear magnetic resonance image set is performed, and a clinical nuclear magnetic resonance alignment and registration image set is obtained. , in the reference image (for example, a certain image with better quality or representative can be selected as the reference image), the position point closest to the calibration position coordinate of the clinical image spatial calibration position template of the clinical nuclear magnetic resonance sub-image C is found. Then, according to the previously calculated image relative displacement error, the clinical nuclear 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 horizontal direction by pixels, if there is still a rotation error, assuming the rotation angle is then the clinical MRI sub-image C is rotated by using the rotation matrix the rotation operation is performed on the clinical MRI sub-image C through multiple iterations of adjustment, so that the clinical MRI sub-image C is aligned with the reference image in spatial position as much as possible, and all clinical MRI sub-images in the patient clinical MRI image set are subjected to the operation, and finally the clinical MRI aligned and registered image set is obtained.

[0087] 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.

[0088] In the embodiment of the present application, the clinical MRI aligned and registered image set is subjected to a gray scale adjustment process, taking a certain 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 that =128, =30, and the gray scale adjustment is performed by using a linear transformation method, and the formula is to achieve that for each pixel point in the image, the gray scale value is substituted into the above formula to calculate the adjusted gray scale value all the adjusted gray scale values of the 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 the clinical MRI gray scale standard image set is generated.

[0089] Further, the gray scale adjustment process on the clinical MRI aligned and registered image set comprises:

[0090] the pixel gray scale distribution value corresponding to each pixel point in each clinical registration sub-image is obtained from the clinical MRI aligned and registered image set;

[0091] In this embodiment of the invention, taking a set of 100 clinical MRI aligned and registered images as an example, each image is 256×256 pixels in size. For any one of the clinical registered sub-images, each pixel in the image is traversed. Assuming the coordinates of the current pixel are... 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.

[0092] 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;

[0093] 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 grayscale distribution range of normal liver tissue under ideal conditions. 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.

[0094] 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.

[0095] 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.

[0096] 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.

[0097] 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 is determined, the coefficients of the polynomial are obtained by solving the least square problem, and then the original gray value of each pixel in the clinical registration sub-image 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.

[0098] Further, as an embodiment of the present application, referring to Figure 3 , a Figure 1 function flow diagram of a lesion auxiliary segmentation module is shown, and in the embodiment, the lesion auxiliary segmentation module includes the following functions:

[0099] 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.

[0100] 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 , the pixel value matrix of the local area is , and 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 convolution kernels of different sizes, a multi-level convolution module is formed to extract different levels of features of the clinical sub-image.

[0101] 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, introduce the attention mechanism by the skip connection characteristics of the combination of deconvolution and U-shaped up-sampling in the encoder part, perform feature fusion on feature maps of different levels, acquire context feature information of different levels by global average pooling and global maximum pooling, and output the corresponding lesion feature segmentation fusion map, so as to construct the corresponding clinical image lesion segmentation model;

[0102] In the embodiment of the application, the 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, 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, one residual convolution block includes two consecutive convolution layers, assuming that the input feature map is , after the first convolution layer (the convolution kernel size is set to 3x3, and the step is 1), the output is , and after the second convolution layer (the convolution kernel is also 3x3, and the step is 1), the output is , 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 it is helpful for large convolution kernels to better extract deep features, and 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 combination of deconvolution and U-shaped up-sampling is used, the deconvolution layer is used to restore the feature map size, for example, a 2x2 deconvolution kernel is used, the step is 2, and the skip connection characteristics are used to splice the low-level feature map of the corresponding layer in the encoder with the feature map of the same size in the decoder, introduce the attention mechanism, 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 , so as to realize effective fusion of feature maps of different levels. At the same time, the context feature information of different levels is acquired 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, the context feature information is fused with other features, and finally the corresponding lesion feature segmentation fusion map is output, and the construction of the clinical image lesion segmentation model is completed.

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

[0104] 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 to perform 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 down-sampling operations; in the decoder part, different levels of features are fused and the feature map size is restored by using deconvolution, up-sampling, 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 of 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 region, 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, to finally generate the final clinical lesion region segmentation fusion image, which clearly identifies the position and range of the clinical lesion in the image.

[0105] Further, the probability segmentation correction module includes the following functions:

[0106] obtaining the lesion confidence probability corresponding to each pixel point in the segmentation image through the clinical lesion region segmentation fusion image;

[0107] 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 morphology 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 morphology 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 The feature vectors of all pixels constitute the clinical lesion feature matrix. Then, based on the feature similarity measurement method, a certain pixel... 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.

[0108] 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;

[0109] 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).

[0110] 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.

[0111] 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 region, and by performing the operation on all pixel points in the entire image, the clinical lesion region 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 region) 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 region segmentation correction result image is obtained.

[0112] Further, the obtaining of the lesion confidence probability corresponding to each pixel point in the segmentation image from the clinical lesion region segmentation fusion image comprises:

[0113] The relative position of each pixel point in the segmentation image in the lesion region and the lesion geometric shape are obtained from the clinical lesion region segmentation fusion image to obtain a clinical lesion feature matrix corresponding to each pixel point in the segmentation image.

[0114] In the embodiment of the present application, taking a clinical lesion region 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 region is determined by calculating the distance of the point to the center of the lesion region, assuming that the center coordinates of the lesion region are , the average value of all pixel point coordinates belonging to the lesion region is obtained, that is, , , wherein is the number of pixel points in the lesion region, indicates that the pixel point belongs to the lesion region, and the distance of the pixel point to the center of the lesion region 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 region are sequentially connected to form a closed curve, the discrete Fourier transform of the curve is performed to obtain a series of Fourier coefficients, these coefficients 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 th Fourier coefficient, and combining these vectors of all pixel points, finally obtaining the clinical lesion feature matrix corresponding to each pixel point in the segmentation map.

[0115] Preferably, the feature similarity between the clinical lesion feature matrix corresponding to each pixel point in the segmentation map is measured to obtain the lesion feature similarity degree between each pixel point and the surrounding neighborhood pixel points in the segmentation map.

[0116] In the embodiment of the present application, taking a pixel point as an example, the feature vector thereof is , and 8 neighborhood pixel points such as , are selected in the 3x3 neighborhood thereof, and the Euclidean distance is used to measure the feature similarity between the pixel point and the neighborhood pixel points, and the formula is wherein represents the th dimension value of the feature vector of the pixel point , represents the th dimension value of the feature vector of the neighborhood pixel point , for example, for the neighborhood pixel point , the feature vector thereof is , and the Euclidean distance therebetween is , the Euclidean distance is calculated for the pixel point and the 8 neighborhood pixel points respectively, and 8 distance values are obtained, in order to more intuitively represent the similarity degree, the distance values are normalized to convert into the similarity degree value , wherein is the maximum value among all distance values, and in this way, the lesion feature similarity degree between the pixel point and the surrounding neighborhood pixel points is obtained, and this operation is performed on all pixel points in the clinical lesion region segmentation fusion map to obtain the feature similarity degree between each pixel point and the neighborhood pixel points.

[0117] Preferably, the lesion confidence prior estimation is performed on each pixel point in the clinical lesion region segmentation fusion map based on the lesion feature similarity degree between each pixel point and the surrounding neighborhood pixel points in the segmentation map to obtain the lesion confidence probability corresponding to each pixel point in the segmentation map.

[0118] In the embodiment of the present application, taking the pixel point as an example, the similarity degrees thereof with the 8 neighborhood pixel points are , respectively., the weighted average method is used to carry out the lesion confidence priori estimation of the pixel point, the weights of the neighborhood pixel points are all set as 1 / 8 (the weight can also be adjusted according to the actual situation, for example, the weight of the pixel point with a short distance is higher), and the lesion confidence probability corresponding to the pixel point is , for example, if the similarity degrees of the eight neighborhood pixel points are 0.8, 0.7, 0.6, 0.9, 0.75, 0.85, 0.7 and 0.8 respectively, the lesion confidence probability of the pixel point is =1 / 8 (0.8+0.7+0.6+0.9+0.75+0.85+0.7+0.8)=0.775, all the pixel points in the clinical lesion region segmentation fusion image are calculated by the weighted average, and finally the lesion confidence probabilities corresponding to the pixel points in the segmentation image are obtained, the probability values can reflect the possibility of each pixel point belonging to the lesion region, and provide more accurate basis for subsequent medical diagnosis and analysis.

[0119] Further, the automatic determination of the lesion probability segmentation threshold by maximizing the inter-class variance of the gray scale corresponding to the segmentation image through the clinical lesion region segmentation fusion image comprises:

[0120] the corresponding gray scale range is obtained through the clinical lesion region segmentation fusion image , the pixel number corresponding to each gray scale is calculated , and the total pixel number corresponding to the whole image is calculated.

[0121] In the embodiment of the application, taking a clinical lesion region segmentation fusion image with a size of 256x256 pixels as an example, the image is an 8-bit gray scale image, the gray scale range is 0 to 255, each pixel point of the whole image is traversed, a length-256 array is created to record the pixel number corresponding to each gray scale, when a pixel point with a coordinate of is scanned, the gray scale value g (0≤g≤255) of the pixel point is obtained, the element value with an index of g in the array is added by 1, and the pixel number of each gray scale is counted in this way, for example, if the gray scale value of the pixel point is 50, the value of the 50th element in the array is added by 1, after all the pixel points are scanned, the pixel number corresponding to each gray scale is obtained, denoted as ( =0, 1,..., 255), and the total pixel number corresponding to the whole image can be calculated by the formula , 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.

[0122] Preferably, 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 ;

[0123] In this embodiment of the invention, the number of pixels corresponding to each gray level is determined based on the previously obtained number of pixels. and the total number of pixels in the entire image. Calculate the probability of pixel occurrence for each gray level. The calculation formula is: ( =0, 1, ..., 255), for example, if gray level 30 corresponds to the number of pixels =1000, total number of pixels =65536, then the probability of a pixel with gray level 30 appearing is... =1000 / 65536≈0.0153. This formula is used to calculate the probability sequence of pixel occurrence for each gray level in the gray level range of 0 to 255. These probability values ​​reflect the likelihood of each gray level appearing in the image, providing an important basis for subsequent analysis of image gray level distribution characteristics and determination of segmentation threshold.

[0124] Preferably, 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. ;

[0125] In this embodiment of the invention, the pixel occurrence probability of each gray level is determined based on the previously obtained probability. Calculate the corresponding cumulative probability and cumulative mean (in It is between 0 and Integers between, that is =0, 1, ..., 255), and simultaneously calculate the mean of the entire image, where the cumulative probability is calculated using the formula: It indicates that the gray level is less than or equal to The sum of the probabilities of pixels appearing, for example, when When =50, This means summing the probabilities of occurrence of pixels with gray levels from 0 to 50 sequentially, and the formula for calculating the cumulative average is: It reflects that the gray level is less than or equal to The average grayscale value of the pixels, for example, calculating the average grayscale value of the pixels. First calculate the molecule. Divide by Obtain the cumulative mean, and also the mean of the entire image. Through formula The calculation involves summing the products of the probability of each gray level and its corresponding pixel. Through this calculation, the cumulative probability, cumulative mean, and mean of the entire image at different gray levels are obtained. These parameters will be used for subsequent inter-class variance calculation to determine a suitable segmentation threshold.

[0126] Preferably, 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.

[0127] In this embodiment of the invention, the mean of the entire image obtained previously is used. Cumulative probability and cumulative average ( =0, 1, ..., 255), calculate the between-class variance. The formula for calculating the between-class variance is: , in turn Calculations were performed from 0 to 255 to obtain a set of inter-class variance values. , , ⋯ And by comparing these inter-class variance values, the maximum value is found, and the maximum value corresponds to... Value and The ratio between them is the lesion probability segmentation threshold. For example, if If 80 / 255 is the maximum value in this set, then it is the lesion probability segmentation threshold corresponding to the clinical lesion region segmentation fusion map. This threshold can be used to segment the image into different regions to assist in medical diagnosis and distinguish lesion regions from normal tissue regions.

[0128] Furthermore, the lesion boundary smoothing module includes the following functions:

[0129] The corresponding clinical imaging lesion segmentation boundary line is obtained by segmenting and correcting the clinical lesion region.

[0130] 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.

[0131] 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.

[0132] 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.

[0133] 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.

[0134] 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 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 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 found by solving this minimization problem, and then the discontinuities at the boundary breakpoints are replaced by this quadratic polynomial, thus smoothing the boundary breakpoints. 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.

[0135] Further, the boundary breakpoint smoothing processing of the corresponding lesion segmentation boundary in the clinical lesion region polygon optimization graph includes:

[0136] The corresponding lesion segmentation boundary breakpoint domain is obtained by processing the corresponding lesion segmentation boundary in the clinical lesion region polygon optimization graph.

[0137] 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 continuous pixel point sequence 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.

[0138] Preferably, the corresponding left and right half-neighborhood boundary trend slopes around the lesion segmentation boundary breakpoint are obtained by setting the 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.

[0139] In the embodiment of the present application, the lesion boundary breakpoint neighborhood range is set, assuming that the range is 5 pixels on the left and right of the breakpoint. For each breakpoint in the lesion segmentation boundary breakpoint domain, the segmentation boundary trend slopes of the left and right half-neighborhoods around the breakpoint are calculated. Taking a certain breakpoint P as an example, the left half-neighborhood is the range of 5 pixels to the left of P, and the right half-neighborhood is the range of 5 pixels to the right of P. For the left half-neighborhood, the slopes between adjacent pixel points are calculated. Assuming that the pixel point coordinates in the left half-neighborhood are , 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 corresponding left and right half-neighbor boundary trend slopes around the lesion segmentation boundary break point are finally obtained.

[0140] Preferably, the break point domain on the corresponding lesion segmentation boundary in the clinical lesion region edge shape optimization graph is subjected to boundary break fitting smoothing processing based on the corresponding left and right half-neighbor boundary trend slopes around the lesion segmentation boundary break point, to generate a clinical lesion edge shape segmentation optimization result.

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

[0142] The above description is merely 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 system comprises the following modules: An MRI image processing module is configured to acquire a set of patient clinical MRI images including T1-weighted, T2-weighted and enhanced sequence scans by an MRI device, and perform image position alignment and grayscale adjustment processing on the set of patient clinical MRI images to generate a set of clinical MRI grayscale standard images; wherein the image position alignment and grayscale adjustment processing on the set of patient clinical MRI images comprises: performing image spatial feature analysis on each clinical MRI sub-image in the set of patient clinical MRI images to extract a spatial feature matrix corresponding to each clinical MRI sub-image, which includes the spatial coordinates, grayscale value distribution and local region corresponding edge, angle and texture geometry information of each pixel point in the image; performing image deformation error analysis between each clinical MRI sub-image in the set of patient clinical MRI images based on the spatial feature matrix corresponding to each clinical MRI sub-image to obtain the corresponding image relative displacement error between each clinical MRI sub-image during image acquisition; acquiring high-contrast spatial position points and low-contrast spatial position points corresponding to each clinical MRI sub-image from the set of patient clinical MRI images, and performing spatial weighted average calibration according to the high-contrast spatial position points and low-contrast spatial position points corresponding to each clinical MRI sub-image to generate a clinical image spatial calibration position template; performing image position alignment and registration on each clinical MRI sub-image in the set of patient clinical MRI images based on the clinical image spatial calibration position template and in combination with the image relative displacement error between each clinical MRI sub-image during image acquisition to obtain a set of clinical MRI alignment and registration images; performing grayscale adjustment processing on the set of clinical MRI alignment and registration images to generate a set of clinical MRI grayscale standard images; wherein the grayscale adjustment processing on the set of clinical MRI alignment and registration images comprises: acquiring pixel grayscale distribution values corresponding to each pixel point in each clinical registration sub-image from the set of clinical MRI alignment and registration images; constructing a clinical image grayscale harmony standard template, which includes the grayscale value distribution range of pathological or normal tissue in the ideal state in the clinical reference image; performing grayscale distribution deviation accounting between the pixel grayscale distribution values corresponding to each pixel point in each clinical registration sub-image based on the clinical image grayscale harmony standard template to obtain the pixel grayscale distribution deviation corresponding to each clinical registration sub-image; performing polynomial curve fitting adjustment on the pixel grayscale distribution values corresponding to each pixel point in each clinical registration sub-image based on the pixel grayscale distribution deviation corresponding to each clinical registration sub-image and in combination with a nonlinear fitting method to generate a set of clinical MRI grayscale standard images; The lesion auxiliary segmentation module is configured to design a multi-level convolution module by using 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 a clinical 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; and the multi-level convolution module is designed by using a convolutional neural network as a core framework to design a multi-level convolution module with different sizes of convolution kernels, including small convolution kernels 3x3 or 5x5 and large convolution kernels 15x15 or 21x21, wherein the small convolution kernels are used to extract low-level feature maps of clinical sub-images, including micro edges, textures and structural changes, and the large convolution kernels are used to extract high-level feature maps of clinical sub-images, including shapes and sizes of lesion regions. The probability segmentation correction module is configured to obtain lesion confidence probabilities of each pixel point in the segmentation image based on the clinical lesion region segmentation fusion image, and correct the probability segmentation boundary of the clinical lesion region segmentation fusion image based on the lesion confidence probabilities of each pixel point in the segmentation image to obtain a clinical lesion region segmentation correction result image. 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.

2. The clinical lesion assisted segmentation system based on magnetic resonance image according to claim 1, wherein, The MRI image processing module includes the following functions: Obtain clinical magnetic resonance sub-images scanned by a T1 weighted sequence through an MRI device; Obtain clinical magnetic resonance sub-images scanned by a T2 weighted sequence through an MRI device; Obtain clinical magnetic resonance sub-images scanned by an enhanced sequence through an MRI device; Merge the clinical magnetic resonance sub-images scanned by the T1 weighted sequence, the T2 weighted sequence and the enhanced sequence 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.

3. The clinical lesion assisted segmentation system based on magnetic resonance images of claim 1, wherein, The lesion auxiliary segmentation module further includes the following functions: The U-Net basic network architecture is formed by combining the corresponding multi-level convolution module with the network architecture of the encoder-decoder corresponding network structure, so that the extraction capability of the large convolution kernel for the deep features in the clinical sub-image is enhanced by using the residual convolution block 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 feature fusion of different levels of feature maps through the skip connection feature, and the context feature information of different levels is obtained through the global average pooling and the global maximum pooling to output the corresponding lesion feature segmentation fusion image, thereby constructing the corresponding clinical image lesion segmentation model; The clinical magnetic resonance grayscale 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 image.

4. 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 clinical lesion region segmentation fusion image is used to obtain the lesion confidence probability corresponding to each pixel point in the segmentation image; The clinical lesion region segmentation fusion image is used to calculate the maximum of the inter-class variance of the gray scale corresponding to the segmentation image to automatically determine the lesion probability segmentation threshold; The lesion confidence probability corresponding to each pixel point in the segmentation image is segmented into a lesion binary image according to the lesion probability segmentation threshold, and the segmentation boundary of the lesion binary image is further corrected and optimized by combining a region growing algorithm, to obtain a clinical lesion region segmentation correction result image.

5. The clinical lesion assisted segmentation system based on magnetic resonance images of claim 4, wherein, The clinical lesion region segmentation fusion image is used to obtain the lesion confidence probability corresponding to each pixel point in the segmentation image. The clinical lesion region segmentation fusion image is used to obtain the relative position of each pixel point in the segmentation image in the lesion region and the lesion geometric shape, to obtain a clinical lesion feature matrix corresponding to each pixel point in the segmentation image. The feature similarity between the clinical lesion feature matrices corresponding to each pixel point in the segmentation image is measured, to obtain the lesion feature similarity between each pixel point and the surrounding neighborhood pixel points in the segmentation image. The lesion confidence priori of each pixel point in the clinical lesion region segmentation fusion image is estimated based on the lesion feature similarity 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.

6. The clinical lesion assisted segmentation system based on magnetic resonance images of claim 4, wherein, The clinical lesion region segmentation fusion image is used to calculate the maximum of the inter-class variance of the gray scale corresponding to the segmentation image to automatically determine the lesion probability segmentation threshold. The corresponding gray scale range is obtained by fusing the clinical lesion area segmentation map , and the number of pixels corresponding to each gray scale is calculated , and the total number of pixels corresponding to 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.

7. The clinical lesion assisted segmentation system based on magnetic resonance images of claim 1, wherein, The clinical lesion region segmentation fusion image is used to obtain the lesion confidence probability corresponding to each pixel point in the segmentation image. The clinical lesion region segmentation fusion image is used to obtain the relative position of each pixel point in the segmentation image in the lesion region and the lesion geometric shape, to obtain a clinical lesion feature matrix corresponding to each pixel point in the segmentation image. The feature similarity between the clinical lesion feature matrices corresponding to each pixel point in the segmentation image is measured, to obtain the lesion feature similarity between each pixel point and the surrounding neighborhood pixel points in the segmentation image. The lesion confidence priori of each pixel point in the clinical lesion region segmentation fusion image is estimated based on the lesion feature similarity 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 7, wherein, The clinical lesion region segmentation fusion image is used to obtain the lesion confidence probability corresponding to each pixel point in the segmentation image. The clinical lesion region segmentation fusion image is used to obtain the relative position of each pixel point in the segmentation image in the lesion region and the lesion geometric shape, to obtain a clinical lesion feature matrix corresponding to each pixel point in the segmentation image. The feature similarity between the clinical lesion feature matrices corresponding to each pixel point in the segmentation image is measured, to obtain the lesion feature similarity between each pixel point and the surrounding neighborhood pixel points in the segmentation image. The lesion confidence priori of each pixel point in the clinical lesion region segmentation fusion image is estimated based on the lesion feature similarity 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. The clinical lesion region segmentation fusion image is used to obtain the lesion confidence probability corresponding to each pixel point in the segmentation image. The clinical lesion region segmentation fusion image is used to obtain the relative position of each pixel point in the segmentation image in the lesion region and the lesion geometric shape, to obtain a clinical lesion feature matrix corresponding to each pixel point in the segmentation image. The feature similarity between the clinical lesion feature matrices corresponding to each pixel point in the segmentation image is measured, to obtain the lesion feature similarity between each pixel point and the surrounding neighborhood pixel points in the segmentation image. The lesion confidence priori of each pixel point in the clinical lesion region segmentation fusion image is estimated based on the lesion feature similarity 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. The clinical lesion region segmentation fusion image is used to obtain the lesion confidence probability corresponding to each pixel point in the segmentation image. The clinical lesion region segmentation fusion image is used to obtain the relative position of each pixel point in the segmentation image in the lesion region and the lesion geometric shape, to obtain a clinical lesion feature matrix corresponding to each pixel point in the segmentation image. The feature similarity between the clinical lesion feature matrices corresponding to each pixel point in the segmentation image is measured, to obtain the lesion feature similarity between each pixel point and the surrounding neighborhood pixel points in the segmentation image. The lesion confidence priori of each pixel point in the clinical lesion region segmentation fusion image is estimated based on the lesion feature similarity 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. The clinical lesion region segmentation fusion image is used to obtain the lesion confidence probability corresponding to each pixel point in the segmentation image. The clinical lesion region segmentation fusion image is used to obtain the relative position of each pixel point in the segmentation image in the lesion region and the lesion geometric shape, to obtain a clinical lesion feature matrix corresponding to each pixel point in the segmentation image. The feature similarity between the clinical lesion feature matrices corresponding to each pixel point in the segmentation image is measured, to obtain the lesion feature similarity between each pixel point and the surrounding neighborhood pixel points in the segmentation image. The lesion confidence priori of each pixel point in the clinical lesion region segmentation fusion image is estimated based on the lesion feature similarity 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. Based on the corresponding left and right half-neighbor boundary trend slope around the lesion segmentation boundary breaking point, the boundary breaking fitting smoothing processing is performed on the breaking point domain on the corresponding lesion segmentation boundary in the edge shape optimization graph of the clinical lesion region, to generate the clinical lesion edge shape segmentation optimization result.

Citation Information

Patent Citations

  • Visual and sensitive intelligent surgical navigation system

    CN116570369A

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

    CN119251192A