A method of reconstructing ultra-high resolution pathology whole slides

By combining deep learning and genetic algorithms to create a multi-dimensional matching and scoring system, the problem of automating the splicing of pathological tissue fragments has been solved, enabling rapid reconstruction of ultra-high resolution whole pathological slides. This system is applicable to various datasets and improves the efficiency of clinical assessment.

CN120634849BActive Publication Date: 2026-05-01SOUTH CHINA UNIV OF TECH +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SOUTH CHINA UNIV OF TECH
Filing Date
2025-06-12
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing pathological tissue fragment splicing algorithms rely heavily on manual annotation and lack fully automated processing capabilities. Linear registration models struggle to overcome the trade-off between accuracy and efficiency, and cannot adapt to complex tissue morphologies and multi-quadrant splicing scenarios.

Method used

By employing a deep learning-based edge classification model and a virtual ensemble image enhancement strategy, combined with Theil-Sen regression and genetic algorithms, and through a multi-dimensional matching scoring system and a multi-resolution stitching optimization algorithm, we can achieve automated and efficient stitching of pathological tissue fragments.

Benefits of technology

It enables rapid reconstruction of ultra-high resolution whole pathological slides, improves splicing accuracy and efficiency, is applicable to different datasets, shortens clinical evaluation time, and improves radiology-pathology related workflows.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120634849B_ABST
    Figure CN120634849B_ABST
Patent Text Reader

Abstract

The application discloses a method for reconstructing ultra-high resolution pathological whole sections, comprising the following steps: obtaining an effective tissue area image of pathological tissue fragments by using a fusion mask; obtaining an effective splicing edge of the effective tissue area image by using an edge classification model and an image enhancement strategy; constructing a multi-dimensional matching score system to calculate the geometric matching degree of the splicing edge; screening out an optimal Top-N splicing scheme in combination with a splicing quality evaluation of a deep neural network; realizing iterative stitching of the effective tissue area image based on a genetic algorithm, global topology optimization, sub-pixel level fine tuning and a multi-dimensional matching score system for evaluating splicing quality; and finally outputting an optimal splicing scheme; and reconstructing a pathological tissue whole section image based on the optimal splicing scheme; the application has efficient and accurate automatic splicing and iterative optimization capabilities, and realizes rapid reconstruction of ultra-high resolution pathological whole sections.
Need to check novelty before this filing date? Find Prior Art

Description

A method for reconstructing ultra-high resolution whole pathological sections Technical Field

[0001] This invention belongs to the field of medical image processing and pattern recognition technology, and in particular relates to a method for reconstructing ultra-high resolution pathological whole slides. Background Technology

[0002] With the increasing public awareness of health and the deepening of the precision medicine strategy, the demand for pathology technology, the gold standard for disease diagnosis, has increased significantly. Through the integrated analysis of histological morphology and molecular detection, it drives the iterative upgrading of clinical diagnosis and treatment. In the field of histopathology, whole-mount section (WMS) exhibits multiple advantages in improving the efficacy of pathological diagnosis by completely preserving the macroscopic morphology and microscopic structure of the excised tissue: First, its panoramic histological features strengthen the spatial correspondence between preoperative imaging and pathological results, providing morphological evidence for precision medicine; second, the full-layer embedding technology effectively avoids tissue layering artifacts caused by traditional sections, reducing the risk of diagnostic bias caused by sample fragmentation; third, the complete preservation of the tissue background helps pathologists trace the spatial relationship between lesions and surrounding structures, significantly improving the accuracy of tumor boundary determination and staging assessment. Despite its many advantages, the practical application of WMS faces multiple challenges. The primary bottleneck lies in the standardized supply of large-size slides, which not only increases the complexity of laboratory storage management but may also force some institutions to abandon the technology due to equipment compatibility issues. Secondly, for specimens removed from organs such as the prostate and breast, or large tumor tissues, the largest available slides still cannot meet the requirements for full embedding, forcing technicians to perform secondary segmentation of the specimens. In addition, the preparation of whole sections requires higher professional knowledge and technical proficiency than traditional quarter sections, which has prevented WMS from being widely adopted.

[0003] The rise of digital pathology has offered a possibility to overcome the bottlenecks of traditional whole-slide imaging (WMS) technology. By developing an AI-based tissue fragment reconstruction algorithm, multiple whole-slide images (WSI) of pathological tissue fragments are intelligently stitched together to simulate the cross-section of the original specimen and generate an artificial WMS. Studies have shown that this digital whole-slide can significantly shorten the reading time for pathologists, greatly improve the diagnostic concordance index, and reduce variability among different observers. However, WSI images differ fundamentally from general images. The high resolution (0.25–0.50 μm / pixel) required for microscopic pathology presents multiple technical challenges to the development of stitching algorithms: First, the ultra-high resolution of WSI means that a single image can easily exceed 100,000 × 100,000 pixels in size, leading to severe computational and time cost pressures on basic image processing operations; Second, unlike traditional full-view digital slices, WSI samples are physically segmented into non-overlapping biological tissue fragments before scanning, rendering the core stitching mechanism based on overlapping region coordinate matching completely ineffective; More complexly, the non-uniform shrinkage and deformation commonly present during tissue sample preparation makes it difficult for solutions based on direct geometric feature matching to achieve accurate alignment.

[0004] To address these challenges, several tissue fragment stitching algorithms have been proposed. HistoStitcher, developed by early researchers, is a semi-automatic registration software that employs a four-quadrant iterative stitching strategy—where pathologists manually annotate the reference points of adjacent fragment edges—and minimizes the mean square error through linear transformation. However, its manual point selection mechanism is not only time-consuming but also susceptible to subjective interference, and the mathematical model based on a single linear transformation is ill-suited to complex tissue morphological features. To overcome this bottleneck, AutoStitcher implements an automatic stitching process by constructing a multi-dimensional cost function that incorporates tissue similarity and contour continuity, significantly improving stitching efficiency when combined with low-resolution pre-alignment and optimization algorithms. However, this algorithm still requires users to manually mark the position of tissue fragments in the original cross-section (e.g., upper left or lower right quadrant). This manual marking method is impractical when dealing with slides lacking pathological reference information, and its deployment flexibility and computational performance remain to be improved due to the closed architecture of the Matlab platform. Although PythonStitcher optimizes the system deployment process through Python refactoring and uses an affine transformation algorithm based on corner Euclidean distance to align tissue fragments, its core performance still highly depends on the quality of manually provided tissue masks and is subject to the dual constraints of an upper limit on the number of fragments and sensitivity to tissue morphology diversity.

