Intelligent segmentation and feature analysis method for medical image
Through technical means such as U-Net structure, Sobel operator, self-organizing map, TPS transformation, DenseNet-201 model and whale optimization algorithm, the problems of multimodal fusion, edge optimization and non-rigid registration in medical image segmentation and feature extraction are solved, and efficient and accurate lesion segmentation and feature analysis are achieved.
Patent Information
- Application Number
- CN202510910529.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-02
- Publication Date
- 2025-10-17
AI Technical Summary
Existing medical image segmentation technology has problems such as difficulty in fusion, low feature extraction efficiency, insufficient accuracy and slow non-rigid registration when processing multimodal images. It is especially difficult to achieve high-precision segmentation and feature extraction under complex lesion morphology.
The U-Net structure is used for medical image segmentation, combined with the Sobel operator for edge detection and morphological operations, feature point matching based on self-organizing map and TPS transformation for non-rigid registration, the DenseNet-201 model is used to introduce the channel attention module for feature extraction, and the whale optimization algorithm is used to select the optimal feature subset. Finally, the genetic algorithm is used to optimize the adaptive neural fuzzy inference system for disease analysis.
It achieves high-precision lesion area segmentation, non-rigid registration and feature extraction, improves the efficiency and accuracy of image processing, reduces computational complexity, and enhances the accuracy and reliability of disease analysis.
Smart Images

