The present invention relates to a method for predicting which regions of tissue would be stained with one stain by training a model to identify those regions based on tissue stained with another stain.
Identifying tumor regions in digital images of cancer tissue is often a prerequisite to performing diagnostic and treatment measures, such as classifying cancers using standard grading schemes. The digital images of tissue slices used in histopathology are very large. Individual images require gigabytes to store. Manual annotation of the tumor regions in whole slides through the visual assessment of a pathologist is laborious considering the high volume of data. Therefore, “chemical annotation” has been used to substitute the marking of tumor regions by a pathologist with image recognition of regions stained by biomarkers that identify tissue that tends to be cancerous. Annotating tumor regions using specific antibody staining decreases the subjectivity of the pathologist's evaluation and accelerates the otherwise tedious process. Immunohistochemical (IHC) staining can be used to distinguish marker-positive cells that express a particular protein from marker-negative cells that do not express the protein. IHC staining typically involves multiple dyes, which includes one or more dyes connected to protein-specific antibodies and another dye that is a counterstain. A common counterstain is hematoxylin, which labels DNA and thus stains nuclei.
A protein specific stain or biomarker can be used to identify the regions of the tissue that are likely cancerous. For example, a biomarker that stains epithelial cells can identify the suspected tumor regions. Then other protein specific biomarkers are used to characterize the cancerous tissue. However, the biomarker that identifies the tumor regions can be incompatible with other protein specific biomarkers so that the biomarker that identifies the cancerous region of interest cannot be included on all slides of a tissue sample. In some situations, the region-identifying biomarker cannot be stained on top of certain other stains. The incompatible biomarkers must be stained on different tissue from adjacent slices, and then the resulting digital images of the adjacent slices are coregistered.
Thus, obtaining all of the information available from the incompatible biomarkers by using multiple adjacent slices requires different tissue of the multiple slices to be stained. As more slices are used, the differences in the tissue of farther apart slices increases. In addition, in some situations there is insufficient tissue to produce a large number of adjacent slices that would accommodate fewer biomarkers per slice. Thus, a method is sought for determining cancerous regions of interest in an image of a tissue slice that would be marked by a region-identifying biomarker without requiring the tissue slice to be stained by that biomarker.
The disclosed method uses a convolutional neural network model to predict which regions of a tissue slice would have been stained by a first stain by training the model to identify those regions based only on tissue stained by a second stain. The method obviates the need to use the first stain to mark likely cancerous regions on other slices of the tissue that are stained with the second stain. Typically, a training slice of tissue from a cancer patient is stained with both a first immunohistochemical stain and a second counterstain. A first digital image of the training slice is then acquired. A target region of a first digital image is identified using image analysis based on the first stain. Then a set of parameters for associated mathematical operations of the model are optimized to train the model to classify individual pixels of the first digital image as belonging to the target region based on the second stain but not on the first stain. One of the mathematical operations is convolution filtering that applies a kernel to neighboring pixels. The optimized parameters and associated mathematical operations of the trained model are then stored in a database. A second digital image is acquired from cancerous tissue that is stained with the second stain but not with the first stain. The parameters of the trained model are then applied to the second digital image to indicate the probability that each pixel of the second digital image falls within a likely cancerous region that would have been stained with the first stain. A prediction image is generated in which particular pixel locations of the second digital image have an intensity associated with belonging to the target region.
Another embodiment of the method includes a training mode and a prediction mode. In the training mode, a first slice of tissue from a cancer patient is stained with a first stain that has a first color. For example, the first stain is pan cytokeratin (panCK), and the first color is yellowish brown. PanCK stains epithelial cells and tends to mark regions of the tissue that are likely cancerous. The first slice of tissue is also stained with a second stain that has a second color. For example, the second stain is hematoxylin, and the second color is blue. A first digital image is acquired of the first slice of tissue. Image analysis is used to determine whether each pixel of the first digital image falls within a region of interest based on the first color. A set of parameters of a model are generated that indicate the probability that each pixel of the first digital image falls within the region of interest using the second color but not the first color. The model is a convolutional neural network model, and the set of parameters is generated by training the convolutional neural network model on the first digital image in which the region of interest has been identified.
A second digital image is analyzed in the prediction mode. The second digital image is acquired from a second slice of tissue that is stained with the second stain but not with the first stain. For example, the second slice of tissue can be a slice of the tissue sample taken from the cancer patient that is adjacent to the first slice of tissue. The second slice might not be stained with the first stain because the second slice is stained with a different immunohistochemical stain that is incompatible with the first stain. The optimized set of parameters of the trained model is used to indicate the probability that each pixel of a second digital image falls within the region of interest using only the second color. Thus, the method can be used to determine the regions of the second slice that are likely cancerous without staining the second slice with the first stain. A prediction image is generated in which each pixel location of the second digital image has an intensity indicative of the probability that the associated pixel of the second digital image falls within the region of interest.
The method can be used to predict the regions that would be stained by biomarkers other than panCK by using fluorescent 4, 6-diamidino-2-phenylindole (DAPI) instead of hematoxylin. The other biomarkers whose staining regions can be predicted using counterstains such as DAPI or hematoxylin include cytokeratin 18, α-methylacyl coenzyme A racemase (AMACR), cluster of differentiation 3 (CD3) antibody stain, cluster of differentiation 4 (CD4) antibody stain and cluster of differentiation 68 (CD68) antibody stain.
Other embodiments and advantages are described in the detailed description below. This summary does not purport to define the invention. The invention is defined by the claims.
The accompanying drawings, where like numerals indicate like components, illustrate embodiments of the invention.
Reference will now be made in detail to some embodiments of the invention, examples of which are illustrated in the accompanying drawings.
Thus, in one example of the first embodiment, system 10 is trained to predict which regions of tissue of a cancer patient would be stained by pan cytokeratin (panCK) by training a convolutional neural network model to identify those regions based solely on tissue stained with the counterstain hematoxylin. PanCK is a group of protein-specific monoclonal antibodies (a biomarker) that in humans are encoded by a family of genes including about twenty epithelial genes. PanCK is used together with an attached dye to form a stain.
System 10 operates in a training mode and in a prediction mode. In the training mode, the convolutional neural network model is optimized by determining the sets of parameters 11 for associated mathematical operations 12 that best predict based only on the staining of nuclei by hematoxylin those regions on training slices that are actually stained with panCK. The training calculations are performed by data processor 13. In one embodiment, data processor 13 is a specialized processor that can simultaneously perform multiple convolution operations between a plurality of pixel matrices and corresponding kernels. The logical operations of the model are implemented on data processor 13 as hardware, firmware, software, and/or a combination thereof to provide a means for characterizing regions of tissue in the digital images. Each trained model comprising the optimized sets of parameters 11 and associated mathematical operations 12 is then stored in the database 14.
Once trained, system 10 obviates the need in the prediction mode to use panCK to stain epithelial cells to determine a likely cancerous region of tissue samples of the cancer patient. The likely cancerous epithelial regions can be predicted on slices that are not stained with panCK by applying a trained model to analyze how the counterstain hematoxylin has stained the nuclei of the tissue. For example, the likely cancerous regions that would be stained by panCK can be identified in a non-training image of a tissue slice that has been stained with only the counterstain hematoxylin and a biomarker that is incompatible with panCK. In the prediction mode, data processor 13 executes software to analyze digital images of stained tissue by applying the trained parameters 11 and associated mathematical operations 12 to predict whether pixels in the images that were not stained by an antibody stain would have been stained by that antibody stain based only on the staining of DNA in nuclei. In one embodiment, a prediction image is generated in which particular pixel locations of the non-training image have an intensity associated with belonging to the likely cancerous region that would have been stained by panCK. The prediction image is displayed on the graphical user interface 15 of a user work station 16.
In step 21, thresholding is used to distinguish the tissue from the background of the first digital image 35. The intensity of each pixel of image 35 is analyzed, a histogram is generated to determine a dividing intensity threshold, and the pixels are divided into tissue pixels and background pixels using the intensity threshold. Each pixel location is classified as belonging either to the class “tissue” or to the class “background” based on the intensity value of the pixel. In step 22, image analysis and a closing operation are used to define contiguous tissue regions on image 35. In an optional step 23, an expert human pathologist marks larger regions of interest within the tissue regions. This manual annotation is optional and used to mark a limited number, for example no more than a dozen, of regions of interest that likely contain cancerous tissue.
In step 24, image analysis is used to identify the region 38 stained by the first stain. System 10 recognizes the regions stained yellowish brown by panCK within the tissue regions. Where the optional step 23 is performed, the regions stained by panCK are detected in step 24 only within the regions of interest manually annotated in step 23. The regions stained by panCK are determined by identifying whether each pixel of the tissue region has a color that falls within the ranges of the red, green and blue color components that make up the yellowish brown imparted by panCK. In step 24, the detected region 38 comprises the regions of epithelial cells. Within a sample of glandular tissue 31 from cancer patient 32, the regions of epithelial cells stained by panCK identify likely cancerous regions within the digital image 35. In step 25, system 10 uses image analysis to identify the tissue region 39 that has not been stained by panCK. The non-panCK region contains nuclei stained blue by hematoxylin but does not contain any tissue stained yellowish brown by panCK.
In step 26, system 10 optimizes a plurality of parameters applied to associated mathematical operations to train a model based on the second stain hematoxylin but not on the first stain panCK to classify individual pixels of the digital image 35 as belonging to a likely cancerous region that is stained by the second stain.
System 10 distinguishes the nuclei within region 38 from the nuclei outside region 38 by optimizing a plurality of parameters applied to associated mathematical operations that comprise the convolutional neural network model. The model is trained to optimize the parameters and operations based on the second stain hematoxylin but not on the first stain panCK so as to classify individual pixels of the digital image 35 as belonging to the likely cancerous region.
In step 27, the optimized plurality of parameters and associated mathematical operations of the trained model are stored in the database 14. The stored parameters and operations of the trained model are then applied to other digital images of tissue samples in step 28. For example, the trained model is run on a second digital image 40 of a tissue slice adjacent to tissue slice 33 that is stained with the second stain hematoxylin but not with the first stain panCK. For example, the adjacent tissue slice could be stained by a biomarker other than panCK because it might be undesirable to stain the adjacent slice with both panCK and the other biomarker. Applying the trained module to the second digital image 40 indicates the probability that each pixel of the second digital image 40 falls within the likely cancerous region that would have been stained by the first stain panCK.
The trained module is software that executes on the data processor 13 and performs intelligent image processing. Thus, data processor 13 includes a computer-readable storage medium having program instructions thereon for performing a method of using a second stain to predict the region that would be stained by a first stain. Such a computer-readable storage medium can include instructions for characterizing pixels in digital images based on the surrounding pixels. The model is a computer program product tangibly embodied on the computer-readable storage medium in data processor 13 and comprises computer readable and executable program instructions that when executed by the processor provide a visual display on the graphical user interface 15 of the interconnected display device 16, such as a personal computer.
In step 29, system 10 generates a prediction image 42 in which each pixel location of the second digital image 40 has an intensity, color or marking indicative of the probability that the associated pixel of the second digital image 40 would fall within the likely cancerous region that would have been stained by the first stain panCK.
In substep 43, a predetermined number of sample pixels are selected from the detected region 38 that was stained by the first stain, as shown in
In substep 44, a patch is defined around each of the sample pixels in the stained region 38 and in the unstained region 39. Thus, each patch is classified as belonging to the stained region or to the unstained region. In one embodiment, each patch is a square of 142×142 pixels that is approximately centered (off center by ½ pixel) at the position of each sample pixel.
In substep 45, each patch is filtered by applying a mathematical operation to each pixel of each patch. The mathematical operation is applied by multiplying the convolution factors of a kernel with the pixel values of the pixels surrounding the pixel of the patch that is being operated upon. The result of the mathematical operation for each pixel is the sum of the products obtained by multiplying by the convolution factors of the kernel. In one embodiment, the kernel is a 3×3 matrix of convolution factors that is multiplied by the pixel values of a 3×3 matrix of pixels centered on the pixel being operated upon.
The result of the filtering is a filtered patch for each mathematical operation or filter applied to the patch. Multiple filters are applied to each patch resulting in multiple filtered images. Each mathematical operation or filter has an associated kernel with convolution factors. Each filter is used to recognize a basic geometric feature, such as a vertical line, a horizontal line or a curve. In one embodiment, sixteen filters are applied to each patch, which results in a 142×142-pixel patch with sixteen filtered layers.
In substep 46, the resolution of the filtered patches with multiple filtered layers is reduced to generate maximum pooled images. The filtered 142×142-pixel patches are downsampled by selecting the maximum intensity pixel from each 2×2 box of the filtered patch, which generates a lower resolution patch of 71×71 pixels, called a “max pooled image.” The lower resolution patch still has sixteen filtered layers.
In substep 47, each of the lower resolution patches is filtered by applying more mathematical operations to each pixel of the lower resolution patches. In one embodiment, sixteen additional filters are applied to each of the lower resolution patches, which results in 71×71-pixel patches each with sixteen times sixteen filtered layers. The filtering and downsampling steps are repeated until 7×7-pixel “max pooled images” with 256 filtered layers are obtained.
In substep 48, the predicted probability of a center patch pixel belonging to the stained region is determined based on the lowest resolution patch with many filtered layers. A weighted sum of each 7×7-pixel patch is calculated, which results in a probability that classifies the central pixel of the patch as belonging either to the stained region 38 or to the unstained region 39. The predicted classification of the central pixel is then compared to the actual class of the patch as illustrated in
In substep 49, the mathematical operations of the filters as well as the parameters of those filters are optimized to more accurately predict the class of the central pixel of each patch. Substeps 45-48 are repeated using slightly varied mathematical operations of the filters and parameters of those filters. The filters and filter parameters are changed so as to minimize the difference between the predicted probability that a center pixel belongs to the stained class or the unstained class and the actual class of the center pixel of each patch. The optimized filters and filter parameters that most accurately classify the center pixels of all of the patches comprise the trained convolutional neural network model that predicts which regions of a tissue slice would have been stained by the first stain based only on how the tissue was stained by the second stain. The optimized mathematical operations (filters) and filter parameters are then stored in database 14 in step 27. Then the optimized filters and filter parameters that were trained on the sample pixels of the first digital image 35 are applied to all of the pixels of the second digital image 40 to determine the predicted region 41 of staining by the first stain.
Example of Optimizing Filter Operations and Parameters.
An example is now provided of how substeps 43-49 of step 26 in the flowchart of
In substep 43, a predetermined number of sample pixels are selected from the detected region 38 that was stained by the first stain, as shown in
In substep 44, a patch is defined around each of the sample pixels in the stained region 38 and in the unstained region 39. In this example, each patch is a square of 142×142 pixels that is approximately centered (off center by ½ pixel) at the position of each sample pixel of the 83,268 sample pixels.
In substep 45, each patch is filtered by applying a mathematical operation to each pixel of each patch. The mathematical operation is applied by multiplying the convolution factors of a convolution kernel with the pixel values of the pixels surrounding the pixel 52 of the patch that is being operated upon. For example, the filter can be a Laplacian operator, a Gaussian operator or a Sobel operator. In this example, the convolution kernel is a 3×3 matrix containing the nine convolution factors denoted as x11, x12, x13; x21, x22, x23; x31, x32, x33.
The convolution operation shown in
In substep 46, the resolution of the filtered patches with multiple filtered layers (such as sixteen) is reduced by generating maximum pooled images. The filtered 142×142-pixel patches are downsampled by selecting the maximum intensity pixel from each 2×2 square of pixels of the filtered patch of 142×142 pixels, which generates a lower resolution patch called a “max pooled image.” The lower resolution patch still has sixteen filtered layers. In this example, because the convolution is carried out without a padding step, two pixels are lost in the convolution, so the convolution of the patch of 142×142 pixels results in a patch 140×140 pixels. After downsampling, each patch of 142×142 pixels is downsampled to a patch of 70×70 pixels ((142−2)/2 pixels).
In substep 47, each of the lower resolution patches is filtered by applying more mathematical operations to each pixel of the lower resolution patches. In this example, sixteen additional filters are applied to each of the lower resolution patches, which results in 70×70-pixel patches each with thirty-two (16*2) filtered layers. In the next step, filtering and downsampling results in 34×34-pixel patches ((70−2)/2), each containing sixty-four (16*2*2) layers. In the next step, filtering and downsampling results in 16×16-pixel patches ((34−2)/2), each containing one hundred twenty-eight layers (16*2*2*2). In the next step, filtering and downsampling results in 7×7-pixel patches ((16−2)/2), each containing two hundred fifty-six layers (16*2*2*2*2). Thus, the filtering and downsampling steps are repeated until 7×7-pixel “max pooled images”, each with 256 filtered layers, are obtained.
In substep 48, the predicted probability of a center patch pixel belonging to the stained region is determined based on the lowest resolution patch with many filtered layers. In this substep, filtering with a 7×7 convolution kernel results in 1×1 pixel patches each containing 512 layers (16*2*2*2*2*2). Each 7×7 pixel patch containing 256 layers results in single pixel values after convolution with the 7×7 convolution kernel. After downsampling the 512 single pixel values, 256 1×1-pixel patches are obtained that are reduced to two 1×1 pixel patches in an additional convolution step. Thus, two pixel values are obtained.
Finally, a SoftMax function is applied to the two pixel values to perform a prediction and classification operation that indicates the specific category to which these two pixel values belong. For example, a multinomial logistic loss function can be applied. A weighted sum of each 7×7-pixel patch is calculated, which results in a probability that classifies the central pixel of the patch as belonging either to the stained region 38 or to the unstained region 39. In this example, the pixel values are 5 and 15, and the predicted probability scores of the two pixels belonging to the stained region are 0.3 and 0.7. This is a weighted sum because 0.3+0.7=1. The predicted classification of the central pixel 51 of the patch 50 is transformed into a vector. In this example, the values 0.3 and 0.7 result in the vector (0,1). Then the vector is compared to the actual classification of the patch that has been determined by a human pathologist. In this example, the classification corresponding to the vector (0,1) and is PanCK-positive. The values determined by the pathologist are 1 and 0, which can be expressed as the vector (1,0) corresponding to a classification as PanCK-negative. In this example, the comparison between the predicted scores and the actual scores is carried out by calculating the square error. The error for each value is 0.7 (1−0.3=0.7 and 0−0.7=−0.7), which leads to square errors of (0.72 and 0.72)=½√(0.49+0.49).
In substep 49, the mathematical operations of the filters as well as the parameters (convolution factors) of those filters are optimized to more accurately predict the class of the central pixel of each patch. Substeps 45-48 are repeated using slightly varied mathematical operations of the filters and parameters of those filters. Back propagation or another method of supervised learning is used to vary and improve the mathematical operations of the filters and parameters of those filters. The optimized filters and filter parameters that most accurately classify the center pixels of all of the patches comprise the trained convolutional neural network model that predicts which regions of a tissue slice would have been stained by the first stain based only on how the tissue was stained by the second stain.
Although the present invention has been described in connection with certain specific embodiments for instructional purposes, the present invention is not limited thereto. Accordingly, various modifications, adaptations, and combinations of various features of the described embodiments can be practiced without departing from the scope of the invention as set forth in the claims.
This application claims the benefit under 35 U.S.C. § 119 of provisional application Ser. No. 62/612,590, entitled “Using a First Stain to Train a Model to Predict the Region Stained by a Second Stain”, filed on Dec. 31, 2017. The subject matter of provisional application Ser. No. 62/612,590 is incorporated herein by reference.
Number | Name | Date | Kind |
---|---|---|---|
20130080134 | Donovan | Mar 2013 | A1 |
20140169654 | Athelogou et al. | Jun 2014 | A1 |
20170169567 | Chefd'hotel et al. | Jun 2017 | A1 |
20170270666 | Barnes | Sep 2017 | A1 |
20180232883 | Sethi | Aug 2018 | A1 |
Entry |
---|
Riku Turkki et al., “Antibody-supervised deep learning for quantification of tumor-infiltrating immune cells in hematoxylin and eosin stained breast cancer samples,” Journal of Pathology Informatics, Sep. 1, 2016 XP055587403 (14 pages). |
Extended European Search Report dated May 17, 2019 in the counterpart foreign application EP18248217.4 issued by the European Patent Office (11 pages). |
Number | Date | Country | |
---|---|---|---|
20190205760 A1 | Jul 2019 | US |
Number | Date | Country | |
---|---|---|---|
62612590 | Dec 2017 | US |