[0005] In summary, existing tissue fragment stitching algorithms heavily rely on manual annotation and lack fully automated processing capabilities. Their linear registration models struggle to overcome the trade-off between accuracy and efficiency. Furthermore, existing algorithms have limited generalization capabilities and cannot adapt to complex tissue morphologies and multi-quadrant stitching scenarios. Summary of the Invention

[0006] In view of this, it is necessary to provide a method for reconstructing ultra-high resolution whole pathological sections to address the aforementioned technical problems, including the following steps:

[0007] Step 1: Use threshold segmentation and tissue topology to generate a fusion mask to obtain an effective tissue region image of pathological tissue fragments;

[0008] Step 2: Using a deep learning-based edge classification model and a virtual ensemble image enhancement strategy, obtain the effective stitching edges of the effective tissue region image;

[0009] Step 3: Based on Theil-Sen regression, noise-resistant modeling is performed on the effective stitching edges. The alignment transformation matrix is ​​calculated to complete the edge alignment of the effective organization region image. A multi-dimensional matching scoring system is constructed to calculate the geometric matching degree of the stitching edges. The optimal Top-N stitching scheme is selected by combining the stitching quality evaluation of deep neural network.

[0010] Step 4: Based on the genetic algorithm, a multi-resolution stitching optimization algorithm is used to perform global topology optimization at the low-resolution level of the image and sub-pixel fine-tuning at the high-resolution level. The stitching quality is evaluated using the multi-dimensional matching scoring system. High-fitness individuals are selected for cross mutation to achieve iterative stitching of the effective tissue region image and finally output the best stitching scheme.

[0011] Step 5: Reconstruct whole-section images of pathological tissue based on the optimal stitching scheme.

[0012] Furthermore, the specific steps of step 1 are as follows:

[0013] Step 101: Obtain and utilize the pyramid level downsampling factor of the pathological tissue fragment image to establish the coordinate transformation relationship from the original resolution level to the target resolution level image. The geometric coordinate transformation of different resolution levels is realized through the contour scaling function to ensure the consistency of the topological structure of the tissue region across resolutions.

[0014] Step 102: After downsampling the pathological tissue fragment image to the target resolution level, perform HSV color space conversion and extract the saturation channel. Use a median filter to eliminate particle noise generated during slide preparation. Generate an initialized binary mask through the adaptive Otsu threshold segmentation algorithm. Use morphological closing operation to smooth the edges. Combine connected component analysis to filter out discrete background noise and obtain the optimized Otsu threshold segmentation mask.

[0015] Step 103: Based on the preprocessing method of the multi-instance learning framework CLAM, extract the effective tissue region mask of the target resolution hierarchical image, use OpenCV for vector graphics processing, map the edges of the tissue region and the holes into vector polygons respectively, and transform the tissue region into positively filled polygons and the inner contour of the hole into negatively filled polygons through hierarchical filling rules, so as to realize the generation of the pathological tissue fragment topological mask.

[0016] Step 104: The Otsu threshold segmentation mask and the pathological tissue fragment topology mask are fused at the pixel level to obtain a fused mask. Then, the effective tissue region jointly identified by the two masks is retained by matrix multiplication. Based on the fused mask and the coordinate transformation relationship, geometric registration and synchronous cropping are performed on the pathological tissue fragment image to obtain the effective tissue region image of the pathological tissue fragment.

[0017] Furthermore, the specific steps of step 2 are as follows:

[0018] Step 201: By extracting the contour of the fusion mask and analyzing the minimum bounding rectangle, the main axis direction of the effective tissue region image is determined, that is, the angle between the major or minor axis of the minimum bounding rectangle and the horizontal axis of the effective tissue region image is calculated. Then, with the centroid of the effective tissue region as the rotation center, an affine transformation matrix is ​​constructed to simultaneously correct the rotation direction of the fusion mask and the effective tissue region image.

[0019] Step 202: Using EfficientNet-B0 as the basic network architecture, a feature extractor for edge classification is constructed. The original classification layer of the basic network architecture is removed, and the original convolutional layers are retained to obtain the backbone network EfficientNet. Backbone This is used to perform feature encoding on the corrected effective tissue region image to obtain the corresponding feature map;

[0020] Step 203: Design an adaptive classification head, compress the feature map through a global average pooling layer, introduce a batch normalization layer and a Dropout layer with a value of 0.5 for regularization, and use a fully connected layer activated by Softmax to output the class probability distribution to obtain the original predicted label with effective stitched edges.

[0021] Step 204: Using a virtual integrated image enhancement strategy, 16 geometric transformation versions of the effective tissue region image are generated. The geometric transformations include any combination of image rotation transformation and mirror flip transformation to form a set of pseudo-images of the effective tissue region image. Then, the feature extractor is used to obtain the corresponding transformed image prediction pseudo-labels in the pseudo-image set. At the same time, a label space inverse transform decoder is designed to map the transformed image prediction pseudo-labels back to the original prediction labels, realizing multi-view decision fusion of a single model and improving the confidence of the classification results.

[0022] Step 205: Based on the edge classification model and virtual integration image enhancement strategy, the majority voting mechanism is used to process the classification prediction results of 16 image enhancements, construct a frequency statistical histogram of predicted labels, select the most frequent predicted label as the final output label, and obtain the effective stitching edges of the corresponding pathological tissue fragment effective tissue region image.

[0023] Furthermore, the specific steps of step 3 are as follows:

[0024] Step 301: Use an edge detection algorithm to obtain the effective splicing edge contour coordinate information of each pathological tissue fragment in a single whole slice sample, and generate all possible tissue fragment pair combinations through Cartesian product operation to ensure that all potential tissue fragment matching possibilities are traversed.

[0025] Step 302: The anti-outlier characteristics of the Theil-Sen regression algorithm are used to perform noise-resistant modeling of effective splicing edge features. The alignment transformation matrix is ​​constructed by calculating the relative components of the centroid and rotation angle of the splicing edge line to achieve geometric alignment of the splicing edges of tissue fragments, and the overlapping of tissue fragments is verified to ensure splicing quality.

[0026] Step 303: Design a multi-dimensional matching scoring system, calculate the matching score of the difference in the length of the stitched edge contour and the matching score of the overlap of the fusion mask, and use the Hausdorff distance algorithm to calculate the matching score of the similarity of the stitched edge contour. Obtain the fitness matching score through linear combination and dynamic truncation. At the same time, use a low-resolution automatic stitching network based on deep learning to further evaluate the stitching quality, and finally obtain the top-N matching stitching schemes.

[0027] Furthermore, step 302 includes the following steps:

[0028] Step 30201: After obtaining all matching combinations of the pathological tissue fragments, the Theil-Sen regression algorithm is used to establish models for the horizontal and vertical edges of each splicing edge line.

