Tissue Staining Pattern and Artifact Classification Using Few-Shot Learning

Few-shot learning techniques for training convolutional neural networks improve the accuracy of histological image classification and artifact detection, addressing the challenges of subjective and time-consuming analysis in histological staining processes.

JP7580000B2Active Publication Date: 2024-11-08VENTANA MEDICAL SYSTEMS INC
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2024043277
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2020-08-24
Filing Date
2024-03-19
Publication Date
2024-11-08
Estimated Expiration
2041-08-17

AI Technical Summary

Technical Problem

Existing histological staining processes introduce artifacts that can impair the accuracy of pathological diagnosis, prognosis, and treatment selection, and current image analysis methods are subjective, time-consuming, and require extensive labeled datasets.

Method used

Employing few-shot learning techniques to train convolutional neural networks using a small number of training samples to classify histological slide images into various categories, including staining patterns and artifacts, improving the accuracy of image classification and artifact detection.

Benefits of technology

Enhances the accuracy of image classification and artifact detection in histological slides, reducing the need for extensive labeled datasets and improving the reliability of pathological analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007580000000004
    Figure 0007580000000004
  • Figure 0007580000000005
    Figure 0007580000000005
  • Figure 0007580000000006
    Figure 0007580000000006
Patent Text Reader

Abstract

To provide a method and system for classifying field-of-view (FOV) images of histological slides into various categories that include certain stain patterns, artifacts, and / or other features of interest.SOLUTION: Few-shot learning (e.g., a prototypical network) techniques are used to train a deep convolutional neural network using a small number of training samples for a small number of image classes for classifying stain images belonging to a larger number of image classes.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

CROSS-REFERENCE TO RELATED APPLICATIONS

[0001] This application claims the benefit of and priority to U.S. Provisional Patent Application No. 63 / 069,421, filed August 24, 2020, which is incorporated by reference herein in its entirety for all purposes. [Background technology]

[0002] background Histology is the microscopic study of animal and plant cells, tissues, or other biological samples by sectioning, staining, and examination under an electron or light microscope. Histological studies can be used in forensic investigations, autopsies, diagnosis, and teaching. Histology is also widely used in the medical field to facilitate diagnosis, prognosis, and treatment selection.

[0003] Staining techniques are widely used in the fields of histology as well as histopathology, hematology and cytopathology to enhance the contrast of certain types of biological objects in biological samples at the microscopic level. For example, hematoxylin and eosin (H&E) staining is used as a diagnostic stain to evaluate tissue morphology, nuclear and cytoplasmic features in tissue sections. The staining process generally involves adding class-specific dyes (e.g., for DNA, proteins, lipids, carbohydrates, etc.) to a portion of the sample to confirm or quantify the presence of a particular compound, structure or feature. For example, staining can serve to identify or highlight biological tissues (e.g., muscle fibers or connective tissue), cell populations (e.g., different blood cells), or organelles within individual cells. Biological stains can also be used to mark cells in flow cytometry, flag proteins or nucleic acids in gel electrophoresis, etc.

[0004] Furthermore, immunohistochemistry (IHC) slide staining is a staining technique utilized to identify proteins in cells of tissue sections and is therefore widely used in the study of different types of cells, such as cancerous and immune cells, in biological tissues. Thus, IHC staining can be used in studies to understand the distribution and localization of differentially expressed biomarkers of immune cells (such as T cells and B cells) in cancerous tissues for immune response studies. For example, tumors may contain infiltrates of immune cells, which may hinder tumor development or promote tumor growth.

[0005] Histological staining involves a series of processes for preparing a sample (e.g., tissue) for microscopic examination by staining each of one or more sections of the sample using one or more histological stains. The histological staining process generally involves fixing, processing, embedding, sectioning and staining. During each stage of the histological staining process, various types of artifacts or other artificial effects can be introduced into the sample. Artifacts and other artificial effects can affect the extent to which various biological objects can be detected and / or characterized (e.g., to identify the number of objects, the size of one or more objects, and / or the shape of one or more objects). Thus, artifacts can affect the extent to which a pathology image can inform a diagnosis, prognosis and / or treatment selection. Summary of the Invention

[0006] overview

[0001] Some embodiments of the present disclosure relate, inter alia, to the preparation and analysis of biological samples, such as digital pathology. More specifically, techniques are disclosed herein for classifying field of view (FOV) images of histological slides into various categories, including specific staining patterns, artifacts, and / or other features of interest. According to certain embodiments, few-shot learning and transfer learning techniques are used to train a deep convolutional neural network (e.g., a prototype network) using a small number of training samples displaying a small number of feature classes (e.g., different types of artifacts). The trained deep convolutional neural network can then be used to classify stained images belonging to a larger number of feature classes. The techniques disclosed herein are superior to existing methods that are simply based on transfer learning techniques. The techniques disclosed herein can be used to classify cell types or other target biological objects (e.g., mitosis, debris, blood vessels, etc.) in FOV images. Various embodiments are described herein, including devices, systems, modules, materials, methods, non-transitory computer-readable storage media storing programs, codes, or instructions executable by one or more processors, and the like.

[0007]

[0002] According to certain embodiments, a computer-implemented method for training a machine learning model for classifying stained or other images is provided. The computer-implemented method can include accessing a pre-trained machine learning model. The pre-trained machine learning model can include a set of parameter values ​​corresponding to a set of parameters, the set of parameter values ​​being learned using a first training data set. The first training data set can include a plurality of images and a corresponding set of classifications, each classification of the set of classifications can characterize a representation in a corresponding image of the plurality of images. In some cases, for each image of at least 50% of the plurality of images, the image represents a macroscopic object.

[0008]

[0003] The computer-implemented method may also include accessing a set of digital pathology images and a corresponding set of artifact classifications. Each digital pathology image of the set of digital pathology images may display a stained portion of a sample and may also include artifacts. In some cases, a digital pathology image of the set of digital pathology images displays a tissue section stained using an IHC staining protocol or an H&E staining protocol. For each digital pathology image of the set of digital pathology images, the digital pathology image may display a microscopic object.

[0009]

[0004] Each artifact classification in the set of artifact classifications can indicate a type of artifact corresponding to the artifact, and the set of classifications in the first training data set can be different from the set of artifact classifications. In some cases, the number of artifact classifications in the set of artifact classifications is less than the number of classifications in the first training data set. In some cases, a particular artifact classification in the set of artifact classifications indicates that the corresponding digital pathology image does not contain an artifact.

[0010]

[0005] The computer-implemented method may also include using few-shot learning to further train the pre-trained machine learning model using the set of digital pathology images and the corresponding set of artifact classifications. The further training of the pre-trained machine learning model may generate a new set of parameter values ​​for the set of parameters. In some cases, the further training of the pre-trained machine learning model includes generating a similarity metric for each artifact classification of the set of artifact classifications using the new digital pathology images and the representation of the artifact classification. The representation of the artifact classification may be generated based on a subset of the set of digital pathology images associated with the artifact classification.

[0011]

[0006] The computer-implemented method may also include receiving a new digital pathology image and processing the new digital pathology image using the further trained machine learning model to generate an output predicting that the new digital pathology image contains a particular type of artifact. In some cases, the set of artifact classifications corresponding to the set of digital pathology images used to further train the pre-trained machine learning model does not contain the particular type of artifact.

[0012]

[0007] According to certain embodiments, a computer-implemented method for classifying a query image using a machine learning model and a set of supporting images is provided. The computer-implemented method can include obtaining a machine learning model, a set of supporting images for a first stained image class of a first set of stained image classes, and an unclassified query image. The set of supporting images for the first stained image class can include a common type of staining artifact. The machine learning model can include a VGG network, an Inception network, a residual neural network (ResNet), a dense convolutional network (DenseNet), or a DenseNet-121 network.

[0013]

[0008] The computer-implemented method may also include generating an embedding for each supporting image in the set of supporting images based on the machine learning model.

[0014]

[0009] The computer-implemented method can also include computing a prototype of the first stain image class based on an embedding of the set of supporting images. The prototype of the first stain image class can include an embedding representing the first stain image class. The computer-implemented method can also include generating an embedding of the unclassified query image based on the machine learning model.

[0015] The computer-implemented method may also include determining a similarity metric between an embedding of the unclassified query image and a prototype of the first stain image class. The similarity metric may include Manhattan distance, Euclidean distance, Chebyshev distance, Hamming distance, or cosine similarity. In some cases, the embedding and the prototype are encoded in a multidimensional embedding space, and a distance between the embedding and the prototype encoded in the multidimensional embedding space is identified.

[0016] The computer-implemented method may also include classifying the unclassified query image based on the similarity metric. Classifying the unclassified query image may include determining that the similarity metric is greater than a predetermined threshold. In response to determining that the similarity metric is greater than a predetermined threshold, the unclassified query image may be classified as being associated with an image class different from the first image class. The unclassified query image may also be classified based on a set of similarity metrics. A respective similarity metric of the set of similarity metrics may be determined between an embedding of the unclassified query image and a prototype of each remaining stain image class of the first set of stain image classes.

[0017] The computer-implemented method can also include tuning parameters of the machine learning model, which includes accessing training images belonging to a second set of stain image classes, selecting a subset of stain image classes from the second set of stain image classes, and tuning the parameters based on a result of classifying the set of query images in each stain image class of the subset of stain image classes. In some cases, the first stain image class is not included in the second set of stain image classes. The number of stain image classes may be less than the number of stain image classes in the first set of stain image classes.

[0018] To classify the set of query images to adjust the parameters of the machine learning model, a similarity metric can be calculated between the embeddings of the set of query images and the prototypes of the subset of stain image classes. In some cases, the prototypes of each stain image class of the subset of image classes are calculated based on embeddings generated from a set of support images selected from the stain image classes. The prototype of the first stain image class can be the mean, median, or center of the embeddings of the set of support images.

[0019] Adjusting the parameters of the machine learning model can include adjusting parameters of a fully connected layer of a pre-trained deep neural network, and the pre-trained deep neural network can be trained using images that do not include stained images.

