A method for calculating tumor purity, an electronic device, and a storage medium

Through the method based on convolutional neural network, the tumor purity is calculated, which solves the problem of low detection results efficiency and accuracy in tumor molecular pathological detection, and achieves more refined purity calculation and higher detection efficiency.

CN114972162BActive Publication Date: 2025-06-27CHANGZHOU TONGSHU BIOTECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210253704.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-15
Publication Date
2025-06-27
Estimated Expiration
2042-03-15

AI Technical Summary

Technical Problem

In the prior art, in tumor molecular pathological detection, affected by fluctuations in tissue content and tumor content, the detection results are not efficient and accurate, and there are problems of false negatives and inconsistent results.

Method used

Using a method based on convolutional neural network, the pathological pictures are obtained, the tissue area is marked, and the tissue area is divided into small pictures. The pre-trained tumor purity prediction model is input to calculate the tumor purity.

Benefits of technology

A more refined tumor purity calculation than manual is achieved, which improves the efficiency and accuracy of the detection results, and reduces the model complexity and calculation time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114972162B_ABST
    Figure CN114972162B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for calculating tumor purity, an electronic device, and a storage medium. The method includes: obtaining a target pathological image to be predicted; marking the target pathological image to obtain a tissue region image; dividing the tissue region image into M sub-images with a preset resolution; inputting the M sub-images into a pre-trained tumor purity prediction model to obtain the probabilities that the M sub-images belong to the tumor region; recording the number of the M sub-images with probabilities greater than a preset threshold, denoted as N. Calculating the tumor purity based on the N sub-images and the M sub-images. The present invention can improve the efficiency and accuracy of the detection results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and particularly relates to a method for calculating tumor purity, an electronic device, and a storage medium. Background Art

[0002] For gene detection and protein detection in tumor molecular pathology, there is currently a large demand in the medical market. There are already related molecular pathology detection solutions for common lung cancer, breast cancer, colorectal cancer, etc. Currently, for tumor patients who require precision treatment, such as targeted therapy and immunotherapy, it is necessary to provide tumor tissue samples for molecular pathology examination. However, due to multiple factors such as patient factors, tumor itself factors, and clinical surgical doctor biopsy sampling in the pathological samples obtained by clinical surgical biopsy, there are large fluctuations in the tissue content and tumor content in each submitted pathological sample. For samples with low tissue content or low tumor content, for the molecular pathology detection technology platform, it often causes undetected cases, resulting in false negative phenomena, or when patients submit samples for molecular pathology examination twice before and after, there are serious inconsistencies in the detection results. Summary of the Invention

[0003] The purpose of the present invention is to provide a method for calculating tumor purity, an electronic device, and a storage medium. Specifically, it can be a method for calculating the tumor purity in a pathological section based on a convolutional neural network (abbreviated as INSIGHT, a CNN based method for tumor purity estimation from H&E stained pathological image) to solve the above problems and improve the efficiency and accuracy of the detection results.

[0004] To achieve the above purpose, the present invention is realized through the following technical solutions:

[0005] A method for calculating tumor purity includes: Step S1, obtaining a target pathological image to be predicted.

[0006] Step S2, marking the target pathological image to obtain a tissue region image. Step S3, dividing the tissue region image into M sub-images with a preset resolution. Step S4, inputting the M sub-images into a pre-trained tumor purity prediction model to obtain the probabilities that the M sub-images belong to the tumor region. Step S5, recording the number of the M sub-images with probabilities greater than a preset threshold, denoted as N. Step S6, calculating the tumor purity according to the N sub-images and the M sub-images.

[0007] Optionally, Step S6 includes: the tumor purity f is calculated using the following formula:

[0008]

[0009] Wherein, N≥0 and M>0.

[0010] Optionally, step S1 includes: obtaining a pathological sample to be predicted, performing pathological sectioning and HE staining on the pathological sample, and scanning with a scanning microscope with a preset magnification to obtain the target pathological images, and the number of the target pathological images is multiple.

