Auxiliary pathological analysis method of microscope system
Through multi-step image preprocessing and feature extraction, combined with convolutional neural network, the problem of inconsistent color of pathological section images under microscope observation is solved, and efficient and accurate pathological image analysis is achieved.
Patent Information
- Application Number
- CN202411777906.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-03-14
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The pathological section images observed by microscope are inconsistent in color performance due to differences in shooting conditions, which seriously affects the doctor's diagnosis and judgment.
A multi-step image preprocessing strategy is adopted, including grayscale normalization and image denoising, combined with the regional adaptive histogram equalization algorithm, color features based on LAB color space are extracted, color and texture features are fused, and pathological image analysis is performed through convolutional neural networks.
It effectively solves the problem of differences between pathological section images acquired from different batches and different devices, improves the stability and reliability of image quality and feature extraction, and improves the accuracy and efficiency of pathological image analysis.
Smart Images

Figure CN119624934A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of pathological analysis, and in particular, relates to a microscope system-assisted pathological analysis method. Background Art
[0002] With the rapid development of modern medical technology, pathological diagnosis plays an increasingly important role in disease diagnosis and treatment plan formulation. As the basic means of pathological diagnosis, the accuracy of pathological section microscopy directly affects the doctor's diagnosis results. Traditional pathological section examination mainly relies on manual observation and judgment by pathologists through a microscope. This method has the following major problems:
[0003] First, the image quality of pathological sections under a microscope is affected by many factors. Uneven staining during the preparation of the sections, differences in the thickness of the sections, and changes in the light intensity and angle during microscopic observation can all lead to large differences in the color performance of the final image. This difference not only affects the doctor's subjective judgment, but also brings difficulties to subsequent image analysis.
[0004] Secondly, existing pathological image analysis methods often use a single image processing technology, such as simple grayscale processing or basic histogram equalization, which is difficult to effectively process complex pathological images. In particular, when facing pathological slice images obtained from different batches and different devices, the processing effects vary greatly and lack stability and consistency.
[0005] Third, with the development of digital pathology, the digitization of pathological sections has generated a massive amount of image data. Traditional manual diagnosis methods are no longer able to meet clinical needs in terms of efficiency and accuracy. Although some medical institutions have begun to try to introduce computer-aided diagnosis systems, the existing systems still have obvious deficiencies in feature extraction and analysis.
[0006] Fourth, most of the pathology image analysis software on the market currently uses fixed image processing parameters and lacks adaptive adjustment capabilities. This often requires manual intervention to adjust parameters when processing pathology images of different sources and quality, which increases the workload of doctors and affects diagnostic efficiency.
[0007] Finally, existing pathological image analysis methods often rely too much on a single feature (such as only considering color or only considering texture) during feature extraction, ignoring the multi-dimensional feature information of pathological images. This one-sided feature extraction method limits the accuracy and reliability of the analysis results.
[0008] The root cause of the above problems is that the pathological slice images observed by the microscope have inconsistent color performance due to different shooting conditions, which seriously affects the doctor's diagnosis and judgment. This technical problem needs to be solved urgently. Summary of the invention
[0009] In view of this, the present invention provides a microscope system assisted pathology analysis method, which can solve the technical problem that the pathology section images observed by the microscope have inconsistent color performance due to differences in shooting conditions, which seriously affects the doctor's diagnosis and judgment.
[0010] The present invention is achieved in that:
[0011] A first aspect of the present invention provides a microscope system assisted pathology analysis method, which comprises the following steps:
[0012] S01, obtaining a pathological slice image from a microscope system, and performing image preprocessing on the pathological slice image, wherein the image preprocessing includes grayscale normalization and image denoising;
[0013] S02, performing illumination equalization processing on the pre-processed pathological slice image, and adjusting the contrast and brightness of the image by using a regional adaptive histogram equalization algorithm;
[0014] S03, extracting the color features of the processed pathological section image, and calculating the color representation center of the image, wherein the color representation center is obtained through the centroid coordinates of the LAB color space;
[0015] S04, establishing a color feature mapping matrix based on the color representation center, and performing a standardization process on the mapping matrix;
[0016] S05, extracting texture features of the pathological slice image, constructing a multidimensional feature vector, and fusing the color feature vector with the texture feature vector;
[0017] S06, performing dimensionality reduction processing on the fused feature vector, and selecting a principal component analysis algorithm to retain important image features;
[0018] S07, establishing a convolutional neural network pathological image analysis model, and inputting the feature vector after dimension reduction;
[0019] S08, using the annotated pathological image data set to train the convolutional neural network pathological image analysis model to optimize model parameters;
[0020] S09, cross-validating the trained convolutional neural network pathological image analysis model, and calculating the accuracy and stability index of the model;
[0021] S10. According to the verification result, iteratively optimize the convolutional neural network pathological image analysis model to improve the analysis performance of the model;
[0022] S11. Applying the optimized convolutional neural network pathology image analysis model to auxiliary diagnosis analysis of new pathology slice images.
[0023] Compared with the prior art, the microscope system-assisted pathology analysis method provided by the present invention has the following beneficial effects:
[0024] First, the present invention adopts a multi-step image preprocessing strategy, including grayscale normalization and image denoising, combined with a regional adaptive histogram equalization algorithm, to effectively solve the problem of differences between pathological slice images acquired from different batches and different devices. This processing method can adaptively adjust the contrast and brightness of the image, significantly improving the image quality and laying a good foundation for subsequent analysis.
[0025] Secondly, the present invention innovatively proposes a color feature extraction method based on the LAB color space. By calculating the color representation center of the image and establishing a color feature mapping matrix, it can not only accurately capture the color characteristics of the pathological image, but also effectively reduce the impact of changes in lighting conditions. This method significantly improves the stability and reliability of feature extraction.
[0026] Third, the present invention constructs a multi-dimensional feature representation system by fusing color feature vectors and texture feature vectors. This multi-dimensional feature fusion method fully reflects the various feature dimensions of pathological images and greatly improves the integrity and accuracy of feature representation. At the same time, the principal component analysis algorithm is used for dimensionality reduction processing, which not only retains important feature information but also improves computational efficiency.
[0027] Fourth, the convolutional neural network pathological image analysis model established by the present invention has adaptive learning capabilities. Through training and cross-validation of annotated data sets, the model can continuously optimize parameters and improve analysis performance. This iterative optimization method enables the model to have strong generalization capabilities and can adapt to different types of pathological image analysis tasks.
[0028] In summary, the present invention solves the technical problem that pathological slice images observed under a microscope have inconsistent color representation due to differences in shooting conditions, which seriously affects doctors' diagnosis and judgment. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 A flow chart of the method provided by the present invention. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical solution and advantages of the embodiments of the present invention more clear, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0031] like Figure 1As shown, it is a flow chart of a microscope system assisted pathological analysis method provided by the present invention. The method comprises the following steps:
[0032] S01, obtaining a pathological slice image from a microscope system, and performing image preprocessing on the pathological slice image, wherein the image preprocessing includes grayscale normalization and image denoising;
[0033] S02, performing illumination equalization processing on the preprocessed pathological slice image, and adjusting the contrast and brightness of the image by using a regional adaptive histogram equalization algorithm;
[0034] S03, extracting color features of the processed pathological slice image, calculating the color representation center of the image, and obtaining the color representation center through the centroid coordinates of the LAB color space;
[0035] S04, establishing a color feature mapping matrix based on the color representation center, and performing a standardization process on the mapping matrix;
[0036] S05, extracting texture features of the pathological slice image, constructing a multi-dimensional feature vector, and fusing the color feature vector with the texture feature vector;
[0037] S06, performing dimensionality reduction processing on the fused feature vector, and selecting a principal component analysis algorithm to retain important image features;
[0038] S07, establishing a convolutional neural network pathological image analysis model, and inputting the feature vector after dimension reduction;
[0039] S08. Using the labeled pathological image dataset, the convolutional neural network pathological image analysis model is trained to optimize the model parameters;
[0040] S09. Cross-validate the trained convolutional neural network pathological image analysis model and calculate the accuracy and stability index of the model;
[0041] S10. According to the verification results, the convolutional neural network pathology image analysis model is iteratively optimized to improve the analysis performance of the model;
[0042] S11. Apply the optimized convolutional neural network pathology image analysis model to auxiliary diagnosis analysis of new pathology slice images.
[0043] The specific implementation methods of the above steps are described in detail below:
[0044] The specific implementation of step S01 is: first obtain the pathological slice image collected by the microscope system and preprocess the image. The preprocessing includes two steps: grayscale normalization and image denoising. Grayscale normalization refers to linearly mapping the pixel grayscale value of the original image to a unified grayscale range of 0-255 to eliminate the brightness difference under different imaging environments. Image denoising uses methods such as median filtering to remove high-frequency noise in the image and improve the stability of subsequent image analysis.
[0045] The specific implementation method of step S02 is: perform illumination equalization processing on the pre-processed pathological slice image, and adjust the contrast and brightness of the image by using a regional adaptive histogram equalization algorithm. The method first analyzes the pixel grayscale distribution of the original image and determines the maximum grayscale value and the minimum grayscale value of the image. The contrast imbalance coefficient of the image is calculated according to the maximum grayscale value and the minimum grayscale value. Then, a suitable block size is selected to divide the image into multiple overlapping or non-overlapping sub-blocks, and histogram equalization processing is performed independently on each sub-block. In this way, the contrast of local image details can be improved, and at the same time, the image artifacts caused by histogram equalization can be eliminated by using bicubic interpolation reconstruction processing. Finally, the brightness gradient and contrast change of the reconstructed image are calculated to ensure a smooth transition of the image brightness and contrast. This regional adaptive histogram equalization algorithm can effectively improve the problem of uneven illumination of the image.
[0046] The specific implementation method of step S03 is: first, convert the pathological slice image from the original color space to the LAB color space. In the LAB color space, the L channel represents brightness, and the A and B channels correspond to the green-red and blue-yellow dimensions of the color, respectively. Then, the LAB image is segmented into multiple color regions. Next, the pixel coordinates and color intensity weights of each color region are calculated, and the centroid coordinates of the LAB space are calculated by the weighted average method. The centroid coordinates can effectively characterize the color distribution characteristics of the pathological slice image. Finally, the centroid coordinates are statistically tested to eliminate possible outliers.
[0047] The specific implementation method of step S04 is: first, construct a mapping matrix based on the color representation center, including a color space coordinate transformation matrix and a color weight distribution matrix. Perform linear normalization on the color space coordinate transformation matrix to map the matrix elements to the interval from 0 to 1. Then, use the Z-score normalization method to process the color weight distribution matrix to eliminate the dimensional differences between different color feature dimensions. Next, calculate the condition number of the normalized mapping matrix to evaluate the numerical stability of the matrix. Perform singular value decomposition on the mapping matrix whose condition number exceeds a certain threshold (for example, 10) to reduce the numerical sensitivity of the matrix. Finally, store the processed color feature mapping matrix to prepare for subsequent image feature extraction.
[0048] The specific implementation method of step S05 is: first, select the gray level co-occurrence matrix algorithm to extract texture features, and calculate the angle, contrast and uniformity of the texture. At the same time, obtain multi-scale texture features through wavelet transform decomposition method. Next, construct a fusion weight matrix of color feature vector and texture feature vector, and the weight matrix is obtained based on feature correlation analysis. Then, a weighted linear fusion method is adopted to linearly combine the color feature vector and the texture feature vector according to the weight matrix. In order to eliminate the scale difference of different feature dimensions, the fused feature vector is subjected to amplitude normalization. Finally, the information entropy of the fused feature vector is calculated to evaluate the information complexity of the feature vector. Through these steps, a multidimensional feature vector containing rich image semantic information can be constructed.
[0049] The specific implementation method of step S06 is: first select the principal component analysis (PCA) algorithm to perform dimensionality reduction processing on the aforementioned fused feature vector. First, calculate the covariance matrix of the feature vector to obtain the eigenvalue and eigenvector. Select the number of principal components according to the cumulative variance contribution rate, and usually retain the principal components that can explain more than 95% of the total variance. Next, perform an orthogonal transformation on the selected principal components to construct a feature space after dimensionality reduction. In order to evaluate the discriminative ability of the feature space after dimensionality reduction, calculate the ratio of the inter-class scatter matrix and the intra-class scatter matrix, that is, the Fisher discriminant criterion. Finally, store the eigenvector after dimensionality reduction as input data for the subsequent convolutional neural network. This can not only greatly reduce the feature dimension, but also retain the most important image feature information.
[0050] The specific implementation method of step S07 is: design a convolutional neural network pathological image analysis model based on a residual network structure. The model includes multiple layers of residual blocks and fully connected layers. First, define the model input layer, and set the input dimension to match the dimension of the feature vector after dimensionality reduction. Then construct the convolution layer, set the appropriate convolution kernel size and step size to extract local features of the image. Next, add a batch normalization layer and an activation function layer to improve the stability of network training. In order to alleviate the gradient vanishing problem of the deep network, a residual connection path is also designed. Finally, configure the model output layer to output the probability distribution of the pathological image analysis results. This convolutional neural network model based on the residual network has strong feature extraction and image classification capabilities.
[0051] The specific implementation method of step S08 is: first, collect a dataset of annotated pathological images containing multiple pathological types and different pathological stages. In order to enhance the generalization ability of the model, the dataset is subjected to data enhancement processing, including image rotation, translation, scaling and mirror transformation. Then the dataset is divided into a training set and a validation set, and a stratified random sampling method is used to ensure that the proportion of samples of each category in the training set and the validation set is consistent. Next, the cross entropy loss function is selected as the model optimization target, and the stochastic gradient descent optimizer is used for parameter update. At the same time, a learning rate decay strategy is set to prevent the model from overfitting. Finally, the model training process is executed, the model parameters are iteratively updated, and the loss value and accuracy change of each round of training are recorded. This training process helps to improve the learning ability and generalization performance of the model.
[0052] The specific implementation method of step S09 is: the trained convolutional neural network pathological image analysis model is verified by using the k-fold cross-validation method. First, the classification accuracy, precision, and recall of the model on the validation set are calculated. Then the receiver operating characteristic curve (ROC curve) and confusion matrix of the model are plotted to more comprehensively evaluate the performance of the model. Next, the Cohen consistency coefficient of the model is calculated to evaluate the stability of the model on different validation sets. At the same time, the performance of the model in different pathological types and pathological stages is analyzed in a fine-grained manner, and the fluctuation range of each performance indicator is recorded. These verification results provide a basis for subsequent model optimization.
[0053] The specific implementation method of step S10 is: first analyze the cross-validation results to identify the performance bottlenecks and optimization points of the model. Then, according to the analysis results, try to adjust the network architecture to increase or decrease the depth and width of the network. At the same time, optimize the model hyperparameters, including learning rate, regularization coefficient, and annealing coefficient. In order to enhance the model's ability to focus on key image features, an attention mechanism module can also be introduced. In addition, using an integrated learning method and combining multiple sub-models with different structures can also help improve the overall performance. Finally, perform model pruning and quantization to improve the reasoning efficiency of the model. After each round of iterative optimization, it is necessary to record the changes in the model in various performance indicators. Through these optimization methods, the analysis ability and application effect of the model can be further improved.
[0054] The specific implementation method of step S11 is: first, the new pathological slice image is subjected to the same image preprocessing process as the training data set, including grayscale normalization, denoising and illumination equalization. Then, the optimized convolutional neural network pathological image analysis model is used to extract and classify image features. The model outputs the diagnosis result and confidence of the pathological image. At the same time, the time consumption and computing resource consumption of the model for analyzing the new image are recorded. Next, a diagnosis report is generated, including a description of the pathological features and preliminary diagnosis suggestions. In order to intuitively display the analysis results, a visualization interface for the model analysis results is established. Finally, a manual review interface is reserved to support medical professionals to review and correct the model diagnosis results. This automated auxiliary diagnosis process can greatly improve the efficiency and accuracy of pathological image analysis.
[0055] Specifically, the principle of the present invention is:
[0056] First, in the image preprocessing stage, the present invention adopts a combination strategy of grayscale normalization and image denoising. Grayscale normalization reduces the brightness difference between images by mapping the image pixel values to a uniform grayscale range. Image denoising uses an adaptive filtering algorithm, which can effectively remove noise interference while retaining image details. The combination of these two steps provides a better quality image foundation for subsequent processing.
[0057] Secondly, the application of regional adaptive histogram equalization algorithm is based on the following principle: divide the image into multiple small areas, calculate the histogram distribution of each area respectively, and then complete the smooth transition between areas through bilinear interpolation method. This localized processing method can better maintain the local features of the image while improving the overall contrast performance.
[0058] In terms of color feature extraction, the present invention selects LAB color space instead of traditional RGB space because LAB space is closer to the perception characteristics of the human eye, where the L channel represents brightness and the a and b channels represent color information. By calculating the centroid coordinates in the LAB space as the color representation center, the overall color characteristics of the image can be more accurately reflected. The advantage of this method is that it is insensitive to changes in illumination and can provide a more stable color feature representation.
[0059] The process of establishing the color feature mapping matrix adopts the principle of mathematical morphology. By spatially mapping the color representation center, a high-dimensional feature space is constructed, and then the consistency of the feature dimension is ensured through standardization and normalization. This processing method not only improves the expressiveness of the feature, but also enhances the generalization performance of the model.
[0060] In terms of texture feature extraction, the present invention adopts a multi-scale analysis method, including the comprehensive application of gray-level co-occurrence matrix, local binary pattern and other algorithms. These algorithms can capture the texture information of the image from different angles and provide rich dimensions for feature fusion.
[0061] Feature fusion adopts an adaptive weight strategy, dynamically adjusting the weights of different features in the fusion process according to their importance. This approach can retain effective information to the greatest extent while suppressing the influence of redundancy and noise.
[0062] The application of the principal component analysis (PCA) algorithm in the dimensionality reduction process is based on the eigenvalue decomposition of the feature covariance matrix. By retaining the eigenvector with the largest contribution rate, the effective dimensionality reduction of the data is achieved while maintaining the main distinguishing information. This step not only reduces the computational complexity of subsequent processing, but also highlights key features and improves classification results.
[0063] The design of the convolutional neural network model adopts a deep residual learning framework, and solves the gradient vanishing problem in deep network training through the skip connection mechanism. Each layer of the model is carefully designed, including convolutional layers, pooling layers, batch normalization layers, etc., to ensure the hierarchy and effectiveness of feature extraction.
[0064] During the model training process, batch normalization and dropout techniques were used to prevent overfitting, and the cross entropy loss function was used to optimize the model parameters. The model performance was evaluated through cross-validation, and the learning rate and other hyperparameters were dynamically adjusted based on the validation results to ensure that the model converged to the optimal solution.
[0065] In summary, the technical solution of the present invention constructs a complete pathological image analysis system through the organic combination of multiple innovative technical modules. Each module has been carefully designed and optimized to work together to solve the core problem of inconsistent color of pathological slice images. The feasibility and effectiveness of the solution have been supported by both theoretical analysis and experimental verification.
[0066] A specific embodiment 1 of the present invention is provided below, and the specific implementation of the steps of this embodiment 1 is described in detail as follows: The specific implementation of step S01 is: firstly, a pathological slice image I collected by a microscope system is obtained, and the image is preprocessed. The preprocessing includes two steps: grayscale normalization and image denoising.
[0067] Grayscale normalization refers to linearly mapping the pixel grayscale values of the original image to a uniform grayscale range of 0-255 to eliminate the brightness differences under different imaging environments. The grayscale normalization process can be expressed as: Where min(I) and max(I) represent the minimum grayscale value and the maximum grayscale value in image I, respectively.
[0068] Image denoising uses methods such as median filtering to remove high-frequency noise in the image and improve the stability of subsequent image analysis. The formula for median filtering is: denoise (x,y)=median{I(xk,yl)|(xk,yl)∈W}, where (x,y) represents the current pixel coordinates, W is the filter window centered at (x,y), and median{} represents the median of the pixel values in the window. Median filtering can effectively remove impulse noise while retaining the edge details of the image.
[0069] The specific implementation method of step S02 is: performing illumination equalization processing on the preprocessed pathological slice image I, and adjusting the contrast and brightness of the image through a regional adaptive histogram equalization algorithm.
[0070] First, analyze the pixel grayscale distribution of the original image I and determine the maximum grayscale value I of the image max and the minimum gray value I min According to I max and I min Calculate the image contrast imbalance coefficient γ:
[0071] Then select a suitable block size N×M to divide the image I into K overlapping or non-overlapping sub-blocks {I k |k=1,2,...,K}. For each sub-block I k Independently perform histogram equalization processing, the formula is: Among them I min,k and I max,k Represent sub-block I k This can improve the contrast of local image details.
[0072] Next, bicubic interpolation reconstruction is used to eliminate image artifacts caused by histogram equalization. The reconstruction formula is: in is the cubic B-spline kernel function.
[0073] Finally, the reconstructed image I is calculated rebuild The brightness gradient and contrast changes ensure the smooth transition of image brightness and contrast. The brightness gradient can be expressed as The contrast change is represented by By adjusting these two indicators, a pathological slice image with balanced illumination can be finally obtained.
[0074] The specific implementation of step S03 is: first, the pathological slice image I is converted from the original color space to the LAB color space to obtain I LABIn the LAB color space, the L channel represents brightness, and the A and B channels correspond to the green-red and blue-yellow dimensions of color, respectively.
[0075] Then to I LAB The image is segmented into K color regions {R k |k=1,2,...,K}. Next, calculate each color region R k The pixel coordinates (x i ,y i ) and color intensity weight w i , the centroid coordinates of the LAB space are calculated by weighted average method (L c ,A c ,B c ): Where n k For region R k The centroid coordinates can effectively characterize the color distribution characteristics of the pathological slice image.
[0076] Finally, the centroid coordinates (L c ,A c ,B c ) to perform statistical tests and eliminate possible outliers. Specifically, the z-score of the centroid coordinates can be calculated: where μ L ,μ A ,μ B and σ L ,σ A ,σ B Respectively represent the mean and standard deviation of the centroid coordinates of the three channels of LAB. L |,|z A |,|z B |If any value is greater than 3, the centroid coordinate is considered as an outlier and is removed. The final centroid coordinate (L c ,A c ,B c ) can construct the color feature vector.
[0077] The specific implementation of step S04 is: first construct a color representation center (L c ,A c ,B c ) mapping matrix M, including the color space coordinate transformation matrix M trans and the color weight distribution matrix M weight .
[0078] Among them, the color space coordinate transformation matrix M trans It is used to map the LAB color space to the new feature space, which can be expressed as: In order to ensure the linearity of the transformation, it is necessary to trans Perform normalization: Maps matrix elements to the range 0 to 1.
[0079] The color weight distribution matrix M weight It is used to indicate the importance of different color channels, and the dimension difference can be eliminated by Z-score normalization method: Where μ(M weight ) and σ(M weight ) represent M weight The mean and standard deviation of .
[0080] Next, calculate the normalized mapping matrix The condition number κ(M norm ), evaluate the numerical stability of the matrix. For the condition number κ(M norm )>10, it is necessary to norm Perform singular value decomposition (SVD) to obtain M norm =U∑V T , where U and V are orthogonal matrices and ∑ is a diagonal matrix. This SVD process can reduce the numerical sensitivity of the mapping matrix.
[0081] Finally, the processed color feature mapping matrix M is stored to prepare for subsequent image feature extraction.
[0082] The specific implementation of step S05 is: firstly, the gray level co-occurrence matrix (GLCM) algorithm is selected to extract texture features. GLCM is defined as: Where (M, N) is the image size, (i, j) represents the gray value pairing. GLCM is used to calculate the texture's angle, contrast, and uniformity: C=∑ i,j (ij) 2 GLCM(i,j),U=-∑ i,j GLCM(i,j)logGLCM(i,j).
[0083] At the same time, multi-scale texture features are obtained through wavelet transform decomposition method. The formula of wavelet transform is: Where ψ(t) is the mother wavelet function, a and b represent the scale and displacement parameters respectively. Through wavelet transform with different scales and displacement parameters, the texture features of the image at multiple resolutions can be extracted.
[0084] Next, we construct the fusion weight matrix W of the color feature vector c and the texture feature vector t. The weight matrix is obtained based on feature correlation analysis. Specifically, we can calculate the correlation coefficient matrix R = corr(c, t) of the feature vector, and perform singular value decomposition on R to obtain R = U∑V T , then W=UV T .
[0085] Then, a weighted linear fusion method is used to linearly combine the color feature vector c and the texture feature vector t according to the weight matrix W: f = Wc + (1-W) t. In order to eliminate the scale difference of different feature dimensions, the fused feature vector f is amplitude normalized:
[0086] Finally, calculate the fused feature vector f norm The information entropy H of the feature vector is used to evaluate the information complexity of the feature vector: where p i is the probability distribution of the i-th dimension of the feature vector, and d is the dimension of the feature vector. Through these steps, a multidimensional feature vector containing rich image semantic information can be constructed.
[0087] The specific implementation of step S06 is: first select the principal component analysis (PCA) algorithm to perform the above fusion feature vector f norm Perform dimensionality reduction processing.
[0088] First calculate the eigenvector f norm The covariance matrix ∑=cov(f norm ), get the eigenvalue λ i and the eigenvector φ i According to the cumulative variance contribution rate The number of principal components k is selected, usually retaining the principal components that can explain more than 95% of the total variance.
[0089] Next, the selected k principal components {φ i |i=1,2,...,k} to perform orthogonal transformation and construct the feature space after dimensionality reduction where Φ=[φ1,φ2,...,φ k ] is the principal component matrix.
[0090] In order to evaluate the feature space after dimensionality reduction The discriminative ability of and the within-class scatter matrix Where C is the number of categories, n c is the number of samples in the cth category, μ c is the sample mean of the cth class, μ is the global sample mean, x ciis the i-th sample of the c-th class. By calculating the Fisher discriminant criterion The discriminative ability of the feature space after dimensionality reduction can be evaluated.
[0091] Finally, store the feature vector after dimensionality reduction As the input data of the subsequent convolutional neural network, this can significantly reduce the feature dimension while retaining the most important image feature information.
[0092] The specific implementation of step S07 is: designing a convolutional neural network pathological image analysis model based on a residual network structure. The model includes multiple layers of residual blocks and fully connected layers.
[0093] First, define the model input layer and set the input dimension d i And the feature vector after dimension reduction dimensions to match.
[0094] Then, a convolution layer is constructed, and the convolution kernel size k×k and step size s are set to extract local features of the image. The formula of the convolution layer is: y=σ(W*x+b), where x is the input feature map, W and b are the convolution kernel weight and bias respectively, and σ is the activation function.
[0095] Next, add batch normalization layer and activation function layer to improve the stability of network training. The batch normalization formula is: where μ B and are the mean and variance of the features within the batch, and γ and β are the scaling and offset parameters.
[0096] In order to alleviate the gradient vanishing problem of deep networks, a residual connection path is also designed. The formula of the residual block is: y = σ(W2σ(W1x)) + x, which directly adds the input x to the feature W2σ(W1x) after two layers of convolution. This jump connection structure helps the effective propagation of gradients.
[0097] Finally, configure the model output layer to output the probability distribution of pathological image analysis results Where W o and b o are the weights and biases of the output layer. The Softmax function is used to map the network output to a probability distribution.
[0098] This convolutional neural network model based on residual network has strong feature extraction and image classification capabilities.
[0099] The specific implementation of step S08 is: first collect a dataset of annotated pathological images containing multiple pathological types and different pathological stages where x i is the image sample, yi is the corresponding category label.
[0100] In order to enhance the generalization ability of the model, the data set is enhanced, including image rotation x rot =Rotate(x,θ), translate x trans =Translate(x,Δx,Δy), scale x scale = Scale(x,s) and mirror transformation x mirror =Mirror(x), etc. Rich training samples can be generated through these transformations.
[0101] The dataset is then divided into a training set and validation set A stratified random sampling method was used to ensure that the proportion of samples of each category in the training set and the validation set was consistent.
[0102] Next, select the cross entropy loss function as the model optimization objective: in is the probability that the i-th sample output by the model belongs to the j-th class, y ij is the true label. And the stochastic gradient descent optimizer is used to update the parameters: Where η is the learning rate. At the same time, set the learning rate decay strategy, such as cosine annealing Prevent model overfitting.
[0103] Finally, the model training process is executed, the model parameters are updated iteratively, and the loss value and accuracy changes of each round of training are recorded. This training process helps to improve the learning ability and generalization performance of the model.
[0104] The specific implementation method of step S09 is: using the k-fold cross-validation method to verify the trained convolutional neural network pathological image analysis model.
[0105] First, calculate the model on the validation set The classification accuracy on Accuracy and recall Among them, TP, FP, and FN represent the number of true positive, false positive, and false negative samples, respectively.
[0106] Then draw the model's receiver operating characteristic curve (ROC curve) TPR = f (FPR) and confusion matrix Evaluate the performance of your model more thoroughly.
[0107] Next, we calculated the Cohen consistency coefficient of the model in Evaluate the stability of the model on different validation sets.
[0108] At the same time, the performance of the model in different pathological types and stages is analyzed in fine granularity, and the fluctuation range of each performance indicator is recorded. These verification results provide a basis for subsequent model optimization.
[0109] The specific implementation method of step S10 is: first analyze the cross-validation results to identify the model performance bottlenecks and optimizable points.
[0110] According to the analysis results, we can try to adjust the network architecture to increase or decrease the depth d and width w of the network. For example, we can expand the network capacity by increasing the number of residual blocks or adjusting the number of convolution kernels. The adjusted network structure can be expressed as: y = F(x; {W l},d,w)+x, where F is the composite mapping of the residual module, {W l} is the parameter set of each layer.
[0111] At the same time, optimize the model hyperparameters, including learning rate η, regularization coefficient λ and annealing coefficient T. For example, the strategy of dynamically adjusting the learning rate is adopted: Large updates can be performed at the beginning of training, and the update step size can be gradually reduced.
[0112] In order to enhance the model's ability to focus on key image features, an attention mechanism module can also be introduced. The formula of the attention mechanism is: a = softmax (W q Q+W k K),y=a T V, where Q, K, and V are query, key, and value vectors respectively, and W q ,W k is a learnable weight. Important features can be highlighted by attention weighting.
[0113] In addition, using ensemble learning methods to combine multiple sub-models with different structures can also help improve the overall performance. The output of the ensemble model can be expressed as: Where M is the number of sub-models, is the output of the mth sub-model.
[0114] Finally, the model is pruned and quantized to improve the inference efficiency of the model. Pruning can reduce the model size by pruning the connections with smaller weights in the network, while quantization converts the network parameters into low-bit numerical representations.
[0115] After each round of iterative optimization, it is necessary to record the changes in the model's performance indicators to evaluate the optimization effect. Through these optimization methods, the model's analysis ability and application effect can be further improved.
[0116] In order to further better understand and implement the present invention, the following provides Example 2 of a specific application scenario of the present invention: The pathology department of a hospital has multiple microscope systems for routine examination of various pathological sections of patients. In order to improve the efficiency and accuracy of diagnosis, the hospital decides to adopt the pathological section image-assisted analysis method based on the microscope system proposed in the present invention.
[0117] First, the hospital collected an annotated dataset containing three common pathological types: breast cancer, lung cancer, and gastric cancer. The dataset contains a total of 2,000 high-definition pathological slice images, of which 40% are breast cancer samples, 30% are lung cancer samples, and 30% are gastric cancer samples. Each image is 1024×768 pixels in size and annotated with pathological diagnosis results. In order to enhance the generalization ability of the model, the following data augmentation operations were performed on the dataset:
[0118] Image rotation: Random rotation angle range is [-20°, 20°];
[0119] Image translation: Random translation distance range is [-50,50] pixels
[0120] Image scaling: random scaling ratio range is [0.8, 1.2];
[0121] Image mirroring: flip horizontally or vertically with probability p=0.5
[0122] Through data enhancement, we finally get a dataset containing 6000 training samples and 1000 validation samples. Table 1 gives the statistical information of the dataset.
[0123] Table 1 Statistics of pathological image dataset
[0124] Pathological type Number of training set samples Number of validation set samples Sample proportion Breast cancer 2400 400 40% Lung cancer 1800 300 30% Gastric cancer 1800 300 30% total 6000 1000 100%
[0125] Next, the hospital used the method of the present invention to preprocess the pathological section images, extract features and design a classification model.
[0126] In the image preprocessing stage, the original pathological slice image I is first converted into a grayscale image, and then a region-adaptive histogram equalization process is performed on it. The specific steps are as follows:
[0127] 1. Analyze the pixel grayscale distribution of the original image I and determine the maximum grayscale value I of the image max =235 and minimum gray value I min =42.
[0128] 2. According to I max and I min Calculate the contrast imbalance coefficient of the image
[0129] 3. Select a block size of 32×32 pixels and divide the image I into K=24×18=432 overlapping sub-blocks.
[0130] 4. Perform histogram equalization processing on each sub-block independently, the formula is Among them I min,k =38,I max,k =221 are the minimum and maximum grayscale values of the kth sub-block.
[0131] 5. Use the bicubic interpolation reconstruction method to fuse the sub-blocks after histogram equalization to obtain the enhanced image I rebuild .
[0132] 6. Calculation I rebuild Brightness gradient and contrast C = 0.83, ensuring a smooth transition of image distribution after illumination balance.
[0133] After the above preprocessing, the original pathological slice image I is converted into a grayscale image I with balanced illumination. rebuild , which lays the foundation for subsequent feature extraction and image analysis.
[0134] In the feature extraction stage, the method of the present invention combines the color and texture features of the pathological slice image. First, the preprocessed image I rebuild Convert to LAB color space and get I LAB Then I LAB Perform region segmentation and identify K = 28 color regions {R k Next, calculate the pixel coordinates (x i ,y i ) and color intensity weight w i , the centroid coordinates of the LAB space are obtained by weighted average (L c =128.6,A c =4.2,B c =-12.7). The centroid coordinates constitute a 3D color feature vector c.
[0135] In terms of texture features, the gray level co-occurrence matrix (GLCM) algorithm is first used to calculate the angle, contrast and uniformity features of the image, and a 9-dimensional texture feature vector t1 is obtained. At the same time, a 12-dimensional multi-scale texture feature t2 is extracted at three scales through wavelet transform. t1 and t2 are linearly fused to form a 21-dimensional texture feature vector t.
[0136] Finally, according to the correlation between the color feature vector c and the texture feature vector t, the following feature fusion weight matrix W is constructed:
[0137]
[0138] Using the weighted linear fusion method, c and t are combined into a 24-dimensional final feature vector f = Wc + (1-W) t. In order to eliminate the scale differences of different feature dimensions, f is amplitude normalized.
[0139] Through the above feature extraction steps, a multidimensional feature vector rich in pathological image semantic information is successfully constructed. It provides high-quality input data for subsequent classification models.
[0140] In the classification model design phase, the hospital adopted the convolutional neural network architecture based on the residual network proposed by the method of the present invention. The specific network structure is shown in Table 2:
[0141] Table 2 Convolutional neural network model structure
[0142]
[0143]
[0144] The input of the model is a 24-dimensional reduced feature vector First, feature extraction is performed through a fully connected layer, and then two residual blocks are used to further learn in-depth feature representation. In order to alleviate the gradient vanishing problem during training, skip connections are used in the residual blocks. Finally, a 3D output is obtained through average pooling and a fully connected layer, which is converted into the probability distribution of three types of pathological images through the Softmax activation function.
[0145] In the model training phase, the hospital used the cross entropy loss function as the optimization target and used the stochastic gradient descent algorithm to update the model parameters. At the same time, the learning rate decay strategy was set, with the initial learning rate η0 = 0.01, the decay coefficient γ = 0.1, and the decay period T = 50 rounds. In order to prevent overfitting, the L2 regularization term was also added, and the regularization coefficient λ = 0.001.
[0146] After 100 training epochs, the classification accuracy of the model on the validation set reached 91.5%, indicating strong generalization ability. Table 3 shows the performance indicators of the model under different pathological types:
[0147] Table 3 Performance indicators of the model on the validation set
[0148] Pathological type Accuracy Accuracy Recall Breast cancer 93.2% 91.7% 92.5% Lung cancer 90.0% 89.3% 90.7% Gastric cancer 91.3% 90.2% 91.0%
[0149] As can be seen from Table 3, the model has achieved high accuracy, precision and recall in the classification tasks of three types of pathological images, and can provide doctors with more reliable diagnostic assistance in practical applications.
[0150] Finally, the hospital deployed the optimized convolutional neural network model into the microscope system to automatically analyze new pathological slice images. When the doctor puts the slice sample under the microscope for observation, the system can automatically capture the image and give a preliminary diagnosis result after steps such as image preprocessing, feature extraction and classification reasoning.
[0151] The specific workflow is as follows:
[0152] 1. Capture pathological slice image I and perform the same image preprocessing operations as the training data to obtain I rebuild .
[0153] 2. Extraction I rebuild Color and texture features, construct a 24-dimensional feature vector
[0154] 3. Input the optimized convolutional neural network model and output the probability distribution of three types of pathological images
[0155] 4. According to Get the diagnosis results and calculate the confidence of the model output
[0156] 5. Generate a diagnostic report, including a description of pathological features and diagnostic suggestions. For example, for this pathological section, the model gives "90.2% probability of gastric cancer, the main features are dysplasia of cells, disordered glandular structure, etc.; the preliminary diagnosis is gastric cancer."
[0157] 6. Display the analysis results to doctors through a visual interface, while retaining the interface for manual review.
[0158] The entire automated analysis process takes only 15 seconds, and the computing resources are low. Doctors can make a final diagnosis based on the model's diagnostic results and confidence level, combined with their own experience. Through human-computer collaboration, the efficiency and reliability of pathological diagnosis are greatly improved.
[0159] It should be noted that the explanations of the variables involved in the present invention are shown in Table 4 below:
[0160] Table 4 Variable explanation table
[0161]
[0162]
[0163] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A microscope system assisted pathological analysis method, characterized in that: The following steps are involved: S01, obtaining a pathological slice image from a microscope system, and performing image preprocessing on the pathological slice image, wherein the image preprocessing includes grayscale normalization and image denoising; S02, performing illumination equalization processing on the pre-processed pathological slice image, and adjusting the contrast and brightness of the image by using a regional adaptive histogram equalization algorithm; S03, extracting the color features of the processed pathological section image, and calculating the color representation center of the image, wherein the color representation center is obtained through the centroid coordinates of the LAB color space; S04, establishing a color feature mapping matrix based on the color representation center, and performing a standardization process on the mapping matrix; S05, extracting texture features of the pathological slice image, constructing a multidimensional feature vector, and fusing the color feature vector with the texture feature vector; S06, performing dimensionality reduction processing on the fused feature vector, and selecting a principal component analysis algorithm to retain important image features; S07, establishing a convolutional neural network pathological image analysis model, and inputting the feature vector after dimension reduction; S08, using the annotated pathological image data set to train the convolutional neural network pathological image analysis model to optimize model parameters; S09, cross-validating the trained convolutional neural network pathological image analysis model, and calculating the accuracy and stability index of the model; S10. According to the verification result, iteratively optimize the convolutional neural network pathological image analysis model to improve the analysis performance of the model; S11. Applying the optimized convolutional neural network pathology image analysis model to auxiliary diagnosis analysis of new pathology slice images.
2. The method according to claim 1, characterized in that The step S02 specifically includes: sub-step 201, determining the maximum grayscale value and the minimum grayscale value of the image by analyzing the pixel grayscale distribution of the pathological slice image; sub-step 202, calculating the contrast imbalance coefficient of the image according to the maximum grayscale value and the minimum grayscale value; sub-step 203, selecting the block size of the regional adaptive histogram equalization algorithm, and dividing the pathological slice image into multiple overlapping or non-overlapping image sub-blocks; sub-step 204, independently performing histogram equalization processing on each image sub-block, and enhancing image details by adjusting the grayscale mapping relationship of the local image; sub-step 205, performing bicubic interpolation reconstruction on the processed image sub-blocks to eliminate image artifacts generated by the histogram equalization processing; sub-step 206, calculating the brightness gradient and contrast change of the reconstructed image to ensure a smooth transition of image brightness and contrast.
3. The method according to claim 1, characterized in that: The step S03 specifically includes: sub-step 301, performing color space conversion on the pathological slice image, converting the image from the original color space to the LAB color space; sub-step 302, performing region segmentation on the LAB color space image, dividing the image into multiple color regions; sub-step 303, calculating the pixel coordinates and color intensity weight of each color region; sub-step 304, calculating the centroid coordinates of the LAB color space by weighted average method based on the pixel coordinates and color intensity weight; sub-step 305, performing statistical tests on the centroid coordinates to eliminate outliers; sub-step 306, establishing a color feature vector based on the centroid coordinates to characterize the color distribution characteristics of the pathological slice image.
4. The method according to claim 1, characterized in that: The step S04 specifically includes: sub-step 401, constructing a mapping matrix based on the color representation center, including a color space coordinate transformation matrix and a color weight distribution matrix; sub-step 402, performing linear normalization processing on the color space coordinate transformation matrix to map the matrix elements to the interval from zero to one; sub-step 403, using the Z-score normalization method to process the color weight distribution matrix to eliminate the dimensional differences between different color feature dimensions; sub-step 404, calculating the condition number of the normalized mapping matrix to evaluate the numerical stability of the matrix; sub-step 405, performing singular value decomposition on the mapping matrix whose condition number exceeds a threshold to reduce the numerical sensitivity of the matrix; sub-step 406, storing the processed color feature mapping matrix to prepare for subsequent image feature extraction.
5. The method according to claim 1, characterized in that: The step S05 specifically includes: sub-step 501, selecting the gray level co-occurrence matrix algorithm to extract texture features, and calculating the angle, contrast and uniformity features of the texture; sub-step 502, obtaining multi-scale texture features through wavelet transform decomposition method; sub-step 503, constructing a fusion weight matrix of color feature vectors and texture feature vectors, and the weight matrix is based on feature correlation analysis; sub-step 504, using a weighted linear fusion method, linearly combining the color feature vector and the texture feature vector according to the weight matrix; sub-step 505, normalizing the amplitude of the fused feature vector to eliminate the scale difference of different feature dimensions; sub-step 506, calculating the information entropy of the fused feature vector and evaluating the information complexity of the feature vector.
6. The method according to claim 1, characterized in that The step S06 specifically includes: sub-step 601, selecting the principal component analysis algorithm to perform dimensionality reduction processing on the fused feature vector; sub-step 602, calculating the covariance matrix of the feature vector to obtain the eigenvalue and the eigenvector; sub-step 603, selecting the number of principal components according to the cumulative variance contribution rate, and retaining the principal components that can explain more than 95% of the total variance; sub-step 604, performing an orthogonal transformation on the selected principal components to construct a feature space after dimensionality reduction; sub-step 605, evaluating the discriminative ability of the feature space after dimensionality reduction, and calculating the ratio of the between-class scatter matrix and the within-class scatter matrix; sub-step 606, storing the eigenvector after dimensionality reduction as input data of the convolutional neural network.
7. The method according to claim 1, characterized in that The step S07 specifically includes: sub-step 701, designing a convolutional neural network pathological image analysis model based on a residual network structure, including multiple layers of residual blocks and fully connected layers; sub-step 702, defining a model input layer, setting the input dimension to match the dimension of the feature vector after dimensionality reduction; sub-step 703, constructing a convolutional layer, setting the convolution kernel size and step size, and extracting local features of the image; sub-step 704, adding a batch normalization layer and an activation function layer to improve the stability of network training; sub-step 705, designing a residual connection path to alleviate the gradient vanishing problem of a deep network; sub-step 706, configuring a model output layer, and outputting a probability distribution of the pathological image analysis results.
8. The method according to claim 1, characterized in that The step S08 specifically includes: sub-step 801, collecting annotated pathological image data sets to ensure that the data sets contain multiple pathological types and different pathological stages; sub-step 802, performing data enhancement processing on the data sets, including image rotation, translation, scaling and mirroring; sub-step 803, dividing the data sets into training sets and validation sets, using a stratified random sampling method; sub-step 804, selecting a cross entropy loss function and a stochastic gradient descent optimizer; sub-step 805, setting a learning rate decay strategy to prevent model overfitting; sub-step 806, executing a model training process, and iteratively updating model parameters; sub-step 807, recording the loss value and accuracy changes of each round of training.
9. The method according to claim 1, characterized in that: The step S09 specifically includes: sub-step 901, using the k-fold cross-validation method to verify the trained convolutional neural network pathological image analysis model; sub-step 902, calculating the classification accuracy, precision and recall rate of the model on the validation set; sub-step 903, drawing the receiver operating characteristic curve and confusion matrix of the model; sub-step 904, calculating the Cohen consistency coefficient of the model to evaluate the stability of the model; sub-step 905, performing a fine-grained analysis of the performance of the model in different pathological types and pathological stages; sub-step 906, recording the fluctuation range of the model in various performance indicators.
10. The method according to claim 1, characterized in that The step S10 specifically includes: sub-step 1001, analyzing the cross-validation results, identifying the model performance bottlenecks and optimization points; sub-step 1002, adjusting the network architecture, increasing or decreasing the network depth and width; sub-step 1003, optimizing the model hyperparameters, including the learning rate, regularization coefficient and annealing coefficient; sub-step 1004, introducing the attention mechanism module to enhance the model's ability to focus on key image features; sub-step 1005, using an integrated learning method to combine multiple sub-models with different structures; sub-step 1006, performing model pruning and quantization to improve the model reasoning efficiency; sub-step 1007, recording the model performance indicators after each round of iterative optimization.
Citation Information
Cited By
Cerebrospinal fluid cell intelligent analysis and diagnosis system and method based on deep learning
CN119832000A
Automatic garbage identification method and system based on data fusion
CN120655988A
A data fusion-based automatic garbage recognition method and system
CN120655988B
Digestive enteritis pathological section image adaptive feature processing method
CN120953150A