[0020] Some embodiments of the present disclosure include a system including one or more data processors. In some embodiments, the system includes a non-transitory computer-readable storage medium including instructions that, when executed on the one or more data processors, cause the one or more data processors to perform some or all of one or more methods and / or some or all of one or more processes disclosed herein. Some embodiments of the present disclosure include a computer program product tangibly embodied in a non-transitory machine-readable storage medium including instructions configured to cause the one or more data processors to perform some or all of one or more methods and / or some or all of one or more processes disclosed herein.

[0021] The terms and expressions used are used as terms of description and not of limitation, and there is no intention in the use of such terms and expressions to exclude the features shown and described or equivalents of any portion thereof. However, it is recognized that various modifications are possible within the scope of the claimed system and method. Thus, although the present system and method have been specifically disclosed by examples and optional features, it should be understood that modifications and variations of the concepts disclosed herein should be recognized by those skilled in the art, and such modifications and variations are considered to be within the scope of the system and method as defined by the appended claims.

[0022] This summary is not intended to identify key or essential features of the claimed subject matter, nor is it intended to be used alone to determine the scope of the claimed subject matter. These illustrative examples are mentioned not to limit or define the disclosure, but to provide examples to aid in its understanding. Further embodiments and examples are discussed in the detailed description, and further description is provided therein. The subject matter should be understood by reference to appropriate portions of the entire specification of this disclosure, any or all drawings, and each claim.

[0023] The above, together with other features and embodiments, will become more apparent with reference to the following specification, claims, and accompanying drawings. [Brief description of the drawings]

[0024] The features, embodiments, and advantages of the present disclosure will be better understood from the following detailed description when taken in conjunction with the following drawings, in which:

[0025] [Figure 1] 1 shows an example of a tissue staining process. [Figure 2A] 1 shows examples of histopathological images. [Figure 2B] 1 shows examples of histopathological images. [Figure 2C] 1 shows examples of histopathological images. [Figure 2D] 1 shows examples of histopathological images. [Figure 2E] 1 shows examples of histopathological images. [Figure 2F] 1 shows examples of histopathological images. [Diagram 3] Shows an example of a convolutional neural network (CNN) for image or other object classification. [Figure 4] 1 illustrates an example of a machine learning model for classifying stained images, according to certain embodiments. [Diagram 5] 1 includes a flowchart illustrating an example method for classifying a query image using a machine learning model and a set of supporting images according to certain embodiments. [Figure 6] 1 includes a flowchart illustrating an example of a method for training a machine learning model for classifying stained or other images, according to certain embodiments. [Figure 7] 1 illustrates an example of a t-sne visualization of the output of a machine learning model in accordance with certain embodiments. [Figure 8] 1 illustrates an example of a t-sne visualization of the output of a machine learning model in accordance with certain embodiments. [Figure 9] 1 includes a graph showing the accuracy of a machine learning model trained using few-shot learning and different numbers of support images according to certain embodiments. [Figure 10] FIG. 1 shows an example of a schematic diagram for classifying images displaying H&E stained tissue sections according to certain embodiments. [Figure 11] 1 illustrates an example of a region of interest generated by processing an H&E stained image, according to certain embodiments. [Figure 12A] 1 illustrates an example of a confusion matrix identifying performance results of trained machine learning models for classifying stained images, according to certain embodiments. [Figure 12B] 1 illustrates an example of a confusion matrix identifying performance results of trained machine learning models for classifying stained images, according to certain embodiments. [Figure 13] 1 illustrates an example set of image results classified using a trained machine learning model, according to some embodiments. [Figure 14] 1 illustrates an example of a computer system for implementing some of the embodiments disclosed herein. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0026] Detailed Description The techniques disclosed herein generally relate to the preparation and analysis of biological samples. More specifically, techniques are disclosed herein for classifying field of view (FOV) images of histological slides into various categories, including specific staining patterns, artifacts, and other features of interest. According to certain embodiments, few-shot learning and transfer learning techniques are used to train a machine learning model (e.g., a prototype network) using a small number (e.g., less than 100, less than 50, less than 25, or less than 15, e.g., about 5 to 10) of training samples belonging to each of a small number of feature classes (e.g., specific proteins, different staining patterns, artifacts, and other features of interest). The trained machine learning model can then be used to classify stained images belonging to a larger number of feature classes. Various embodiments of the present invention are described herein, including devices, systems, materials, methods, non-transitory computer-readable storage media storing programs, codes, or instructions executable by one or more processors, and the like.

[0027] Histological staining is used in digital pathology workflows to highlight features of interest (e.g., tumor nuclei for H&E staining, target proteins for IHC staining) in sectioned tissues or cells on histological slides and to enhance the contrast of features of interest. IHC has been widely used in histological imaging and clinical studies. For example, in tumor-containing samples, staining can help efficiently localize pathological cells and their microenvironment, thereby facilitating more accurate medical diagnosis. In another example, IHC staining, such as 3,3'-diaminobenzidine (DAB) staining, can be used to identify the presence or distribution of biomarkers within tissue sections presented on a specimen slide. The identified biomarkers can then be analyzed to facilitate the diagnosis of tumor tissue (for example). In some cases, IHC is used to identify different specific proteins that are considered antigens (e.g., programmed death-ligand 1 (PD-L1)), primary antibodies (e.g., anti-PD-L1 antibodies), and secondary antibodies. However, stained sample sections on histological slides can have various types of problems that prevent the information that can be conveyed. For example, the stained sections can be torn or folded, and / or the slides can contain one or more watermarks. Additionally, some of the images of the stained sections can be suboptimal (e.g., blurry). Such problems are examples of "artifacts", in that parts of the image display things that do not represent the sample. In order to accurately analyze slide images, it may be desirable to perform image processing to detect such artifacts or other artificial effects and, if possible, improve the degree to which the image conveys accurate information about the subject for interpretation (e.g., pathology diagnosis, prognosis and / or treatment selection can be improved). To this end, currently, digital pathology images are frequently evaluated by human pathologists to assess quality (e.g., of the image, of the section, and / or in general) before images of stained sample sections are analyzed (e.g., to detect and / or characterize specific biological objects or specific biomarkers in the stained sample sections). If the quality of the stained sample sections is poor, the corresponding digital pathology images can be discarded from the digital pathology analysis performed on a given subject. However, assessing staining quality and detecting artifacts in stained images can be subjective and time-consuming.

[0028] Machine learning techniques such as convolutional neural network (CNN) models have been successfully applied to image classification, object detection and recognition, video action recognition, etc. CNN models efficiently implement spatial locality and weight sharing by reusing local filters to extract features from local regions (also called receptive fields). To achieve accurate CNN models, a large number of samples are often used to train the neural network. However, for digital pathology, extensively labeled datasets may not be available, or building such datasets may be expensive and time-consuming given the expertise required to manually analyze and annotate (e.g., classify and label) images.

[0029] According to certain embodiments, the few-shot learning technique is used to train a machine learning model (e.g., a neural network) to classify FOV images of histological slides into various image classes that contain specific staining patterns, artifacts, and other features of interest. The machine learning model can include a convolutional neural network (e.g., a deep neural network such as a dense convolutional network) that includes one or more fully connected layers. The one or more fully connected layers of the machine learning model can be trained in multiple iterations (called episodes) using the few-shot learning technique and a small number of training samples (e.g., stained images) for each image class of multiple (e.g., M) image classes that correspond to different types of features (e.g., artifacts).

[0030] In one example, in each training iteration, K (K<=M) image classes may be selected (e.g., randomly or pseudo-randomly) from the M image classes. The training images may be divided (e.g., using random or pseudo-random techniques) into N “support” images and Q “query” images from the training images belonging to each of the K image classes. The number of support images (N) may be equal to the number of shots in the few-shot learning technique being implemented, and may be (for example) less than 200, less than 100, less than 50, less than 25, less than 20, or less than 15 (e.g., about 5-10). Each support image of the N support images for each image class of the K image classes may be passed to a machine learning model, which may encode the support image into a corresponding embedding (e.g., a multidimensional vector) in a multidimensional embedding space (alternatively referred to herein as a "multidimensional space"). The average (or median) of the N embeddings of the N support images for each image class may be calculated to determine a prototype representing the image class. Each query image of the Q query images may also be encoded into a corresponding embedding by the same machine learning model. A similarity metric (e.g., distance or similarity) between the embedding of the query image and the prototype of each image class in the multidimensional space may be determined. The query image may then be classified as belonging to the image class whose prototype is closest to the embedding of the query image. A loss (e.g., classification error) can be calculated based on the result of the classification of the query image. The loss can then be back-propagated to the preceding layers of the machine learning model to adjust the parameters of the machine learning model, such as the parameters (e.g., weights) of the fully connected layer. The above training process (episode) may be performed for multiple iterations, for example, using an Adam optimizer with a particular learning rate.

[0031] The techniques disclosed herein can train machine learning models (e.g., deep convolutional neural networks such as prototypical neural networks) for image classification using a small number of training samples from a small number of known image classes. Thus, the techniques disclosed herein can be suitable for use when only a limited number of annotated samples are available.

[0032] The knowledge learned from a limited number of training samples of a small number of image classes can be transferred to classify query samples of other image classes, such as digital pathology images having artifacts that are not in the small number of image classes used in the training phase to train the machine learning model. For example, the trained machine learning model can be used to identify the presence of new classes (e.g., new biomarkers, new biological objects, other types of artifacts) in the query image by calculating a relationship score (e.g., distance or similarity) between the query image and the small number of samples of each new image class, without retraining the machine learning model.

[0033] Furthermore, the techniques disclosed herein may outperform existing methods based solely on transfer learning in classification accuracy and therefore may be used to more accurately identify stained images with artifacts or other defects, thereby improving the accuracy of sample analysis and diagnosis. The techniques disclosed herein may further be used to qualitatively or quantitatively determine the quality of stained images. The techniques disclosed herein may also be used to classify cell types (e.g., tumor cells, fetal cells in maternal plasma) or other target biomarkers (e.g., PD-L1, alpha-fetoprotein, cytokeratin) within FOV images.