[0011] Optionally, the tumor purity prediction model in step S4 includes: Step S4.1, obtaining Z of the target pathological images. Step S4.2, randomly dividing the Z target pathological images to obtain a pre-training set, a pre-verification set, and a pre-test set. Step S4.3, labeling each of the target pathological images in the pre-training set and dividing them into Z1 sub-images with a preset resolution to obtain a training set. Labeling each of the target pathological images in the pre-verification set and dividing them into Z2 sub-images with a preset resolution to obtain a verification set. Labeling each of the target pathological images in the pre-test set and dividing them into Z3 sub-images with a preset resolution to obtain a test set. Step S4.4, classifying and storing the Z1, Z2, and Z3 sub-images. Step S4.5, inputting the training set into a deep learning framework to establish a tumor purity prediction model. Step S4.6, inputting the verification set into the tumor purity prediction model to optimize the tumor purity prediction model. Step S4.7, inputting the test set into the optimized tumor purity prediction model to obtain the pre-trained tumor purity prediction model.

[0012] Optionally, step S4.5 includes: The training set includes tumor region sub-images and normal region sub-images. Inputting the tumor region sub-images and the normal region sub-images into the deep learning framework respectively, and performing classification training on the deep learning framework to establish the tumor purity prediction model.

[0013] Optionally, step S4.6 includes: Inputting the verification set into the tumor purity prediction model for optimization training, and repeating this process. When the loss value of the verification set does not decrease for i consecutive rounds and the number of optimization training times is greater than j rounds, stop training. At this time, the loss value of the verification set reaches the minimum, and save the weights of the tumor purity prediction model.

[0014] Optionally, the step S4.7 includes: inputting the test set into the optimized tumor purity prediction model, repeating this process, and counting the sensitivity, specificity, and model evaluation metrics of the tumor purity prediction model. Finally, stop the test when the average model evaluation metric of the tumor purity prediction model is 98.7%, and obtain the pre-trained tumor purity prediction model.

[0015] On the other hand, the present invention also provides an electronic device, including a processor and a memory. A computer program is stored on the memory. When the computer program is executed by the processor, the method described above is implemented.

[0016] On yet another aspect, the present invention also provides a readable storage medium. A computer program is stored in the readable storage medium. When the computer program is executed by a processor, the method described above is implemented.

[0017] The present invention has at least one of the following advantages:

[0018] The present invention distinguishes the category (normal / tumor) to which each sub-picture (small picture) belongs in units of the size of a preset resolution. Under the condition of ensuring the accuracy of the classification model, a more refined purity calculation can be achieved compared to manual calculation.

[0019] Compared with the prior art patents, the present invention calculates the purity in units of small pictures. Compared with the prior art, the calculation is slightly rough. However, in large digital images such as digital pathology slides, the calculation method of the present invention will not have a large error compared with the calculation method of the area of the region, and there are the following two advantages: The calculation steps of the present invention are simpler. Taking small pictures as the standard for inputting data into the deep learning model can reduce the complexity of the model, save the resources required by the model, and reduce the calculation time.

[0020] In subsequent prediction tasks (such as predicting gene mutations in tumors), the small pictures of the tumor region predicted by the present method can be directly used, and there is no need to segment the tumor region again, improving the detection efficiency and accuracy.

[0021] BRIEF DESCRIPTION OF THE DRAWINGS BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 is a schematic flowchart of a tumor purity calculation method provided by an embodiment of the present invention;

[0023] Figure 2 is a schematic comparison diagram of the brain tumor purity result obtained by using the tumor purity calculation method provided by an embodiment of the present invention and the result judged by a pathologist. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0024] The following further elaborates on a method for calculating tumor purity, an electronic device, and a storage medium proposed by the present invention in conjunction with the accompanying drawings and specific embodiments. According to the following description, the advantages and features of the present invention will be clearer. It should be noted that the accompanying drawings are in a very simplified form and all use non-precise scales, only for conveniently and clearly assisting in explaining the purpose of the embodiments of the present invention. In order to make the purpose, features, and advantages of the present invention more obvious and understandable, please refer to the accompanying drawings. It should be noted that the structures, proportions, sizes, etc. shown in the drawings of this specification are only used to cooperate with the content disclosed in the specification for those familiar with this technology to understand and read, and are not used to limit the limiting conditions for the implementation of the present invention. Therefore, they do not have a technical essence. Any modification of the structure, change in the proportional relationship, or adjustment of the size, without affecting the efficacy that the present invention can produce and the purpose that can be achieved, should still fall within the scope that the technical content disclosed by the present invention can cover.

[0025] As Figure 1 shown, a method for calculating tumor purity provided in this embodiment includes: Step S1, obtaining a target pathological image to be predicted.