[0029] Step 30202: The centroid of each splicing edge line is calculated by replacing the traditional centroid with the midpoint of the endpoint. The rotation angle of each edge is determined by the difference between the endpoints of the regression line. The translational relative components of any two splicing edges are calculated to compensate for the initial position difference and the coordinate offset caused by rotation. An alignment coordinate transformation matrix is ​​constructed to achieve geometric correction of the splicing edges of tissue fragments.

[0030] Step 30203: Construct a mismatch detection criterion based on the statistics of the fusion mask area. When the overlap rate of the fusion mask of the detected tissue fragment image is greater than 20%, trigger the 180° rotation compensation mechanism and update the corresponding translational relative components, recalculate the alignment coordinate transformation matrix, and solve the mirror matching error caused by contour symmetry.

[0031] Furthermore, step 303 includes the following steps:

[0032] Step 30301: Employ a stitching edge length consistency assessment. Set the stitching edge lengths of any two valid tissue region images to L1 and L2, respectively. Then, the difference in stitching edge contour length between the two images is used to determine the fitness score. len for:

[0033]

[0034] If the lengths of the spliced ​​edge lines are similar, the score is higher; if the lengths differ significantly, the score is lower.

[0035] Step 30302: Using spatial exclusivity constraints, construct an exponential fusion mask overlap matching score. Set the fusion mask overlap rate of any two valid tissue region images to ρ, then the fusion mask overlap matching score is calculated as fitness. ρ for:

[0036] fitness ρ =100(1-ρ) 6

[0037] The larger the overlap ratio ρ of the fusion mask, the lower the score; the smaller the overlap ratio ρ of the fusion mask, the higher the score.

[0038] Step 30303: Contour similarity is used for measurement. An inverse numerical mapping is established based on bidirectional Hausdorff distance. The Hausdorff distance between the edge lines of any two valid tissue region images A and B is set as d. H (A→B),d H (B→A), then the contour similarity matching score based on Hausdorff distance is fitness. Hausdorff for:

[0039]

[0040] If the two splicing edges are similar in shape, the smaller the Hausdorff distance, the higher the score, and vice versa;

[0041] Step 30304: The edge contour length difference, fusion mask overlap, and contour similarity matching score are comprehensively scored. Robustness is evaluated through linear combination and dynamic truncation to obtain the fitness matching score, as shown in the following formula:

[0042] fitness = clip(fitness) len +fitness p +fitness Hausdorff ,0,400)

[0043] Among them, the clipping operation limits the impact of outliers, and the 400-point threshold design ensures that the ideal match is...

[0044] fitness hausdorff >250 and fitness len A fitness score >250 indicates a valid match; a fitness score <100 indicates an invalid match.

[0045] Step 30305: Using a data storage format compatible with the JigsawNet framework, save the pairing information of all pathological tissue fragment images, including node index, matching score, transformation matrix, splicing edge classification results, etc. At the same time, calculate the intersection of the dilated masks of any two pathological tissue fragment images, skeletonize the fusion mask to create a pseudo suture line to represent the optimal splicing path, and transform the skeletonized coordinates to the original image coordinates for visualization.

[0046] Step 30306: Using the low-resolution automatic stitching network JigsawNetWithROI pre-trained on the traditional fragment stitching dataset, further evaluate the image edge stitching quality of the organized fragment pairs, improve the confidence of the fitness matching score, and finally obtain the Top-N matching stitching schemes.

[0047] Furthermore, the specific steps of step 4 are as follows:

[0048] Step 401: A four-layer resolution pyramid is constructed using macro-topology, regional structure, local features, and sub-pixel downsampling factors. Global topology optimization is performed at the low-resolution level of the image, while sub-pixel fine-tuning is performed at the high-resolution level, effectively balancing computational efficiency and stitching accuracy.

[0049] Step 402: Obtain the splicing information of multi-resolution tissues, including the coordinate transformation relationship of multi-resolution tissues, corner points and transformation matrices in tissue fragments, and extract the Theil-Sen lines of relevant edges as robust approximations of splicing edges to initialize tissue fragment pairing transformation.

[0050] Step 403: Initialize the quality of the paired tissue fragment splicing using the multi-dimensional matching scoring system described in Step 3, select high-fitness individuals as parents for crossover mutation, retain the optimal solution for offspring for directional mutation, so as to realize the process of iterative suturing of pathological tissue fragments, and finally output the best splicing scheme.

[0051] Furthermore, step 403 includes the following steps:

[0052] Step 40301: Initialize the number of iterations, fitness matching score, and crossover mutation probability, and use the Top-N splicing schemes as the initial population, splicing information parameters as gene values, and then run the genetic algorithm for iteration;

[0053] Step 40302: Repeat the iterative process of evaluating all solutions in each generation until the predefined maximum number of iterations is reached, or the best solution fails to improve for 50 consecutive generations.

[0054] Step 40303 employs a four-level resolution layer-by-layer optimization strategy. The lowest resolution level completes the registration of the main image, and then the high resolution level is used to refine the preliminary registration results, ultimately outputting the best stitching scheme.

[0055] Furthermore, step 5 also includes the following optimization steps:

[0056] Step 501: Divide the high-resolution pathological tissue fragment image into 64×64 pixel basic tile units. Perform multi-resolution optimization independently on each tile. The obtained rigid transformation parameters include relative rotation components, relative translation components, and transformation matrix. By converting the high-resolution pathological tissue fragment image into the calculation of each image tile, the computational overhead is reduced during the reconstruction process.

[0057] Step 502: Based on bilinear interpolation, the overlapping areas of adjacent pathological tissue fragment images are fused to make the splicing edges between pathological tissue fragments more visually attractive, and finally the whole slice image with the best fitting effect is reconstructed.

[0058] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0059] This invention presents a highly efficient and precise automatic stitching and iterative optimization method for the rapid reconstruction of ultra-high resolution whole-slice pathology sections. It can be used to reconstruct artificial whole-slice medical images (WMS) from pathological tissue fragments, aiding clinical assessment and facilitating radiology-pathology workflows. The reconstruction method is only affected by the shape of the pathological tissue fragments and requires no further image information during optimization, making it essentially a stain-independent solution suitable for accurately reconstructing original WMSs on a range of different datasets. Furthermore, the use of automatically detected benchmarks demonstrates similar suturing accuracy and speed. The efficient algorithm design and containerization improve the reproducibility of reconstruction results on routine clinical workstations, which will help clinicians shorten case assessment time and improve radiology-pathology workflows, thus promoting research in the multimodal field of medicine.