[0034] As used herein, the term "neural network" refers to one or more computer-implemented networks that can be trained to achieve a goal. Unless otherwise indicated, references herein to a neural network include one neural network or multiple interrelated neural networks trained together. Examples of neural networks include convolutional neural networks (CNNs), recurrent neural networks (RNNs), fully connected neural networks, encoder neural networks (e.g., "encoders"), decoder neural networks, etc. Examples of neural networks include, but are not limited to, neural networks (e.g., "decoders"), densely connected neural networks, and other types of neural networks. In some embodiments, the neural networks can be implemented using specialized hardware (e.g., GPUs, tensor processing units (TPUs), systolic arrays, single instruction multiple data (SIMD) processors, etc.), using software code and general-purpose processors, or using a combination of specialized hardware and software code.

[0035] As used herein, the term "layer" or "network layer" refers to an analysis stage in a neural network. Layers perform different types of analysis related to the type of neural network. For example, layers in an encoder may perform different types of analysis on an input image in order to encode the input image. In some cases, a particular layer provides features based on the particular analysis performed by that layer. In some cases, a particular layer downsamples the received image. Additional layers perform additional downsampling. In some cases, each round of downsampling reduces the visual quality of the output image, but provides features based on the associated analysis performed by that layer.

[0036] As used herein, the term "embedding" refers to a low-dimensional vector into which a high-dimensional vector can be encoded or transformed. In the context of neural networks, embedding is a mapping of discrete (e.g., categorical) objects or variables (e.g., images or words) to vectors in a continuous, low-dimensional space to represent the discrete objects. In some cases, embeddings may be feature vectors or feature maps extracted by a neural network or encoder from a large input feature map. Embeddings can reduce the dimensionality of categorical variables and meaningfully represent categories in the transformed space. Embeddings can be used to find nearest neighbors in the embedding space. Embeddings can be used to make recommendations based on cluster categories, can be used as inputs to machine learning models for supervised tasks, and can be used to visualize concepts and relationships between categories.

[0037] The following examples are provided to introduce certain embodiments. In the following description, for purposes of explanation, specific details are set forth to provide a thorough understanding of the examples of the present disclosure. However, it will be apparent that various examples can be practiced without these specific details. For example, devices, systems, structures, assemblies, methods, and other components may be shown as components in block diagram form so as not to obscure the examples in unnecessary detail. In other examples, well-known devices, processes, systems, structures, and techniques may be shown without necessary details so as to avoid obscuring the examples. The drawings and description are not intended to be limiting. The terms and expressions used in this disclosure are used as terms of description rather than limitation, and there is no intention in the use of such terms and expressions to exclude the features shown and described or equivalents thereof, or portions thereof. The term "example" is used herein to mean "serve as an example, instance, or illustration." Any embodiment or design described herein as an "example" should not necessarily be construed as preferred or advantageous over other embodiments or designs. I. Tissue Preparation and Analysis

[0038] Histological stains are widely used to highlight features of interest and enhance the contrast of sectioned tissues or cells of biological samples. In tumor-containing samples, histological stains can help efficiently localize pathological cells and their microenvironment, thereby facilitating better medical diagnosis and treatment. For example, dyes can be applied to the trailing and leading edges of sample tissues to identify the location of diseased or tumor cells or other pathological cells. In biological research, stains are used to mark cells and flag nucleic acids, proteins, or gel electrophoresis to aid microscopy. The process of histological staining can include several steps, such as fixing, processing, embedding, sectioning, staining and imaging.

[0039] In some embodiments, IHC staining of tissue sections is a type of histological staining used to identify the presence of protein in biological samples.For example, the expression level of a particular protein (e.g., an antigen) is determined by: (a) performing IHC analysis of a tumor sample with a particular antibody type; (b) determining the presence and / or expression level of the protein in the sample.In some embodiments, the IHC staining intensity is determined relative to a reference determined from a reference sample (e.g., a control cell line staining sample, a tissue sample from a non-cancerous patient, a reference sample known to have a predetermined level of protein expression).

[0040] FIG. 1 shows an example of a histological staining process 100. Stage 110 of the histological staining process 100 can include tissue fixation, which can be used to preserve tissue and slow tissue degradation. In histology, fixation generally refers to an irreversible process that uses chemicals to retain chemical composition, preserve native tissue architecture, and maintain cellular structures from degradation. Fixation can also harden cells or tissues for sectioning. Fixatives can enhance tissue and cell preservation using crosslinking proteins. Fixatives can bind and crosslink some proteins and denature other proteins by dehydration, which can harden tissue and inactivate enzymes that might otherwise degrade tissue. Fixatives can also kill bacteria. Fixatives can be administered, for example, by perfusion and immersion of the prepared tissue. A variety of fixatives can be used, including buine fixatives and formaldehyde fixatives, such as neutral buffered formalin (NBF) and paraffin-formalin (paraformaldehyde-PFA). Although the fixation process can help preserve tissue and cellular structure for the purpose of histological examination, tissue fixation can result in concealment of tissue antigens, thereby reducing antigen detection. Thus, tissue fixation is generally considered a limiting factor for IHC, since formalin can crosslink antigens and mask epitopes. In some cases, additional processes are performed to reverse the effects of crosslinking, including treating formalin-fixed tissues with citraconic anhydride (a reversible protein crosslinker) and heating.

[0041] Stage 120 of the histological staining process 100 can include tissue processing and embedding. Tissue processing can result in animal or human tissue after fixation being in a state where the tissue is completely infiltrated with a suitable histological wax, such as paraffin wax. The histological wax may not be soluble in water or alcohol, but may be soluble in a paraffin solvent, such as xylene. Thus, water in the tissue may need to be replaced by xylene. To do so, the tissue can first be dehydrated by gradually replacing the water in the sample with alcohol, which can be achieved by passing the tissue through increasing concentrations of ethyl alcohol (e.g., from 0 to about 100%). After the water has been replaced by the alcohol, the alcohol may be replaced by xylene, which is miscible with the alcohol. Tissue embedding can include embedding the tissue in warm paraffin wax. Because paraffin wax can be soluble in xylene, the molten wax can be filled by xylene to fill the spaces previously filled by water. The wax-filled tissue can be cooled to form a hardened block that can be clamped to a microtome for sectioning. In some cases, deviations from the above exemplary procedure result in penetration of the paraffin wax resulting in inhibition of penetration of antibodies, chemicals, or other fixatives.

[0042] Stage 130 of the histological staining process 100 can include tissue sectioning. Sectioning is the process of cutting thin sections of a sample from an embedded block with the purpose of mounting the sample on a microscope slide for examination. Tissue sectioning may be performed using a microtome. In some cases, tissue can be rapidly frozen in dry ice or isopentane and then cut by a cold knife in a refrigerated cabinet (e.g., a cryostat). Other types of coolants, such as liquid nitrogen, can be used to freeze the tissue. Tissue sections for use by light microscopy are generally on the order of 4-10 μm thick. In some cases, sections can be embedded in epoxy or acrylic resin, which can allow thinner sections (e.g., <2 μm) to be cut. Tissue sections can be placed on glass slides.

[0043] Stage 140 of the histological staining process 100 can include tissue section staining. The purpose of staining is to identify different tissue components by color reaction. Most cells are colorless and transparent. Therefore, it may be necessary to stain histological sections to visualize the cells. The staining process generally involves adding a dye or stain to the sectioned sample to confirm or quantify the presence of a particular compound, structure, molecule, or feature (e.g., subcellular feature). For example, staining can help identify or highlight a particular biomarker (e.g., PD-L1) from a tissue section image. In other examples, staining can be used to identify or highlight biological tissues (e.g., muscle fibers or connective tissue), cell populations (e.g., different blood cells), or organelles within individual cells. Many staining solutions are water-based. Therefore, in order to stain the sections, the wax may need to be dissolved and replaced by water (rehydrated) before applying the staining solution to the sections. For example, the sections can be passed sequentially through xylene, decreasing concentrations of ethyl alcohol (from about 100% to 0%), and water. Once stained, the sections may be dehydrated again and placed in xylene. The sections can then be mounted on microscope slides in mounting medium dissolved in xylene. A coverslip can be placed on top to protect the sample sections. Evaporation of the xylene around the edges of the coverslip allows the mounting medium to dry out and firmly bond the coverslip to the slide.

[0044] Various types of staining protocols can be used to perform tissue staining. For example, IHC staining protocols include using a hydrophobic barrier line around the tissue section to prevent leakage of reagents from the slide during incubation, treating the tissue section with reagents to block endogenous sources of nonspecific staining (e.g., enzymes, free aldehyde groups, immunoglobulins, and other unrelated molecules that can mimic specific staining), incubating the tissue section with a permeabilization buffer to facilitate penetration of antibodies and other staining reagents into the tissue, incubating the tissue section with a primary antibody for a period of time (e.g., 1-24 hours) at a specific temperature (e.g., room temperature, 6-8 °C), rinsing the tissue section using a wash buffer, incubating the tissue section with a secondary antibody for another period of time at another specific temperature (e.g., room temperature), rinsing the tissue section again using a water buffer, incubating the rinsed tissue section with a chromogen (e.g., DAB), and washing off the chromogen to stop the reaction. In some cases, a counterstain is then used to distinguish the overall "landscape" of the tissue section and serve as the primary color reference used to detect the tissue target. Examples of counterstains include hematoxylin (blue to purple stain), methylene blue (blue stain), toluidine blue (nuclear deep blue, polysaccharide pink to red stain), nuclear fast red (also called Kernechtrot dye, stains red), methyl green (green stain), non-nucleogenic stains such as eosin (pink stain), etc. Those skilled in the art will recognize that other IHC staining techniques can be implemented to perform tissue section staining.

[0045] In another example, an H&E staining protocol can be performed for staining tissue sections. The H&E staining protocol involves applying hematoxylin stain to tissue sections mixed with metal salts or mordants. The tissue sections can then be rinsed in a weak acid solution to remove excess stain (differentiation), followed by bluing in weak alkaline water. After application of hematoxylin, the tissue can be counterstained with eosin. It will be appreciated that other H&E staining techniques can be implemented.