[0026] In this embodiment, Step S1 includes: obtaining a pathological sample to be predicted, performing pathological sectioning and HE staining on the pathological sample, and scanning with a scanning microscope having a preset magnification to obtain the target pathological image, and the number of the target pathological images is multiple.

[0027] Specifically, obtaining a tissue sample of a colorectal cancer patient that meets the standards, that is, the pathological sample. It can be understood that in this embodiment, the scanning microscope of the target pathological image is a 40-fold microscope, but the present invention is not limited thereto, that is, pathological images scanned with other magnification microscopes such as a 20-fold microscope or a 10-fold microscope can also be used.

[0028] Step S2, marking the target pathological image to obtain a tissue region image.

[0029] In this embodiment, the tissue region is marked on the target pathological image. The tissue region refers to the region containing cells in the target pathological image, and the cells therein include normal and / or diseased cells. By marking the digital pathological section image, the effective pathological region is determined, and the image marking methods include but are not limited to image binarization processing methods, image segmentation models based on machine learning, or edge detection algorithms, etc.

[0030] Step S3, dividing the tissue region image into M sub-images with a preset resolution. In this embodiment, the preset resolution is 512×512 resolution, but the present invention is not limited thereto, that is, in this embodiment, small images with other resolutions such as 256×256 or 350×400 can also be used.

[0031] Step S4: Input the M sub - images into a pre - trained tumor purity prediction model to obtain the probabilities that the M sub - images belong to the tumor region.

[0032] Step S5: Record the number of the M sub - images with probabilities greater than a preset threshold, denoted as N.

[0033] Step S6: Calculate the tumor purity based on the N sub - images and the M sub - images.

[0034] The tumor purity f is calculated using the following formula:

[0035]

[0036] where N≥0 and M>0.

[0037] Step S4 includes: Step S4.1: Obtain Z target pathological images.

[0038] In this embodiment, when the target pathological image is scanned at 40 - fold magnification, Z = 301, but the present invention is not limited thereto.

[0039] Step S4.2: Randomly divide the Z target pathological images to obtain a pre - training set, a pre - validation set, and a pre - test set.

[0040] In this embodiment, 301 images can be randomly divided. 70% of the 301 images are used as the pre - training set; 10% of the 301 images are used as the pre - validation set; 20% of the 301 images are used as the pre - test set.

[0041] Step S4.3: Mark each target pathological image in the pre - training set and divide it into Z1 sub - images with a preset resolution (512×512 resolution) to obtain a training set. Mark each target pathological image in the pre - validation set and divide it into Z2 sub - images with a preset resolution to obtain a validation set. Mark each target pathological image in the pre - test set and divide it into Z3 sub - images with a preset resolution to obtain a test set.

[0042] In this embodiment, Z1 + Z2+Z3 = 199989, but the present invention is not limited thereto.

[0043] Step S4.4: Classify and store the Z1, Z2, and Z3 sub - images.

[0044] Among them, in this embodiment, a human (pathologist) classifies 199,989 sub-images into tumor regions / normal regions; the classification and storage are carried out according to the following rules, that is, the first-level directory is the directory at the pathological image level; the second-level directory is the tumor / normal directory, and the third level is the sub-images corresponding to the classification of the corresponding pathological image.

[0045] Step S4.5: Input the training set into the deep learning framework to establish a tumor purity prediction model.

[0046] In this embodiment, step S4.5 includes: The training set includes tumor region sub-images and normal region sub-images. The tumor region sub-images and the normal region sub-images are respectively input into the deep learning framework, and the deep learning framework is classified and trained to establish the tumor purity prediction model.

[0047] Specifically, use the ResNet18 model in the torchvision library of the deep learning framework, change the output dimension of the last fully connected layer in the ResNet18 model to 2 (the output dimension of 2 means that there are two classification results in this time, namely normal tissue sub-images and tumor tissue sub-images), and classify and train the tumor region sub-images and normal region sub-images of the training set (randomly select 100 tumor region sub-images and 100 normal region sub-images for pathological images in each round).

[0048] It can be understood that the ResNet18 model is used in this embodiment, but other convolutional neural network models such as VGGNet, DenseNet, MobileNet, etc. can also be used.

[0049] The deep learning framework used in this embodiment can be PyTorch, and other deep learning frameworks such as TensorFlow, Keras, Caffe, etc. can also be used. The present invention is not limited thereto.

[0050] Step S4.6: Input the validation set into the tumor purity prediction model to optimize the tumor purity prediction model.

