A batch effect analysis method and system based on medical images
By constructing a batch effect explorer network for preprocessing, feature extraction and various analyses of medical images, the robustness and versatility problems caused by batch effects are solved, and the stability and consistency of medical image analysis are achieved.
Patent Information
- Application Number
- CN202411756140.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2044-12-03
AI Technical Summary
In the existing technology, medical image analysis has problems with robustness and versatility due to batch effects. Especially in multicenter studies, differences in scanners, image preprocessing methods, and operator processing lead to poor performance of algorithms when applied in different centers.
Build a batch effect explorer network, including a preprocessor module, a feature extractor module, and an analyzer module, to identify and reduce batch effects through image preprocessing, feature extraction, and evaluation and visualization with multiple analysis tools.
It improves the stability of medical image analysis, can unsupervisedly distinguish datasets from different sites, identify and correct batch effects, and enhances the robustness and versatility of image analysis.
Smart Images

Figure CN119541779B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of medical image analysis, and in particular to a batch effect analysis method and system based on medical images. Background Art
[0002] Batch effects are nonbiological variations that arise from technical differences between batches of data during data generation, such as images from different centers or acquired with different scanners. This phenomenon can adversely impact the robustness and generalizability of cancer diagnostic models based on computational pathology or radiology, especially in multicenter studies. Digital pathology involves differences in scanners used, image preprocessing methods employed, operator handling, and slide preparation. Radiology, which involves variations in scanners, protocols, acquisition parameters, and image preprocessing methods, also faces significant hurdles in machine learning applications. When algorithms are trained on one center, they may perform poorly and lack robustness or generalizability when applied to another. Summary of the Invention
[0003] In order to solve the above technical problems, the purpose of the present invention is to provide a batch effect analysis method and system based on medical images, which can reduce the batch effect in the data and thus improve the stability of the batch effect in medical image analysis.
[0004] The first technical solution adopted by the present invention is: a batch effect analysis method based on medical images, comprising the following steps:
[0005] Acquiring medical image data;
[0006] Introduce the preprocessor module, feature extractor module and analyzer module to build the batch effect explorer network;
[0007] Based on the batch effect explorer network, batch effect evaluation and visualization of medical image data are performed to obtain batch effect analysis results of medical images.
[0008] Furthermore, the step of performing batch effect evaluation and visualization processing on the medical image data based on the batch effect explorer network to obtain batch effect analysis results of the medical images specifically includes:
[0009] Input medical image data into the batch effect explorer network;
[0010] A preprocessor module based on a batch effect explorer network performs image preprocessing on the medical image data to obtain preprocessed medical image data;
[0011] The feature extractor module based on the batch effect explorer network performs image feature extraction on the preprocessed medical image data to obtain a medical image feature matrix;
[0012] The analyzer module based on the batch effect explorer network performs batch effect evaluation and visualization on the medical image feature matrix to obtain the batch effect analysis results of the medical image.
[0013] Furthermore, the preprocessor module based on the batch effect explorer network performs image preprocessing on the medical image data to obtain preprocessed medical image data, which specifically includes:
[0014] Inputting medical image data into a preprocessor module based on a batch effect explorer network;
[0015] Performing format conversion processing on medical image data to obtain medical image data with preset format requirements;
[0016] Pre-segment the medical image data with preset format requirements to obtain the region of interest mask and clinical data;
[0017] The region of interest mask and clinical data are integrated to obtain preprocessed medical image data.
[0018] Furthermore, the analyzer module based on the batch effect explorer network performs batch effect evaluation and visualization on the medical image feature matrix to obtain the batch effect analysis results of the medical image, which specifically includes:
[0019] Inputting the medical image feature matrix into the analyzer module based on the batch effect explorer network;
[0020] The image overview module based on the analyzer module performs image resizing, permutation and combination, and visual difference feature extraction on the medical image feature matrix to obtain the first batch effect evaluation results;
[0021] Based on the distribution analysis module with violin plot of the analyzer module, the Wilcoxon rank sum test is performed on the medical image feature matrix to obtain the second batch effect evaluation results;
[0022] Based on the uniform manifold approximation and projection modules of the analyzer module, the medical image feature matrix is projected and dimensionally reduced to obtain the third batch effect evaluation results;
[0023] Based on the hierarchical clustering module of the analyzer module, the medical image feature matrix is subjected to hierarchical clustering processing to obtain the fourth batch effect evaluation results;
[0024] Based on the principal variation component analysis module of the analyzer module, principal component analysis and variance component analysis are performed on the medical image feature matrix to obtain the fifth batch effect evaluation results;
[0025] The batch effect scoring module based on the analyzer module performs multiple clustering stability evaluation processes on the medical image feature matrix to obtain the sixth batch effect evaluation result;
[0026] The first batch effect evaluation results, the second batch effect evaluation results, the third batch effect evaluation results, the fourth batch effect evaluation results, the fifth batch effect evaluation results and the sixth batch effect evaluation results are integrated to obtain the batch effect analysis results of the medical images.
[0027] Furthermore, the uniform manifold approximation and projection module based on the analyzer module performs projection dimensionality reduction processing on the medical image feature matrix to obtain the third batch effect evaluation result, which specifically includes:
[0028] Inputting the medical image feature matrix into the uniform manifold approximation and projection module based on the analyzer module;
[0029] Based on the uniform manifold approximation and projection module, the number of neighbors, minimum distance and number of components are initialized, and the initialized uniform manifold approximation and projection module is constructed;
[0030] Based on the initialized uniform manifold approximation and projection module, the medical image feature matrix is fitted to obtain a low-dimensional embedded medical image feature matrix;
[0031] The corresponding scatter plot is obtained according to the low-dimensional embedded medical image feature matrix and plotted on a two-dimensional plane for visualization to obtain the third batch effect evaluation results.
[0032] Furthermore, the hierarchical clustering module based on the analyzer module performs hierarchical clustering processing on the medical image feature matrix to obtain the fourth batch effect evaluation result, which specifically includes:
[0033] Inputting the medical image feature matrix into the hierarchical clustering module based on the analyzer module;
[0034] Based on the hierarchical clustering module, initialize the connection method parameters and distance measurement parameters;
[0035] The medical image feature matrix is calculated by using distance metric parameters to construct several independent clusters with pairwise distance matrices;
[0036] Through the connection method parameters, two independent clusters with the smallest corresponding pairwise distance matrix are searched and merged to obtain a new cluster;
[0037] The connection method parameters are cyclically searched for two independent clusters with pairwise distance matrices corresponding to the minimum distance between them and merged until all independent clusters are traversed to obtain the fourth batch effect evaluation result.
[0038] Furthermore, the principal variation component analysis module based on the analyzer module performs principal component analysis and variance component analysis on the medical image feature matrix to obtain the fifth batch effect evaluation result, which specifically includes:
[0039] Inputting the medical image feature matrix into the principal variation component analysis module based on the analyzer module;
[0040] Initializing a batch information vector and a clinical information matrix based on a principal variation component analysis module, wherein the clinical information matrix represents clinical data;
[0041] performing normalization processing on the medical image feature matrix to obtain a normalized medical image feature matrix;
[0042] Perform principal component analysis on the standardized medical image feature matrix to obtain several principal component data;
[0043] Integrate several principal component data to obtain the principal component matrix;
[0044] Integrate the batch information vector with the clinical information matrix to construct the design matrix;
[0045] The principal component matrix was fitted as random factors, and the variance components of the design matrix were estimated to obtain the fifth batch effect evaluation results.
[0046] Furthermore, the batch effect scoring module based on the analyzer module performs multiple clustering stability evaluation processes on the medical image feature matrix to obtain a sixth batch effect evaluation result, which specifically includes:
[0047] Inputting the medical image feature matrix into the batch effect scoring module based on the analyzer module;
[0048] Based on the batch effect scoring module, the number of resampling iterations is defined, and the medical image feature matrix is clustered multiple times to obtain the consensus matrix;
[0049] Normalize the consensus matrix to obtain a normalized consensus matrix;
[0050] Construct a group matrix based on the element group relationship in the normalized consensus matrix;
[0051] The area under the curve of the normalized consensus matrix and the group matrix was calculated to obtain the sixth batch effect evaluation results.
[0052] Furthermore, the calculation expression of the area under the curve of the normalized consensus matrix and the group matrix is specifically as follows:
[0053] S={(i,j)|1≤i <j≤N}
[0054]
[0055] C={C(i,j)|(i,j)∈S}
[0056]
[0057] In the above formula, N represents the number of samples, i and j represent the item elements in the matrix, and S represents the subset that avoids duplication of (i, j) and (j, i). represents the normalized consensus matrix, C(·) represents the group matrix, AUC(·) represents the area under the curve, and BES represents the stability index of consensus clustering. represents the consensus matrix divided by the number of times a resampled dataset is selected at the same time, and C' represents the group matrix divided by the number of times a resampled dataset is selected at the same time.
[0058] The second technical solution adopted by the present invention is: a batch effect analysis system based on medical images, comprising:
[0059] The first module is used to obtain medical image data;
[0060] The second module is used to introduce the preprocessor module, feature extractor module and analyzer module to build the batch effect explorer network;
[0061] The third module is used to evaluate and visualize the batch effects of medical image data based on the batch effect explorer network to obtain the batch effect analysis results of medical images.
[0062] The beneficial effects of the method and system of the present invention are as follows: the present invention constructs a batch effect explorer network by introducing a preprocessor module, a feature extractor module and an analyzer module, and performs batch effect evaluation and visualization on medical image data, enabling users to determine whether there are any image variables or variable combinations that can unsupervisedly distinguish data sets from different sites, thereby reducing the batch effect in the data and thus improving the stability of the batch effect in medical image analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Figure 1 This is a flowchart of the steps of a batch effect analysis method based on medical images of the present invention;
[0064] Figure 2This is a structural block diagram of a batch effect analysis system based on medical images of the present invention;
[0065] Figure 3 is a schematic diagram illustrating the results of an image overview provided by a specific embodiment of the present invention;
[0066] Figure 4 is a schematic diagram of distribution analysis results with a violin plot provided in a specific embodiment of the present invention;
[0067] Figure 5 Schematic diagram of uniform manifold approximation and projection results provided by a specific embodiment of the present invention;
[0068] Figure 6 Schematic diagram of hierarchical clustering results provided by a specific embodiment of the present invention;
[0069] Figure 7 It is a schematic diagram of the main variation component analysis results provided by a specific embodiment of the present invention. DETAILED DESCRIPTION
[0070] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. The step numbers in the following embodiments are provided for ease of description only and do not limit the order of the steps. The order of execution of the steps in the embodiments can be adaptively adjusted based on the understanding of those skilled in the art.
[0071] The present invention developed the Batch Effect Explorer (BEEx) to qualitatively and quantitatively assess whether batch effects exist between medical image datasets from different centers. BEEx combines a set of tools based on intensity, gradient, and texture features to provide visual and quantitative indicators that enable users to determine whether there are any image variables or combinations of variables that can unsupervisedly distinguish datasets from different sites. BEEx supports a variety of medical imaging techniques, including microscopy and radiology. The results of the present invention's examples clearly demonstrate the presence of batch effects in these cases. In addition, BEEx can identify and verify the reduction of batch effects in data processed using correction methods.
[0072] Reference Figure 1 The present invention provides a batch effect analysis method based on medical images, which includes the following steps:
[0073] S100, acquiring medical image data;
[0074] S200, introduce the preprocessor module, feature extractor module and analyzer module to build the batch effect explorer network;
[0075] In this embodiment, the batch effect explorer network constructed by the present invention includes three interrelated modules: Preprocessor: This module is responsible for loading and preprocessing images, segmentation masks and clinical data, and preparing them for subsequent analysis. Feature Extractor: This module focuses on extracting features based on image intensity, gradient and texture from images for downstream analysis. Analyzer: This module provides batch effect assessment and visualization. It also includes a set of tools for various analyses, including image overview, distribution analysis with violin plots, uniform manifold approximation and projection (UMAP), hierarchical clustering, principal variation component analysis (PVCA) and the proposed batch effect score (BES).
[0076] S300, based on the batch effect explorer network, batch effect evaluation and visualization processing are performed on the medical image data to obtain the batch effect analysis results of the medical images.
[0077] Specifically, medical image data are input into a batch effect explorer network.
[0078] S310, performing image preprocessing on the medical image data by a preprocessor module based on the batch effect explorer network to obtain preprocessed medical image data;
[0079] Specifically, the medical image data is input into a preprocessor module based on a batch effect explorer network; the medical image data is format converted to obtain medical image data with preset format requirements; the medical image data with preset format requirements is pre-segmented to obtain a region of interest mask and clinical data; the region of interest mask and clinical data are integrated to obtain preprocessed medical image data.
[0080] In this embodiment, the preprocessor helps prepare and process data for the feature extractor and analyzer. BEEx supports multiple medical image types and formats, such as NIfTI (.nii.gz), DICOM (.dcm), Portable Network Graphics (.png), and OpenSlide (.svs). In addition, BEEx provides helper scripts to help users convert DICOM files to NIfTI format. Pre-segmented region of interest (ROI) masks and clinical data are optional during preprocessing. If an ROI mask is specified, BEEx will only analyze batch effects within the region of interest indicated by the ROI mask. If available, clinical data will be used to perform PVCA.
[0081] S320, a feature extractor module based on a batch effect explorer network, performing image feature extraction processing on the preprocessed medical image data to obtain a medical image feature matrix;
[0082] In this embodiment, in the feature extraction module, BEEx extracts various intensity-, gradient-, and texture-based features from processed images. For digital pathology images, BEEx extracts (n=36) features, including color histogram, brightness, and contrast. For radiology images, BEEx extracts up to (n=27) features, including signal-to-noise ratio, foreground intensity mean, and entropy focus criterion.
[0083] S330, an analyzer module based on a batch effect explorer network, performs batch effect evaluation and visualization on the medical image feature matrix to obtain batch effect analysis results of the medical image.
[0084] Specifically, the medical image feature matrix is input into the analyzer module based on the batch effect explorer network. BEEx uses six analyzers to visualize and evaluate batch effects from different perspectives: image overview, distribution analysis using violin plots, distribution analysis using UMAP, hierarchical clustering, PVCA, and batch effect scoring.
[0085] S331, an image overview module based on the analyzer module performs image size adjustment, permutation and combination, and visual difference feature extraction on the medical image feature matrix to obtain the first batch effect evaluation results;
[0086] In this embodiment, the Image Viewer directly examines batch effects through visual appearance. It resizes the original images and arranges them into a single image map. This makes visual differences and features (such as color, style, and shape) across images from different groups more apparent and easier to examine.
[0087] S332, based on the distribution analysis module with violin plot of the analyzer module, performing a Wilcoxon rank sum test on the medical image feature matrix to obtain the second batch effect evaluation result;
[0088] In this embodiment, distribution analysis with violin plots illustrates the distribution of image features calculated by the feature extractor for different groups. The analyzer reveals pre-analysis variances for different groups. In addition, to determine which or which types of features lead to batch effects, distribution analysis with violin plots performs a Wilcoxon rank sum test on the image features extracted from different groups in a pairwise manner. The Wilcoxon rank sum test is a non-parametric statistical hypothesis test used to compare independent samples and assess whether their distributions are significantly different. If the feature values of one group are significantly different from those of other groups (p<0.05), the group is highlighted in red in the violin plot. Therefore, users can assess the extent of batch effects not only at the overall level, but also at the group level. In addition, tracking features associated with batch effects can help users better understand the extent of variability in their data and inspire them to mitigate the batch effects they encounter.
[0089] S333. Based on the uniform manifold approximation and projection module of the analyzer module, perform projection dimensionality reduction processing on the medical image feature matrix to obtain a third batch effect evaluation result;
[0090] Specifically, the medical image feature matrix is input into the uniform manifold approximation and projection module based on the analyzer module; based on the uniform manifold approximation and projection module, the number of neighbors, minimum distance and number of components are initialized, and the initialized uniform manifold approximation and projection module is constructed; based on the initialized uniform manifold approximation and projection module, the medical image feature matrix is fitted to obtain a low-dimensional embedded medical image feature matrix; according to the low-dimensional embedded medical image feature matrix, the corresponding scatter plot is obtained and drawn on a two-dimensional plane for visualization, and the third batch effect evaluation result is obtained.
[0091] In this example, distribution analysis using Unified Mapping (UMAP), a dimensionality reduction technique, is used to project image features from different cohorts into a two-dimensional space. Reducing the dimensionality of the data makes it easier to visualize complex patterns and structures and examine site-specific clusters. If batch effects are present, distinguishable clusters will appear in the plot.
[0092] The specific algorithm flow of UMAP is as follows:
[0093] Input: feature matrix X∈R (m×n) , where m is the number of samples, n is the number of features, the number of neighbors k, the minimum distance δ, the number of components d (default is 2), and any other UMAP parameters.
[0094] 1) Initialize UMAP, set the number of neighbors k, the minimum distance δ and the number of components d;
[0095] 2) Obtain a low-dimensional embedding Z∈R by fitting UMAP on the feature matrix X (m×d) ;
[0096] 3) Create a scatter plot of the low-dimensional embedding Z and plot Z on a two-dimensional plane;
[0097] 4) Customize charts (e.g., add titles, labels, and legends);
[0098] Output: UMAP plot visualizing the low-dimensional representation of the feature matrix X.
[0099] S334. Based on the hierarchical clustering module of the analyzer module, perform hierarchical clustering processing on the medical image feature matrix to obtain the fourth batch of effect evaluation results;
[0100] Specifically, the medical image feature matrix is input into the hierarchical clustering module based on the analyzer module; based on the hierarchical clustering module, the connection method parameters and the distance measurement parameters are initialized; the medical image feature matrix is calculated by the distance measurement parameters to construct several independent clusters with pairwise distance matrices; the two independent clusters with pairwise distance matrices corresponding to the minimum distance between them are searched through the connection method parameters and merged to obtain a new cluster; the two independent clusters with pairwise distance matrices corresponding to the minimum distance between them are searched through the connection method parameters in a loop and merged until all independent clusters are traversed to obtain the fourth batch effect evaluation results.
[0101] In this example, hierarchical clustering creates a cluster hierarchy and visualizes the results using a heatmap (also called a cluster plot). Hierarchical clustering is a cluster analysis method that constructs a cluster hierarchy. The resulting clusters are then visualized using a heatmap with a color gradient to represent the numerical values of the data. This allows us to visualize the relationships, similarities, and differences between different data samples. If batch effects are present, the samples in the analyzer plot are grouped primarily based on their cohort.
[0102] The specific algorithm flow of hierarchical clustering is as follows:
[0103] Input: feature matrix X∈R (m×n) , where m is the number of samples, n is the number of features, the connection method L (e.g., 'single', 'complete', 'average'), and the distance metric D (e.g., 'euclidean', 'manhattan').
[0104] 1) Calculate the pairwise distance matrix D using the distance metric D;
[0105] 2) Initialize each sample as an independent cluster;
[0106] 3) Repetition;
[0107] 4) Find a pair of clusters with the smallest distance (C i ,C j );
[0108] 5) Merge cluster C i and C j Forming a new cluster C ij ;
[0109] 6) Update the distance matrix D to reflect the new cluster C ij distances to all other clusters;
[0110] 7) Until all samples are merged into one cluster or the stopping condition is reached;
[0111] Output: Hierarchical clustering heatmap visualizing the feature matrix.
[0112] S335. Based on the principal variation component analysis module of the analyzer module, principal component analysis and variance component analysis are performed on the medical image feature matrix to obtain the fifth batch effect evaluation result;
[0113] Specifically, the medical image feature matrix is input into a principal variation component analysis module based on the analyzer module; based on the principal variation component analysis module, the batch information vector and the clinical information matrix are initialized, and the clinical information matrix represents the clinical data; the medical image feature matrix is standardized to obtain a standardized medical image feature matrix; principal component analysis is performed on the standardized medical image feature matrix to obtain a number of principal component data; the several principal component data are integrated to obtain a principal component matrix; the batch information vector and the clinical information matrix are integrated to construct a design matrix; the principal component matrix is fitted as a random factor, and the variance component of the design matrix is estimated to obtain the fifth batch effect evaluation result.
[0114] In this example, Principal Variance Components Analysis (PVCA) combines Principal Components Analysis (PCA) and Variance Components Analysis (VCA) to partition the variance in the data into its principal components. This can be used to identify and quantify the main sources of variation in the data. If batch effects are present, the batch variance in the plot is one of the main contributors to the overall variation.
[0115] The algorithm flow of principal variance component analysis is as follows:
[0116] Input: feature matrix X∈R (m×n) , where m is the number of samples, n is the number of features, and the batch information vector b∈R m , clinical information matrix C∈R (m×p) , where p is the number of clinical variables.
[0117] 1) Standardize the feature matrix X so that each feature has zero mean and unit variance;
[0118] 2) Perform principal component analysis (PCA) on X;
[0119] 3) Select the first k principal components that capture most of the variance (e.g., k equals 5);
[0120] 4) Form the matrix Z of the first k principal components, with dimension m×k;
[0121] 5) Combine batch information b and clinical information C into a design matrix D∈R (m×(1+p)) ;
[0122] 6) For each principal component z i (column vector of Z), D is fitted as a random factor in the univariate mixed model, whose expression is z i =D γ +∈ i , where γ is the random effect coefficient vector, ∈ i is the residual;
[0123] 7) Estimate each principal component z i The variance components of the random factors, i.e., the variances of batch, clinical variables, and residuals;
[0124] 8) Average the proportion of variance explained by all k principal components to obtain the proportion of overall variance explained by batch, clinical variables, and residuals.
[0125] Output: batch, clinical variables, and proportion of overall variance explained by residuals.
[0126] S336. The batch effect scoring module based on the analyzer module performs multiple clustering stability evaluation processes on the medical image feature matrix to obtain a sixth batch effect evaluation result;
[0127] Specifically, the medical image feature matrix is input into the batch effect scoring module based on the analyzer module; based on the batch effect scoring module, the number of resampling iterations is defined, and the medical image feature matrix is clustered multiple times to obtain a consensus matrix; the consensus matrix is normalized to obtain a normalized consensus matrix; according to the element group relationship in the normalized consensus matrix, a group matrix is constructed; the area under the curve of the normalized consensus matrix and the group matrix is calculated to obtain the sixth batch effect evaluation result.
[0128] In this example, the batch effect score (BES) is an overall indicator of the degree of batch effect. BES measures the batch effect by evaluating the stability of sample clustering in a cohort based on consensus clustering. We assume that if the degree of batch effect of a cohort is high, the samples in the cohort will be stably clustered together in multiple clustering runs. More specifically, given the number of resampling iterations H, the sampled dataset can be defined as D = {D1 , D 2 , …, D H}, according to a predefined ratio, such as 80%. In each resampling iteration h ∈ {1, 2, …, H}, let M (h) represent the consensus matrix of the (N × N) dataset D (h) . The number of all samples is N, and the clustering results of sample pairs can be defined as the elements of the following matrix, and its expression is:
[0129]
[0130] Let I (h) be the (N × N) indicator matrix, where I (h) (i, j) is 1 when items i and j exist in the dataset D at the same time (h) , and 0 otherwise. The consensus matrix can be defined as the normalization of the concatenated matrix of all resampled datasets, and its expression is:
[0131]
[0132] That is, the consensus matrix records the number of times that items i and j are assigned to the same cluster, divided by the number of times they are selected simultaneously in the same resampled dataset. Therefore, the consensus matrix measures the stability and robustness of sample pairs clustering together.
[0133] Let C(i, j) represent whether items i and j belong to the same group, and it is defined as follows: [[ID=____]]
[0134] [[ID=____]] [[ID=____]] [[ID=____]]
[0135] Here, we define the batch effect score BES as the area under the curve AUC of the consensus matrix M and the group matrix C, where i < j, and obtain the subset S that avoids the repetition of (i, j) and (j, i), and its expression is:
[0136] S = {(i, j)|1 ≤ i < j ≤ N}
[0137]
[0138] C = {C(i, j)|(i, j) ∈ S}
[0139]
[0140] In the above formula, N represents the number of samples, i and j represent the item elements in the matrix, S represents the subset that avoids the repetition of (i, j) and (j, i), It seems there are some incomplete or incorrect lines in the original text (lines 35 - 39 are not fully shown). I've translated it as accurately as possible based on the available content. If you can provide the complete and correct original text, it will be possible to get a more accurate translation.represents the normalized consensus matrix, C(·) represents the group matrix, AUC(·) represents the area under the curve, and BES represents the stability index of consensus clustering. represents the consensus matrix divided by the number of times a resampled dataset is selected at the same time, and C' represents the group matrix divided by the number of times a resampled dataset is selected at the same time.
[0141] BES reflects the strength of batch effects by measuring the stability of consensus clustering. When BES values are close to 1, samples cluster easily and stably by cohort, indicating a high degree of batch effect between cohorts. Conversely, if BES values are close to 0.5, samples cluster randomly, indicating a low degree of batch effect between cohorts. Note that BES can be applied not only to all cohorts in a dataset but also to the cohort level within multicenter datasets.
[0142] S337. Integrate the first batch effect evaluation results, the second batch effect evaluation results, the third batch effect evaluation results, the fourth batch effect evaluation results, the fifth batch effect evaluation results, and the sixth batch effect evaluation results to obtain batch effect analysis results of the medical image.
[0143] Finally, simulation experiments were conducted to further validate the analysis method proposed in this embodiment of the present invention. BEEx demonstrated a high degree of batch effect in a multicenter HCC dataset based on WSI. Furthermore, this embodiment of the present invention examined a dataset containing four HCC whole-slide image cohorts: GDPH, TCGA, FAHKU, and FAHZU. Significant batch effects were observed in all four cohorts of the dataset. However, BEEx did not find any significant batch effect between GDPH and FAHKU.
[0144] Specifically, there were significant differences in the hematoxylin and eosin (H&E) staining patterns and intensities between the cohorts. More specifically, the staining patterns of TCGA and FAHZU were significantly different from those of GDPH and FAHKU, while there was no significant difference in staining between GDPH and FAHKU. Similarly, FAHZU and TCGA each had distinct clusters, while GDPH and FAHKU overlapped into one cluster, as shown in Figure 2. Figure 3 and Figure 4 As shown in Figure 3, there is a high degree of batch effect between FAHZU, TCGA, and the combination of GDPH and FAHKU, while the degree of batch effect between GDPH and FAHKU is low. Figure 5As shown in Figure 2, most of the features based on tissue, texture, and color can significantly distinguish all cohorts (p < 0.05), while some features cannot distinguish cohorts (e.g., RGB 1 brightness mean) or can only significantly distinguish one or two cohorts (e.g., YUV 2 brightness mean and HSV 1 brightness standard deviation). According to the hierarchical clustering results, as shown in Figure 2, Figure 6 As shown in Figure 2, samples from TCGA and FAHZU were mainly grouped according to their cohorts, while samples from GDPH and FAHKU were mixed together. Figure 7 As shown, batch was the main contributor to the overall variation (63.48%). In addition, the overall BES of the WSI study in the present invention was 0.8417. The inter-cohort BES values of TCGA for GDPH, TCGA for FAHKU, TCGA for FAHZU, GDPH for FAHKU, GDPH for FAHZU, and FAHKU for FAHZU were 0.9956, 0.9673, 0.9055, 0.5523, 0.9939, and 0.8839, respectively.
[0145] Reference Figure 2 , a batch effect analysis system based on medical images, comprising:
[0146] The first module 201 is used to obtain medical image data;
[0147] The second module 202 is used to introduce a preprocessor module, a feature extractor module and an analyzer module to build a batch effect explorer network;
[0148] The third module 203 is used to perform batch effect evaluation and visualization processing on the medical image data based on the batch effect explorer network to obtain batch effect analysis results of the medical images.
[0149] The contents of the above method embodiments are all applicable to the present system embodiments. The functions specifically implemented by the present system embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0150] The above is a specific description of the preferred implementation of the present invention, but the invention is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of this application.
Claims
1. A batch effect analysis method based on medical images, characterized in that: The following steps are involved: Acquiring medical image data; Introduce the preprocessor module, feature extractor module and analyzer module to build the batch effect explorer network; Input medical image data into the batch effect explorer network; Inputting medical image data into a preprocessor module based on a batch effect explorer network; Performing format conversion processing on medical image data to obtain medical image data with preset format requirements; Pre-segment the medical image data with preset format requirements to obtain the region of interest mask and clinical data; Integrate the region of interest mask and clinical data to obtain preprocessed medical image data; The feature extractor module based on the batch effect explorer network performs image feature extraction on the preprocessed medical image data to obtain a medical image feature matrix; Inputting the medical image feature matrix into the analyzer module based on the batch effect explorer network; The image overview module based on the analyzer module performs image resizing, permutation and combination, and visual difference feature extraction on the medical image feature matrix to obtain the first batch effect evaluation results; Based on the distribution analysis module with violin plot of the analyzer module, the Wilcoxon rank sum test is performed on the medical image feature matrix to obtain the second batch effect evaluation results; Based on the uniform manifold approximation and projection modules of the analyzer module, the medical image feature matrix is projected and dimensionally reduced to obtain the third batch effect evaluation results; Based on the hierarchical clustering module of the analyzer module, the medical image feature matrix is subjected to hierarchical clustering processing to obtain the fourth batch effect evaluation results; Based on the principal variation component analysis module of the analyzer module, principal component analysis and variance component analysis are performed on the medical image feature matrix to obtain the fifth batch effect evaluation results; The batch effect scoring module based on the analyzer module performs multiple clustering stability evaluation processes on the medical image feature matrix to obtain the sixth batch effect evaluation result; The first batch effect evaluation results, the second batch effect evaluation results, the third batch effect evaluation results, the fourth batch effect evaluation results, the fifth batch effect evaluation results and the sixth batch effect evaluation results are integrated to obtain the batch effect analysis results of the medical images.
2. The batch effect analysis method based on medical images according to claim 1, characterized in that: The step of performing projection dimensionality reduction processing on the medical image feature matrix based on the uniform manifold approximation and projection module of the analyzer module to obtain the third batch effect evaluation result specifically includes: Inputting the medical image feature matrix into the uniform manifold approximation and projection module based on the analyzer module; Based on the uniform manifold approximation and projection module, the number of neighbors, minimum distance and number of components are initialized, and the initialized uniform manifold approximation and projection module is constructed; Based on the initialized uniform manifold approximation and projection module, the medical image feature matrix is fitted to obtain a low-dimensional embedded medical image feature matrix; The corresponding scatter plot is obtained according to the low-dimensional embedded medical image feature matrix and plotted on a two-dimensional plane for visualization to obtain the third batch effect evaluation results.
3. The batch effect analysis method based on medical images according to claim 2, characterized in that: The hierarchical clustering module based on the analyzer module performs hierarchical clustering processing on the medical image feature matrix to obtain the fourth batch effect evaluation result, which specifically includes: Inputting the medical image feature matrix into the hierarchical clustering module based on the analyzer module; Based on the hierarchical clustering module, initialize the connection method parameters and distance measurement parameters; The medical image feature matrix is calculated by using distance metric parameters to construct several independent clusters with pairwise distance matrices; Through the connection method parameters, two independent clusters with the smallest corresponding pairwise distance matrix are searched and merged to obtain a new cluster; The connection method parameters are cyclically searched for two independent clusters with pairwise distance matrices corresponding to the minimum distance between them and merged until all independent clusters are traversed to obtain the fourth batch effect evaluation result.
4. The batch effect analysis method based on medical images according to claim 3, characterized in that: The principal variation component analysis module based on the analyzer module performs principal component analysis and variance component analysis on the medical image feature matrix to obtain the fifth batch effect evaluation result, which specifically includes: Inputting the medical image feature matrix into the principal variation component analysis module based on the analyzer module; Initializing a batch information vector and a clinical information matrix based on a principal variation component analysis module, wherein the clinical information matrix represents clinical data; performing normalization processing on the medical image feature matrix to obtain a normalized medical image feature matrix; Perform principal component analysis on the standardized medical image feature matrix to obtain several principal component data; Integrate several principal component data to obtain the principal component matrix; Integrate the batch information vector with the clinical information matrix to construct the design matrix; The principal component matrix was fitted as random factors, and the variance components of the design matrix were estimated to obtain the fifth batch effect evaluation results.
5. The batch effect analysis method based on medical images according to claim 4, characterized in that: The batch effect scoring module based on the analyzer module performs multiple clustering stability evaluation processes on the medical image feature matrix to obtain a sixth batch effect evaluation result, which specifically includes: Inputting the medical image feature matrix into the batch effect scoring module based on the analyzer module; Based on the batch effect scoring module, the number of resampling iterations is defined, and the medical image feature matrix is clustered multiple times to obtain the consensus matrix; Normalize the consensus matrix to obtain a normalized consensus matrix; Construct a group matrix based on the element group relationship in the normalized consensus matrix; The area under the curve of the normalized consensus matrix and the group matrix was calculated to obtain the sixth batch effect evaluation results.
6. The batch effect analysis method based on medical images according to claim 5, characterized in that: The calculation expressions of the area under the curve of the normalized consensus matrix and the group matrix are specifically as follows: ; In the above formula, N represents the number of samples, i, j Represents the item elements in the matrix, S To avoid and The repeated subset of represents the normalized consensus matrix, represents the group matrix, represents the area under the curve, BES represents the stability index for measuring consensus clustering, represents the consensus matrix divided by the number of times a resampled dataset is selected simultaneously, Represents a group matrix divided by the number of times a resampled dataset is selected simultaneously.
7. A batch effect analysis system based on medical images, characterized in that: Includes the following modules: The first module is used to obtain medical image data; The second module is used to introduce the preprocessor module, feature extractor module and analyzer module to build the batch effect explorer network; The third module is used to input medical image data into the batch effect explorer network; Inputting medical image data into a preprocessor module based on a batch effect explorer network; Performing format conversion processing on medical image data to obtain medical image data with preset format requirements; Pre-segment the medical image data with preset format requirements to obtain the region of interest mask and clinical data; Integrate the region of interest mask and clinical data to obtain preprocessed medical image data; The feature extractor module based on the batch effect explorer network performs image feature extraction on the preprocessed medical image data to obtain a medical image feature matrix; Inputting the medical image feature matrix into the analyzer module based on the batch effect explorer network; The image overview module based on the analyzer module performs image resizing, permutation and combination, and visual difference feature extraction on the medical image feature matrix to obtain the first batch effect evaluation results; Based on the distribution analysis module with violin plot of the analyzer module, the Wilcoxon rank sum test is performed on the medical image feature matrix to obtain the second batch effect evaluation results; Based on the uniform manifold approximation and projection modules of the analyzer module, the medical image feature matrix is projected and dimensionally reduced to obtain the third batch effect evaluation results; Based on the hierarchical clustering module of the analyzer module, the medical image feature matrix is subjected to hierarchical clustering processing to obtain the fourth batch effect evaluation results; Based on the principal variation component analysis module of the analyzer module, principal component analysis and variance component analysis are performed on the medical image feature matrix to obtain the fifth batch effect evaluation results; The batch effect scoring module based on the analyzer module performs multiple clustering stability evaluation processes on the medical image feature matrix to obtain the sixth batch effect evaluation result; The first batch effect evaluation results, the second batch effect evaluation results, the third batch effect evaluation results, the fourth batch effect evaluation results, the fifth batch effect evaluation results and the sixth batch effect evaluation results are integrated to obtain the batch effect analysis results of the medical images.
Citation Information
Patent Citations
Method and device for predicting hemotoxicity of patient after radiotherapy based on machine learning
CN119007978A
Batch effect mitigation in digitized images
US20230059717A1