[0060] Meanwhile, this invention also utilizes fusion masks and edge classification models to detect the splicing edges of effective tissue regions, performs accurate registration through multi-dimensional edge matching comprehensive scoring, and designs a deep iteration of an intelligent optimization strategy based on genetic algorithms to obtain the best splicing scheme, thereby achieving rapid reconstruction of ultra-high resolution pathological whole slides. Attached Figure Description

[0061] Figure 1 shows a schematic flowchart of the method for implementing the present invention.

[0062] Figure 2 shows a schematic diagram of the reconstructed whole slice of the method of the present invention. Detailed Implementation

[0063] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are merely some, not all, of the embodiments of this invention. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0064] To better understand the technical content of this embodiment, let's first introduce the explanation of the terms involved in this embodiment.

[0065] Whole Mount Section (WMS): refers to a pathological section of the entire tissue or organ.

[0066] EfficientNet edge classifier: refers to an efficient convolutional neural network architecture, a model used for edge detection and classification.

[0067] Morphological operations are image processing techniques primarily used to analyze and manipulate the shape and structure of images, including erosion, dilation, opening, and closing operations.

[0068] Connected Component Analysis (CCA) is an image processing technique used to identify and label interconnected pixel regions in an image, helping to identify individual objects or regions within the image.

[0069] Majority Voting: This is an ensemble learning method that combines the predictions of multiple classifiers to improve overall classification performance.

[0070] Theil-Sen regression algorithm: a robust linear regression method for estimating the parameters of linear models, with greater robustness to outliers.

[0071] The Hausdorff distance algorithm is used to measure the similarity between two sets of points. It is defined as the maximum minimum distance from one set of points to another, that is, the maximum distance from each point to its nearest neighbor.

[0072] Skeletonization is an image processing technique used to extract the skeleton of objects in a binary image. It preserves the object's topological structure while reducing its width, making it appear as a thin line. Skeletonization is commonly used in shape analysis, pattern recognition, and image segmentation.

[0073] Genetic Algorithm (GA) is an optimization algorithm based on natural selection and genetic mechanisms. It iteratively optimizes solutions to problems by simulating biological evolution. The main steps include selection, crossover, and mutation.

[0074] Figure 1 shows a schematic flowchart of an embodiment of the present invention. A method for reconstructing ultra-high resolution whole pathological sections includes the following steps:

[0075] Step 1: Use threshold segmentation and tissue topology to generate a fusion mask to obtain an effective tissue region image of pathological tissue fragments;

[0076] Step 2: Employ a deep learning-based edge classification model and a virtual ensemble image enhancement strategy to obtain effective stitching edges of the effective organization region image;

[0077] Step 3: Based on Theil-Sen regression, noise-resistant modeling is performed on the effective stitching edges. The alignment transformation matrix is ​​calculated to complete the edge alignment of the effective organization region image. A multi-dimensional matching scoring system is constructed to calculate the geometric matching degree of the stitching edges. The optimal Top-N stitching scheme is selected by combining the stitching quality evaluation of deep neural network.

[0078] Step 4: Based on the genetic algorithm, a multi-resolution stitching optimization algorithm is used to perform global topology optimization at the low-resolution level of the image and sub-pixel fine-tuning at the high-resolution level. The stitching quality is evaluated using the multi-dimensional matching scoring system. High-fitness individuals are selected for cross mutation to achieve iterative stitching of the effective tissue region image and finally output the best stitching scheme.

[0079] Step 5: Reconstruct whole-section images of pathological tissue based on the optimal stitching scheme.

[0080] The following example illustrates the process of reconstructing ultra-high resolution whole pathological sections.

[0081] Specifically, step 1 includes the following steps:

[0082] Step 101: Obtain and utilize the pyramid level downsampling factor of the pathological tissue fragment image to establish the coordinate transformation relationship from the original resolution level (level 0) to the target resolution level (level n) image. The geometric coordinate transformation of different resolution levels is realized through the contour scaling function to ensure the consistency of the topological structure of the tissue region across resolutions.

[0083] Step 102: After downsampling the pathological tissue fragment image to the target resolution level, perform HSV color space conversion and extract the saturation channel. Use a median filter to eliminate particle noise generated during slide preparation. Generate an initialized binary mask through the adaptive Otsu threshold segmentation algorithm. Use morphological closing operation to smooth the edges. Combine connected component analysis to filter out discrete background noise and obtain the optimized Otsu threshold segmentation mask.

[0084] Among them, Otsu thresholding is an automatic thresholding method for image binarization. It determines the optimal threshold by minimizing the intra-class variance of the image or equivalently maximizing the inter-class variance, thereby segmenting the image into background and foreground with effective labels.

[0085] Step 103: Based on the preprocessing method of the multi-instance learning framework CLAM, extract the effective tissue region mask of the target resolution hierarchical image, use OpenCV for vector graphics processing, map the edges of the tissue region and the holes into vector polygons respectively, and transform the tissue region into positively filled polygons and the inner contour of the hole into negatively filled polygons (i.e., tissue topology) through hierarchical filling rules, so as to realize the generation of the pathological tissue fragment topology mask.

[0086] Among them, the pathological tissue fragment topological mask is a mask that marks pathological tissue fragments. It not only marks the tissue region, but also takes into account the topological structure of the tissue to ensure the connectivity and integrity of the tissue region.

[0087] Step 104: The Otsu threshold segmentation mask and the pathological tissue fragment topology mask are fused at the pixel level to obtain a fused mask. Then, the effective tissue region jointly identified by the two masks is retained by matrix multiplication. Based on the fused mask and the coordinate transformation relationship, geometric registration and synchronous cropping are performed on the pathological tissue fragment image to obtain the effective tissue region image of the pathological tissue fragment.

[0088] Specifically, step 2 includes the following steps:

[0089] Step 201: By extracting the contour of the fusion mask and analyzing the minimum bounding rectangle, determine the principal axis direction of the effective tissue region image, that is, calculate the angle θ∈[-45°, 45°] between the major or minor axis of the minimum bounding rectangle and the horizontal axis of the effective tissue region image, and then use the centroid (x) of the effective tissue region as the reference point. c ,y c Affine transformation matrix M is constructed with the center of rotation as the reference point. The affine transformation matrix M is calculated as follows:

[0090]

[0091] Where α = cosθ represents the cosine of the included angle θ, and β = cosθ represents the sine of the included angle θ, so as to simultaneously correct the rotation direction of the fused mask and the effective tissue region image, which is convenient for subsequent edge detection and classification;

[0092] Step 202: Construct a feature extractor for edge classification, using EfficientNet-B0 as the base network architecture (B0 represents the baseline version B0 of EfficientNet). Remove the original classification layer of the base network architecture and retain the original convolutional layers to obtain the backbone network EfficientNet-B0. BackboneThe feature map is obtained by feature encoding the corrected effective tissue region image, and a transfer learning strategy is used to load pre-trained weights and implement custom initialization. The feature extraction process is as follows:

[0093] feat=EfficientNet Backbone (input)

[0094] Wherein, input is the image downsampled to the target resolution level, and feat∈R C×H×W This is a preliminary feature map extracted from the image, where C is the number of channels, and H and W are the height and width of the image; EfficientNet Backbone This represents the backbone network of EfficientNet-B0;

[0095] Step 203: Design an adaptive classification head. The feature map (feat) is compressed using a global average pooling layer. A batch normalization layer and a 0.5 Dropout layer are introduced for regularization. A fully connected layer activated by Softmax outputs the class probability distribution to obtain the original predicted labels for the four classes of the effective stitched edges. The formula is as follows:

[0096] l = Classifier adaptive (GPA(feat))

[0097] Where, l∈{0:upper right,1:lower right,2:lower left,3:upper left}) represents the original predicted labels of the four categories of the effective concatenation edge and their corresponding position information (e.g., label number 0 is located on the upper right, label number 1 is located on the lower right, etc.); feat is the feature map, GPA represents the global average pooling layer; Classifier adaptive This represents a fully connected layer with batch normalization (BN), dropout regularization, and softmax activation.

[0098] Step 204: Using a virtual integrated image enhancement strategy, 16 geometric transformation versions of the effective tissue region image are generated. The geometric transformations include any combination of image rotation transformations and mirror flip transformations to form a pseudo-image set I of the effective tissue region image. The rotation transformations include four rotation modes: 0°, 90°, 180°, and 270°. The mirror flips include four flip modes: horizontal flip (hor), vertical flip (ver), no flip (nonr), and combined flip (both) (the geometric transformation type is the product of rotation transformation and mirror flip). Then, the feature extractor is used to obtain the corresponding transformed image prediction pseudo-labels in the pseudo-image set I.

[0099] Simultaneously design a label space inverse transform decoder Γ -1 The formula is as follows:

[0100] Γ -1 (k,r,f)=rot -r (flip - f(k))

[0101] Where k∈{0,1,2,3} are the transformed image prediction pseudo-labels in the pseudo-image set I, r∈{0°,90°,180°,270°} are rotation parameters, f∈{hor,ver,none,both} are flip parameters, and rot -r The flip represents the inverse operation of rotation. -f This represents the inverse operation of flipping, which maps the predicted pseudo-labels of the transformed image back to the original predicted labels, thereby achieving multi-view decision fusion of a single model and improving the confidence of the classification results.

[0102] It should be noted that this method first performs label prediction on the image to obtain the corresponding original predicted label, then performs geometric transformation and label prediction on the image to obtain the transformed image predicted pseudo label, and then maps the image predicted pseudo label back to the original predicted label, so as to evaluate whether the model can also identify the same effective stitching edge for images with different rotations and flips, thereby improving the confidence of the classification results.

[0103] Step 205: Based on the edge classification model and the virtual ensemble image enhancement strategy, a majority voting mechanism is used to process the classification prediction results of 16 image enhancements, and a histogram Counter is constructed to count the frequency of predicted labels.

[0104]

[0105] Where l represents the original predicted label of the effective stitched edge category, and k i Let Γ represent the pseudo-label predicted for the transformed image of the i-th transformation. -1 This represents the label space inverse transform decoder that maps the predicted pseudo-labels of the transformed image to the original predicted labels, where δ represents the Dirac function;

[0106] The most frequently predicted label is selected as the final output label. When the most frequent occurrence of a tie occurs, the label with the smallest geometric center distance is selected first, and the other label is used as a candidate label for further evaluation. Finally, the effective stitching edge of the effective tissue region image of the pathological tissue fragment is obtained based on the predicted label.

[0107] Specifically, step 3 includes the following steps:

[0108] Step 301: Use an edge detection algorithm to obtain the effective splicing edge contour coordinate information of each pathological tissue fragment in a single whole slice sample, and generate all possible tissue fragment pair combinations through Cartesian product operation to ensure that all potential tissue fragment matching possibilities are traversed.

[0109] Step 302: The anti-outlier characteristics of the Theil-Sen regression algorithm are used to perform noise-resistant modeling of effective splicing edge features. The alignment transformation matrix is ​​constructed by calculating the relative components of the centroid and rotation angle of the splicing edge line to achieve geometric alignment of the splicing edges of tissue fragments, and the overlapping of tissue fragments is verified to ensure splicing quality.

[0110] Step 303: Design a multi-dimensional matching scoring system, calculate the matching score of the difference in the length of the stitched edge contour and the matching score of the overlap of the fusion mask, and use the Hausdorff distance algorithm to calculate the matching score of the similarity of the stitched edge contour. Obtain the fitness matching score through linear combination and dynamic truncation. At the same time, use a low-resolution automatic stitching network based on deep learning to further evaluate the stitching quality, and finally obtain the top-N matching stitching schemes.

[0111] Preferably, step 302 specifically includes the following steps:

[0112] Step 30201: After obtaining all matching combinations of the pathological tissue fragments, the Theil-Sen regression algorithm is used to establish a y = f(x) model for horizontal edges and an x ​​= f(t) model for vertical edges for each splicing edge; wherein, in the y = f(x) model, any two data points (x, t, ...) are defined as... i ,y i ),(x j ,y j The difference in their X-direction coordinates is Δx, the difference in their Y-direction coordinates is Δy, and the slope is expressed as... hyperparameters ∈=10 -5 To avoid numerical instability and ensure the validity of slope calculations for non-horizontal edges; the median of the slopes of line segments between data points is calculated to determine the slope β of the best-fit line. m The calculation formula is as follows:

[0113] β m =Median(β) ij )