[0046] In some embodiments, tissue staining can be performed using various types of stains depending on which feature is of interest. For example, DAB can be used on various tissue sections for IHC staining, where DAB results in a brown color that displays the feature of interest in the stained image. In another example, alkaline phosphatase (AP) can be used on skin tissue sections for IHC staining, since the DAB color can be masked by melanin pigment. With regard to primary staining techniques, applicable stains can include, for example, basophilic and acidophilic stains, hematin and hematoxylin, silver nitrate, trichrome stains, and the like. Acidic dyes can react with cationic or basic components in tissues or cells, such as proteins and other components in the cytoplasm. Basic dyes can react with anionic or acidic components in tissues or cells, such as nucleic acids. As mentioned above, one example of a staining system is H&E. Eosin can be a negatively charged pink acidic dye, and hematoxylin can be a purple or blue basic dye that contains hematein and aluminum ions. Other examples of stains include Periodic Acid-Schiff (PAS) stains, Masson's Trichrome, Alcian Blue, Van Gieson, Reticulin stains, etc. In some embodiments, different types of stains can be used in combination.

[0047] Stage 150 of the histological staining process 100 may include medical imaging to examine the stained tissue in the slide using an electron or optical microscope. In some cases, the examination may include a gross examination prior to microscopic examination. A gross examination may help the pathologist identify cells or tissues with a mass (possibly cancerous), and a microscopic examination may be used to confirm. A microscope may magnify an image of the tissue to reveal details of the tissue. For example, an optical microscope may have a resolution of less than 1 μm, such as about several hundred nanometers. To observe finer details in the nanometer or sub-nanometer range, an electron microscope may be used.

[0048] In step 160, the image of the stained section can be analyzed and the results can be reported. The analysis can be qualitative or quantitative. In histopathology, the stained image can be analyzed to identify signs of disease, understand the biological mechanisms of disease processes, etc. For example, immunohistochemistry (IHC) histology can be used to detect the presence of specific protein markers that can aid in accurate tumor classification and diagnosis. In cytology, the stained image can be used to study the structure, function and chemistry of cells, the presence of isolated cells and cell clusters, the absence of more complex structures such as glands, etc.

[0049] The above histological staining processes can introduce various changes to normal morphological and cytological features due to the presence of various artifacts. As used herein, the term "artifact" can refer to artificial structures or tissue changes in a prepared microscope slide as a result of exogenous factors. Artifacts can occur, for example, during surgical removal, fixation, tissue processing, embedding, sectioning, staining, and mounting procedures. Artifacts in histopathology include, for example, prefixation artifacts, fixation artifacts, bone tissue-related artifacts, tissue processing artifacts, dissection-related artifacts, floating and mounting-related artifacts, staining artifacts, mounting artifacts, biological artifacts, imaging artifacts, and other types of artifacts. It may include artifacts.

[0050] For example, pre-fixation artifacts can include injection artifacts, squeeze artifacts (e.g., tissue tears or tissue folds), sulfuration artifacts, starch artifacts, autolysis artifacts, etc. Fixation artifacts can include, for example, formalin pigments, mercury pigments, ice crystal artifacts, freezing artifacts, streaming artifacts, etc. Floating and mounting related artifacts can include, for example, folds and wrinkles in the cross section, contamination, air bubbles, etc. Staining artifacts can include, for example, residual wax, artifacts associated with the addition of acetic acid to eosin, artifacts due to mordant of hematoxylin, artifacts due to fluorescent sheen of hematoxylin, etc. Mounting artifacts can include, for example, residual water and air bubbles.

[0051] 2A-2F show examples of histopathological stained images. FIG. 2A shows an example of an image of tissue stained with hematoxylin. FIG. 2B shows an example of an image of tissue with a watermark. FIG. 2C shows an example of an image of tissue with membrane / cytoplasmic staining. FIG. 2D shows an example of a stained image with non-specific staining of connective fibers or interstitial elements. FIG. 2E shows an example of an image of nuclear stain. FIG. 2F shows an example of an image with tissue folds.

[0052] Artifacts can reduce the quality of images of stained sample sections, which can lead to misdiagnosis or delayed diagnosis. For example, multiple artifacts (e.g., out of focus, watermarks, and tissue folds) present in images of stained samples can obscure diagnostic features. These artifacts can even result in complete unusability of the tissue. To accurately analyze slide images, it may be desirable to detect such artifacts or other artificial effects in slide images and, if possible, process the slide images so that artifacts and other artificial effects do not interfere with pathology diagnosis. However, assessing the quality of stained images and detecting artifacts from stained images can be subjective and time-consuming. II. Machine Learning Models

[0053] Machine learning techniques such as CNN models have been successfully applied to image classification, object detection and recognition, video action recognition, etc. CNN models efficiently implement spatial locality and weight sharing by reusing local filters to extract features from local regions. Convolutional neural networks can perform operations including, for example, convolution, nonlinearity (or activation) functions (e.g., ReLU), pooling or subsampling, and classification. Different CNNs can have different combinations of these main operations, as well as other additional operations. For example, a residual neural network (ResNet) network can include network layers that include mostly convolutional layers and a few pooling layers, and can also perform residual summation operations for residual learning.

[0054] FIG. 3 shows an example of a CNN 300 for image or other object classification. As described above, the CNN 300 can perform operations including convolution, nonlinearity (or activation) functions, pooling or subsampling, and classification. An object 310 to be classified, such as one or more input images or other input data sets (called input feature maps), can be represented by a matrix of pixel values. For example, the object 310 can include multiple channels (e.g., multiple input feature maps), with each channel representing a particular component of the object 310. For example, the image captured by a digital camera or a microscope can be represented by a matrix of pixel values. A color image from a microscope may have a red channel, a green channel, and a blue channel, where each channel may be represented by a matrix of pixels having pixel values ​​ranging, for example, from 0 to 255 (i.e., 8 bits). A grayscale image may have only one channel. The following description describes the processing of a single image channel using CNN 300. Other channels may be processed similarly.

[0055] As shown in FIG. 3, an object 310 (e.g., an input image) may first be processed by a first convolutional layer 315 using a first set of filters, where the first convolutional layer 315 may perform a convolution between a matrix representing the input image and a matrix representing each filter in the first set of filters. The convolution may include multiple matrix multiplications. The first convolutional layer 315 may also perform a nonlinear activation function (e.g., ReLU). An output matrix 320 from the first convolutional layer 315 may have a smaller dimension than the input image. The first convolutional layer 315 may perform a convolution on the input image using the first set of filters to generate multiple output matrices 320, which may be referred to as output feature maps of the first convolutional layer 315. The number of filters used may be referred to as the depth of the convolutional layer. In the example shown in FIG. 3, the first convolutional layer 315 may have a depth of three. Each output matrix 320 (e.g., output feature map) may be passed to a pooling layer 325, where each output matrix 320 may be subsampled or downsampled to generate a matrix 330.

[0056] Each matrix 330 may be processed by the second convolutional layer 335 using a second set of filters. A nonlinear activation function (e.g., ReLU) may also be performed by the second convolutional layer 335 as described above. An output matrix 340 (e.g., output feature map) from the second convolutional layer 335 may have a smaller dimension than the matrix 330. The second convolutional layer 335 may perform convolution on the matrix 330 using a second set of filters to generate multiple output matrices 340. In the example shown in FIG. 3, the second convolutional layer 335 may have a depth of 6. Each output matrix 340 may be passed to a pooling layer 345, and each output matrix 340 may be subsampled or downsampled to generate an output matrix 350.

[0057] The output matrix 350 from the pooling layer 345 can be flattened into a vector by a flattening layer 355. The flattened vector can be passed to a fully connected layer 360 (e.g., a multi-layer perceptron (MLP)). The fully connected layer 360 can include an input layer 370 that obtains the output vector from the flattening layer 355. The fully connected layer 360 can also include a hidden layer 380 and an output layer 390. The fully connected layer 360 can classify objects in an input image into one of several categories using a feature map or output matrix 350 and, for example, a softmax function. The operation of the fully connected layer can be represented by matrix multiplication. For example, if there are M nodes on the input layer 370 and N nodes on the hidden layer 380, and the weights of the connections between the M nodes on the input layer 370 and the N nodes on the hidden layer 380 can be represented by a matrix W containing M·N elements, the output Y of the hidden layer 380 can be determined by Y=X×W.

[0058] Convolution operations in CNNs can be used to extract features from an input image. Convolution operations can preserve spatial relationships between pixels by extracting image features using small regions of the input image. In convolution, a matrix (called a filter, kernel, or feature detector) can slide over the input image (or feature map) in a certain step size (called a stride). For every position (or step), an element-wise multiplication between the filter matrix and the overlap matrix in the input image can be calculated and summed to produce a final value that represents a single element in the output matrix (e.g., feature map). Filters are designed to detect specific features from the original input image. It can be used.

[0059] A convolution using one filter (or one set of filters) on an input pixel array can be used to generate one feature map, and a convolution using another filter (or another set of filters) on the same input pixel array can generate a different feature map. CNNs can learn the weights of the filters themselves during the training process based on several user-specified parameters (sometimes called hyperparameters), such as the number of filters, the filter size, and the architecture of the network. To improve image feature extraction as well as pattern recognition in new images, a specific number of filters and / or a specific size of the filters can be determined to generate the feature map.

[0060] The size of the output feature map can be determined based on parameters such as depth, stride, and zero padding. As mentioned above, the depth of a convolutional layer can correspond to the number of filters (or sets of filters) used in the convolution operation. For example, in the CNN 300 shown in FIG. 3, three separate filters are used in the first convolutional layer 315 to perform the convolution operation on the input image, thus generating three different output matrices 320 (or feature maps). The stride is the number of pixels over which the filter matrix is ​​slid on the input pixel array. For example, if the stride is 1, the filter matrix moves by one pixel. If the stride is 2, the filter matrix moves by two pixels. A larger stride can generate a smaller feature map. In some implementations, the input matrix may be padded with zeros around the boundaries so that the filter matrix can be applied to the boundary elements of the input pixel array. The zero padding can allow control of the size of the feature map.

[0061] As shown in Figure 3, after every convolution operation, an additional nonlinear operation using an activation function (e.g., ReLU) can be used. ReLU is an element-wise operation that replaces all negative pixel values ​​in the feature map with zero. The purpose of the ReLU operation is to introduce nonlinearity into the CNN. Other nonlinear functions such as tanh or sigmoid functions can also be used, but ReLU has been found to perform better in many situations.

