IP Library Granted Patent US 12670703
Granted Patent B2
US 12670703 · App. 18/565,328 · Granted Jun 30, 2026

Microscopy system and method for generating a virtually stained image

Inventors: Alexander Freytag (Erfurt, DE); Matthias Eibl (Jena, DE); Christian Kungel (Penzberg, DE); Anselm Brachmann (Jena, DE); Daniel Haase (Zoellnitz, DE); Manuel Amthor (Jena, DE)
Assignee: Carl Zeiss Microscopy GmbH
G06V10/776G06T11/00G06V10/774G06V10/993G06V20/695G06V20/698
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12670703
App. No.
18/565,328
Granted
Jun 30, 2026
Kind
B2
Abstract

A computer-implemented method for generating an image processing model that calculates a virtually stained image from a microscope image comprises a training of the image processing model using training data comprising at least: microscope images as input data into the image processing model; target images formed using captured chemically stained images; and predefined segmentation masks that discriminate between image regions to be stained and image regions that are not to be stained. The image processing model is trained to calculate virtually stained images from the input microscope images by optimizing a staining reward/loss function that captures a difference between the virtually stained images and the target images. The predefined segmentation masks are taken into account in the training of the image processing model to compensate errors in the chemically stained images.

Claims (62)

1 . A computer-implemented method for generating an image processing model in order to calculate a virtually stained image from a microscope image, the method comprising:

training the image processing model using training data comprising at least:

microscope images as input data into the image processing model, and

target images formed using captured chemically stained images that are registered locally in relation to the microscope images;

wherein the image processing model is trained to calculate virtually stained images from the input microscope images by optimizing a staining reward/loss function that captures a difference between the virtually stained images and the target images;

wherein the training data additionally comprises predefined segmentation masks, wherein the predefined segmentation masks discriminate between image regions to be stained and image regions that are not to be stained;

wherein the predefined segmentation masks are taken into account in the training of the image processing model to compensate errors in the chemically stained images;

wherein the image processing model is trained to calculate not only a virtually stained image but also a segmentation mask from an input microscope image, wherein in the training a segmentation reward/loss function to be optimized is used, which captures differences between the segmentation masks calculated by the image processing model and the predefined segmentation masks.

2 . The computer-implemented method according to claim 1 , wherein the predefined segmentation masks are taken into account when the target images are formed from the chemically stained images and/or in the staining reward/loss function.

3 . The computer-implemented method according to claim 1 , further comprising:

taking into account the predefined segmentation masks for a variable weighting in the staining reward/loss function by weighting differences between the virtually stained images and the target images differently for different image regions as a function of the predefined segmentation masks.

4 . The computer-implemented method according to claim 3 , wherein an image region that is stained in one of the chemically stained images is given a weaker weighting if a locally corresponding image region in the associated predefined segmentation mask is designated as not to be stained.

5 . The computer-implemented method according to claim 3 , wherein a weighting of an image region that is designated as to be stained in one of the predefined segmentation masks is defined as a function of a stain strength in a locally corresponding image region of the associated chemically stained image,

wherein the weighting is lower when the stain strength is weaker.

6 . The computer-implemented method according to claim 1 , further comprising:

generating the target images from the chemically stained images and the associated predefined segmentation masks by deleting or computationally destaining stained image regions of a chemically stained image if the locally corresponding image regions in the associated predefined segmentation mask are designated as not to be stained.

7 . The computer-implemented method according to claim 1 , wherein image regions of lint or other artefacts, which do not belong to a sample to be analyzed and which appear in the chemically stained images as stained image regions, are registered in the predefined segmentation masks as image regions that are not to be stained.

8 . The computer-implemented method according to claim 1 , wherein an artefact detection program is run to generate a predefined segmentation mask,

wherein the artefact detection program classifies regions to be stained in a segmentation mask as artefacts as a function of their shape and size, and

wherein the artefact detection program registers image regions that have been classified as artefacts in the segmentation mask as image regions that are not to be stained.

9 . The computer-implemented method according to claim 1 , wherein in the training a consistency reward/loss function to be optimized is used, which captures a consistency between a virtually stained image calculated by the image processing model and a segmentation mask calculated by the image processing model.

10 . The computer-implemented method according to claim 9 , wherein in the training the staining reward/loss function, the segmentation reward/loss function, and the consistency reward/loss function are optimized together.