[0114] Where Median represents the median calculation, β m The slope of the best-fit line is represented by the intercept α between the data points. m =Median(y i -β m x iFinally, the Theil-Sen fitted line representation y = β is constructed for each stitching edge. m x+α m The fitted line representation of the vertical edge x=f(y) model is similar to that described above;

[0115] Step 30202: The centroid Q of each splicing edge line is calculated by replacing the traditional centroid with the endpoint midpoint, and the rotation angle of each edge line is determined by the difference between the endpoints of the regression line. The rotation angles of the two effective stitching edges corresponding to any two effective tissue region images A and B are respectively Their centers of mass are located at Q and Q, respectively. A Q B Calculate the rotational relative components Compensate for rotational offset and calculate the relative translational components. To compensate for initial position differences and coordinate offsets caused by rotation, an alignment coordinate transformation matrix W is constructed to achieve geometric correction of the effective tissue region image B. The alignment coordinate transformation matrix is ​​calculated as follows:

[0116]

[0117] Among them, t x The relative translation component of the effective tissue region image B in the X-axis direction, t y This represents the relative translation component of the effective tissue region image B in the Y-axis direction;

[0118] Step 30203: Construct a mismatch detection criterion based on the statistics of the fused mask area, as shown in the following formula:

[0119]

[0120] Where ρ represents the overlap rate of the fusion mask of the tissue fragment image, A and B are the two effective tissue region images mentioned above, A∩W(B) represents the overlapping image region between image A and image B after coordinate transformation, and S represents the area of ​​the image fusion mask region.

[0121] When the overlap rate ρ of the fusion mask in the detected tissue fragment image is greater than 20%, it indicates poor stitching fit, triggering the 180° rotation compensation mechanism R. new =R + 180°, where R is the rotational relative component, and update the corresponding translational relative component R. new The alignment coordinate transformation matrix was recalculated to resolve the mirror matching error caused by contour symmetry.

[0122] Furthermore, step 303 specifically includes the following steps:

[0123] Step 30301: Using a splicing edge length consistency assessment, the splicing edge line lengths of the two pathological tissue fragments are set as L1 and L2, respectively. The difference in splicing edge contour length between the two fragments is then used to determine the fitness score. len for:

[0124]

[0125] If the lengths of the spliced ​​edge lines are similar, the score is higher; if the lengths differ significantly, the score is lower.

[0126] Step 30302: Using spatial exclusivity constraints, an exponential fusion mask overlap matching score is constructed. The fusion mask overlap rate of the two pathological tissue fragments is set to ρ. Then, the fusion mask overlap matching score *fitness* is calculated. ρ for:

[0127] fitness ρ =100(1-ρ) 6

[0128] The larger the overlap ratio ρ of the fusion mask, the lower the score; the smaller the overlap ratio ρ of the fusion mask, the higher the score.

[0129] Step 30303: Contour similarity is used for measurement. An inverse numerical mapping is established based on bidirectional Hausdorff distance. The Hausdorff distance between the edge lines of two effective tissue region images A and B is set as d. H (A→B),d H (B→A), then the contour similarity matching score based on Hausdorff distance is fitness. Hausdorff for:

[0130]

[0131] If the stitching edge shapes of two valid tissue region images A and B are more similar, the Hausdorff distance is smaller and the score is higher, and vice versa;

[0132] Step 30304: The edge contour length difference, fusion mask overlap, and contour similarity matching score are comprehensively scored. Robustness is evaluated by linear combination and dynamic truncation. The fitness matching score formula is as follows:

[0133] fitness = clip(fitness) len +fitness ρ +fitness Hausdorff ,0,400)

[0134] Among these features, the clipping operation limits the impact of outliers, and the 400-point threshold design ensures that the ideal match is fitness. hausdorff >250 and fitness len A fitness score >250 indicates a valid match; a fitness score <100 indicates an invalid match.

[0135] Step 30305: Using a data storage format compatible with the JigsawNet framework, save the pairing information of all pathological tissue fragment images, including node index, matching score, transformation matrix, splicing edge classification results, etc. At the same time, calculate the intersection of the dilated masks of any two pathological tissue fragment images, skeletonize the fusion mask to create a pseudo suture line to represent the optimal splicing path, and transform the skeletonized coordinates to the original image coordinates for visualization.

[0136] Step 30306: Using the low-resolution automatic stitching network JigsawNetWithROI pre-trained on the traditional fragment stitching dataset, further evaluate the image edge stitching quality of the organized fragment pairs, improve the confidence of the fitness matching score, and finally obtain the Top-N matching stitching schemes.

[0137] Specifically, step 4 includes the following steps:

[0138] Step 401: A four-layer resolution pyramid is constructed using downsampling factors of 2560× for macro topology, 853× for regional structure, 284× for local features, and 128× for subpixels. Global topology optimization is performed at the low-resolution level of the image, while subpixel-level fine-tuning is performed at the high-resolution level, effectively balancing computational efficiency and stitching accuracy.

[0139] Step 402: Obtain the splicing information of multi-resolution tissues, including the coordinate transformation relationship of multi-resolution tissues, corner points and transformation matrices in tissue fragments, and extract the Theil-Sen lines of relevant edges as robust approximations of splicing edges to initialize tissue fragment pairing transformation.

[0140] Step 403: Initialize the quality of the paired tissue fragment splicing using the multi-dimensional matching scoring system described in Step 3, select high-fitness individuals as parents for crossover mutation, retain the optimal solution for offspring for directional mutation, so as to realize the process of iterative suturing of pathological tissue fragments, and finally output the best splicing scheme.

[0141] The iterative stitching process is equivalent to basically aligning the image blocks. However, since there are still many gaps between the eroded edges, it is necessary to further fine-tune the position coordinates of the tissue fragments for fitting. By selecting a scheme with a high fitness score and iteratively adjusting, the best stitching scheme can be obtained.

[0142] Preferably, step 403 specifically includes the following steps:

[0143] Step 40301: Initialize the iteration count n, fitness matching score (fitness), and crossover mutation probability P. Use the Top-N splicing schemes as the initial population N, and the splicing information parameters as gene values ​​B. Then, run the genetic algorithm GA for iteration to obtain the splicing scheme solution as follows:

[0144] solution=GA(N,V,n,fitness,P)

[0145] The splicing solution includes the total number of pathological tissue fragments, the global position (x, y) and rotation angle of each pathological tissue fragment, the connection relationship between the pathological tissue fragments, and the fitness matching score, among other information.

[0146] Step 40302: Repeat the iterative process of evaluating all solutions in each generation until the predefined maximum number of iterations is reached, or the best solution fails to improve for 50 consecutive generations.

[0147] Step 40303 employs a four-level resolution layer-by-layer optimization strategy. The lowest resolution level completes the registration of the main image, and then the high resolution level is used to refine the preliminary registration results, ultimately outputting the best stitching scheme.

[0148] Specifically, step 5 further includes the following optimization steps:

[0149] Step 501: Divide the high-resolution pathological tissue fragment image into 64×64 pixel basic tile units. Perform multi-resolution optimization independently on each tile. The obtained rigid transformation parameters include relative rotation components, relative translation components, and transformation matrix. By converting the high-resolution pathological tissue fragment image into calculations for each tile, the computational overhead is reduced during the reconstruction process.

[0150] Step 502: Based on bilinear interpolation, the overlapping areas of adjacent pathological tissue fragment images are fused to make the splicing edges between pathological tissue fragments more visually attractive, and finally the whole slice image with the best fitting effect is reconstructed.