[0062] Spatial pooling (also called subsampling or downsampling) can reduce the dimensionality of each feature map while retaining certain important information. In particular, pooling can make the feature dimensions smaller and more manageable, reducing the number of parameters and calculations in the network. Spatial pooling can be performed in various ways, such as max pooling, average pooling, and sum pooling. In max pooling, the maximum element in each spatial neighborhood (e.g., a 2×2 window) can be used to represent the spatial neighborhood. Instead of taking the maximum element, the average (in the case of average pooling) or sum (in the case of sum pooling) of all elements in each window can be used to represent the spatial neighborhood.

[0063] In the example shown in FIG. 3, two sets of convolutional and pooling layers are used. Note that these operations can be repeated any number of times in a single CNN. Furthermore, a pooling layer may not be used after every convolutional layer. For example, in some implementations, a CNN may perform multiple convolutional and ReLU operations before performing a pooling operation.

[0064] The training process of a convolutional neural network such as the CNN 300 can be similar to the training process of any feedforward neural network. First, all parameters and weights (including the weights in the filters and the weights in the fully connected layers) are trained on a randomly generated The convolutional neural network may be initialized by random values ​​or known neural network parameters. Second, the convolutional neural network may take training samples (e.g., training images) as inputs and perform a forward propagation step (including convolution, nonlinear activation, and pooling operations, as well as forward propagation operations in the fully connected layer) to determine the output probability of each possible class. The training samples may be classified using a softmax function based on the output probability. The classification result of the training samples by the convolutional neural network may be compared with the expected result, and the error between the expected result and the classification output may be backpropagated to the previous layer. The weights may be adjusted accordingly based on the error. For example, techniques such as backpropagation may be used to calculate the gradient of the error with respect to the parameters trained in the network, and gradient descent may be used to update the parameters trained in the network to minimize the output error. This process may be repeated a certain number of times, a certain number of training samples, or until the output error falls below a predetermined threshold.

[0065] At the end of the training process, all parameters of the CNN may be optimized to correctly classify training samples from the training dataset. When unseen samples (e.g., test samples or new samples) are input to the CNN, the CNN can output the probability of each class using the trained parameters through a forward propagation step, which is sometimes called an inference (or prediction) process compared to the training process. If the training dataset is sufficient, the trained network can classify unseen samples into the correct classes.

[0066] One example of a CNN is Dense Convolutional Networks (DenseNets). In DenseNet, each layer can be connected to all previous layers in a feedforward manner, and the output feature maps of all previous layers and the original input feature maps can be concatenated to form the input feature map of the current layer. DenseNet can use fewer parameters than an equivalent traditional CNN because it does not need to learn redundant feature maps. DenseNet can use less memory and computation to achieve high performance. III. Image classification using few-shot learning and transfer learning

[0067] Generally, a large number of samples may be required to train a neural network or other machine learning model. In the case of digital pathology, extensively labeled datasets may not be available or manual analysis and annotating of stained images by medical experts to train machine learning models may be expensive and time-consuming.

[0068] According to certain embodiments, a few-shot learning technique is used to train a machine learning model (e.g., a neural network) to classify field images of tissue slides into various classes, including specific staining patterns, artifacts, and other features of interest. The machine learning model can include a pre-trained convolutional neural network that includes one or more fully connected layers. The pre-trained convolutional neural network is trained using a large benchmark dataset (e.g., CIFAR-10, CIFAR-100, SVHN, or ImageNet dataset) and can include publicly available (available for download) deep neural networks such as VGG, Inception V3, ResNet (e.g., ResNet-50), DenseNet, etc. Layers other than the fully connected layer do not need to be retrained. One or more fully connected layers of the machine learning model can be retrained in multiple iterations (called episodes) using a few-shot learning technique and a small number of training samples (e.g., stained images) for each image class of multiple (e.g., M) image classes. The knowledge learned from the limited number of training samples of the M image classes is used to train the machine learning model. The query samples can be transferred to classify query samples of other classes, such as stained images with artifacts not in the M image classes. For example, the trained machine learning model can be used to classify query images of new image classes by calculating a relationship score (e.g., embedding distance) between the query image and a small number of examples of each new image class without retraining the machine learning model.

[0069] FIG. 4 illustrates an example of a machine learning model 400 for classifying stained images of a biological sample according to certain embodiments. In the illustrated example, the machine learning model 400 may include a neural network 430 (e.g., DenseNet or another deep neural network) and may include multiple convolutional layers 432 and one or more fully connected layers 434 at the end of the neural network 430. A small number (e.g., less than about 20, e.g., about 5 to 15) of supporting images 410 (e.g., stained images) belonging to each image class (e.g., stained images without artifacts and stained images with different types of artifacts such as protein markers) may be encoded into corresponding embeddings (e.g., multidimensional feature vectors) by the neural network 430. The embeddings of supporting images belonging to the same image class may form a cluster in a multidimensional space 440. The mean, median, or center of embeddings of supporting images belonging to the same image class may be calculated to determine a prototype representing the image class in the multidimensional space 440.

[0070] Each query image 420 (e.g., a stained image) to be classified may also be encoded into a corresponding embedding by the neural network 430. A distance or similarity metric (e.g., Manhattan, Euclidean, Chebyshev, or Hamming distance, or cosine similarity) between the embedding of the query image 420 and the prototype of each image class may be determined by the similarity metric engine 450. The query image 420 may then be classified by the prediction engine 460 based on the similarity metric between the embedding of the query image 420 and the prototype of each class. For example, the query image 420 may be classified by the prediction engine 460 into the class whose prototype is closest to the embedding of the query image 420.

[0071] Neural network 430, similarity metric engine 450, and prediction engine 460 can be implemented using, for example, one or more general purpose CPUs, GPUs, TPUs, or systolic arrays, SIMD processors, etc., and instructions generated by a compiler based on a description of machine learning model 400.

[0072] The machine learning model 400, more specifically the neural network 430, can be trained using images from several known image classes. The trained machine learning model 400 (or the neural network 430) can also be used to classify a query image of a new image class (e.g., with a new type of artifact). For example, a small number (e.g., less than 20, such as 1, 5, 10, 15, etc.) of support images of the new image class can be provided and used as input to determine whether the query image belongs to the new image class. The support images may be encoded or processed by the neural network 430 to generate embeddings of the support images. Prototypes representing the new image class can be determined by (for example) calculating the mean, median, or center of the embeddings of the support images. The embedding of the query image may be extracted by the neural network 430. A similarity metric of the embedding of the query image to the prototypes of the existing image classes and the new image class may be determined by the similarity metric engine 450. The similarity metric can then be used by the prediction engine 460 to determine which class the query image belongs to.

[0073] FIG. 5 includes a flowchart 500 illustrating an example of a method for classifying a query image using a machine learning model and a set of supporting images according to certain embodiments. The operations described in the flowchart 500 may be performed by a computer system implementing a machine learning model, such as the machine learning model 400. Although the flowchart 500 may describe the operations as a sequential process, in various embodiments, many of the operations may be performed in parallel or simultaneously. Furthermore, the order of the operations may be changed. The operations may have additional steps not shown. Furthermore, embodiments of the method may be implemented by hardware, software, firmware, middleware, microcode, hardware description languages, or any combination thereof. When implemented in software, firmware, middleware, or microcode, the program code or code segments for performing the associated tasks may be stored in a computer-readable medium, such as a storage medium.

[0074] In operation 510, the computer system may receive a machine learning model, a set of supporting images in a first image class, and a query image. The supporting images and the query image may be, for example, stained images with or without artifacts. For example, the supporting images of the first image class may include common types of artifacts discussed above, such as watermarks, tissue folds, blurring, etc. The query image may or may not belong to the first image class. An example of a machine learning model may be the machine learning model 400. The machine learning model may be trained using training images from several image classes, which may or may not include the first image class. The machine learning model may be trained to generate embeddings of input images, such as stained images. The machine learning model may include a deep neural network (e.g., neural network 430, such as DenseNet) that can extract feature vectors or generate embeddings of the input images. The machine learning model may also include a similarity metric engine (e.g., similarity metric engine 450) that can determine a similarity metric (e.g., squared Euclidean distance) between the embeddings, and a prediction engine (e.g., prediction engine 450) that classifies the query image based on a similarity metric associated with the query image.

[0075] At operation 520, the computer system can generate respective embeddings of each support image in the set of support images based on the machine learning model. For example, the support images can be passed to a deep convolutional neural network, such as ResNet or DenseNet, which can apply various filters to the support images via convolution, activation, and pooling operations to extract low-dimensional feature vectors as vectors representing the support images in a multidimensional space.

[0076] In operation 530, the computer system can calculate a prototype of the first image class. The embeddings of the set of supporting images can form clusters in a multidimensional space. The prototype can be, for example, the mean, median, or center of the embeddings of the set of supporting images, such as the center of a cluster of embeddings of the set of supporting images in the multidimensional space. The prototypes of the image classes used during training of the machine learning model can be known or can be determined using supporting images from these image classes.

[0077] At operation 540, the computer system can generate an embedding of the query image based on the same machine learning model used to generate the embedding of the supporting image. Thus, the query image may be mapped into the same multi-dimensional space as the supporting image.

[0078] At operation 550, the computer system can determine a similarity metric between the embedding of the query image and the prototype of the first image class. As described above, the similarity metric can include, for example, squared Euclidean distance or cosine similarity between two vectors in a multi-dimensional space. In some embodiments, a similarity metric between the embedding of the query image and known prototypes of each of the other image classes can be determined as well.

[0079] At operation 560, the computer system may classify the query image based on a similarity metric between the embedding of the query image and the prototype of the first image class and / or a similarity metric between the embedding of the query image and the known prototype of each of the other image classes. For example, the computer system may determine that the query image is not in the first image class based on determining that a squared Euclidean distance between the embedding of the query image and the prototype of the first image class is greater than a threshold. In another example, the computer system may determine that the query image is in the second image class based on determining that a squared Euclidean distance between the embedding of the query image and the prototype of the second image class is the lowest among the prototypes of the image class.

