A segmentation method for PAS-stained microscopic pathology images
Through a two-stage model training method, sliding window cropping and FTUs center cropping are used to form a data set, which solves the accuracy problem of functional tissue unit segmentation in high-resolution PAS stained microscope images, achieving higher segmentation accuracy and lower error.
Patent Information
- Application Number
- CN202110915201.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-10
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2041-08-10
Smart Images

Figure CN113592883B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a segmentation method for PAS-stained microscopic pathological images. Background Art
[0002] The adult human body contains 37 trillion cells, and determining the functions and relationships between these cells is a difficult task. PAS staining, as a staining method, is generally used to display glycogen and other polysaccharides. How to detect and segment functional tissue units (FTUs) between different human tissues through PAS staining microscope images is a huge challenge. PAS staining microscope images are usually stored in the form of TIFF files, which will take up a large amount of memory (>500MB-5GB). If it is completely dependent on manual processing, it will be time-consuming and laborious to accurately segment relatively small functional tissue units on such high-resolution images. Therefore, the detection and segmentation of functional tissue units must be intelligent to solve practical application problems.
[0003] At present, there are many conventional image segmentation deep learning methods, such as segNet, Unet, DCnet, etc., and the segmentation effect is also good. In the high-resolution image segmentation task, the generally adopted solution is to use the method of cutting the large image into small images for training, and then splicing the prediction results to obtain the large image segmentation result. However, the prediction results of the model trained in this way are prone to errors in the processing of the edge parts of the small images. Therefore, it is very meaningful to find a deep learning model training solution to efficiently and accurately segment very small FTUs in high-resolution PAS-stained microscopic pathology images. To this end, we propose a segmentation method for PAS-stained microscopic pathology images. Summary of the invention
[0004] The main purpose of the present invention is to provide a segmentation method for PAS-stained microscopic pathology images, which can effectively solve the problems in the background technology.
[0005] To achieve the above object, the technical solution adopted by the present invention is:
[0006] A segmentation method for PAS-stained microscopic pathology images comprises the following steps:
[0007] Step 1: Training data set: Crop the original large image in two different ways to form two different data sets;
[0008] Step 2: Training model: Use the segmentation model to train the two data sets in step 1.
[0009] Regular training is performed to obtain a two-stage training model;
[0010] Step 3: Use the model to predict new data: Use the two models obtained in step 2 to predict new data.
[0011] Data for prediction.
[0012] A further improvement of the present invention is that the specific process of the training data set in step 1 is as follows: the original large image is cropped by sliding window cropping and cropped with FTUs as the target center, both of which are cropped into image blocks of 1024*1024 size; the image blocks processed by sliding window cropping are scaled to 256*256 after removing all background data through data screening, which is the training data for stage 1; the image blocks cropped with FTUs as the target center are scaled to 256*256, which is the training data for stage 2, so that the image after sliding window cropping of the original large image and the image cropped with FTUs as the target center form two data sets respectively.
[0013] A further improvement of the present invention is that the specific process of the conventional training of the model training in step two is: introducing the two different data sets in step one, respectively inputting them into the model for training and iterating continuously to obtain two trained models; the stage one training data is trained with a deep learning model to obtain a stage one model, and the stage two training data is trained with a deep model to obtain a stage two model.
[0014] A further improvement of the present invention is that the process of predicting new data in step 3 is as follows: input a new large image to be segmented, perform sliding window cropping operation on overlapped images, and form n 256*256 size Patch image blocks nPs; use the stage 1 model to predict nPs to obtain the segmentation result of the Patch image; perform post-processing to splice the nPs segmentation result into a segmentation result Res01 of the original image size; obtain m FTUs to be selected from the segmentation result Res01;
[0015] Crop the center of each selected FTUs target to obtain m 256*256 size patch image blocks mPs; use the second stage model to predict mPs to obtain the segmentation result of the patch image; perform post-processing and splice the mPs segmentation result into the segmentation result Res02 of the original image size;
[0016] The final segmentation result Res of the original image is the result of the fusion of Res01 and Res02.
[0017] A further improvement of the present invention is that, during the post-processing, the nPs segmentation results are spliced into a segmentation result Res01 of the original image size and the mPs segmentation results are spliced into a segmentation result Res02 of the original image size, and both splicing uses the center parts of two adjacent Patches for splicing.
[0018] A further improvement of the present invention is that the fusion result of Res01 and Res02 conforms to the following formula: .
[0019] Compared with the prior art, the present invention has the following beneficial effects:
[0020] The present invention proposes a two-stage model training method, in which different data sets are used for targeted training in the two stages, which can effectively improve the accuracy of high-resolution PAS-stained microscopic pathology image segmentation. It has been verified that this method can improve the accuracy by 1.02% compared with the traditional model training method. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solution of the present invention, the accompanying drawings required for use in the technical description of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0022] Figure 1 A high-resolution PAS-stained microscopic pathology image according to a segmentation method of a PAS-stained microscopic pathology image of the present invention;
[0023] Figure 2 A flow chart for preparing a data set for a segmentation method of a PAS-stained microscopic pathology image of the present invention;
[0024] Figure 3 A flow chart for preparing a data set clipped by sliding window for a segmentation method of a PAS-stained microscopic pathology image of the present invention;
[0025] Figure 4 A flow chart for preparing a data set clipped by target center for a segmentation method of a PAS-stained microscopic pathology image of the present invention;
[0026] Figure 5 A flowchart of a model training method for segmenting a PAS-stained microscopic pathology image according to the present invention;
[0027] Figure 6 A schematic diagram of the central part splicing processing of a Patch in a segmentation method of a PAS-stained microscopic pathology image according to the present invention;
[0028] Figure 7 The present invention provides a model prediction flow chart for a segmentation method of a PAS-stained microscopic pathology image. DETAILED DESCRIPTION
[0029] The present invention is further described below in conjunction with specific embodiments, wherein the accompanying drawings are only used for exemplary descriptions and represent only schematic diagrams rather than actual drawings, and should not be understood as limitations on this patent. In order to better illustrate the specific embodiments of the present invention, some parts of the accompanying drawings may be omitted, enlarged or reduced, and do not represent the size of the actual product. For those skilled in the art, it is understandable that some well-known structures and their descriptions in the accompanying drawings may be omitted. Based on the specific embodiments of the present invention, all other specific embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0030] Example 1
[0031] The high-resolution PAS staining microscope pathological image targeted by the present invention is briefly shown as follows Figure 1 As shown, FTUs and tissues are not easy to distinguish in the image, and FTUs appear very small in the image, with the image width and height both being more than 20,000 pixels.
[0032] A segmentation method for PAS-stained microscopic pathology images comprises the following steps:
[0033] Step 1: Training data set: Crop the original large image in two different ways to form two different data sets;
[0034] Step 2: Training model: Use the segmentation model to train the two data sets in step 1.
[0035] Regular training is performed to obtain a two-stage training model;
[0036] Step 3: Use the model to predict new data: Use the two models obtained in step 2 to predict new data.
[0037] Data for prediction.
[0038] In this embodiment, the specific process of step 1 training data set is as follows: the original large image is cropped by sliding window cropping and cropping with FTUs as the target center, both of which are cropped into image blocks of 1024*1024 size; the image blocks processed by sliding window cropping are scaled to 256*256 after removing all background data through data screening, which is the training data for stage 1; the image blocks cropped with FTUs as the target center are scaled to 256*256, which is the training data for stage 2, so that the image after sliding window cropping of the original large image and the image cropped with FTUs as the target center form two data sets respectively;
[0039] Since the training is divided into two stages, two datasets need to be prepared, dataset Dataset01 and dataset Dataset02, which are used for the two stages of training respectively. The dataset preparation process is as follows: Figure 2 As shown,
[0040] The preparation process of the dataset Dataset01 is as follows: Figure 3 As shown:
[0041] a. Cropping is performed with overlapping through sliding windows to a size of 1024*1024;
[0042] b. Patch data screening: Convert RGB images to HSV images, calculate the pixel values of H, S, and V components, and filter out patches containing less than 10% tissue through a certain threshold to increase the quality of the data set;
[0043]
[0044] c. Data scaling: Scale the 1024*1024 image to 256*256 to reduce the size of the image fed into the network model
[0045] Like size, model improves training speed.
[0046] The preparation process of the dataset Dataset02 is as follows: Figure 4 As shown:
[0047] a. Data cropping: cropping is performed based on the center of each FTUs to a size of 1024*1024;
[0048] b. Data scaling: Scale the 1024*1024 image to 256*256 to reduce the size of the image fed into the network model and improve the training speed of the model.
[0049] In this embodiment, the specific process of conventional training of the model training in step 2 is as follows: introduce the two different data sets in step 1, input them into the model for training and iterate continuously to obtain two trained models; the stage 1 training data is trained with the deep learning model to obtain the stage 1 model, and the stage 2 training data is trained with the deep model to obtain the stage 2 model. The model training process is as follows: Figure 5 shown.
[0050] In this embodiment, the prediction flow chart of step three is as follows: Figure 7 As shown in the figure, the process of predicting new data is as follows: input the new large image to be segmented, perform sliding window cropping operation on the overlapped ones, and form n 256*256 size patch image blocks nPs; use the stage one model to predict nPs and get the segmentation result of the patch image; perform post-processing and splice the nPs segmentation result into the segmentation result Res01 of the original image size; get m FTUs to be selected from the segmentation result Res01;
[0051] Crop the center of each selected FTUs target to obtain m 256*256 size patch image blocks mPs; use the second stage model to predict mPs to obtain the segmentation result of the patch image; perform post-processing and splice the mPs segmentation result into the segmentation result Res02 of the original image size;
[0052] The final segmentation result Res of the original image is the result of the fusion of Res01 and Res02.
[0053] In this embodiment, during post-processing, the nPs segmentation result is spliced into a segmentation result Res01 of the original image size, and the mPs segmentation result is spliced into a segmentation result Res02 of the original image size. Both splicing uses the center part of two adjacent patches for splicing. The splicing process diagram is shown in FIG. Figure 6 shown.
[0054] In this embodiment, the fusion result of Res01 and Res02 conforms to the following formula:
[0055] .
[0056] Example 2
[0057] like Figure 1-7 As shown, a segmentation method for PAS-stained microscopic pathology images comprises the following steps:
[0058] S1. Prepare dataset Dataset01;
[0059] a. Data cropping: Data is cropped with overlap in the form of sliding windows. Generally, the overlap ratio is between 0.2 and 0.5, and the size is cropped to 1024*1024.
[0060] b. Patch data screening: Convert RGB images to HSV images, calculate the pixel values of H, S, and V components, and filter out patches containing less than 10% tissue through a certain threshold to increase the quality of the data set;
[0061] c. Data scaling: Scale the 1024*1024 image to 256*256 to reduce the size of the image fed into the network model and improve the training speed of the model.
[0062] S2, prepare dataset Dataset02;
[0063] a. Data cropping: cropping is performed based on the center of each FTUs to a size of 1024*1024;
[0064] b. Data scaling: Scale the 1024*1024 image to 256*256 to reduce the size of the image fed into the network model and improve the training speed of the model.
[0065] S3. Use the segmentation model Unet to perform regular training on the Dataset01 training data set to obtain the stage training result Model01;
[0066] S4, use the segmentation model Unet to perform regular training on the Dataset02 training data set, and the stage training result is Model02;
[0067] S5, input the large image IMAGE to be segmented, perform sliding window cropping operation with overlap, and convert it into n 256*256 size Patch image blocks nPs;
[0068] S6. Use Model01 to predict nPs and obtain the segmentation result of the Patch image;
[0069] S7, perform post-processing, stitch the nPs segmentation results into the segmentation results Res01 of the original image Image size, and use the central part of the Patch for stitching;
[0070] S8, obtain m FTUs to be selected from Res01;
[0071] S9, cropping is performed based on the center of each selected FTUs target to obtain m 256*256 size Patch image blocks mPs;
[0072] S10, use Model02 to predict mPs and obtain the segmentation result of the Patch image;
[0073] S11, perform post-processing, stitch the mPs segmentation result into a segmentation result Res02 of the size of the original image Image, and the stitching operation is consistent with step S7;
[0074] S12. Finally, the segmentation result of Image is the fusion result of Res01 and Res02. The fusion formula is as follows: .
[0075] The present invention proposes a two-stage model training method, in which different data sets are used for targeted training in the two stages, which can effectively improve the accuracy of high-resolution PAS-stained microscopic pathology image segmentation. It has been verified that this method can improve the accuracy by 1.02% compared with the traditional model training method.
[0076] The above shows and describes the basic principles and main features of the present invention and the advantages of the present invention. It should be understood by those skilled in the art that the present invention is not limited to the above embodiments. The above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention to be protected. The scope of protection of the present invention is defined by the attached claims and their equivalents.
Claims
1. A segmentation method for PAS-stained microscopic pathology images, characterized in that: The following steps are involved: Step 1, training data set: the original large image is cropped in two different ways to form two different data sets; the specific process of the training data set in step 1 is: the original large image is cropped by sliding window cropping and cropped with FTUs as the target center, and the image blocks processed by sliding window cropping are scaled after all background data is removed through data screening to form stage 1 training data; the image blocks cropped with FTUs as the target center are scaled to form stage 2 training data, so that the image after sliding window cropping of the original large image and the image cropped with FTUs as the target center form two data sets respectively; Step 2: Training model: Use the segmentation model to perform conventional training on the two data sets in step 1 to obtain two-stage training models; the specific process of conventional training of model training is: introduce the two different data sets in step 1, input them into the model for training and iterate continuously to obtain two trained models; the stage 1 training data is trained with the deep learning model to obtain the stage 1 model, and the stage 2 training data is trained with the deep model to obtain the stage 2 model Step 3: Predict new data using the model: Use the two models obtained in step 2 to predict new data. The process of predicting new data is as follows: Input the new large image to be segmented, perform sliding window cropping operations on the overlapped images, and form Patch image blocks nPs; Use the model of stage 1 to predict nPs and obtain the segmentation result of the Patch image; perform post-processing to splice the nPS segmentation result into the segmentation result Res01 of the original image size; obtain m FTUs to be selected from the segmentation result Res01; crop the center of each FTUs target to obtain m Patch image blocks mPs; Use the second-stage model to predict mPs and obtain the segmentation result of the Patch image; perform post-processing to splice the mPs segmentation result into the segmentation result Res02 of the original image size; finally, the segmentation result Res of the original image is the result of the fusion of Res01 and Res02.
2. The segmentation method of a PAS staining microscopic pathology image according to claim 1, characterized in that: In the step three, n Patch image blocks nPs of size 256*256 are formed.
3. The segmentation method of a PAS-stained microscopic pathology image according to claim 1, characterized in that: When performing the post-processing, the nPs segmentation results are spliced into a segmentation result Res01 of the original image size, and the mPs segmentation results are spliced into a segmentation result Res02 of the original image size. Both splicing uses the central parts of two adjacent Patches for splicing.
4. The segmentation method of a PAS-stained microscopic pathology image according to claim 1, characterized in that: The fusion result of Res01 and Res02 conforms to the following formula: 。