[0151] This invention provides an efficient and accurate automatic stitching and iterative optimization method to achieve rapid reconstruction of ultra-high resolution whole pathological sections. This method can be used to reconstruct artificial whole-slice medical images (WMS) from pathological tissue fragments, aiding clinical assessment and facilitating radiology-pathology workflows. The reconstruction method is only affected by the shape of the pathological tissue and requires no further image information during optimization, making it essentially a stain-independent solution suitable for accurately reconstructing original WMS on a range of different datasets. Furthermore, the efficient algorithm design and containerization improve the reproducibility of the reconstruction results on routine clinical workstations, which will help clinicians shorten case assessment time and improve radiology-pathology workflows, promoting research in the multimodal field of medicine.

[0152] The technical features or steps of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features or steps in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0153] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

Claims

1. A method for reconstructing ultra-high resolution whole pathological sections, characterized in that, Includes the following steps: Step 1: Generate a fusion mask using threshold segmentation and tissue topology to obtain an effective tissue region image of pathological tissue fragments; Step 2: Use a deep learning-based edge classification model and virtual ensemble image enhancement strategy to obtain effective stitching edges of the effective tissue region image; Step 3: Perform noise-resistant modeling on the effective stitching edges based on Theil-Sen regression, calculate the alignment transformation matrix to complete the edge alignment of the effective tissue region image, construct a multi-dimensional matching scoring system to calculate the geometric matching degree of the stitching edges, and combine deep neural network stitching quality evaluation to select the optimal Top-N stitching scheme; Step 4: Use a multi-resolution stitching optimization algorithm based on genetic algorithm to optimize the low-resolution layer of the image. Step 3 involves global topology optimization at the high-resolution level, sub-pixel fine-tuning at the high-resolution level, evaluating stitching quality using the multi-dimensional matching scoring system, selecting high-fitness individuals for cross-mutation, iterative stitching of the effective tissue region image, and finally outputting the optimal stitching scheme. Step 5 involves reconstructing the whole-section image of the pathological tissue based on the optimal stitching scheme. Step 3 includes step 303, designing a multi-dimensional matching scoring system, calculating the stitching edge contour length difference matching score and the fusion mask overlap matching score, and using a distance algorithm to calculate the stitching edge contour similarity matching score. Fitness matching scores are obtained through linear combination and dynamic truncation. Simultaneously, an automatic stitching network is used to evaluate stitching quality, ultimately obtaining the optimal stitching scheme. The process involves p-N matching stitching schemes, specifically including the following steps: Step 30301, using stitching edge length consistency evaluation, setting the stitching edge line lengths of any two valid tissue region images and calculating the matching score for the difference in stitching edge contour lengths between them; Step 30302, using spatial exclusivity constraints, constructing an exponential fusion mask overlap matching score, setting the fusion mask overlap rate of any two valid tissue region images and calculating the fusion mask overlap matching score; Step 30303, using contour similarity as a metric, setting the distance between the edge lines of any two valid tissue region images and calculating the contour similarity matching score of the distance; Step 30304, combining the edge contour length difference and fusion mask overlap... The overlapping and contour similarity matching scores are comprehensively scored, and the robustness of the evaluation is ensured by linear combination and dynamic truncation to obtain the fitness matching score; in step 30305, the pairing information of all pathological tissue fragment images is saved, including node index, matching score, transformation matrix, and splicing edge classification results. At the same time, the intersection of the dilated mask of any two pathological tissue fragment images is calculated, and the fusion mask is skeletonized to create a pseudo-suture line to represent the optimal splicing path. The coordinates of the skeletonized image are transformed to the original image coordinates for visualization; in step 30306, the image edge splicing quality of the tissue fragment pairs is evaluated using an automatic splicing network to improve the confidence of the fitness matching score, and finally the top-N matching splicing schemes are obtained.

2. The method for reconstructing ultra-high resolution whole pathological sections according to claim 1, characterized in that, The specific steps of step 1 are as follows: Step 101, obtain and utilize the pyramid-level downsampling factor of the pathological tissue fragment image, establish the coordinate transformation relationship from the original resolution level to the target resolution level image, and realize the geometric coordinate transformation of different resolution levels through the contour scaling function to ensure the consistency of the topological structure of the tissue region across resolutions; Step 102, after downsampling the pathological tissue fragment image to the target resolution level, perform HSV color space conversion and extract the saturation channel, use a median filter to eliminate the particle noise generated during slide preparation, generate an initialized binary mask through the adaptive Otsu threshold segmentation algorithm, use morphological closing operation for edge smoothing, and combine connected component analysis to filter out discrete background noise to obtain the optimized Otsu threshold segmentation mask; Step 103, extract the effective tissue region mask of the target resolution level image based on the preprocessing method of the multi-instance learning framework CLAM, use OpenCV for vector graphics processing, map the edges of the tissue region and holes to vector polygons respectively, and convert the tissue region into positively filled polygons and the inner contour of the hole into negatively filled polygons through hierarchical filling rules to realize the generation of the pathological tissue fragment topological mask; Step 104: The Otsu threshold segmentation mask and the pathological tissue fragment topology mask are fused at the pixel level to obtain a fused mask. Then, the effective tissue region jointly identified by the two masks is retained by matrix multiplication. Based on the fused mask and the coordinate transformation relationship, geometric registration and synchronous cropping are performed on the pathological tissue fragment image to obtain the effective tissue region image of the pathological tissue fragment.

3. The method for reconstructing ultra-high resolution whole pathological sections according to claim 1, characterized in that, The specific steps of step 2 are as follows: Step 201, by extracting the contour of the fusion mask and analyzing the minimum bounding rectangle, the main axis direction of the effective tissue region image is determined, that is, the angle between the major or minor axis of the minimum bounding rectangle and the horizontal axis of the effective tissue region image is calculated. Then, with the centroid of the effective tissue region as the rotation center, an affine transformation matrix is ​​constructed to simultaneously correct the rotation direction of the fusion mask and the effective tissue region image; Step 202, using EfficientNet-B0 as the basic network architecture, a feature extractor for edge classification is constructed. The original classification layer of the basic network architecture is removed, and the original convolutional layer is retained to obtain the backbone network. Step 203 involves designing an adaptive classification head, compressing the feature map using a global average pooling layer, introducing a batch normalization layer and a 0.5 Dropout layer for regularization, and using a fully connected layer activated by Softmax to output the class probability distribution to obtain the original predicted labels for the effective stitching edges. Step 204 utilizes a virtual ensemble image enhancement strategy to generate 16 geometric transformation versions of the effective tissue region image. The geometric transformations include any combination of image rotation transformations and mirror flip transformations to form the effective stitching edges. A set of pseudo-images of the tissue region image is obtained, and the corresponding transformed image predicted pseudo-labels in the pseudo-image set are obtained by the feature extractor. At the same time, a label space inverse transform decoder is designed to map the transformed image predicted pseudo-labels back to the original predicted labels, realize multi-view decision fusion of a single model, and improve the confidence of the classification results. In step 205, based on the edge classification model and the virtual integration image enhancement strategy, the majority voting mechanism is used to process the classification prediction results of 16 image enhancements, construct a frequency statistics histogram of predicted labels, select the most frequent predicted label as the final output label, and obtain the effective stitching edges of the corresponding pathological tissue fragment effective tissue region image.