[0080] The above-mentioned machine learning model can be trained using few-shot learning and transfer learning techniques. The machine learning model can be based on a pre-trained convolutional neural network. The pre-trained convolutional neural network can be trained using a large benchmark dataset (e.g., CIFAR-10, CIFAR-100, SVHN, or ImageNet dataset) and can include publicly available (available for download) deep neural networks such as VGG, Inception, ResNet, DenseNet, etc. Only a few layers, such as one or more fully connected layers, of the pre-trained convolutional neural network can be retrained to classify stained images. The one or more fully connected layers can be retrained using a few training images using a few-shot learning technique.

[0081] FIG. 6 includes a flowchart 600 illustrating an example of a method for training a machine learning model for classifying stained or other images, according to certain embodiments. The operations described in the flowchart 600 may be performed by a computer system including, for example, one or more CPUs, GPUs, TPUs, systolic arrays, or SIMD processors. Although the flowchart 600 may describe the operations as a sequential process, in various embodiments, many of the operations may be performed in parallel or simultaneously. Also, the order of the operations may be changed. The operations may have additional steps not shown. Furthermore, the method embodiments may be implemented by hardware, software, firmware, middleware, microcode, hardware description languages, or any combination thereof. When implemented in software, firmware, middleware, or microcode, the program code or code segments for performing the associated tasks may be stored in a computer-readable medium, such as a storage medium.

[0082] In operation 610, the computer system may receive a pre-trained deep neural network model and training images belonging to the M classes. The pre-trained convolutional deep neural network model may be trained using a large benchmark dataset (e.g., CIFAR-10, CIFAR-100, SVHN, or ImageNet dataset) and may include publicly available (available for download) deep neural networks such as VGG, Inception, ResNet, DenseNet, etc. In one example, the pre-trained deep neural network model may be The model may include a DenseNet-121 that includes multiple convolutional layers, where the input to each convolutional layer may include the original input feature map and the output feature maps of all preceding layers. Because each convolutional layer may have access to a different level of feature map than the preceding convolutional layer, the DenseNet-121 may have better performance than a traditional convolutional neural network. Like many other neural networks, the DenseNet-121 may also include one or more fully connected layers, for example at the end. The DenseNet-121 may also include a softmax layer. The training images may include, for example, stained images with different types of patterns and artifacts as described above. The training images may be labeled with the corresponding image class (e.g., type of pattern or artifact). The training images may include a respective set of training images for each image class.

[0083] In operation 620, the computer system may randomly, pseudo-randomly, or otherwise select K classes from the M classes, where K≦M. From each set of training images in each class of the selected K classes, N training images may be randomly, pseudo-randomly, or otherwise selected as support images, and Q training images may be randomly, pseudo-randomly, or otherwise selected as query images. N may be a small number less than 20, for example, about 5 to 10. Q is also a small number, such as about 5 to 10. In one example, the set of training images for each class may include 20 training images, K may be 5, N may be 10, and Q may be 5. Thus, 50 support images and 25 query images may be selected from 100 training images belonging to 5 classes.

[0084] In operation 630, the computer system can use a pre-trained deep neural network model to generate embeddings of the N support images and the Q query images for each class of the K classes. Each support image or query image can be passed to the pre-trained deep neural network model to generate a respective feature vector (i.e., embedding). In one example, each training image can include 256×256 pixels. Each training image can be represented by a two-dimensional matrix (e.g., 256·256) or a three-dimensional matrix (e.g., 256·256·3 color channels). The feature vector (or embedding) of each training image can include a 1024 element vector. The embeddings of the support images can form clusters in a multidimensional space.

[0085] In operation 640, the computer system can calculate, for each of the K classes, a prototype that represents the class in the multidimensional space. For example, the prototype of a class can be the mean or median of the embeddings of the N supporting images of the class, or the center of a cluster of the embeddings of the N supporting images of the class.

[0086] At operation 650, a similarity metric between each respective query image embedding of the Q query images and the prototypes of the K classes may be determined. In one example, each similarity metric of the query images may be a squared Euclidean distance between the query image embedding and the prototypes of the respective class. Each query image of the Q query images may then be classified based on the similarity metric between the query image embedding and the prototypes of the K classes. For example, the query image may be classified into the class whose prototype is closest (e.g., has the shortest Euclidean distance) to the embedding of the query language.

[0087] In operation 660, the parameters of the fully connected layer are adjusted based on the results of the classification of the Q query images. The parameters of the pre-trained deep neural network model, such as the parameters (e.g., weights), can be adjusted. As described above, the parameters of the pre-trained deep neural network model can be adjusted using backpropagation techniques, and the gradient of the classification error with respect to the parameters can be calculated and used to update the parameters. In some embodiments, a classical stochastic gradient descent procedure can be used to update the parameters of the pre-trained deep neural network model. In some embodiments, an adaptive moment (Adam) estimation technique can be used to update the parameters of the pre-trained deep neural network model. The Adam estimation technique is an adaptive learning rate optimization technique for training deep neural networks. The Adam estimation technique leverages the power of adaptive learning rate methods to find individual learning rates for each parameter. The Adam estimation technique can adapt the parameter learning rates based on the average first moment (mean) and average second moment (non-centred variance) of the gradients.

[0088] Operations 620-660 may be performed iteratively to optimize parameters of the deep neural network model. In some embodiments, operations 620-660 may be performed a predetermined number of times. In some embodiments, operations 620-660 may be performed until all training images in the received training images for the M classes have been selected. In some embodiments, operations 620-660 may be performed until the classification error falls below a certain threshold.

[0089] According to certain embodiments, based on the classification results, stained images classified into different artifact classes can be excluded, marked, or reacquired to improve the quality of the stained images for subsequent analysis. For example, stained images with specific artifacts can be excluded from subsequent analysis. For some stained images with specific artifacts, the parts of the stained images with artifacts can be identified or marked so that the parts can be excluded from subsequent analysis. For some stained images with specific artifacts, stained images of the stained sections can be acquired from different fields of view. IV. Exemplary Artifact Classification in IHC Stained Tissue

[0090] In one example, images of IHC stained tissues for different biomarkers such as BCL2, HER2, CD10, Ki67 are scanned at 40x. The scanned images can include various staining features and artifacts. The training dataset can be curated by extracting patches of 256x256 pixels from slide tissue images and manually annotating the patches by a pathologist. The curated training dataset can include stained images belonging to six image classes. The six image classes can include two staining classes (nuclear staining and membranous cytoplasmic staining), three artifact classes (tissue folds, watermarks on tissue, and non-specific stromal staining), and one non-staining class. The training dataset can include 20 samples (images or image patches) for each of the six classes, for a total of 120 samples. The training dataset can be divided into a support set and a query set. For example, to perform few-shot learning, 10 samples from each class may be selected to serve as a random, pseudorandom, or support set, and the remaining 10 samples from each class may be used as a query set. Additionally, 20 samples for each of three classes of novel artifacts, including surgical incision ink, cuts (i.e., torn tissue), and blurred regions, may be curated and used to evaluate the accuracy of the trained machine learning model.

[0091] As a machine learning model, a prototype network having a DenseNet-121 network can be used. The DenseNet-121 network is a prototype The DenseNet-121 network may be trained and / or publicly available models (e.g., trained using the CIFAR-10, CIFAR-100, SVHN, or ImageNet datasets) and only the fully connected layer of the DenseNet-121 network may be retrained using the training dataset. The final fully connected layer may include 1024 nodes and may be used to generate a low-dimensional representation of the input image. This may help overcome overfitting issues resulting from the use of a small number of samples. Batch normalization is used to normalize the network. A single network is used to generate embeddings of both the support and query images. As described above, representations (e.g., prototypes) of the six image classes are determined based on the support images and evaluated against the embedding of the query image using a similarity metric (e.g., Euclidean distance) to classify the query image.

[0092] In the training phase, the machine learning model may be trained in multiple iterations based on few-shot learning. Each training iteration may be referred to as an episode. In each episode, the selected support images and the query image are sent to the network, the network loss (e.g., classification error) is determined, and the error gradient is back-propagated to the fully connected layer. In each episode, K image classes may be randomly, pseudo-randomly, or otherwise selected from the M image classes, where K≦M. For each image class of the K image classes, N support images of the image class may be randomly, pseudo-randomly, or otherwise selected, where N is a hyperparameter (number of shots) and may be selected based on the number of available samples. For example, N may be about 5 to 10. For each image class of the K image classes, Q query images may also be randomly, pseudo-randomly, or otherwise selected. An embedding (e.g., a d-dimensional feature vector, where d=1024 in one example) of the support image may be generated by passing the support image to the machine learning model. Thus, for each image class, N embeddings may be generated. The mean, median, or center of the N embeddings of the N support images in each class may be calculated to determine a prototype representing the image class. To classify the Q query images, each query image in the Q query images may be encoded into a query embedding. A squared Euclidean distance metric may be calculated to determine the distance from each prototype to each query embedding. Each query image may be classified into the class prototype that is closest to the query embedding. The classification error may be backpropagated to optimize the parameters of the machine learning model using an Adam optimizer with a negative log-likelihood loss and a fixed learning rate of 0.001. The machine learning model is trained for 10 iterations.

[0093] FIG. 7 includes a diagram 700 showing an example of t-sne visualization of the output of a trained machine learning model after 10 iterations according to certain embodiments. The diagram 700 shows class representations (e.g., prototypes) of the six image classes mentioned above, including two staining classes (nuclear staining and membrane cytoplasmic staining), three artifact classes (tissue folds, watermarks on tissue, and non-specific interstitial staining), and one non-staining class. The diagram 700 also shows embeddings of the query images. Prototypes of each image class are created using 10 supporting images. Five query images of each image class are used for visualization. FIG. 7 shows that the trained machine learning model can efficiently cluster embeddings of the query images around the corresponding prototypes.

[0094] In the inference phase, the trained machine learning model can classify stained images into image classes used in the training phase and new image classes not used in the training phase. The new image classes can correspond, for example, to new types of artifacts. The machine learning model does not need to be retrained using images from the new image classes. The trained model can be used to predict whether a query image belongs to the new image class. The machine learning model can use a small number of supporting images of the new image class to generate clusters of embeddings of the supporting images, determine prototypes representing the new image class based on the embeddings of the supporting images, encode the query image into the query embedding, and classify the query image based on a similarity metric between the query embedding and the prototypes of the new image class as described above.