[0051] In this embodiment, step S4.6 includes: Input the validation set into the tumor purity prediction model for optimization training. Repeat this process. When the loss value of the validation set does not decrease for i consecutive rounds and the number of optimization training times is greater than j rounds, stop training. At this time, the loss value of the validation set reaches the minimum, and save the weights of the tumor purity prediction model.

[0052] In this embodiment, i = 5 and j = 10, but the present invention is not limited thereto, as long as their values are all positive integers.

[0053] Step S4.7: Input the test set into the optimized tumor purity prediction model to obtain the pre-trained tumor purity prediction model.

[0054] In this embodiment, as shown in Table 1, Step S4.7 includes: Input the test set into the optimized tumor purity prediction model, repeat this process, and count the sensitivity, specificity, and model evaluation metric (area under the curve, AUC) of the tumor purity prediction model. Finally, stop the test when the average model evaluation metric of the tumor purity prediction model reaches 98.7% to obtain the pre-trained tumor purity prediction model.

[0055] Table 1 shows the ten-fold cross-validation results of the training model.

[0056]

[0057]

[0058] Table 1: The "Normal" column represents the number of small pictures of correctly identified normal regions among all small pictures of normal regions, and the "Specificity" column represents The "Tumor" column represents the number of small pictures of correctly identified tumor regions among all small pictures of tumor regions, and the "Sensitivity" column represents The "accuracy" column represents the accuracy rate, and the "AUC" column represents the area under the ROC curve.

[0059] As Figure 2 shown, it represents the scatter plot of the pathologist's (pathological expert) interpretation and INSIGHT Prediction (that is, Figure 2 It represents the scatter plot of the pathologist's interpretation of tumor purity results and the predicted tumor purity results of this embodiment); among them, tumor purity refers to the proportion of tumor cells in the tumor tissue, which is significantly correlated with the clinical characteristics, genomic expression, and biological characteristics of tumor patients. The pathologist's judgment of the tumor proportion based on H&E-stained pathological sections is a routine part of the molecular detection process. Pathological experts usually extract thin slices of tumor tissue slides, then observe them under a microscope, or perform an electronic scan of the sections and magnify them on a computer for reading.

[0060] Please continue to refer to Figure 2As shown in the figure, the results of pathologists' interpretation of tumor purity for 208 pathological images in the external test set are compared with the results of predicting tumor purity in this embodiment. The Spearman correlation coefficient is shown at the top of the figure. The abscissa represents the results of predicting tumor purity in this embodiment, and the ordinate represents the results of pathologists' interpretation of tumor purity. The solid line represents the diagonal line (x = y). In the case where the calculation error is 0, all data points will align on the diagonal line.

[0061] In this embodiment, all tissue regions are marked on the pathological images, small images are segmented from the tissue regions, and the probability that the small images are located in the tumor region is calculated using a deep learning model. The number of small images in the tumor region is divided by the number of small images in the tissue region as the final calculation result.

[0062] Due to the huge resolution of pathological images, there may be a mixed situation between the normal tissue regions and the tumor tissue regions in each part of the figure. When pathologists interpret pathological images with limited energy, they will not judge every detail, and it is easy to select areas where tumor cells are more concentrated. In addition, normal cells existing in the tumor tissue are easily overlooked. However, there may be a small amount of normal tissue in the real tumor part, which will lead to large differences in the interpretation results of different pathologists, and often the results are higher than the true purity. As shown in the figure above, most of the three points are above the red line, indicating that the pathologists' interpretation is higher than the results of predicting tumor purity in this embodiment. This embodiment uses a size of 512×512 resolution as the unit to distinguish the category (normal / tumor) of each small image, and can achieve more refined purity calculation than manual work while ensuring the accuracy of the classification model.

[0063] Compared with the prior art patents, this embodiment calculates the purity in units of small images. Compared with calculating in a way that is slightly rough, but in large digital images such as digital pathological section images, the calculation method of the present invention and the calculation method of the regional area will not have a large error, and there are the following two advantages:

[0064] The calculation steps of this embodiment are simpler. Using small images as the standard for data input of the deep learning model can reduce the complexity of the model, save the resources required by the model, and reduce the calculation time.

[0065] In subsequent prediction tasks (such as predicting gene mutations in tumors), the small images of the tumor region predicted by this method can be directly used, and there is no need to segment the tumor region again, improving the detection efficiency and accuracy.