Figure CN120807438A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image analysis, in particular to an intelligent segmentation and feature analysis method of medical images. BACKGROUND
[0002] Medical image analysis technology, especially in image segmentation and feature extraction, has made significant progress in recent years, especially under the introduction of deep learning methods, has been widely used, with the continuous progress of computer vision technology, medical image segmentation method has developed from the traditional manual segmentation method to the method based on convolutional neural network (CNN).
[0003] However, although the existing medical image segmentation technology has achieved certain results, it still faces difficulties such as processing multi-modal images, low feature extraction efficiency, and precision problems under complex lesion morphology, traditional segmentation methods are often sensitive to noise and irregularities of input images, resulting in fuzzy lesion boundaries, especially in low-contrast or complex background images, in addition, the existing multi-modal medical image registration technology, although it can realize the spatial alignment of images through the feature point-based method, still has the problems of insufficient registration accuracy and slow registration speed, especially in the non-rigid registration of lesion area, traditional methods often cannot effectively handle the deformation problem caused by lesions or morphological differences, therefore, how to improve the segmentation accuracy, optimize image registration, and effectively extract the lesion features in the image, is still a challenge in the field of medical image processing. SUMMARY
[0004] In view of the above existing problems, the present application is proposed.
[0005] Therefore, the present application provides an intelligent segmentation and feature analysis method of medical images, which solves the problems of low efficiency and accuracy of multi-modal image fusion, edge optimization, non-rigid registration, and feature selection and analysis in traditional medical image segmentation and feature analysis.
[0006] To solve the above technical problems, the present application provides the following technical scheme:
[0007] In a first aspect, the present application provides an intelligent segmentation and feature analysis method of medical images, which comprises,
[0008] reading multi-modal medical images for preprocessing and size standardization;
[0009] segmenting medical images based on U-Net structure, using Sobel operator for edge detection combined with morphological operation to optimize the edges of the segmented image to obtain edge-optimized lesion segmentation map;
[0010] Feature point matching is performed on the multi-modal lesion segmentation image based on self-organizing mapping, and non-rigid registration is performed on the matched feature points through TPS transformation;
[0011] A foreground region enhancement operation is performed on the registered image, a channel attention module is introduced based on a DenseNet-201 model to extract features from the registered image, and a whale optimization algorithm is used to optimize the features to generate an optimal feature subset;
[0012] An adaptive neuro-fuzzy inference system based on a genetic algorithm is used to analyze the features of the disease.
[0013] As a preferred scheme of the medical image intelligent segmentation and feature analysis method, the reading of the medical image for preprocessing and size standardization includes,
[0014] The input multi-modal medical image is converted into a grayscale image, and the grayscale values in the grayscale image are standardized;
[0015] A Gaussian smoothing filter is used to remove noise in the grayscale image;
[0016] A bilinear interpolation algorithm is used to scale the image to a standard size after removing noise, and a standardized medical image is obtained;
[0017] The multi-modal medical image refers to two different types of medical images, CT and MRI, collected from the same patient.
[0018] As a preferred scheme of the medical image intelligent segmentation and feature analysis method, the medical image segmentation based on the U-Net structure uses a Sobel operator for edge detection combined with morphological operations to optimize the edges of the segmented image to obtain an edge-optimized lesion segmentation image, including,
[0019] An intelligent segmentation model is constructed based on the U-Net structure, which includes an encoder part, a decoder part, and a final output layer;
[0020] The model is trained using a training set and gradient descent method to update the parameters of the model, and the model is output after training is completed;
[0021] The intelligent segmentation model is input into the standardized medical image to obtain a probability distribution map of each pixel belonging to the lesion region;
[0022] The probability of each pixel belonging to the lesion region in the probability distribution map is compared with the segmentation threshold based on the historical average value to determine the lesion region, the pixel values of the probability distribution map are segmented based on the lesion region, and the lesion region is labeled to obtain a binary segmentation image;
[0023] Based on the binary segmentation image, a Sobel operator is used to calculate a gradient to obtain edge information of the binary segmentation image;
[0024] Based on the edge information, a non-maximum suppression and a double threshold method are used to further refine the boundary of the binary segmentation image to obtain a boundary enhanced segmentation image;
[0025] Based on the boundary enhanced segmentation image, a morphological opening operation is used to smooth the segmentation boundary, and a morphological closing operation is used to repair the boundary cracks to obtain a final segmentation image.
[0026] As a preferred scheme of the medical image intelligent segmentation and feature analysis method, wherein: the self-organizing map is used for feature point matching of the multi-modal lesion segmentation image, and non-rigid registration is performed on the matched feature points through TPS transformation, including,
[0027] After reading CT and MRI two different types of medical images for segmentation processing, they are marked as S1 and S2 respectively, S1 represents a segmentation image that needs to be registered to S2;
[0028] The SIFT algorithm is used to extract feature points from S1 and S2, and the extracted feature points are stored as sets S1 and S2 respectively, and each feature point is represented by three-dimensional coordinates;
[0029] The ICP algorithm is used to calculate the best rigid transformation matrix between the feature point sets of S1 and S2, and is applied to all feature points of S1 to update the feature point coordinates of S1, and S1 and S2 are preliminarily aligned;
[0030] A SOM grid is initialized, each neuron in the grid represents a mapping position of a feature point, and the initial weight vector of each neuron of the SOM is set to the three-dimensional coordinates of the corresponding feature point in S1;
[0031] The feature point coordinates of S2 are used as input to train the SOM, and the weights of the SOM neurons are iteratively updated through a competitive learning mechanism during the training process, and the optimal learning rate and decay strategy are selected through cross-validation, and the iteration is stopped when the weight transformation amplitude of the neurons no longer obviously decreases;
[0032] Through the topological structure of the SOM, the corresponding feature points in S2 are found for each feature point in S1;
[0033] Based on the corresponding point relationship between S1 and S2, a TPS transformation is used to calculate the deformation field of S1 to S2;
[0034] Based on the calculated deformation field, S1 is deformed to the space of S2 through bilinear interpolation to obtain a registered S1 image, and a fusion registration image is obtained by weighted averaging based on the registered S1 image and the S2 image.
[0035] As a preferred scheme of the medical image intelligent segmentation and feature analysis method, wherein: the foreground region enhancement operation on the registered image comprises,
[0036] The lesion region part of the fusion registration map is enhanced in contrast by using histogram equalization;
[0037] The background part of the fusion registration map is processed by Gaussian blur to reduce the details of the background region.
[0038] As a preferred scheme of the medical image intelligent segmentation and feature analysis method, wherein: the channel attention module is introduced based on the DenseNet-201 model to extract features from the registration map, and the whale optimization algorithm is used to optimize the features to generate an optimal feature subset, which comprises,
[0039] A pre-trained DenseNet-201 model is used and the full connection layer is removed, a channel attention module is added after each convolution layer inside each dense block of the DenseNet-201 model, and the channel attention weight is calculated based on the channel attention module to enhance the feature map output by the convolution layer;
[0040] The channel attention weight is calculated by performing global average pooling on the feature map F output by the convolution layer to generate F avg , and calculating the channel attention weight A by using a 1x1 convolution layer on F avg .
[0041] The feature map output by the convolution layer is enhanced by using the channel attention weight A to perform element-wise multiplication on the feature map F output by the convolution layer;
[0042] The fusion registration map after the lesion region is enhanced is processed according to the standard input format requirement of the DenseNet-201 model;
[0043] The DenseNet-201 model with the added channel attention module is trained using a local training set that meets the input standard of the DenseNet-201 model, a cross-entropy loss function is selected to calculate the difference between the features extracted by the model and the real features, an Adam optimizer is used for gradient descent optimization, the parameters of the model are fine-tuned, and the iteration is stopped when the loss of the model no longer obviously decreases in the continuous iteration process and the model is output;
[0044] The fusion registration map that meets the input standard of the DenseNet-201 model is input into the fine-tuned DenseNet-201 model, semantic information, spatial information and multi-scale features of the image are extracted through a series of convolution layers, pooling layers and feature dense connections, and a final feature vector F f∈C, C is the number of channels of the feature vector output by the DenseNet-201 model, and each channel represents a feature;
[0045] According to the number of channels C of the feature vector, a suitable whale population size N is selected, and a binary vector with a length of C is randomly generated for each whale to represent the selection of the features;
[0046] A matrix X with a size of NxC is created to store the positions of all whales;
[0047] Each element x ij in the matrix X is randomly assigned a value of 0 or 1;
[0048] The selected feature subset of each whale is input into the pre-trained classification model, and the accuracy of the feature subset is evaluated by cross-validation method, and the fitness of each individual is calculated according to the accuracy of the feature subset and the number of selected features in the feature subset;
[0049] The position of the whale with the highest fitness among all whales is the current optimal solution;
[0050] The distance D i between the position of each whale i and the position of the current optimal solution is calculated for each whale i;
[0051] For each whale i, a random coefficient E is randomly generated in the range of [-2, 2], and the position of the whale is updated according to the size of E;
[0052] When |E|<1, the whale approaches the optimal solution through the spiral update formula;
[0053] When |E|≥1, the whale performs random search;
[0054] After updating the position, the fitness of each whale is recalculated and compared with the previous fitness, if the fitness of the new position is higher, the new position is accepted, otherwise, the original position is maintained;
[0055] In each iteration, the fitness of each whale is calculated, if the fitness of a whale is better than the current optimal solution, it is set as the new optimal solution, when the optimal solution no longer improves significantly, the iteration is stopped, and the current optimal solution is output as the optimal feature subset.
[0056] As a preferred scheme of the medical image intelligent segmentation and feature analysis method, wherein: the adaptive neural fuzzy reasoning system based on genetic algorithm optimization analyzes the disease condition of the feature subset, including,
[0057] The adaptive neural fuzzy reasoning model includes an input layer, a fuzzy layer, a rule layer, a de-fuzzy layer, and an output layer;
[0058] The adaptive neuro-fuzzy inference model is trained using the training set and the gradient descent method, and model parameters output after training are used to update the adaptive neuro-fuzzy inference model;
[0059] The number of rules and the parameters of the membership function of the adaptive neuro-fuzzy inference model are encoded as chromosomes of the genetic algorithm, the DEAP library is used to initialize the genetic algorithm, the mean square error is used as the fitness function, an initial population is generated, each individual in the population represents a set of possible rule and parameter solutions, and selection, crossover and mutation operations are defined;
[0060] The genetic algorithm is run, optimization is stopped when the fitness no longer changes significantly, and the final solution is output to optimize the adaptive neuro-fuzzy inference model, and the final disease analysis result is output according to the new optimal feature subset after optimization.
[0061] In a second aspect, the present application provides an intelligent segmentation and feature analysis system for medical images, comprising,
[0062] An image standardization module is configured to read a medical image, convert it into a grayscale image, perform standardization processing, remove noise using a Gaussian smoothing filter, and finally scale the image to a standard size using bilinear interpolation;
[0063] A medical image segmentation module is configured to segment a medical image, optimize the edges of the segmented image through a Sobel operator and morphological operations, and obtain an edge-enhanced lesion segmentation image;
[0064] A multi-modal image registration module is configured to perform feature point matching on multi-modal lesion segmentation images, and perform non-rigid registration based on the matched feature points through TPS transformation;
[0065] A feature extraction and optimization module is configured to extract features from the registered images, and optimize the features using a whale optimization algorithm to generate an optimal feature subset;
[0066] A disease analysis module is configured to analyze the optimal feature subset to generate a final disease diagnosis result.
[0067] In a third aspect, the present application provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and wherein the computer program, when executed by the processor, implements any step of the intelligent segmentation and feature analysis method for medical images according to the first aspect of the present application.
[0068] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements any step of the intelligent segmentation and feature analysis method for medical images according to the first aspect of the present application.
[0069] The application has the beneficial effects that: through the cooperation of the encoder and decoder parts in the U-Net structure, efficient and accurate segmentation of the lesion area is realized, after edge detection by the Sobel operator, the edge is further optimized through morphological operation, avoiding the problem of edge blur in the traditional segmentation method, through the competitive learning mechanism of self-organizing mapping (SOM), the corresponding feature points in different modal images are accurately found, and then high-precision non-rigid registration is realized through TPS transformation, by adding a channel attention module to DenseNet-201, the efficiency and accuracy of feature extraction are further improved, by simulating the search behavior of whales through whale optimization algorithm, the most diagnostic features can be efficiently selected from a large number of candidate features, the accuracy of feature selection is improved, and the computational complexity is also reduced, by optimizing the adaptive neuro-fuzzy inference system (ANFIS) through genetic algorithm, more accurate reasoning analysis of the disease is realized. BRIEF DESCRIPTION OF DRAWINGS
[0070] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0071] Figure 1 Flow chart of the intelligent segmentation and feature analysis method of medical images in embodiment 1.
[0072] Figure 2 Structure diagram of the intelligent segmentation and feature analysis system of medical images in embodiment 1. DETAILED DESCRIPTION
[0073] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the specific embodiments of the present application will be described in detail below with reference to the drawings of the specification.
[0074] In the following description, many specific details are set forth in order to provide a thorough understanding of the present application, but the present application can also be implemented in other ways different from those described herein, and those skilled in the art can make similar generalizations without departing from the connotation of the present application, therefore the present application is not limited to the specific embodiments disclosed below.
[0075] Secondly, the "one embodiment" or "embodiment" referred to herein means that the specific features, structures or characteristics can be included in at least one implementation of the present application. "In one embodiment" appearing in different places in the specification does not mean the same embodiment, nor is it an independent or alternative embodiment that excludes other embodiments.
[0076] Example 1, with reference to Figure 1 and Figure 2 , which is the first embodiment of the present invention, provides a method for intelligent segmentation and feature analysis of medical images, comprising the following steps:
[0077] S1. Read multimodal medical images for preprocessing and size standardization;
[0078] Specifically, the input multimodal medical image is read and converted into a grayscale image, and the grayscale value in the grayscale image is standardized;
[0079] Use Gaussian smoothing filter to remove noise from grayscale images;
[0080] The image after noise removal is scaled to a standard size using a bilinear interpolation algorithm to obtain a standardized medical image;
[0081] The multimodal medical images refer to two different types of medical images, CT and MRI, collected from the same patient.
[0082] By converting medical images into grayscale images and standardizing their grayscale values, the brightness and contrast differences in the original images are reduced, and unified processing of medical images from different sources is achieved, ensuring the consistency of the images in subsequent analysis. After using a Gaussian smoothing filter to remove noise, the stray noise in the image is effectively suppressed, making the image clearer, thereby improving the accuracy of subsequent segmentation and analysis. In addition, the image is adjusted to a unified standard size through a bilinear interpolation algorithm, ensuring that the subsequent processing flow is not affected by differences in the input image size, avoiding possible geometric distortion and information loss, and ultimately unifying the image quality and size, improving compatibility under different image sources, reducing the impact of noise on subsequent analysis, enhancing the clarity of the image data, and providing a reliable data foundation for subsequent segmentation and feature extraction.
[0083] S2. Perform medical image segmentation based on the U-Net structure, use the Sobel operator for edge detection and combine morphological operations to optimize the edges of the segmented image to obtain an edge-optimized lesion segmentation map;
[0084] Specifically, an intelligent segmentation model is constructed based on the U-Net structure, which includes an encoder part, a decoder part, and a final output layer;
[0085] The encoder part consists of a convolutional layer and a maximum pooling layer. The ReLU activation function is applied after the convolutional layer, and the maximum pooling layer compresses the feature map size.
[0086] The encoder part is composed of an up-sampling layer, a convolution layer and a jump connection, the up-sampling layer restores the size of the feature map extracted by the encoder through the up-sampling operation, the convolution layer applies convolution operation on the feature map after up-sampling to generate a new feature representation, and the jump connection extracts the feature map from the corresponding layer of the encoder and splices it with the up-sampled feature map in the decoder;
[0087] The final output layer applies a 1x1 convolution to the feature map output by the decoder to generate the final segmentation result
[0088] The model is trained using the training set, and the cross-entropy loss function is selected to calculate the difference between the model segmentation result and the actual label, the Adam optimizer is used for gradient descent optimization, the parameters of the model are updated, and the iteration is stopped when the loss no longer decreases obviously, and the model is output;
[0089] Based on the intelligent segmentation model, the standardized medical image is input to obtain a probability distribution map of each pixel belonging to the lesion area;
[0090] Based on the historical average value as the segmentation threshold, the probability of each pixel belonging to the lesion area in the probability distribution map is compared with the segmentation threshold to determine the lesion area, the pixel value of the probability distribution map is segmented based on the lesion area, and the lesion area is labeled to obtain a binary segmentation image;
[0091] Based on the binary segmentation image, the Sobel operator is used to calculate the gradient to obtain the edge information of the binary segmentation image;
[0092] Based on the edge information, the binary segmentation image boundary is further refined by non-maximum suppression and double threshold method to obtain a boundary enhanced segmentation image;
[0093] Based on the boundary enhanced segmentation image, the segmentation boundary is smoothed by morphological opening operation, and the boundary crack is repaired by morphological closing operation to obtain the final segmentation image.
[0094] The application of U-Net structure in medical image segmentation can effectively extract semantic information in the image and generate high-resolution segmentation map through the cooperation of encoder and decoder parts, realizing efficient and accurate segmentation of lesion area, especially suitable for complex medical images. After edge detection by Sobel operator, the edge is further optimized by morphological operation, making the boundary of the segmentation result clearer, avoiding the problem of fuzzy edge in traditional segmentation method, improving the recognizability of the lesion, especially in the segmentation of lesion area, the optimized edge can accurately outline the contour of the lesion part, avoiding the omission and misdiagnosis problems that may occur in traditional methods.
[0095] S3, matching feature points of multimodal lesion segmentation images based on self-organizing maps, and performing non-rigid registration based on the matched feature points through TPS transformation;
[0096] Specifically, after reading two different categories of medical images, CT and MRI, and performing segmentation processing, they are marked as S1 and S2 respectively, where S1 represents the segmented image that needs to be registered to S2;
[0097] Use the SIFT algorithm to extract feature points from S1 and S2, and store the extracted feature points as sets S1 and S2 respectively. Each feature point is represented by a three-dimensional coordinate;
[0098] Use the ICP algorithm to calculate the optimal rigid transformation matrix between the feature point sets of S1 and S2, and apply it to all feature points of S1, update the feature point coordinates of S1, and perform a preliminary alignment of S1 and S2;
[0099] Initialize a SOM grid, where each neuron represents the mapping position of a feature point, and set the initial weight vector of each neuron of the SOM to the three-dimensional coordinates of the corresponding feature point in S1;
[0100] Use the feature point coordinates of S2 as input to train the SOM. During the training process, the weights of the SOM neurons are iteratively updated through a competitive learning mechanism. The optimal learning rate and decay strategy are selected through cross-validation. The iteration is stopped when the neuron weight transformation amplitude no longer decreases significantly.
[0101] Through the topological structure of SOM, find the corresponding feature point in S2 for each feature point in S1;
[0102] Based on the corresponding point relationship between S1 and S2, the deformation field from S1 to S2 is calculated by TPS transformation, which is expressed as:
[0103]
[0104] Among them, f(S1) represents the deformation field function of each feature point in S1, a1, a2, a3 represent the affine transformation parameters, and w i Represents the weight coefficient of each feature point, n represents the total number of feature points in S1, p i represents the coordinates of the i-th feature point in S1, q i Indicates that S2 and p i The corresponding feature point coordinates, x represents p i The horizontal axis, y represents p i The vertical coordinate, U(p i -q i ) represents the thin plate spline basis function, p i -q i Represents the feature point p i to qi the distance between the two images;
[0105] The mean square error is selected as the error measurement objective function, and the target is to minimize the difference between the S1 image and the S2 image;
[0106] The parameters in the deformation field formula are updated by minimizing the objective function by the gradient descent method, and when the value of the objective function no longer obviously decreases, the iteration is stopped, the optimized parameters in the deformation field formula are output, and the final deformation field is calculated;
[0107] Based on the calculated deformation field, S1 is deformed to the space of S2 by bilinear interpolation to obtain the registered S1 image, and based on the registered S1 image and S2 image, the fusion is performed by weighted average to obtain the fusion registration image.
[0108] The self-organizing mapping (SOM) is used for feature point matching of multi-modal medical images, which can effectively capture the topological relationship between images, and then realize high-precision non-rigid registration through TPS (Thin-Plate Spline) transformation, which is particularly suitable for processing registration problems of different modalities (CT and MRI images). This collaborative optimization cannot be achieved by a single technology, especially in complex lesion areas, the combination of self-organizing mapping and TPS transformation can significantly reduce the error of non-rigid registration, and the combination of rigid registration and non-rigid registration greatly improves the stability of registration, avoiding the global instability problem that may be caused by simply relying on non-rigid registration. This combination method can adaptively process non-rigid deformation in complex images, especially when registering at different angles and different modalities, it can not only avoid the error caused by traditional rigid registration methods, but also reduce the computational complexity of non-rigid registration, significantly improving the accuracy and reliability of registration.
[0109] S4, performing a foreground region enhancement operation on the registered image, introducing a channel attention module based on a DenseNet-201 model to extract features of the registration image, and using a whale optimization algorithm to optimize the features to generate an optimal feature subset;
[0110] Specifically, the lesion area part of the fusion registration image is enhanced in contrast by histogram equalization;
[0111] The background part of the fusion registration image is processed by Gaussian blur to reduce the details of the background area.
[0112] Further, a DenseNet-201 model pre-trained on an ImageNet dataset is loaded through a PyTorch deep learning framework and a full connection layer is removed, and the DenseNet-201 model after removing the full connection layer includes an initial convolution layer, a dense block, a transition layer, and a pooling layer;
[0113] The channel attention module is added after the convolution layer inside each dense block of the DenseNet-201 model, and the channel attention weight is calculated based on the channel attention module to enhance the feature map of the convolution layer output;
[0114] The calculation of the channel attention weight refers to performing global average pooling on the output feature map F of the convolution layer respectively to generate a global average feature vector F avg The channel attention weight A is calculated by a 1×1 convolution layer on F avg , and is expressed as:
[0115] A=ReLU(Conv(F avg ));
[0116] Wherein, ReLU is an activation function, Conv is a 1×1 convolution layer, and A is a channel attention weight with a size of 1×1×C.
[0117] The enhancement of the feature map of the convolution layer output refers to multiplying the feature map F of the convolution layer output by element-wise multiplication using the channel attention weight A to generate an enhanced feature map F en , and is expressed as:
[0118] F en (i,j,c)=F(i,j,c)⊙A(c);
[0119] Wherein, F(i,j,c) is the value of the output feature map of the convolution layer at position (i,j) and channel c, A(c) is the value of the channel attention weight at channel c, and is element-wise multiplication, and F en (i,j,c) is the value of the enhanced feature map at position (i,j) and channel c.
[0120] The enhanced fusion registration map of the lesion area is processed according to the standard input format requirement of the DenseNet-201 model;
[0121] The DenseNet-201 model added with the channel attention module is trained using the local training set conforming to the input standard of the DenseNet-201 model, and the cross-entropy loss function is selected to calculate the difference between the feature extracted by the model and the real feature, the Adam optimizer is used for gradient descent optimization, the parameters of the model are fine-tuned, and the iteration is stopped when the loss of the model no longer obviously decreases in the continuous iteration process, and the model is output.
[0122] The fusion registration map conforming to the input standard of the DenseNet-201 model is input into the fine-tuned DenseNet-201 model, and the semantic information, spatial information and multi-scale features of the image are extracted through a series of convolution layers, pooling layers and feature dense connection to generate the final feature vector F.f ∈C, C is the number of channels of the feature vector output by the DenseNet-201 model, and each channel represents a feature;
[0123] According to the number of channels C of the feature vector, a suitable whale population size N is selected, and a binary vector with a length of C is randomly generated for each whale to represent the selection state of the feature;
[0124] A matrix X with a size of NxC is created to store the positions of all whales, which is represented as:
[0125]
[0126] where x ij represents the selection state of the jth feature of the ith whale;
[0127] Each element x ij in the matrix X is randomly assigned a value of 0 or 1;
[0128] The selected feature subset of each whale is input into the pre-trained classification model, and the accuracy of the feature subset is evaluated by cross-validation method. The fitness of each individual is calculated according to the accuracy of the feature subset and the number of features selected in the feature subset, which is represented as:
[0129]
[0130] where F i represents the fitness of the feature subset selected by the ith whale, Ac(i) represents the accuracy of the feature subset selected by the ith whale, |i| represents the number of features in the feature subset selected by the ith whale, and λ represents the regularization parameter selected by cross-validation;
[0131] The position of the whale with the highest fitness among all whales is the current optimal solution;
[0132] For each whale i, the distance D i between the position of the current whale i and the position of the current optimal solution is calculated, which is represented as:
[0133] D i = |B·X * -X i |;
[0134] where B is a random coefficient with a value range of [0,2], X * is the position of the current optimal solution, and X i is the position of the ith whale;
[0135] For each whale i, a random coefficient E is randomly generated in the range of [-2,2], and the whale position is updated according to the size of E;
[0136] When |E|<1, the whale approaches the optimal solution through the spiral update formula, which is expressed as:
[0137] X i (t+1)=D i ·e bl ·cos(2πl)+X * ;
[0138] Wherein, X i (t+1) is the updated position of whale i, b is a constant, l is a random number in the range of [-1, 1], D i is the distance between whale i and the current optimal solution X * .
[0139] When |E|≥1, the whale performs random search, which is expressed as:
[0140] X i (t+1)=X rand -E·D i ;
[0141] Wherein, X rand is a randomly selected whale position.
[0142] After updating the position, the fitness of each whale is recalculated and compared with the previous fitness, if the fitness of the new position is higher, the new position is accepted, otherwise, the original position is maintained.
[0143] The fitness of each whale is calculated in each iteration, if the fitness of a whale is better than the current optimal solution, it is set as the new optimal solution, when the optimal solution no longer improves obviously, the iteration is stopped, and the current optimal solution is output as the optimal feature subset.
[0144] The lesion area is enhanced by histogram equalization method, which effectively improves the contrast of the lesion area, makes the boundary of the lesion more obvious, and enhances the recognizability of the lesion area. At the same time, the background part is processed by Gaussian blur, which reduces the interference of irrelevant background information.
[0145] The DenseNet-201 model is removed through the DenseNet-201 model, and the channel attention module is combined, so that the performance of the DenseNet-201 model in the medical image feature extraction task is significantly improved. The channel attention weight dynamically adjusts the importance of each channel in the convolution layer output feature map, and significantly improves the feature extraction effect. The channel attention weight enhances the key features and suppresses the redundant features, and significantly improves the feature discrimination ability and the generalization ability of the model. The model parameters are fine-tuned by using the local medical image training set, the adaptability of the model to the medical image is improved, and the feature extraction efficiency and accuracy are further improved. The whale optimization algorithm simulates the search behavior of whales to optimize the feature vector, which can efficiently select the most diagnostic features from a large number of candidate features, select the optimal feature subset, and improve the efficiency of feature selection. The optimization process of the algorithm not only improves the accuracy of feature selection, but also effectively reduces the influence of redundant features and reduces the complexity of calculation. Through the optimized feature subset, the accuracy of subsequent classification and analysis is improved, so that the disease diagnosis model can provide accurate diagnosis results in a shorter time.
[0146] S5, the adaptive neuro-fuzzy inference system based on the genetic algorithm optimization analyzes the disease condition based on the feature subset;
[0147] Specifically, the adaptive neuro-fuzzy inference model includes an input layer, a fuzzy layer, a rule layer, a de-fuzzy layer, and an output layer. The optimal feature subset is input into the input layer. The fuzzy layer uses a Gaussian membership function to fuzz the input features. The rule layer generates fuzzy rules based on domain knowledge to infer the fuzzy features to obtain fuzzy output. The de-fuzzy layer converts the fuzzy output into actual output. The output layer generates the final output result.
[0148] The adaptive neuro-fuzzy inference model is trained using the training set and the gradient descent method. The model parameters are updated after the training.
[0149] The number of rules and the parameters of the membership function of the adaptive neuro-fuzzy inference model are encoded as chromosomes of the genetic algorithm. The DEAP library is used to initialize the genetic algorithm. The mean square error is used as the fitness function to generate an initial population. Each individual in the population represents a possible solution of a set of rules and parameters. Selection, crossover, and mutation operations are defined.
[0150] The selection operation represents the selection of individuals in the current population, which is used to generate the next generation.
[0151] The crossover operation represents the combination of the gene information of two individuals to generate a new individual.
[0152] The mutation operation represents a random modification to the individual's genes, introducing new genetic variations;
[0153] The genetic algorithm is run, and when the fitness no longer changes significantly, the optimization is stopped, and the final solution is output. The adaptive neuro-fuzzy inference model is optimized, and after optimization, the final disease analysis result is output according to the new optimal feature subset.
[0154] The parameters of the ANFIS model are adjusted through the training set, so that the model can better fit the training data and improve the fitting ability and prediction accuracy of the model for known data. The rules and membership function parameters of the adaptive neuro-fuzzy inference system (ANFIS) are optimized through the genetic algorithm, further improving the accuracy and adaptability of the inference system and enhancing the generalization ability of the model for unseen data, not just fitting the training data. The genetic algorithm can perform global optimization in the space of rule numbers and membership degree function parameters, avoiding the problem of local optimal solution in traditional methods. The optimized ANFIS system can perform more accurate reasoning and analysis of the disease according to the new optimal feature subset. This strategy combining genetic algorithm and neuro-fuzzy reasoning not only improves the intelligent level of the reasoning system, but also makes the disease analysis result more in line with individual differences, providing reliable support for the final clinical decision-making and helping doctors make more scientific and reasonable judgments.
[0155] The embodiment also provides an intelligent segmentation and feature analysis system for medical images, which comprises: an image standardization module, which is used for reading a medical image, converting the medical image into a grayscale image, performing standardization processing, removing noise using a Gaussian smoothing filter, and finally scaling the image to a standard size using bilinear interpolation; a medical image segmentation module, which is used for segmenting the medical image, optimizing the edges of the segmented image through a Sobel operator and morphological operations, and obtaining an edge-enhanced lesion segmentation image; a multi-modal image registration module, which is used for performing feature point matching on multi-modal lesion segmentation images and performing non-rigid registration based on the matched feature points through TPS transformation; a feature extraction and optimization module, which is used for extracting features from the registered images and optimizing the features using a whale optimization algorithm to generate an optimal feature subset; and a disease analysis module, which is used for performing disease analysis on the optimal feature subset and generating a final disease diagnosis result.
[0156] The embodiment also provides a computer device suitable for the intelligent segmentation and feature analysis method for medical images, which comprises a memory and a processor; the memory is used for storing computer executable instructions, and the processor is used for executing the computer executable instructions to implement the intelligent segmentation and feature analysis method for medical images proposed in the above embodiment.
[0157] The computer device can be a terminal, and the computer device includes a processor, a memory, a communication interface, a display screen and an input device connected by a system bus. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for running the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is configured to perform wired or wireless communication with an external terminal. The wireless communication can be achieved by WIFI, an operator network, NFC (Near Field Communication) or other technologies. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer overlaid on the display screen, or a key, trackball or touchpad arranged on the shell of the computer device, or an external keyboard, touchpad or mouse, etc.
[0158] The embodiment also provides a storage medium having a computer program stored thereon, the program being executed by a processor to implement the method for intelligent segmentation and feature analysis of medical images as described above. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as a static random access memory (SRAM), an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a programmable read-only memory (PROM), a read-only memory (ROM), a magnetic storage, a flash memory, a magnetic disk or an optical disk.
[0159] To sum up, the present application improves the compatibility of different image sources by preprocessing and size standardization of medical images; realizes accurate segmentation of the lesion area by segmenting the standard medical image through the U-Net structure, combining edge detection and morphological operation; realizes high-precision non-rigid registration by matching feature points of multi-modal medical images through SOM; clearly highlights the lesion area through foreground region enhancement; reduces the influence of redundant features on model calculation by selecting the optimal feature subset through the whale optimization algorithm; and improves the accuracy and adaptability of the inference system by optimizing the adaptive neural fuzzy inference system through the genetic algorithm.
[0160] It should be noted that the above examples are only used to illustrate the technical solutions of the present application but not limit the present application. Although the present application is described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present application can be modified or equivalently replaced, without departing from the spirit and scope of the technical solutions of the present application, which should be covered in the scope of the claims of the present application.
Claims
1. A method for intelligent segmentation and feature analysis of medical images, characterized by: include, Read multimodal medical images for preprocessing and size normalization; Medical image segmentation is performed based on the U-Net structure. The Sobel operator is used for edge detection and morphological operations are combined to optimize the edges of the segmented image to obtain an edge-optimized lesion segmentation map. Feature point matching is performed on multimodal lesion segmentation images based on self-organizing maps, and non-rigid registration is performed through TPS transformation based on the matched feature points; The foreground area of the registered image is enhanced. Based on the DenseNet-201 model, a channel attention module is introduced to extract features from the registered image. The features are optimized using the whale optimization algorithm to generate the optimal feature subset. An adaptive neuro-fuzzy inference system optimized by genetic algorithm is used to analyze the disease condition based on feature subsets.
2. The intelligent segmentation and feature analysis method for medical images according to claim 1, wherein: The reading of medical images for preprocessing and size standardization includes: Read the input multimodal medical image, convert the image into a grayscale image, and standardize the grayscale values in the grayscale image; Use Gaussian smoothing filter to remove noise from grayscale images; The image after noise removal is scaled to a standard size using a bilinear interpolation algorithm to obtain a standardized medical image; The multimodal medical images refer to two different types of medical images, CT and MRI, collected from the same patient.
3. The intelligent segmentation and feature analysis method for medical images according to claim 2, wherein: The medical image segmentation is performed based on the U-Net structure, and the Sobel operator is used for edge detection combined with morphological operations to optimize the edge of the segmented image to obtain an edge-optimized lesion segmentation map, including: Build an intelligent segmentation model based on the U-Net structure, which includes an encoder part, a decoder part, and a final output layer; Use the training set and gradient descent method to train the model, update the model parameters, and output the model after training is completed; Based on the intelligent segmentation model, the standardized medical image is input to obtain the probability distribution map of each pixel belonging to the lesion area; Based on the historical average value as the segmentation threshold, the probability of each pixel in the probability distribution map belonging to the lesion area is compared with the segmentation threshold to determine the lesion area. The pixel values of the probability distribution map are segmented based on the lesion area, and the lesion area is marked to obtain a binary segmentation image. Based on the binary segmentation image, the Sobel operator is used to calculate the gradient to obtain the edge information of the binary segmentation image; Based on the edge information, the boundary of the binary segmentation image is further refined by non-maximum suppression and double threshold method to obtain a boundary enhanced segmentation image; The segmentation image based on boundary enhancement is smoothed by morphological opening operation, and then the boundary cracks are repaired by morphological closing operation to obtain the final segmentation map.
4. The intelligent segmentation and feature analysis method for medical images according to claim 3, wherein: The method of performing feature point matching on the multimodal lesion segmentation image based on the self-organizing map and performing non-rigid registration through TPS transformation based on the matched feature points includes: After reading two different categories of medical images, CT and MRI, and performing segmentation processing, they are marked as S1 and S2 respectively. S1 represents the segmented image that needs to be registered to S2; Use the SIFT algorithm to extract feature points from S1 and S2, and store the extracted feature points as sets S1 and S2 respectively. Each feature point is represented by a three-dimensional coordinate; Use the ICP algorithm to calculate the optimal rigid transformation matrix between the feature point sets of S1 and S2, and apply it to all feature points of S1, update the feature point coordinates of S1, and perform a preliminary alignment of S1 and S2; Initialize a SOM grid, where each neuron represents the mapping position of a feature point, and set the initial weight vector of each neuron of the SOM to the three-dimensional coordinates of the corresponding feature point in S1; Use the feature point coordinates of S2 as input to train the SOM. During the training process, the weights of the SOM neurons are iteratively updated through a competitive learning mechanism. The optimal learning rate and decay strategy are selected through cross-validation. The iteration is stopped when the neuron weight transformation amplitude no longer decreases significantly. Through the topological structure of SOM, find the corresponding feature point in S2 for each feature point in S1; Based on the corresponding point relationship between S1 and S2, the deformation field from S1 to S2 is calculated through TPS transformation; Based on the calculated deformation field, S1 is deformed to the space of S2 by bilinear interpolation to obtain the registered S1 image. The registered S1 image and S2 image are fused by weighted averaging to obtain a fused registration map.
5. The intelligent segmentation and feature analysis method for medical images according to claim 4, wherein: The foreground area enhancement operation is performed on the registered image, including: Histogram equalization is used to enhance the contrast of the lesion area in the fused registration image; Gaussian blurring is used to reduce the details of the background area of the fused registration image.
6. The intelligent segmentation and feature analysis method for medical images according to claim 5, wherein: The DenseNet-201 model introduces a channel attention module to extract features from the registration map, and uses the whale optimization algorithm to optimize the features to generate the optimal feature subset, including: Use the pre-trained DenseNet-201 model and remove the fully connected layer. Add a channel attention module after the convolution layer in each dense block of the DenseNet-201 model. Based on the channel attention module, calculate the channel attention weights to enhance the feature maps output by the convolution layer. The calculation of the channel attention weight refers to performing global average pooling on the feature map F output by the convolution layer to generate F avg , through the 1×1 convolution layer to F avg Calculate the channel attention weight A; The enhancement of the feature map output by the convolution layer refers to enhancing the feature map F output by the convolution layer by element-by-element multiplication using the channel attention weight A; The fused registration image after lesion area enhancement is processed according to the standard input format requirements of the DenseNet-201 model; A DenseNet-201 model with a channel attention module added was trained using a local training set that met the DenseNet-201 model input criteria. The cross-entropy loss function was used to calculate the difference between the extracted features and the true features. The Adam optimizer was used for gradient descent optimization to fine-tune the model parameters. The model output was stopped when the model loss no longer decreased significantly during successive iterations. The fused registration map that meets the DenseNet-201 model input standard is input into the fine-tuned DenseNet-201 model. Through a series of convolutional layers, pooling layers, and feature dense connections, the semantic information, spatial information, and multi-scale features of the image are extracted to generate the final feature vector F. f ∈C, C is the number of channels of the feature vector output by the DenseNet-201 model, and each channel represents a feature; Select the appropriate whale population size N based on the number of channels C of the feature vector, and randomly generate a binary vector of length C for each whale to represent the feature selection; Create a matrix X of size N×C to store the positions of all whales; For each element x in the matrix X ij Randomly assign a value of 0 or 1; The feature subset selected by each whale is input into the pre-trained classification model to evaluate the accuracy of the feature subset through cross-validation. The fitness of each individual is calculated based on the accuracy of the feature subset and the number of features selected in the feature subset. The position of the whale with the highest fitness among all whales is the current optimal solution; For each whale i, calculate the distance D between the current position of whale i and the current optimal solution position i ; For each whale i, a random coefficient E is randomly generated in the range of [-2, 2], and the whale position is updated according to the size of E; When |E|<1, the whale approaches the optimal solution through the spiral update formula; When |E|≥1, the whale performs random search; After updating the position, the fitness of each whale is recalculated and compared with the previous fitness. If the fitness of the new position is higher, the new position is accepted; otherwise, the original position is maintained. The fitness of each whale is calculated in each iteration. If the fitness of a whale is better than the current optimal solution, it is set as the new optimal solution. When the optimal solution is no longer significantly improved, the iteration is stopped and the current optimal solution is output as the optimal feature subset.
7. The intelligent segmentation and feature analysis method for medical images according to claim 6, wherein: The adaptive neuro-fuzzy inference system based on genetic algorithm optimization performs disease analysis on feature subsets, including: Constructing an adaptive neuro-fuzzy inference model includes input layer, fuzzy layer, rule layer, defuzzification layer and output layer; The adaptive neural fuzzy inference model is trained using a training set and a gradient descent method, and after the training is completed, the model parameters are output to update the adaptive neural fuzzy inference model; The number of rules and the parameters of the membership function of the adaptive neuro-fuzzy inference model are encoded as chromosomes of the genetic algorithm. The genetic algorithm is initialized using the DEAP library, and the mean square error is used as the fitness function to generate the initial population. Each individual in the population represents a set of possible solutions to the rules and parameters. The selection, crossover, and mutation operations are defined. Run the genetic algorithm. When the fitness no longer changes significantly, stop the optimization and output the final solution to optimize the adaptive neuro-fuzzy inference model. After optimization, output the final disease analysis results based on the new optimal feature subset.
8. A medical image intelligent segmentation and feature analysis system based on the medical image intelligent segmentation and feature analysis method according to any one of claims 1 to 7, characterized in that: include, Image normalization module, which is used to read medical images, convert them into grayscale images, perform normalization, remove noise using a Gaussian smoothing filter, and finally scale the image to a standard size using bilinear interpolation; Medical image segmentation module, used to segment medical images, optimize the edges of the segmented image through Sobel operator and morphological operations, and obtain edge-enhanced lesion segmentation map; Multimodal image registration module, used to match feature points of multimodal lesion segmentation images and perform non-rigid registration based on the matched feature points through TPS transformation; Feature extraction and optimization module, used to extract features from the registered image and optimize the features using the whale optimization algorithm to generate the optimal feature subset; The disease analysis module is used to analyze the disease condition based on the optimal feature subset and generate the final disease diagnosis result.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the medical image intelligent segmentation and feature analysis method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the medical image intelligent segmentation and feature analysis method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Semantic compression reconstruction method, storage medium and electronic equipment
CN121686191A