[0095] FIG. 8 includes a diagram 800 illustrating an example of t-sne visualization of the output of a trained machine learning model for different classes of input images according to certain embodiments. In the example shown in FIG. 8, the machine learning model is the same as the machine learning model described with reference to FIG. 7. The machine learning model is trained using images from the six image classes mentioned above, including two staining classes (nuclear staining and membranous cytoplasmic staining), three artifact classes (tissue folds, watermarks on tissue, and non-specific stromal staining), and one non-staining class. Prototypes of these six image classes and embeddings of a query image into these six image classes are shown in FIG. 8.

[0096] FIG. 8 also shows the output of the machine learning model for stained images from three new image classes that are not used during the training phase of the machine learning model. The three new image classes include surgical incision ink, cuts (i.e., torn tissue), and blurred area artifacts. FIG. 8 shows prototypes of the three new image classes determined using supporting images associated with the three new image classes. FIG. 8 also shows embeddings of query images for the three new image classes. FIG. 8 shows that for the three new image classes that are not used to train the machine learning model, the machine learning model can also efficiently cluster embeddings of query images around corresponding prototypes.

[0097] For comparison, a machine learning model based on a pre-trained DenseNet-121 model is retrained using transfer learning but not using few-shot learning. The machine learning model is retrained using an iterative training process of 10 iterations with a learning rate of 0.001. The classification accuracy of the machine learning models trained using transfer learning and different numbers of training samples, and the classification accuracy of the machine learning models trained using both few-shot learning and transfer learning are shown in Table 1. The accuracy of the trained machine learning models is evaluated using a separate set of 60 test samples (containing 10 images per class). As shown in Table 1, the machine learning model trained using transfer learning based on 60 support images can achieve an accuracy of about 80%. The machine learning model trained using transfer learning based on 120 training samples, including both support images and query images, can achieve an accuracy of about 86%. The machine learning model trained using both transfer learning and few-shot learning based on 120 training samples can achieve an accuracy of about 96% (an improvement of about 10% over the machine learning model trained using only transfer learning). [Table 1]

[0098] FIG. 9 illustrates few-shot learning and different numbers of support images according to certain embodiments. 9 includes a graph 900 showing the accuracy of a machine learning model trained using (number of shots). As shown in FIG. 9, increasing the number of support examples (number of shots) can improve classification accuracy. However, the accuracy curve begins to flatten out when the number of shots exceeds about 5. When the number of shots exceeds about 15, the improvement decreases and accuracy may saturate at an upper limit. Exemplary artifact classification of VH&E stained tissue (A) Process Overview

[0099] FIG. 10 illustrates an example schematic 1000 for classifying images displaying H&E stained tissue sections, according to certain embodiments. At block 1005, a computer system receives a scan image of H&E stained tissue. In some embodiments, the scan image includes one or more staining patterns, artifacts, and / or other features of interest. At block 1010, the computer system identifies an area of ​​interest in the scan image. In some cases, a mask is generated to isolate the area of ​​interest in the scan image. The mask may include pixel information representing a boundary of the area of ​​interest, such that the mask may be used to remove information in the scan image that is around the area of ​​interest.

[0100] Various techniques can be used to identify regions of interest. For example, the pixels of the scanned image in an initial color space (e.g., RGB color space) can be processed to identify pixel intensity information of the scanned image under hue, saturation, and value (HSV) color space. Then, a series of image processing operations (e.g., masking, filtering, smoothing) can be applied to the pixel intensity information to extract regions of interest. In another example, an Okapi-Chamfer matching algorithm can be applied to the scanned image to identify regions of interest. In this example, the regions of interest can be identified based on distance information calculated between a feature vector representing the scanned image and the feature vectors of training images clustered based on their feature similarity.

[0101] In block 1015, the computer system divides the region of interest into a plurality of image tiles. Each image tile of the plurality of image tiles can then be processed to predict whether the image tile contains an artifact. In some embodiments, the computer system applies the trained machine learning model to the plurality of image tiles. The machine learning model may be trained in multiple iterations using few-shot learning. For the H&E stained tissue classification example, few-shot learning was used in two training iterations to identify five image classes, including four artifact classes and one tissue class. In the first training iteration, the machine learning model was trained on training images corresponding to a tissue fold class and a pen mark class. The two image classes are more commonly encountered and distinctive compared to the other image classes. In the second training iteration, the machine learning model was trained on training images corresponding to a hemorrhage class and a microtome chatter class.

[0102] After the training phase is complete, the computer system can apply the trained machine learning model to each image tile of the plurality of image tiles for classification. For example, the first set of image tiles 1020 can be classified as including at least one artifact (e.g., bleeding area, pen mark), and the second set of image tiles 1025 can be classified as having no artifact. Additionally or alternatively, the computer system can apply the trained machine learning model to predict a particular type of artifact or tissue displayed in each image tile. For the H&E stained tissue classification example, a representation (e.g., prototype) of five image classes was determined based on the supporting images, each image class indicating the presence of a particular type of artifact. The five image classes were a bleeding class, a microtome chatter class, a pen mark class, a tissue fold class, and a tissue class. The representations of the five image classes were evaluated against the embedding of each image tile using a similarity metric (e.g., Euclidean distance) to classify the image tile as having a particular type of artifact.

[0103] In some embodiments, a prototype network with a DenseNet-121 network is used as the machine learning model. The DenseNet-121 network may be a pre-trained and / or published model (e.g., trained using the CIFAR-10, CIFAR-100, SVHN, or ImageNet dataset), and one or more layers (e.g., the fully connected layers of the DenseNet-121 network) may be re-trained using the training dataset. A single network can be used to generate embeddings of both the support images and the query image (e.g., multiple image tiles).

[0104] At block 1030, for each image tile predicted to contain one or more artifacts, the computer system identifies a location of the one or more artifacts within the image tile. In some cases, the location of the one or more artifacts includes x and y coordinate values ​​of each pixel in the image tile that corresponds to the one or more artifacts. (B) Exemplary regions of interest

[0105] FIG. 11 illustrates examples of regions of interest 1110, 1115, and 1120 generated by processing an H&E stained image 1105, according to certain embodiments. In some embodiments, each of the regions of interest 1110, 1115, and 1120 is generated by performing various image processing techniques, such as an HSV transformation and an Okapi-Chamfer matching algorithm. For example, the region of interest 1105 may correspond to an output image generated based on processing the scan image with an HSV transformation. In another example, the region of interest 1110 may correspond to an output image generated based on processing the scan image through an Okapi-Chamfer matching algorithm. In yet another example, the region of interest 1120 may correspond to an output image generated based on processing the scan image through a Pyris image processing system. As illustrated in FIG. 11, the shape, size, and pixel intensity of the regions of interest may vary based on the type of image processing technique used to process the scan image. (C) Performance evaluation of the trained machine learning model

[0106] The accuracy of the trained machine learning model can be evaluated using a set of test samples. In an exemplary testing scenario, the machine learning model was trained with 100 training samples for each of the five image classes mentioned above (i.e., hemorrhage class, microtome chatter class, pen mark class, tissue fold class, and tissue class). The trained machine learning model was evaluated using a test sample of approximately 30 slide images for each image class. As shown in Table 2, the trained machine learning model achieved an average accuracy of 96.67% for predicting a specific type of artifact. Furthermore, the trained machine learning model achieved a higher accuracy (98%) for predicting whether an image (e.g., an image tile of an H&E stained image) corresponds to a tissue or artifact. [Table 2]

[0107] FIG. 12A illustrates an example of a confusion matrix 1200A that identifies performance results of a trained machine learning model for classifying stained images according to certain embodiments. The confusion matrix 1200A is generated based on the set of training and test samples identified in Table 2, where numbers 1-5 correspond to hemorrhage class, microtome chatter class, pen mark class, tissue fold class, and tissue class, respectively. Each column of the confusion matrix 1200A represents an instance in a predicted image class, and each row represents an instance in an actual image class. As shown in FIG. 12A, the trained machine learning model achieved very high accuracy when determining whether a given image corresponds to a hemorrhage region, a microtome chatter region, or a tissue fold region. The accuracy of the trained machine learning model slightly decreased when classifying images with pen marks. However, the error rate was still relatively low (e.g., 2 out of 29 test samples corresponding to pen marks were misclassified).

[0108] In another exemplary testing scenario, the machine learning model was trained with 100 training samples and 20 validation samples for each of the five image classes. The trained machine learning model was evaluated using 15 support samples and 70 test samples for each image class. As shown in Table 3, the trained machine learning model achieved an average accuracy of 85.14% for predicting a specific type of artifact. In addition, the trained machine learning model achieved a relatively high accuracy (91.71%) for predicting whether an image (e.g., an image tile of an H&E stained image) corresponds to a tissue or an artifact. [Table 3]

[0109] FIG. 12B illustrates an example of a confusion matrix 1200B that identifies performance results of a trained machine learning model for classifying stained images, according to certain embodiments. The confusion matrix 1200B was generated based on the set of training and test samples identified in Table 3. where numbers 1 to 5 correspond to the hemorrhage class, the microtome chatter class, the pen mark class, the tissue fold class, and the tissue class, respectively. Each column of the confusion matrix 1200B represents an instance in a predicted image class, and each row represents an instance in an actual image class. As shown in Figure 12B, the trained machine learning model achieved relatively high accuracy across the five image classes. However, the accuracy of classifying images corresponding to tissue fold regions drops to approximately 74.3%. (D) Example output of artifact classification

[0110] FIG. 13 illustrates an exemplary set of image results 1300 classified using a trained machine learning model, according to some embodiments. The trained machine learning model correctly classified 35 of 39 tissue images, achieving an accuracy rate of 89.74%. Of the four misclassifications, image 1305 displaying pen-marked regions was misclassified as having a bleeding region. Two images 1310 displaying tissue sections were misclassified as pen-marked regions. Image 1315 displaying pen-marked regions was misclassified as a tissue fold region. As discussed above, the trained machine learning model misclassifies images with pen-marked regions more often than images with other types of artifacts. VI. Computing Environment

