An experimental dyeing result image processing calculation method
By employing a dual-model identification strategy and area ratio calculation, the problem of accurately quantifying positive and vacuolated regions in immunohistochemical staining and intracellular structure staining analysis was solved, enabling efficient pathological analysis and efficacy monitoring, and improving the automation and reliability of pathological diagnosis.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-20
- Publication Date
- 2026-03-24
AI Technical Summary
Existing technologies struggle to accurately distinguish positive areas from background in immunohistochemical staining and intracellular structure staining analysis, and their identification and quantification of vacuolar regions are not precise enough. This results in poor objectivity and reproducibility in the assessment of pathological indicators, making it difficult to meet the needs of large-sample studies and precision medicine.
A dual-model identification strategy is adopted, using a pre-trained first identification model to identify stained positive regions and a second identification model to extract intracellular vacuolar regions. By combining area ratio calculation and a disease assessment model, accurate assessment of disease status and monitoring of treatment efficacy can be achieved.
It improves the accuracy and automation of staining image analysis, provides efficient and reliable quantitative support, offers objective data support for disease diagnosis and treatment evaluation, and enhances the credibility of pathological analysis.
Smart Images

Figure CN121033844B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and more specifically, to a method for processing and calculating experimental staining results images. Background Technology
[0002] In modern medical research, pathological diagnosis, and drug development, experimental staining techniques are crucial for observing tissue morphology, assessing pathological changes, and monitoring treatment efficacy. Immunohistochemical staining, special staining (such as Sirius red staining), and staining analysis targeting intracellular structures (such as lipid droplet vacuoles) play an irreplaceable role in disease diagnosis and research. For example, observing red-positive areas in liver tissue through Sirius red staining can directly reflect the degree of collagen deposition during liver fibrosis, providing important evidence for the staging diagnosis of liver fibrosis. Meanwhile, staining analysis of lipid droplet vacuoles within hepatocytes can accurately assess the degree of hepatic steatosis, aiding in the research and treatment of metabolic diseases such as non-alcoholic fatty liver disease.
[0003] Traditional methods rely primarily on pathologists or researchers to visually inspect stained slides and make qualitative or semi-quantitative assessments based on experience. This manual assessment approach is not only time-consuming and labor-intensive, but also susceptible to subjective experience and visual fatigue, resulting in poor objectivity, consistency, and reproducibility of the results. It is difficult to meet the stringent data quantification requirements of large-sample studies or precision medicine.
[0004] With the development of digital pathology technology, some studies have adopted automated analysis methods based on image segmentation. However, existing technologies still have significant shortcomings in specific identification and accurate calculation. On the one hand, for positive areas after immunohistochemical staining or special staining, due to the complex tissue background, uneven staining intensity, and possible non-specific staining interference, existing algorithms often struggle to accurately distinguish positive areas from the background, resulting in large area calculation errors and affecting the accuracy of quantitative assessment of pathological indicators (such as the degree of collagen deposition). On the other hand, for the identification of intracellular vacuoles (such as lipid droplets), due to the diverse morphology and size of vacuoles and their potential gray-level overlap with other intracellular structures, existing image segmentation algorithms struggle to accurately extract vacuolar regions, thus affecting the accuracy of quantitative analysis of indicators such as the degree of hepatic steatosis.
[0005] Therefore, how to accurately distinguish and calculate the staining positive areas and the area of intracellular vacuoles, so as to provide support for disease status assessment and efficacy monitoring, is a technical problem that urgently needs to be solved in the field of medical image analysis. Summary of the Invention
[0006] To address the technical problems existing in the background art, the present invention provides an image processing and calculation method for experimental staining results, an electronic device, a computer storage medium, and a computer program product.
[0007] This invention also provides a method for image processing and calculation of experimental staining results, comprising the following steps:
[0008] Digital images of stained tissue samples are acquired and preprocessed; wherein, the staining process includes immunohistochemical staining and intracellular structure staining.
[0009] The first recognition model is used to identify the positive stained regions in the preprocessed digital image of the tissue sample, and the area of the identified positive stained regions is quantified to obtain the area data of the positive regions; wherein, the first recognition model is trained in advance using images containing positive stained regions with irregular shapes;
[0010] The second recognition model is used to identify and extract intracellular vacuolar regions in the preprocessed digital image of the tissue sample, and the area of the extracted intracellular vacuolar regions is quantified to obtain vacuolar region area data; wherein, the second recognition model is pre-trained using vacuolar images containing adjacent low-staining regions or nested with stained positive regions;
[0011] The percentage of the area of the positive region is calculated based on the area data of the positive region, and the percentage of the area of the vacuolated region is calculated based on the area data of the vacuolated region.
[0012] The proportions of the positive staining area and the proportion of the vacuolated area are input into a preset disease assessment model, and the disease status assessment results are output. By comparing the disease status assessment results at different time points, dynamic monitoring of the efficacy after treatment can be achieved.
[0013] The present invention also provides a computer storage medium storing a computer program, which, when executed by a processor, performs the method described in any of the preceding claims.
[0014] The present invention also provides a computer program product comprising program code for performing the steps of the method as described in any of the preceding claims.
[0015] This invention improves the accuracy and comprehensiveness of experimental staining image analysis, providing efficient and reliable quantitative support for disease diagnosis (such as liver fibrosis and steatosis) and treatment assessment, and can significantly improve the automation level and reliability of pathological analysis results. Attached Figure Description
[0016] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is a flowchart illustrating an experimental staining result image processing and calculation method disclosed in an embodiment of the present invention;
[0018] Figure 2 This is a schematic diagram illustrating the identification results of the stained positive region as disclosed in an embodiment of the present invention;
[0019] Figure 3 This is a schematic diagram illustrating the identification results of intracellular vacuolar regions disclosed in an embodiment of the present invention. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, exemplary embodiments will be described in detail below, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements.
[0021] like Figure 1 As shown, an embodiment of the present invention provides a method for processing and calculating experimental staining results images, comprising the following steps:
[0022] 100. Acquire digital images of stained tissue samples and preprocess the digital images of the tissue samples; wherein, the staining process includes immunohistochemical staining and intracellular structure staining.
[0023] In this step, images of stained tissue samples are acquired using devices such as digital pathology scanners. The staining process includes immunohistochemical staining to mark the positive expression of specific antigens and intracellular structural staining targeting lipid droplets. Simultaneously, the acquired raw digital images of the tissue samples undergo noise reduction, contrast enhancement, and color normalization to eliminate interference from imaging noise and uneven lighting, highlighting the characteristic differences between stained positive areas and intracellular vacuolar areas.
[0024] 200, using a first recognition model to identify the stained positive regions in the preprocessed digital image of the tissue sample, and quantifying the area of the identified stained positive regions to obtain positive region area data; wherein, the first recognition model is pre-trained using images containing stained positive regions with irregular shapes.
[0025] In this step, a pre-trained first recognition model is used. Its training data includes a large number of staining positive region samples with irregular shapes (such as positive signals with blurred edges and scattered morphology), enabling it to learn complex morphological features and effectively identify positive regions of various shapes in immunohistochemistry or special staining. The recognition results are as follows: Figure 2 As shown.
[0026] The pixel-level area of the positive regions identified by the first recognition model is calculated, and the accurate area data of the positive regions is output.
[0027] 300, using a second recognition model to identify and extract intracellular vacuolar regions in the preprocessed digital image of the tissue sample, and quantifying the area of the extracted intracellular vacuolar regions to obtain vacuolar region area data; wherein, the second recognition model is pre-trained using vacuolar images containing adjacent low-staining regions or nested with stained positive regions.
[0028] In this step, the second recognition model is trained using samples containing specific scenarios: vacuoles adjacent to low-staining regions and nested vacuoles located within positively stained regions. The model learns the morphological features (such as boundary contours and internal grayscale distribution) and spatial topological patterns of vacuoles in complex spatial relationships, ensuring accurate extraction of target regions such as lipid droplet vacuoles within hepatocytes even in complex situations involving complex regional relationships. The recognition results are as follows: Figure 3 As shown.
[0029] The area of the extracted cavitation regions is calculated to generate cavitation region area data.
[0030] 400, calculate the percentage of the area of the stained positive region based on the positive region area data, and calculate the percentage of the area of the vacuolated region based on the vacuolated region area data.
[0031] In this step, the percentage of the area of the positive staining region is calculated, i.e., the area of the positive region / the total area of the tissue region, and the percentage of the area of the vacuolated region is calculated, i.e., the area of the vacuolated region / the total area of the cell region.
[0032] 500, input the area ratio of the stained positive region and the area ratio of the vacuolated region into a preset disease assessment model, output the disease status assessment result, and realize the dynamic monitoring of the efficacy after treatment by comparing the disease status assessment results at different time points.
[0033] In this step, the proportion of positive area and the proportion of vacuolated area are input into a preset disease assessment model, such as a machine learning model that combines clinical pathological parameters. Through the correlation analysis between quantitative indicators and disease status, the model outputs the status assessment results of diseases such as liver fibrosis and steatosis.
[0034] Meanwhile, by comparing the disease status assessment results at different treatment time points, the changing trends of positive and vacuolated areas are tracked to achieve dynamic monitoring and evaluation of treatment effects, providing data support for clinical treatment adjustments.
[0035] This invention employs a dual-model recognition strategy targeting the different characteristics of stained positive regions and intracellular vacuolar regions. A first recognition model, trained on irregular positive region samples, accurately captures complex positive regions in immunohistochemistry. A second recognition model, trained in adjacent / nested scenarios, effectively extracts hidden intracellular vacuolar regions, achieving precise quantification of these two key regions. By linking area proportion calculation with a disease assessment model, the quantified data is transformed into objective disease status results, and dynamic comparisons are used to monitor treatment efficacy. This invention improves the accuracy and comprehensiveness of experimental staining image analysis, providing efficient and reliable quantitative support for disease diagnosis (such as liver fibrosis and steatosis) and treatment assessment, significantly enhancing the automation and reliability of pathological analysis results.
[0036] Optionally, the preprocessing of the digital image of the tissue sample includes at least one of the following operations:
[0037] Noise in the digital image of the tissue sample is removed using Gaussian filtering or median filtering algorithms.
[0038] Adaptive histogram equalization enhances the image contrast of the tissue sample digital images to highlight the grayscale difference between the stained positive areas and the background.
[0039] Morphological opening and closing operations are used to remove small-area impurities from the digital images of the tissue samples in order to preserve the integrity of the tissue structure.
[0040] The contours of the tissue region are extracted using an edge detection algorithm, and the unorganized background areas at the image edges are cropped out.
[0041] In this embodiment, Gaussian filtering or median filtering algorithms are used to specifically eliminate granular or salt-and-pepper noise caused by sensor noise and illumination fluctuations during image acquisition. Gaussian filtering is suitable for smoothing high-frequency noise, while median filtering is more effective at suppressing impulse noise. The two algorithms can be flexibly selected according to the type of noise to avoid noise interfering with the accuracy of subsequent region identification.
[0042] Adaptive histogram equalization optimizes the grayscale distribution in local image regions, addressing issues of uneven staining leading to localized over-darkness or over-brightness. This operation significantly amplifies the grayscale difference between stained positive areas (such as immunohistochemical staining areas) and background tissue, making the boundaries and internal structures of positive areas clearer and providing more easily distinguishable feature inputs for the primary recognition model.
[0043] Morphological opening operations (erosion followed by dilation) are used to eliminate small-area impurities (such as dye deposits and bubbles) in the image. Then, closing operations are used to fill tiny cavities within the tissue area, removing interference while maintaining the integrity of the tissue structure. This operation can prevent small impurities from being misidentified as tiny positive areas or cavitation, reducing false positive results in the identification process.
[0044] Edge detection algorithms (such as the Canny operator) are used to extract the contour boundaries of tissue samples, precisely cropping out unorganized background areas (such as slides or blank areas) at the image edges. This operation reduces the computational resource consumption of invalid regions while ensuring the statistical accuracy of the total area of tissue regions and the total area of cell regions in subsequent area ratio calculations, thus improving the reliability of the quantification results.
[0045] Optionally, the step of using the first recognition model to identify the stained positive regions in the preprocessed digital image of the tissue sample includes:
[0046] 201. Extract multi-dimensional features of each candidate positive staining region from the preprocessed digital image of the tissue sample, including color channel features, texture features and morphological features; wherein, the color channel features are the channel value distribution of the candidate positive staining region in the RGB or HSV color space, the texture features are the region texture roughness calculated based on the gray-level co-occurrence matrix, and the morphological features include the region perimeter, area and roundness.
[0047] In this step, the core features of each candidate stained positive region are extracted from the preprocessed digital image of the tissue sample and used as input to the first recognition model. Specifically:
[0048] Color channel characteristics: For positive areas stained by immunohistochemistry or special staining (such as Sirius red staining), the channel value distribution in the RGB (red, green, blue) or HSV (hue, saturation, lightness) color space is extracted. For example, the red positive areas stained with Sirius red have significantly higher values in the red channel of the RGB color space than the background. By statistically analyzing the pixel value range and distribution pattern of this channel, the color difference between the positive areas and the background can be preliminarily distinguished.
[0049] Texture features: The texture roughness of candidate regions is calculated based on the gray-level co-occurrence matrix to capture the gray-level variation patterns within positive regions. For example, positive regions of fibrotic tissue may exhibit a rougher texture, while normal tissue has a more uniform texture. Quantifying texture differences can help eliminate non-specific staining interference.
[0050] Morphological features: Extract geometric parameters such as perimeter, area, and roundness of candidate regions. Irregularly shaped positive regions (such as diffusely distributed collagen deposition areas) can be distinguished from regular noise regions through morphological features, thereby ensuring that subsequent models focus on the true pathological structures.
[0051] 202. Input the multi-dimensional features into the first recognition model to obtain the pixel-level first segmentation mask of the candidate stained positive region; wherein, the first recognition model is a deep learning model based on U-Net or Mask R-CNN architecture;
[0052] In this step, the multi-dimensional features extracted in the previous steps are integrated and analyzed using the first recognition model to generate accurate pixel-level segmentation results. Specifically:
[0053] The first recognition model adopts either the U-Net or Mask R-CNN architecture, both of which excel at handling fine segmentation tasks in medical images. U-Net achieves end-to-end segmentation through an encoder-decoder structure, with the decoder fusing multi-scale features from the encoder via skip connections, making it suitable for capturing detailed boundaries of positive regions. Mask R-CNN adds a mask branch to object detection, which can simultaneously output the location of candidate regions and pixel-level masks, making it suitable for multi-region recognition in complex backgrounds.
[0054] The first recognition model inputs the multi-dimensional features extracted in step 201 into the convolutional layer, and generates a high-dimensional feature map through multiple convolutional operations. After dimensionality reduction by the pooling layer, it fuses feature information of different scales (such as global structure and local details) through skip connections. Finally, it generates a pixel-level first segmentation mask for candidate stained positive regions through the output layer. Each pixel in the mask is marked as "positive" or "non-positive".
[0055] 203. Based on the first segmentation mask, a non-maximum suppression algorithm is used to remove redundant identification results, and candidate positive staining regions with confidence levels higher than a preset threshold are retained as the final positive staining regions.
[0056] In this step, for overlapping or redundant recognition results that the first recognition model may output (such as the same positive region being labeled multiple times), the intersection-overall reunification ratio (IoU) of the candidate regions is calculated, the region with the highest confidence is retained, other redundant results with high overlap are suppressed, and duplicate counting is avoided.
[0057] Meanwhile, a preset confidence threshold, for example, 0.7, is set, and only candidate regions whose prediction confidence from the first recognition model is higher than this preset confidence threshold are retained as the final positive staining regions. This process can filter out low-confidence noise recognition results (such as misjudged regions due to non-specific staining), further improving recognition accuracy.
[0058] Optionally, the step of extracting multi-dimensional features of each candidate stained positive region from the preprocessed digital image of the tissue sample includes:
[0059] In 2011, the historical records of staining positive regions were obtained, including labeled true positive regions, false positive regions and their corresponding feature parameters. The feature parameters include color channel features, texture features, morphological features, color gradient features, region density features, color channel correlation features and location features.
[0060] In this step, historical records of the identification of staining positive areas marked by pathology experts are collected. These historical records mainly include true positive areas: real staining positive areas confirmed by experts (such as specific chromogenic areas in immunohistochemistry), and their corresponding characteristic parameters (such as RGB channel values, texture roughness, area perimeter, etc.); false positive areas: areas that are misjudged as positive by the first identification model but are actually interference areas (such as staining impurities, non-specific staining areas), and their corresponding characteristic parameters.
[0061] The aforementioned feature parameters include both basic visual features (color channels, texture, morphology) and derived features (color gradient features, region density features, channel correlation features, and positional features), making the feature dimensions more comprehensive.
[0062] In 2012, correlation analysis was performed on the feature parameters in the historical records to calculate the mutual information value and synergistic contribution between features, and four feature pairs with strong coupling or synergistic effects were selected: color channel-texture feature pair, morphology-color gradient feature pair, region density-texture feature pair, and color channel correlation-location feature pair.
[0063] In this step, feature pairs with strong coupling or synergistic effects are identified through quantitative analysis, avoiding meaningless feature combinations. Specifically:
[0064] Mutual information quantifies the dependency between two features; a higher mutual information value indicates a stronger correlation between the features. For example, calculating the mutual information between RGB red channel intensity and texture roughness, if the value is significantly higher than other combinations, it indicates a strong coupling between the two in positive region recognition.
[0065] Furthermore, feature importance ranking (such as the Gini coefficient of random forests) is used to evaluate whether the contribution of two features as joint inputs to the recognition results is significantly higher than that of a single feature. For example, region density and texture consistency have low recognition contributions when used alone, but their contributions increase significantly when used together, indicating a synergistic effect between the two.
[0066] Based on the aforementioned quantitative indicators, four core feature pairs were ultimately determined: color channel-texture feature pairs, morphology-color gradient feature pairs, region density-texture feature pairs, and color channel correlation-location feature pairs. This ensures that each feature pair can improve recognition accuracy through complementary verification.
[0067] In 2013, based on the four sets of feature pairs selected, the corresponding feature parameters of each candidate stained positive region were extracted from the preprocessed digital image of the tissue sample to form a multi-dimensional feature combination.
[0068] In this step, specific parameters are extracted from the preprocessed image for the four sets of feature pairs mentioned above:
[0069] Color channel-texture feature pairs: Extract the channel value distribution of candidate regions in RGB / HSV space, and simultaneously calculate the texture roughness based on the gray-level co-occurrence matrix;
[0070] Morphological-color gradient feature pairs: extract morphological parameters such as region perimeter and area, and calculate the color change rate of the region edge, such as the grayscale difference from positive color to background color.
[0071] Region density-texture feature pair: Statistically calculate the percentage of positive pixels per unit area (region density) and analyze the spatial continuity of texture features within the region, such as the texture difference between adjacent pixels;
[0072] Color channel correlation-location feature pair: Calculate the Pearson correlation coefficient between different color channels (such as the correlation between hue and saturation in HSV), and mark whether the region is located within the cell outline (location feature).
[0073] The above-mentioned combination of feature parameters forms multi-dimensional features. Thus, this embodiment retains the recognizability of a single feature while enhancing the ability to distinguish complex positive regions through the synergistic relationship of feature pairs, providing more accurate feature basis for the first recognition model.
[0074] Optionally, the multi-dimensional features are input into a first recognition model to obtain a pixel-level segmentation mask for the candidate stained positive region, including: the first recognition model contains four parallel feature pair recognition branches, each corresponding to one of four sets of feature pairs:
[0075] The first branch targets the color channel-texture feature pair, extracting the coupling features between color channels and texture through three convolutional layers, and outputting the first feature map. The second branch targets the morphology-color gradient feature pair, using dilated convolutional layers to capture the spatial correlation between morphological parameters and edge gradients, and outputting the second feature map. The third branch targets the region density-texture feature pair, combining pooling layers and attention mechanisms to enhance the synergistic features of density distribution and texture continuity, and outputting the third feature map. The fourth branch targets the color channel correlation-location feature pair, fusing channel correlation coefficients and location markers through fully connected layers, and outputting the fourth feature map.
[0076] In this step, unique association information for each feature pair is extracted through a dedicated network branch to avoid interference from different feature pairs:
[0077] The first branch (color channel-texture feature pair): uses three cascaded convolutional layers. The first layer extracts the spatial pattern of color channel numerical distribution, the second layer extracts the local features of texture roughness, and the third layer fuses the outputs of the first two layers through convolutional kernels to capture the coupling relationship between color intensity and texture coarseness (such as strong positive staining is usually accompanied by rough texture). The final output reflects the first feature mapping of the associated pattern of the feature pair.
[0078] The second branch (morphological-color gradient feature pairs): expands the receptive field using dilated convolutional layers (convolutions with dilation rates) while preserving edge details. By calculating the spatial correlation between morphological parameters (such as perimeter / area ratio) and color gradients (rate of change of edge pixel values), it captures the co-features of irregular shapes and steep edges (such as the morphology and edge characteristics of fibrous strands), and outputs a second feature map.
[0079] The third branch (region density-texture feature pair): First, the spatial dimension of region density is compressed through pooling layers, and then an attention mechanism (such as channel attention module) is introduced to make the network focus on regions with high density and continuous texture (such as dense positive cell clusters), suppress interference regions with low density and messy texture, and output a third feature map that strengthens collaborative features.
[0080] The fourth branch (color channel correlation-location feature pair): non-linearly fuses color channel correlation coefficients (such as Pearson values between RGB channels) and location markers (such as binary labels inside / outside cell outlines) through a fully connected layer, quantifies the association between channel correlation and biological location (such as positive regions inside cells usually have specific channel correlations), and outputs the fourth feature map.
[0081] The first to fourth feature maps are weighted and concatenated by the feature fusion module, and the weighting coefficients are dynamically allocated based on the collaborative contribution of each feature pair in the historical identification record.
[0082] In this step, the feature fusion module assigns dynamic weights to the first to fourth feature maps based on the collaborative contribution of each feature pair in the historical record of positive staining region identification (i.e., the contribution index calculated in step 2012). For example, if the color channel-texture feature pair has the highest contribution to true positive identification in the historical record (e.g., weight 0.3), then its feature map will have a larger weight during fusion.
[0083] In the above weighted splicing process, the spatial dimensions of the four sets of feature maps are aligned and then superimposed according to their weights. This preserves the unique information of each set of feature pairs and highlights the role of key feature pairs through weight adjustment, while avoiding interference from secondary features.
[0084] The fused features are upsampled to the input image size by the decoder and then used to generate pixel-level segmentation masks for candidate stained positive regions through the softmax activation function.
[0085] In this step, the decoder uses upsampling operations (such as deconvolution and bilinear interpolation) to restore the fused low-resolution feature maps to the original size of the input image, ensuring spatial localization accuracy. The softmax activation function is then used to calculate the probability of each pixel being "positive" or "non-positive," generating a pixel-level segmentation mask. For example, pixels with a probability greater than 0.5 are marked as positive regions, ultimately outputting a complete candidate colored positive region mask.
[0086] Optionally, the step of quantifying the area of the identified positive staining regions to obtain positive region area data includes:
[0087] 204. Based on the pixel-level segmentation mask of the final stained positive region, count the total number of pixels within the mask region, and convert the total number of pixels into the actual physical area according to the resolution parameters of the digital image of the tissue sample.
[0088] In this step, based on the final segmentation mask of the positive region output in step 203, the total number of pixels marked as "positive" within the mask is counted using a pixel traversal algorithm. For example, if the segmentation mask of a positive region contains 1000 pixels, this value is directly recorded as the basic quantization index.
[0089] By combining the resolution parameters of the digital image of the tissue sample (i.e., the actual length corresponding to a unit pixel, such as 1 pixel = 0.5 micrometers), the number of pixels is converted into the actual physical area. The calculation formula is: Actual physical area = Total number of pixels × (Unit pixel length) 2 For example, 1000 pixels at a resolution of 0.5 micrometers per pixel correspond to an actual area of 1000 × (0.5)² = 250 square micrometers. This conversion eliminates the influence of image scaling on area calculation, allowing the quantification result to directly reflect the true size of the pathological tissue.
[0090] 205. The actual physical areas of each stained positive region identified in the digital image of the tissue sample are summed to obtain the total area data of the positive region of the tissue sample.
[0091] In this step, the complete sample-level quantized data is obtained by summing the areas of all positive regions in a single image. Specifically:
[0092] The actual physical areas of each independent positive staining region calculated in step 204 are summed to obtain the total area of the positive staining regions in the digital image of the tissue sample. For example, if the image contains three positive regions with areas of 250 square micrometers, 300 square micrometers, and 150 square micrometers respectively, the total area of the positive regions after summing is 700 square micrometers.
[0093] Optionally, the step of using a second recognition model to identify and extract intracellular vacuolar regions in the preprocessed digital image of the tissue sample includes:
[0094] 301. Extract the spatial and morphological features of each candidate vacuolar region within the cell from the preprocessed digital image of the tissue sample; wherein, the spatial features include the adjacency distance between the vacuolar and the surrounding positive staining regions and the nesting hierarchy relationship, and the morphological features include the outline roundness of the vacuolar region, the internal gray-level uniformity, and the edge gradient change rate.
[0095] In this step, features exhibiting both spatial correlation and morphological differences in intracellular vacuoles are extracted from digital images of tissue samples. Specifically:
[0096] (1) Spatial characteristics: used to capture the positional relationship between cavitation bubbles and their surrounding environment, including:
[0097] Adjacency distance: Calculates the shortest pixel distance between the candidate vacuolar region and the surrounding positive staining region, such as the edge distance between the lipid droplet vacuolar and the positive liver fibrosis region, to determine whether there is a pathological association between the two, such as the inflammatory microenvironment of the vacuolar adjacent to the positive region;
[0098] Nesting hierarchy: The algorithm determines whether a vacuole is located inside a positively stained region. For example, lipid droplet vacuoles in hepatocytes are surrounded by positively stained cytoplasm. The nesting depth is quantified, such as single-layer nesting or multi-layer containment, to help distinguish intracellular vacuoles from impurities outside the tissue.
[0099] (2) Morphological characteristics: used to characterize the geometric and grayscale properties of cavitation, including:
[0100] Outline roundness: Calculated by the formula (4π × area / perimeter²), intracellular vacuoles (such as lipid droplets) usually exhibit high roundness, while irregular impurities have low roundness;
[0101] Internal grayscale uniformity: The variance of pixel grayscale values within the vacuolar region is statistically analyzed. Due to structural homogenization (e.g., no staining agent in lipid droplets), the grayscale variance of intracellular vacuolars is significantly lower than that of background tissue.
[0102] Edge gradient change rate: Calculates the grayscale change of pixels at the edge of the bubble. Since the bubble edge has a clear boundary with the surrounding colored area, the gradient change rate is usually steep and continuous.
[0103] 302, The spatial features and the morphological features are input into the second recognition model, and the second recognition model outputs a pixel-level second segmentation mask for the intracellular vacuolar region; wherein, the second recognition model is a deep learning model based on the improved U-Net architecture;
[0104] In this step, the second recognition model is based on an improved U-Net architecture, with the network structure optimized for the needs of cavitation bubble recognition, specifically as follows:
[0105] Encoder: Employs multi-scale convolutional layers (such as 3×3 and 5×5 convolutional kernels) to extract local details of cavitation (such as edge gradients) and capture global spatial relationships (such as nesting relationships with positive regions). By fusing feature maps of different scales, it solves the problem of large differences in cavitation size.
[0106] Decoder: Introduces an attention gate mechanism to dynamically enhance attention to vacuolar regions in adjacent / nested scenes during feature upsampling (e.g., suppressing background interference and focusing on tiny vacuolars surrounded by positive regions), thereby improving feature recognition in complex spatial relationships.
[0107] Segmentation Mask Output: The second recognition model transforms the input spatial and morphological features through multiple nonlinear transformations, and finally outputs a pixel-level second segmentation mask for the intracellular vacuolar region. Each pixel in the mask is marked as "vacuolar" or "non-vacuolar", which directly reflects the spatial distribution of vacuolars.
[0108] 303. The second segmentation mask is optimized through morphological post-processing to remove interference regions of non-cellular vacuoles.
[0109] In this step, morphological post-processing is performed on the second segmentation mask, including filling the tiny holes inside the cavitation mask caused by recognition errors through closing operations, restoring the complete shape of the cavitation (such as repairing the broken area at the edge of the lipid droplet cavitation); setting an area threshold (such as an area less than 50 pixels) to filter out small interference areas caused by noise or misjudgment (such as pseudo cavitations where dye particles are misidentified).
[0110] The optimized second segmentation mask can accurately preserve the real intracellular vacuolar regions and effectively eliminate non-vacuolar interference (such as tissue fissures and bubble impurities), providing a reliable basis for regional boundaries for subsequent area quantification.
[0111] Optionally, the step of inputting the percentage of the area of the stained positive region and the percentage of the area of the vacuolated region into a preset disease assessment model and outputting the disease status assessment result includes:
[0112] 501. The proportion of positive staining areas and the proportion of vacuolated areas are normalized using Z-score to obtain standardized features. The standardized features are then input into the disease assessment model to obtain multidimensional assessment results, including disease grade and risk score of progression in key areas. The disease assessment model is a gradient boosting tree model that integrates clinical parameters.
[0113] In this step, z-score normalization is used to convert the proportion of stained positive regions and the proportion of vacuolated regions. The formula is: Standardized feature = (Original value - Feature mean) / Feature standard deviation. For example, if the proportion of positive regions in a sample is 25%, and the mean and standard deviation of this feature in the training set are 15% and 5%, then the standardized value is (25-15) / 5 = 2.
[0114] The disease assessment model employs a gradient boosting tree (such as XGBoost or LightGBM) that integrates clinical parameters. The input layer includes three types of features: the standardized percentage of stained positive regions and the percentage of vacuolated regions; patient clinical parameters (such as age, gender, disease duration, and basic medical history); and derived features (such as the ratio of positive to vacuolated regions and the spatial overlap between the two types of regions). The model uses multi-round decision tree ensemble learning to capture non-linear relationships between features. For example, "high percentage of positive regions + high percentage of vacuolated regions" corresponds to different liver fibrosis risks in patients of different age groups. The output is a multi-dimensional assessment result, including disease grading: corresponding to a standardized pathological grading system (such as liver fibrosis grades F0-F4, mild / moderate / severe fatty infiltration), achieving objective grading by associating quantitative features with historical pathological grading data; and a key region progression risk score: based on the dynamic changes in positive and vacuolated regions (such as the expansion rate of positive regions and the fusion trend of vacuolated regions), a continuous risk score between 0 and 1 is generated, with higher values indicating a greater likelihood of disease progression.
[0115] 502. The multidimensional assessment results are converted into disease state assessment conclusions by using preset threshold judgment rules.
[0116] In this step, multi-dimensional thresholds are set based on historical clinical data and expert consensus. For example, disease grading thresholds: a risk score of 0-0.2 corresponds to F0 (no fibrosis), 0.2-0.4 corresponds to F1 (mild), and so on; progression risk thresholds: a score >0.7 is considered "high risk of progression" and requires close monitoring; 0.3-0.7 is "moderate risk" and regular follow-up is recommended; <0.3 is "low risk".
[0117] By combining multidimensional assessment results with threshold rules, structured conclusions are generated. For example, a patient's liver tissue sample shows a positive area ratio of 25% (standardized value 2) and a vacuolar area ratio of 18% (standardized value 1.5), resulting in a comprehensive assessment of liver fibrosis grade F2 and a progression risk score of 0.65 (moderate risk). Furthermore, the disease status assessment conclusion can also include a description of the feature contribution, such as "the positive area ratio contributes 60% to the grading result," enhancing the interpretability of the assessment.
[0118] This invention also discloses a computer storage medium storing a computer program, which is executed by a processor as described in Embodiment 1.
[0119] This invention also discloses a computer program product comprising program code for performing the steps of the method as described in any of the preceding claims.
[0120] Those skilled in the art will understand that this application is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made by those skilled in the art without departing from the scope of protection of this application. Therefore, although this application has been described in detail through the above embodiments, this application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of this application, and the scope of this application is determined by the scope of the appended claims.
Claims
1. A method for image processing and calculation of experimental staining results, characterized in that, Includes the following steps: Digital images of stained tissue samples are acquired and preprocessed; wherein, the staining process includes immunohistochemical staining and intracellular structure staining. The first recognition model is used to identify the positive stained regions in the preprocessed digital image of the tissue sample, and the area of the identified positive stained regions is quantified to obtain the area data of the positive regions; wherein, the first recognition model is trained in advance using images containing positive stained regions with irregular shapes; The second recognition model is used to identify and extract intracellular vacuolar regions in the preprocessed digital image of the tissue sample, and the area of the extracted intracellular vacuolar regions is quantified to obtain vacuolar region area data; wherein, the second recognition model is pre-trained using vacuolar images containing adjacent low-staining regions or nested with stained positive regions; The percentage of the area of the positive region is calculated based on the area data of the positive region, and the percentage of the area of the vacuolated region is calculated based on the area data of the vacuolated region. The proportion of the area of the stained positive region and the proportion of the area of the vacuolated region are input into a preset disease assessment model, and the disease status assessment results are output. By comparing the disease status assessment results at different time points, dynamic monitoring of the efficacy after treatment can be achieved. The first recognition model is used to identify the stained positive regions in the preprocessed digital image of the tissue sample, including: Multi-dimensional features of each candidate positive staining region are extracted from the preprocessed digital image of the tissue sample, including color channel features, texture features and morphological features; wherein, the color channel features are the channel value distribution of the candidate positive staining region in the RGB or HSV color space, the texture features are the region texture roughness calculated based on the gray-level co-occurrence matrix, and the morphological features include the region perimeter, area and roundness. The multi-dimensional features are input into the first recognition model to obtain the pixel-level first segmentation mask of the candidate stained positive region; wherein, the first recognition model is a deep learning model based on U-Net or Mask R-CNN architecture; Based on the first segmentation mask, a non-maximum suppression algorithm is used to remove redundant identification results, and candidate positive staining regions with confidence levels higher than a preset threshold are retained as the final positive staining regions. Multidimensional features of each candidate stained positive region were extracted from the preprocessed digital image of the tissue sample, including: The historical records of positive staining regions are obtained, including labeled true positive regions, false positive regions and their corresponding feature parameters. The feature parameters include color channel features, texture features, morphological features, color gradient features, region density features, color channel correlation features and location features. Correlation analysis was performed on the feature parameters in the historical records to calculate the mutual information value and synergistic contribution between features, and four feature pairs with strong coupling or synergistic effects were selected: color channel-texture feature pair, morphology-color gradient feature pair, region density-texture feature pair, and color channel correlation-location feature pair. Based on the four sets of feature pairs selected, the corresponding feature parameters of each candidate stained positive region are extracted from the preprocessed digital image of the tissue sample to form a multi-dimensional feature combination. The multi-dimensional features are input into the first recognition model to obtain a pixel-level segmentation mask for the candidate stained positive region, including: the first recognition model contains four parallel feature pair recognition branches, each corresponding to one of four feature pairs: The first branch targets the color channel-texture feature pair, extracting the coupling features between color channels and texture through three convolutional layers, and outputting the first feature map. The second branch targets the morphology-color gradient feature pair, using dilated convolutional layers to capture the spatial correlation between morphological parameters and edge gradients, and outputting the second feature map. The third branch targets the region density-texture feature pair, combining pooling layers and attention mechanisms to enhance the synergistic features of density distribution and texture continuity, and outputting the third feature map. The fourth branch targets the color channel correlation-location feature pair, fusing channel correlation coefficients and location markers through fully connected layers, and outputting the fourth feature map. The first to fourth feature maps are weighted and concatenated by the feature fusion module, and the weighting coefficients are dynamically allocated based on the collaborative contribution of each feature pair in the historical identification record. The fused features are upsampled to the input image size by the decoder and then used to generate pixel-level segmentation masks for candidate stained positive regions through the softmax activation function.
2. The method for processing and calculating experimental staining results images according to claim 1, characterized in that: Preprocessing the digital image of the tissue sample includes at least one of the following operations: Noise in the digital image of the tissue sample is removed using Gaussian filtering or median filtering algorithms. Adaptive histogram equalization enhances the image contrast of the tissue sample digital images to highlight the grayscale difference between the stained positive areas and the background. Morphological opening and closing operations are used to remove small-area impurities from the digital images of the tissue samples in order to preserve the integrity of the tissue structure. The contours of the tissue region are extracted using an edge detection algorithm, and the unorganized background areas at the image edges are cropped out.
3. The method for processing and calculating experimental staining results images according to claim 1, characterized in that: The area of the identified positive staining regions is quantified to obtain positive region area data, including: Based on the pixel-level segmentation mask of the final stained positive region, the total number of pixels within the mask region is counted, and the total number of pixels is converted into the actual physical area according to the resolution parameters of the digital image of the tissue sample. The actual physical areas of each stained positive region identified in the digital image of the tissue sample are summed to obtain the total area data of the positive regions of the tissue sample.
4. The method for processing and calculating experimental staining results images according to claim 3, characterized in that: The second recognition model is used to identify and extract intracellular vacuolar regions in the preprocessed digital image of the tissue sample, including: Spatial and morphological features of candidate vacuoles within cells are extracted from the preprocessed digital images of the tissue samples. The spatial features include the adjacency distance between the vacuoles and the surrounding positive staining regions, and the nesting hierarchy. The morphological features include the outline roundness of the vacuole region, the internal gray-level uniformity, and the edge gradient change rate. The spatial features and morphological features are input into the second recognition model, and the second recognition model outputs a pixel-level second segmentation mask for the intracellular vacuolar region; wherein, the second recognition model is a deep learning model based on the improved U-Net architecture; The second segmentation mask is optimized by morphological post-processing to remove interfering regions of non-cellular vacuoles.
5. The method for processing and calculating experimental staining results images according to claim 1, characterized in that: The percentage of the area of the stained positive region and the percentage of the area of the vacuolated region are input into a preset disease assessment model, and the disease status assessment results are output, including: The proportions of positive staining areas and vacuolated areas were normalized using Z-score to obtain standardized features. These standardized features were then input into a disease assessment model to obtain multidimensional assessment results, including disease grading and risk scores for progression in key areas. The disease assessment model was a gradient boosting tree model that incorporated clinical parameters. The multidimensional assessment results are converted into disease state assessment conclusions using preset threshold judgment rules.
6. A computer storage medium storing a computer program, characterized in that: The computer program is executed by the processor to perform the method as described in any one of claims 1-5.
7. A computer program product, characterized in that: The computer program product includes program code for performing the steps of the method as described in any one of claims 1-5.
Citation Information
Patent Citations
Pathological microscopic image analysis method, apparatus and device, and storage medium
CN116682109A
Immunohistochemical digital pathological image processing method
CN119181091A