[0066] On the other hand, this embodiment also provides an electronic device, including a processor and a memory. A computer program is stored on the memory. When the computer program is executed by the processor, the method described above is implemented.

[0067] In another aspect, the present embodiment further provides a readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the method described above is implemented.

[0068] It should be noted that in this article, the term "comprise", "include" or any other variant thereof is intended to cover a non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without more limitations, an element defined by the statement "comprising a..." does not exclude the presence of additional identical elements in the process, method, article or device including the element.

[0069] It should be noted that the devices and methods disclosed in the embodiments of this article can also be implemented in other ways. The device embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architectures, functions and operations of devices, methods and computer program products according to multiple embodiments of this article. In this regard, each block in the flowchart or block diagram may represent a module, program or part of code, and the module, program segment or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, as well as the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.

[0070] In addition, in each embodiment of this article, the functional modules can be integrated together to form an independent part, or each module can exist separately, or two or more modules can be integrated to form an independent part.

[0071] Although the content of the present invention has been introduced in detail through the above preferred embodiments, it should be recognized that the above description should not be considered as a limitation of the present invention. After those skilled in the art have read the above content, various modifications and substitutions to the present invention will be obvious. Therefore, the protection scope of the present invention should be defined by the appended claims.

Claims

1. A method for calculating tumor purity, characterized in that, Including: Step S1: Obtain the target pathological image to be predicted; Step S2: Mark the target pathological image to obtain a tissue region image; Step S3: Divide the tissue region image into M sub-images with a preset resolution; Step S4: Including: Step S4.1: Obtain Z target pathological images; Step S4.2: Randomly divide the Z target pathological images to obtain a pre-training set, a pre-verification set, and a pre-test set; Step S4.3: Mark each target pathological image in the pre-training set and divide it into Z1 sub-images with a preset resolution to obtain a training set; Mark each target pathological image in the pre-verification set and divide it into Z2 sub-images with a preset resolution to obtain a verification set; Mark each target pathological image in the pre-test set and divide it into Z3 sub-images with a preset resolution to obtain a test set; Step S4.4: Classify and store the Z1, Z2, and Z3 sub-images; Step S4.5: The training set includes tumor region sub-images and normal region sub-images; input the tumor region sub-images and the normal region sub-images into a deep learning framework respectively, and perform classification training on the deep learning framework to establish a tumor purity prediction model; Step S4.6: Input the verification set into the tumor purity prediction model to optimize the tumor purity prediction model; Step S4.7: Input the test set into the optimized tumor purity prediction model to obtain the pre-trained tumor purity prediction model; input the M sub-images into the pre-trained tumor purity prediction model to obtain the probabilities that the M sub-images belong to the tumor region; Step S5: Record the number of the M sub-images with probabilities greater than a preset threshold, denoted as N; Step S6: Calculate the tumor purity according to the N sub-images and the M sub-images; Step S6 includes: The tumor purity f is calculated by the following formula: where N≥0, M>0.

2. The tumor purity calculation method according to claim 1, wherein Step S1 includes: Obtain a pathological sample to be predicted, perform pathological sectioning and HE staining on the pathological sample, and scan it with a scanning microscope with a preset magnification to obtain the target pathological image, and the number of the target pathological images is multiple.

3. The method for calculating tumor purity according to claim 1, wherein Step S4.6 includes: Input the verification set into the tumor purity prediction model for optimization training, and repeat this process. When the loss value of the verification set does not decrease for i consecutive rounds and the number of optimization training times is greater than j rounds, stop training. At this time, the loss value of the verification set reaches the minimum value, and save the weights of the tumor purity prediction model.

4. The method for calculating tumor purity according to claim 3, wherein, Step S4.7 includes: Input the test set into the optimized tumor purity prediction model, and repeat this process. Statistically calculate the sensitivity, specificity, and model evaluation index of the tumor purity prediction model. Finally, stop testing when the average model evaluation index of the tumor purity prediction model is 98.7% to obtain the pre-trained tumor purity prediction model.

5. An electronic device, characterized in that, It includes a processor and a memory, and a computer program is stored on the memory. When the computer program is executed by the processor, the method described in any one of claims 1 to 4 is implemented.

6. A readable storage medium, characterized in that, A computer program is stored in the readable storage medium. When the computer program is executed by a processor, the method described in any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Method and system for detecting fuzzy region of full-slice digital pathological image

    CN111462076A

  • Tumor cell content evaluation method and system, computer equipment and storage medium

    CN111967465A