[0111] 14 illustrates an example of a computer system 1400 for implementing some of the embodiments disclosed herein. The computer system 1400 may have a distributed architecture, where some of the components (e.g., memory and processor) are part of an end-user device and some other similar components (e.g., memory and processor) are part of a computer server. The computer system 1400 includes at least a processor 1402, a memory 1404, a storage device 1406, an input / output (I / O) peripherals 1408, a communication peripherals 1410, and an interface bus 1412. The interface bus 1412 is configured to communicate, transmit, and transfer data, control, and commands between various components of the computer system 1400. The processor 1402 may include one or more processing units, such as a CPU, a GPU, a TPU, a systolic array, or a SIMD processor. The memory 1404 and storage devices 1406 include computer-readable storage media such as RAM, ROM, Electrically Erasable Programmable Read Only Memory (EEPROM), hard drives, CD-ROM, optical storage devices, magnetic storage devices, electronic non-volatile computer storage devices such as flash memory, and other tangible storage media. Any such computer-readable storage media can be configured to store instructions or program code embodying aspects of the present disclosure. The memory 1404 and storage devices 1406 also include computer-readable signal media. Computer-readable signal media include propagated data signals in which computer-readable program code is embodied. Such propagated signals take any of a variety of forms, including but not limited to electromagnetic, optical, or any combination thereof. Computer-readable signal media include any computer-readable medium that can communicate, propagate, or transmit a program for use in connection with the computer system 1400, other than computer-readable storage media.

[0112] Additionally, memory 1404 includes an operating system, programs, and applications. Processor 1402 is configured to execute stored instructions and includes, for example, a logic processing unit, a microprocessor, a digital signal processor, and other processors. Memory 1404 and / or processor 1402 can be virtualized and hosted within another computing system, for example, in a cloud network or data center. I / O peripherals 1408 include keyboards, screens (e.g., touch screens), microphones, speakers, other input / output devices, and the like. The computer system 1400 includes a user interface such as a USB stick, a USB 3.0 port, a USB 2.0 port, a USB 3 ...

[0113] Although the subject matter has been described in detail with respect to specific embodiments thereof, it will be understood that those skilled in the art, upon achieving the above understanding, can easily generate modifications, variations, and equivalents to such embodiments. It is therefore to be understood that the present disclosure is presented for purposes of illustration and not limitation, and does not exclude the inclusion of such modifications, variations, and / or additions to the subject matter as would be readily apparent to those skilled in the art. In fact, the methods and systems described herein may be embodied in various other forms. Furthermore, various omissions, substitutions, and changes in the form of the methods and systems described herein can be made without departing from the spirit of the present disclosure. The appended claims and their equivalents are intended to cover such forms or modifications as fall within the scope and spirit of the present disclosure.

[0114] Unless otherwise indicated, throughout this specification, discussions utilizing terms such as "processing," "computing," "calculating," "determining," and "identifying" are understood to refer to operations or processes of a computing device, such as one or more computers or similar electronic computing devices or devices, that manipulate or transform data represented as physical electronic or magnetic quantities in the memory, registers, or other information storage, transmission, or display devices of the computing platform.

[0115] The one or more systems described herein are not limited to any particular hardware architecture or configuration. A computing device may include any suitable arrangement of components that provide results conditional on one or more inputs. Suitable computing devices include general-purpose microprocessor-based computing systems that access stored software that programs or configures the computing system, from general-purpose computing devices to dedicated computing devices that implement one or more embodiments of the present subject matter. Any suitable programming, scripting, or other type of language or combination of languages ​​may be used to implement the teachings contained herein in the software used to program or configure a computing device.

[0116] The method embodiments disclosed herein may be performed in operation of such a computing device. The order of the blocks shown in the above examples may be changed, e.g., the blocks may be rearranged, combined, and / or divided into sub-blocks. Certain blocks or processes may be performed in parallel.

[0117] Conditional language used herein, such as, among others, "can," "could," "might," "may," "eg," and the like, unless expressly stated otherwise or understood otherwise within the context of use, is generally intended to convey that particular examples include particular features, elements, and / or steps, but not other examples. Thus, such conditional language generally conveys that features, elements, and / or steps are present in some way in one or more examples. It is not intended to imply that one or more examples necessarily include logic for determining whether or not those features, elements and / or steps should be included or performed in any particular example, with or without author input or prompting.

[0118] Terms such as "comprising," "including," "having," and the like are synonymous and are used in an inclusive, open-ended manner and do not exclude additional elements, features, acts, operations, etc. Additionally, the term "or" is used in an inclusive (rather than exclusive) sense, e.g., when used to connect a list of elements, the term "or" may mean one, some, or all of the elements in the list. Use of "adapted to" or "configured to" herein means open, inclusive language that does not exclude devices adapted or configured to perform additional tasks or steps. Additionally, use of "based on" means open and inclusive in that a process, step, calculation, or other operation "based on" one or more enumerated conditions or values ​​may in fact be based on additional conditions or values ​​beyond those enumerated. Similarly, the use of "based at least in part on" is meant to be open and inclusive in that a process, step, calculation, or other action "based at least in part on" one or more recited conditions or values ​​may in fact be based on additional conditions or values ​​beyond those recited. The headings, lists, and numbering contained herein are for ease of description only and are not meant to be limiting.

[0119] The various features and processes described above may be used independently of each other or may be combined in various ways. All possible combinations and subcombinations are intended to fall within the scope of the present disclosure. Furthermore, in some implementations, certain method or process blocks may be omitted. The methods and processes described herein are also not limited to any particular sequence, and the blocks or states associated therewith may be performed in other sequences as appropriate. For example, the described blocks or states may be performed in an order other than the order specifically disclosed, or multiple blocks or states may be combined into a single block or state. The example blocks or states may be performed in serial, parallel, or in any other manner. Blocks or states may be added to or deleted from the disclosed examples. Similarly, the example systems and components described herein may be configured differently than described. For example, elements may be added, removed, or rearranged as compared to the disclosed examples.

Claims

1. 1. A computer-implemented method for classifying a stained image of a biological sample, comprising: Obtaining a machine learning model, a set of support images for a first stain image class of the first set of stain image classes, and an unclassified query image; generating an embedding for each supporting image in the set of supporting images based on the machine learning model; calculating a prototype of the first stained image class based on the embedding of the set of support images, the prototype of the first stained image class including an embedding representing the first stained image class; generating an embedding of the unclassified query image based on the machine learning model; and determining a similarity metric between the embedding of the unclassified query image and the prototype of the first stain image class; determining a classification of the unclassified query image based on the similarity metric, the classification including a prediction that the unclassified query image corresponds to the first stain image class; generating an output including the classification of the unclassified query image; 4. A computer-implemented method comprising:

2. The computer-implemented method of claim 1 , wherein the set of supporting images for the first stained image class includes a common type of staining artifact.

3. Determining the classification of the unclassified query image includes: determining that the similarity metric is greater than a predetermined threshold; determining an alternative classification for the unclassified query image in response to determining that the similarity metric is greater than the predetermined threshold, the alternative classification including a prediction that the unclassified query image is associated with a stain image class different from the first stain image class; 3. The computer-implemented method of claim 1, comprising:

4. Determining the similarity metric between the embedding of the unclassified query image and the prototypes of the first stain image class, encoding the embedding and the prototypes in a multi-dimensional embedding space; determining a distance between the embedding and the prototype encoded in the multi-dimensional embedding space; The computer-implemented method of any one of claims 1 to 3, comprising:

5. 5. The computer-implemented method of claim 1, wherein the machine learning model comprises a VGG network, an Inception network, a residual neural network (ResNet), a dense convolutional network (DenseNet), or a DenseNet-121 network.

6. The computer-implemented method of any one of claims 1 to 5, wherein the similarity metric comprises Manhattan distance, Euclidean distance, Chebyshev distance, Hamming distance, or cosine similarity.

7. determining a respective similarity metric between the embedding of the unclassified query image and a prototype of each remaining stain image class of the first set of stain image classes; determining the classification of the unclassified query image based on the respective similarity metrics; The computer-implemented method of any one of claims 1 to 6, further comprising:

8. accessing training images belonging to a second set of stained image classes; selecting a subset of stain image classes from the second set of stain image classes; For each stain image class of the subset of stain image classes, selecting a set of support images from the training images within the stained image class; generating an embedding of the set of supporting images based on the machine learning model; and Computing a prototype of the stain image class based on the embedding of the set of support images; For each stain image class of the subset of stain image classes, selecting a set of query images from the training images within the stained image class; generating embeddings for the set of query images based on the machine learning model; for each query image in the set of query images, calculating a similarity metric between the embedding of the query image and the prototypes of the subset of stain image classes; determining a respective classification for each query image in the set of query images based on the similarity metric; adjusting parameters of the machine learning model based on the classification of each of the set of query images in each stain image class of the subset of stain image classes; The computer-implemented method of any one of claims 1 to 7, further comprising:

9. The computer-implemented method of claim 8 , wherein the first stained image class is not included in the second set of stained image classes.

10. the machine learning model includes a pre-trained deep neural network including a fully connected layer, the pre-trained deep neural network being trained using images that do not include stained images; 10. The computer-implemented method of claim 8 or 9, wherein tuning the parameters of the machine learning model comprises tuning parameters of the fully connected layer.

11. The computer-implemented method of any one of claims 8 to 10, wherein a number of stain image classes in the subset of stain image classes is less than a number of stain image classes in the first set of stain image classes.

12. 11. The computer-implemented method of claim 1, wherein computing the prototype of the first stained image class comprises computing a mean, median, or center of the embedding of the set of support images.

13. 1. A system comprising: one or more data processors; A non-transitory computer readable storage medium comprising instructions which, when executed on said one or more data processors, cause said one or more data processors to perform the method of any one of claims 1 to 12. A system comprising:

14. A non-transitory computer-readable storage medium storing computer-executable instructions that, when executed by one or more processing devices, cause the one or more processing devices to perform the method of any one of claims 1 to 12.

Citation Information

Patent Citations

  • Data analysis processing device and data analysis processing program

    JP2019091454A

  • Incremental learning framework for object detection in videos

    US20170109582A1

  • Generalizable and Interpretable Deep Learning Framework for Predicting MSI from Histopathology Slide Images

    US20190347557A1

  • Data processing apparatus by learning of neural network, data processing method by learning of neural network, and recording medium recording the data processing method

    US20200257970A1