4. The method for reconstructing ultra-high resolution whole pathological sections according to claim 1, characterized in that, The specific steps of step 3 further include: Step 301, using an edge detection algorithm to obtain the effective splicing edge contour coordinate information of each pathological tissue fragment in a single whole slice sample, generating all possible tissue fragment pair combinations through Cartesian product operation to ensure that all potential tissue fragment matching possibilities are traversed; Step 302, using the anti-outlier characteristics of the Theil-Sen regression algorithm to perform noise-resistant modeling of effective splicing edge features, constructing an alignment transformation matrix by calculating the relative components of the centroid and rotation angle of the splicing edge line, realizing the geometric alignment of the tissue fragment splicing edges, and verifying the overlapping of tissue fragments to ensure splicing quality; wherein, the distance algorithm in step 303 is the Hausdorff distance algorithm, and the automatic splicing network is a low-resolution automatic splicing network based on deep learning.

5. The method for reconstructing ultra-high resolution whole pathological sections according to claim 4, characterized in that, Step 302 includes the following steps: Step 30201, after obtaining all matching combinations of the pathological tissue fragments, the Theil-Sen regression algorithm is used to establish models for the horizontal and vertical edges of each splicing edge line respectively; Step 30202, the centroid of each splicing edge line is calculated by replacing the traditional centroid with the endpoint midpoint, and the rotation angle of each edge line is determined by the difference between the endpoints of the regression line. The translational relative component of any two splicing edges is calculated to compensate for the initial position difference and the coordinate offset caused by rotation. An alignment coordinate transformation matrix is ​​constructed to achieve geometric correction of the splicing edges of the tissue fragments; Step 30203, a mismatch detection criterion based on the fusion mask area statistics is constructed. When the overlap rate of the fusion mask of the tissue fragment image is detected to be greater than 20%, a 180° rotation compensation mechanism is triggered and the corresponding translational relative component is updated. The alignment coordinate transformation matrix is ​​recalculated to solve the mirror matching error caused by contour symmetry.

6. The method for reconstructing ultra-high resolution pathological whole sections according to claim 4, characterized in that: In step 30301, the lengths of the stitching edge lines of any two valid tissue region images are set as follows: and The difference in the length of the spliced ​​edge contours between the two is matched by a score. for: If the lengths of the spliced ​​edge lines are similar, the score is higher; if the lengths differ significantly, the score is lower. In step 30302, the overlap rate of the fusion mask for any two valid tissue region images is set to... Then the fusion mask overlap matching score for: ; Mask overlap rate The larger the value, the lower the score; fusion mask overlap rate The smaller the value, the higher the score; step 30303 establishes an inverse numerical mapping based on the bidirectional Hausdorff distance, setting the Hausdorff distance between the edge lines of any two valid tissue region images A and B as . , Then the contour similarity matching score based on Hausdorff distance for: If two splicing edges have similar shapes, the smaller the Hausdorff distance, the higher the score, and vice versa; in step 30304, the fitness matching score is calculated using the following formula: Among them, the clipping operation limits the impact of outliers, and the 400-point threshold design ensures that the ideal match is: and ; Qualified match is Invalid match is In step 30305, a data storage format compatible with the JigsawNet framework is used to save the pairing information of all pathological tissue fragment images; in step 30306, the automatic stitching network is a low-resolution automatic stitching network JigsawNetWithROI pre-trained on a traditional fragment stitching dataset.

7. The method for reconstructing ultra-high resolution whole pathological sections according to claim 1, characterized in that, The specific steps of step 4 are as follows: Step 401, a four-layer resolution pyramid is constructed using macro topology, regional structure, local features, and sub-pixel downsampling factors. Global topology optimization is completed at the low-resolution level of the image, while sub-pixel fine-tuning is performed at the high-resolution level, effectively balancing computational efficiency and stitching accuracy. Step 402: Obtain the splicing information of multi-resolution tissues, including the coordinate transformation relationship of multi-resolution tissues, corner points and transformation matrices in tissue fragments, and extract the Theil-Sen lines of relevant edges as robust approximations of splicing edges to initialize tissue fragment pairing transformation. Step 403: Initialize the quality of the paired tissue fragment splicing using the multi-dimensional matching scoring system described in Step 3, select high-fitness individuals as parents for crossover mutation, retain the optimal solution for offspring for directional mutation, so as to realize the process of iterative suturing of pathological tissue fragments, and finally output the best splicing scheme.

8. The method for reconstructing ultra-high resolution whole pathological sections according to claim 7, characterized in that, Step 403 includes the following steps: Step 40301, initialize the number of iterations, fitness matching score, and crossover mutation probability, and use the Top-N splicing schemes as the initial population, splicing information parameters as gene values, and then run the genetic algorithm for iteration; Step 40302, repeat the iterative process of evaluating all solutions in each generation until the predefined maximum number of iterations is reached, or the best solution fails to improve for 50 consecutive generations; Step 40303 employs a four-level resolution layer-by-layer optimization strategy. The lowest resolution level completes the registration of the main image, and then the high resolution level is used to refine the preliminary registration results, ultimately outputting the best stitching scheme.

9. The method for reconstructing ultra-high resolution whole pathological sections according to claim 1, characterized in that, Step 5 further includes the following optimization steps: Step 501, the high-resolution pathological tissue fragment image is divided into 64×64 pixel basic image block units, and each image block is independently optimized for multi-resolution. The obtained rigid transformation parameters include relative rotation components, relative translation components, and transformation matrix. By converting the high-resolution pathological tissue fragment image into the calculation of each image block, the computational overhead is reduced during the reconstruction process. Step 502, the overlapping areas of adjacent pathological tissue fragment images are fused based on bilinear interpolation, making the splicing edges between pathological tissue fragments more visually attractive, and finally reconstructing the full-slice image with the best fitting effect.

Citation Information

Patent Citations

  • Whole slide digital pathological image processing and analysis method

    CN106408573A

  • Pathological image segmentation method and device based on deep learning and readable storage medium thereof

    CN120031899A