11 . The computer-implemented method according to claim 1 , wherein the image processing model comprises an encoder-decoder structure in which the same encoder is used with different decoders to calculate the virtually stained image and the calculated segmentation mask.

12 . The computer-implemented method according to claim 1 , wherein the image processing model is trained to calculate not only a virtually stained image and a segmentation mask from an input microscope image, but also to calculate, acting as an autoencoder, a microscope image reconstruction which shall correspond with the input microscope image;

wherein the image processing model comprises an encoder-decoder structure in which the same encoder is used with different decoders to calculate the virtually stained image, the calculated segmentation mask and the microscope image reconstruction.

13 . A computer-implemented method for generating a virtually stained image, comprising:

obtaining a microscope image;

calculating a virtually stained image using the microscope image by means of an image processing model generated according to claim 12 .

14 . The computer-implemented method according to claim 13 , wherein a calculated segmentation mask is also formed from an input microscope image by means of the image processing model;

wherein a refined virtually stained image is calculated by multiplying the virtually stained image by the calculated segmentation mask.

15 . The computer-implemented method according to claim 13 , wherein the image processing model calculates, acting as an autoencoder, a microscope image reconstruction from the microscope image;

wherein the microscope image is classified to appear suitable for the image processing model as a function of differences between the microscope image and the microscope image reconstruction.

16 . The computer-implemented method according to claim 1 , wherein after completion of the training a follow-up training of the image processing model is carried out, wherein in the follow-up training:

only a part of the image processing model that generates virtually stained images is trained further; while a part of the image processing model that generates calculated segmentation masks is kept constant in the follow-up training;

training data comprising microscope images and captured chemically stained images but no predefined segmentation masks is used;

the image processing model generates a calculated segmentation mask for each of the microscope images;

the calculated segmentation masks are used to compensate errors in the chemically stained images.

17 . The computer-implemented method according to claim 16 , wherein in the follow-up training a consistency reward/loss function to be optimized is used, which captures a consistency between a virtually stained image calculated by the image processing model and a segmentation mask calculated by the image processing model.

18 . The computer-implemented method according to claim 16 , wherein a number of microscope images and associated chemically stained images used in the follow-up training is greater than a number of microscope images and associated chemically stained images used in the previous training.

19 . A non-transitory computer-readable medium, comprising commands, which, when executed by a computer, cause the computer to execute the method according to claim 1 .

20 . A microscopy system comprising:

a microscope for image capture; and

a computing device that is configured to carry out a computer-implemented method for generating an image processing model in order to calculate a virtually stained image from a microscope image, the method comprising:

training the image processing model using training data comprising at least:

microscope images as input data into the image processing model, and

target images formed using captured chemically stained images that are registered locally in relation to the microscope images;

wherein the image processing model is trained to calculate virtually stained images from the input microscope images by optimizing a staining reward/loss function that captures a difference between the virtually stained images and the target images;

wherein the training data additionally comprises predefined segmentation masks,

wherein the predefined segmentation masks discriminate between image regions to be stained and image regions that are not to be stained;

wherein the predefined segmentation masks are taken into account in the training of the image processing model to compensate errors in the chemically stained images;

wherein the computing device is configured to display to a user microscope images, associated chemically stained images and an input tool via which the user can draw, correct or verify associated segmentation masks, and wherein these segmentation masks are then used as predefined segmentation masks in the training.

21 . The microscopy system according to claim 20 ,

wherein the image processing model is trained to calculate not only a virtually stained image but also a segmentation mask from an input microscope image,

wherein in the training a segmentation reward/loss function to be optimized is used, which captures differences between the segmentation masks calculated by the image processing model and the predefined segmentation masks.

22 . A computer-implemented method for generating an image processing model in order to calculate a virtually stained image from a microscope image, the method comprising:

training the image processing model using training data comprising at least:

microscope images as input data into the image processing model, and

target images formed using captured chemically stained images that are registered locally in relation to the microscope images;

wherein the image processing model is trained to calculate virtually stained images from the input microscope images by optimizing a staining reward/loss function that captures a difference between the virtually stained images and the target images;

wherein the training data additionally comprises predefined segmentation masks, wherein the predefined segmentation masks discriminate between image regions to be stained and image regions that are not to be stained;

wherein the predefined segmentation masks are taken into account in the training of the image processing model to compensate errors in the chemically stained images; and

taking into account the predefined segmentation masks for a variable weighting in the staining reward/loss function by weighting differences between the virtually stained images and the target images differently for different image regions as a function of the predefined segmentation masks.