System and method for detecting anomalies in images

DE102020211214B4Active Publication Date: 2026-07-09SIEMENS HEALTHINEERS AG
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
DE · DE
Patent Type
Patents
Current Assignee / Owner
SIEMENS HEALTHINEERS AG
Filing Date
2020-09-07
Publication Date
2026-07-09

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

The invention describes a method for generating a system (6) for detecting anomalies in images, comprising the following steps: - providing a generative network and / or an autoencoder (10) (“G / A network”), a Siamese network (8), a first training dataset (T1) comprising normal images, and a second training dataset (T2) comprising abnormal images; - training the G / A network (10) to generate latent data (LD) from input images (IP) and output images (OP) from the latent data (LD), wherein the training is performed using images from the first training dataset, and wherein a loss function is used for training at least at the beginning of the training, the loss function increasing the similarity of the input images (IP) and respective output images (OP); - training the Siamese network (8) to generate similarity measures (S) between input images (IP) and respective output images (OP).The training with images from the first training dataset (T1) and the second training dataset (T2) is performed by using images from both training datasets (T1, T2) as input images (IP) for the G / A network (10) and comparing output images (OP) of the G / A network (10) with their respective input images (IP) via the Siamese network (8). The invention further describes a related system and method for detecting anomalies in images and a related imaging system.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] The invention describes a system and a method for detecting anomalies in images, as well as a method for generating such a system and a medical imaging system. The anomalies in images are preferably detected using confidence levels generated by the system.

[0002] In the technical field of machine learning, systems, particularly those comprising a deep neural network framework, are sometimes used. These systems are capable of learning from a set of training images and generating new images with the same features as the training images. Several embodiments of such systems exist, differing in their internal structure, but all sharing the common feature of a first neural network (the "input network") that converts an input image into a set of systematic data, such as features or a code (hereinafter referred to as "latent data"), and a second neural network (the "output network") that generates images based on the latent data. The output images generated from the latent data of input images should resemble the input images.

[0003] Such systems include, for example, "generative networks," with specific implementations being generative adversarial networks (GANs) or generative query networks (GQNs). Other examples are autoencoders, particularly variable autoencoders (VAEs). Besides their use for image compression, they (especially their output network) can also be used to generate photorealistic objects, such as faces, that are entirely fictional.

[0004] An example of a network in the technical field of the invention is an autoencoder, i.e., an architecture of an artificial neural network capable of learning a representation (encoding) for an image (typically for dimensionality and / or noise reduction) based on unsupervised learning of data encodings. Additionally, a reconstruction side (decoding) is trained along with the encoding, whereby the autoencoder generates output images based on the reduced encoding (latent data), with the output images being representations that are as close as possible to the original input images. Accordingly, an autoencoder comprises an input layer, an encoding network (as the input network), a latent space containing the encoding (latent data), a decoding network (as the output network), and an output layer. Special autoencoders are variational autoencoders (VAEs), which are generative models.

[0005] These networks are often used for generating images or for recognizing and classifying images.

[0006] One disadvantage of generative networks is that the training is very complicated and can lead to systematic errors.

[0007] A serious problem with recognition and classification networks is their lack of reliability, especially when using deep neural networks, because the credibility of the output depends heavily on the training. For example, training on noisy or incorrect images could easily lead to high-confidence mispredictions. Particularly in medical image classification, such as anomaly detection tasks, the problem of unbalanced data arises, making the deep learning training process difficult.

[0008] Accordingly, a major drawback of recognition and classification networks is the lack of a measure for the reliability of their output. With regard to medical images in particular, it should be noted that accurate annotation of medical images requires significant effort and expense and can be subject to uncertainties within the images themselves. Additionally, medical images may contain noise, for example, as a result of dose reduction. Because training a deep learning model on noisy or uncertain ground-truth data could lead to false results with a high degree of confidence, this is, as mentioned above, particularly problematic for clinical decision-making.

[0009] The object of the present invention is to improve known systems, devices, and methods to enable an improvement in image processing and, in particular, in the training of a recognition and classification network. A further preferred object is to generate a (confidence) rating as a measure of reliability for the detection and classification of anomalies in images.

[0010] This problem is solved by a method according to claim 1, a system according to claim 10, a method for detecting anomalies according to claim 12 and an imaging system according to claim 13.

[0011] This invention relates to neural networks, which are algorithms or models that need to be trained. The basic principles of machine learning are well known to those skilled in the art. Apart from a suitable loss function for solving a specific problem (also well known), the nature of the training data and the ground truth (labels frequently applied to the data) are crucial. Accordingly, a (trained) neural network or a group of (trained) neural networks, if the loss function is clear, can be defined by the specific training procedure.

[0012] The system according to the invention for detecting anomalies in images is trained by a special method.

[0013] A method according to the invention for generating a system for detecting anomalies in images, particularly in medical images, comprises the following steps: - Providing a generative network and / or an autoencoder.

[0014] Typically, either a generative network or an autoencoder (network) is provided, although a combination of a generative network and an autoencoder could also be provided. The generative network and / or the autoencoder (the network) will also be referred to as the "G / A network" below for readability. As mentioned above, the basics of G / A networks are well known to experts. The respective networks comprise a first neural network ("input network") that converts an input image into a set of systematic data, such as features or a code (hereinafter "latent data" or "latent features"), and a second neural network ("output network") that generates images from the latent data. The output images generated from input images using latent data should look similar to the input images. Loss functions for such G / A networks are well known to experts.The G / A network, in particular, has not yet been trained. However, it could also be an already trained G / A network that is now being further trained according to the procedure. - Providing a Siamese net.

[0015] A Siamese network (sometimes also called a "Siamese neural network" or "neural twin network") is an artificial neural network that uses the same weights while simultaneously acting on two different input vectors to compute comparable output vectors. In relation to the field of the invention, the input vectors are input images and output images of a generative network, or its latent data (compared with latent data generated from the output images). The output vector of this Siamese network is a similarity measure. Accordingly, images generated by the G / A network are compared with their respective original images. The basic principles of training Siamese networks are well known. For example, training can be achieved using triplet loss or contrastive loss. In this particular case, the Siamese network is not yet trained.However, it could also be an already trained network that is now being further trained according to the procedure. - Providing an initial training dataset consisting of normal images.

[0016] The term "normal images" refers to images of objects in their normal state, where "normal" denotes a predefined state in which objects should be, or a correct state. In the context of medical images, "normal" means a healthy state. In the context of product quality, "normal" means a defect-free or desired state. The nature of the images determines the type of problem the system will later solve. It is preferred that the images be medical images (for a medical application) or images of products (for quality assurance). For example, the images in the first dataset are images of a healthy organ or body region.

[0017] The images from the first training dataset are preferably labeled as normal images to provide ground truth. However, the mere knowledge that images from the first dataset are used for training could also be considered ground truth. - Providing a second training dataset containing abnormal images.

[0018] The term "abnormal images" refers to images of objects in a state that differs from their normal state—that is, a state in which objects should not be, or an incorrect state. In the context of medical images, "abnormal" signifies a pathological condition. In the context of product quality, "abnormal" signifies a faulty or defective condition. It is clear that the abnormal images depict the same type of objects as the normal images, with the difference that the objects are now not normal. Following the previous example, the images in the second dataset represent images of a non-healthy organ or body region.

[0019] The images from the second training dataset are preferably labeled as abnormal images to provide ground truth. However, the mere knowledge that images from the second dataset are used for training could also be considered ground truth. - Training the G / A network to generate latent data from input images and output images from the latent data, wherein the training is performed using images from the first data set, using a loss function for training at least at the beginning of the training (later the Siamese network could possibly replace the loss function), where the loss function increases the similarity of the input images and the respective output images.

[0020] The G / A network uses its input network to generate latent data, specifically a set of codes or features, based on the normal images from the initial training dataset. To later compare the input and output of the G / A network, the output network generates images based on the latent data.

[0021] Suitable loss functions that increase the similarity between the input and output images are well known to experts, such as reconstruction loss functions, which address image similarity, or perceptual loss functions, which address the latent data of images. With respect to perceptual loss, the output images must be reprocessed by the first network (or a network identical to the first) to generate latent data, specifically a code or feature set, of the output images. Accordingly, the G / A network is trained to learn how to reconstruct examples from normal images, such as a majority class that often comprises the normal examples for a medical anomaly detection task. The G / A network could, for example, be one of the architectures of a variational autoencoder or a generative adversarial network.

[0022] It should be noted that a G / A network does not aim to produce identical output images, i.e., output where the pixels of the input images are processed pixel by pixel. The latent images always represent features or an encoding of the image that does not include the direct values ​​and / or coordinates of pixels. Accordingly, by training the G / A network exclusively on normal images (e.g., images of a healthy organ), it will not "understand" abnormal states of the object. Consequently, output images of abnormal subjects (e.g., images of a pathological organ) that are processed later (not during training) by the G / A network will bear less resemblance to their respective input images than when normal images are processed. Preferably, the G / A network is trained on a large training dataset containing report statements, without requiring explicit annotation. - Training the Siamese network to generate similarity measures (also called "similarity metric") between input images and respective output images, whereby the training with images from the first training dataset and the second training dataset is carried out by using images from both datasets as input images for the G / A network and comparing output images of the G / A network with their respective input images through the Siamese network.

[0023] Naturally, the Siamese network needs to know whether a normal or abnormal image is being input in order to learn similarity differences. As mentioned above, direct labels of the images can be used, or the training dataset itself can act as the label. The basic principles of generating a similarity measure are well-known, with the similarity measure typically being a value that is higher the better the similarity and lower the similarity. In short, the task of the Siamese network is to learn whether two input images are similar or different, so a similarity metric is learned based on the reconstructed output of a G / A network.It is preferably trained to maximize the similarity measure when a normal sample is available and its reconstruction is provided, and to minimize the similarity measure when an abnormal sample is measured and its reconstruction is provided.

[0024] The similarity measures generated by the Siamese network can preferably be used in an active learning setup to guide an annotation process with recommendations, especially for further training of the G / A network.

[0025] A system according to the invention for detecting anomalies in images comprises the following components: - a generative network and / or an autoencoder that has been trained by the method according to the invention, - a Siamese network trained by the inventive method. This Siamese network is connected to the G / A network so that it is able to compare input images with its output images generated by the G / A network.

[0026] Although there might be alternative arrangements for training, it is preferred that this arrangement (or another arrangement relating to the system described below) also be used for training the networks.

[0027] A method according to the invention for detecting anomalies in images comprises the following steps: - Providing an image as input for a system according to the invention, - Receiving a similarity measure for this image (by outputting the Siamese net), - if the similarity measure is beyond a predefined similarity threshold, classifying an abnormality in the image, in particular depending on the area of ​​the abnormality, which can preferably be achieved with a classification network described below.

[0028] Optionally, input images can be processed multiple times to generate several output images and corresponding similarity measures, preferably with each input image. Accordingly, there are two or more similarity metrics for each input image. This makes it possible and advantageous to generate a probability distribution (or a non-normalized similarity distribution) over the similarity measures.

[0029] It is clear that "beyond" a threshold means "in a range of abnormal events." In terms of a typical similarity measure, where good similarities result in a high measure and poor similarities result in a low measure, "beyond" means below the threshold.

[0030] A control device according to the invention for controlling an imaging system comprises a system according to the invention. Alternatively or additionally, it is configured to carry out the method according to the invention. The control device can include additional units or devices for controlling components of an imaging system, for example, a sequence control unit for controlling the measurement sequence, a memory, a transmitter that generates, amplifies, and transmits radiation, a magnetic system interface, a radiation receiver for acquiring signals, and / or a reconstruction unit for reconstructing image data.

[0031] An imaging system according to the invention comprises a control device according to the invention. Accordingly, an imaging system according to the invention comprises a system according to the invention and / or is configured to carry out a method according to the invention. Preferred imaging systems are medical imaging systems, for example, computed tomography (CT) systems or magnetic resonance imaging systems.

[0032] Some units or modules of the aforementioned system or control device can be implemented wholly or partially as software modules running on a processor of the system or control device. Implementation largely in the form of software modules can have the advantage that applications already installed on an existing system can be updated with relatively little effort to install and execute these units of the present application. The object of the invention is also achieved by a computer program product comprising a computer program that can be directly loaded into the memory of a device of a system or a control device of an imaging system and that includes program units for executing the steps of the method according to the invention when the program is executed by the control device or the system.In addition to the computer program, such a computer program product may also include other parts such as documentation and / or additional components, including hardware components such as a hardware key (dongles, etc.) to enable access to the software.

[0033] A computer-readable medium, such as a USB flash drive, hard drive, or other portable or permanently installed storage device, can be used to transport and / or store the executable parts of a computer program product so that they can be read by a processor unit of a control device or system. A processor unit can comprise one or more microprocessors or their equivalents.

[0034] Particularly advantageous embodiments and features of the invention are specified by the dependent claims, as set out in the following description. Features of different claim categories can be appropriately combined to generate further embodiments not described here.

[0035] According to a preferred method, the G / A network is trained by comparing an input image with its output image generated by the G / A network. The images can be compared directly or indirectly using data generated from the images by identical processes. It is preferred that the comparison be performed using a reconstruction loss function. It is preferred to compare the images directly (comparison of the image data). Alternatively or additionally, data generated by a first network of the G / A network, in particular latent data, are compared with data additionally processed by the first network, in particular using a perceptual loss function. The first network of the G / A network is preferably an encoder network, such that the data is an encoding or a feature set of the image.It is preferred that the training be supported by an already trained (second) Siamese network to replace a reconstruction loss function and / or a perceptual loss function.

[0036] According to a preferred method, the Siamese network is trained to generate similarity measures directly by comparing the images (comparing the image data) between the input images and their respective output images. Alternatively or additionally, the Siamese network is trained to generate similarity measures between the input images and their respective output images indirectly using data, particularly latent data, generated by a first network of the G / A network. This latent data is then compared with data from output images additionally processed by the first network. The first network of the G / A network is preferably an encoder network, such that the data is an encoding or a set of features of the image.

[0037] According to a preferred method, the G / A network is a generative adversarial network (GAN) or an autoencoder, in particular a variable autoencoder (VAE). A generative adversarial network (GAN) is a class of machine learning frameworks in which two neural networks compete with each other.

[0038] According to a preferred method, the Siamese network is trained to generate a similarity threshold on the similarity measures, where the similarity threshold indicates the processing of an abnormal image by the G / A network. It preferably learns the threshold on the similarity measure using both normal and abnormal examples from the training datasets. This is advantageous for a final binary decision ("normal" or "abnormal"), but not necessary if samples are ranked according to their similarity. It is clear that the threshold is chosen such that it separates normal images from abnormal images.

[0039] According to a preferred method, the Siamese network is trained to normalize similarity measures, the normalization preferably being based on a validation dataset. A validation dataset is a separate training dataset. Validation data from the validation dataset is primarily used to fine-tune the hyperparameters of a network and to monitor loss behavior during training. Normalized similarity measures can be set as a "confidence level." Using this confidence level (or by otherwise comparing the similarity measure to predefined values), automated annotations can be made based on predictions with a high degree of confidence. Using the similarity measure as a confidence level has the advantage of providing clinicians with a measure of the reliability of the system output.

[0040] Preferably, the system (and / or the training setup) comprises a classification network connected to the output of the Siamese network, preferably such that it receives a similarity score if it exceeds a predefined similarity threshold, and particularly only in this case, so that normal images (with a high similarity score) are not classified. The classification network receives output images or latent data from the G / A network or input images as input and classifies its input data. For example, normal images of a healthy coronary artery are not classified because they have a high similarity score (the G / A network is trained on healthy coronary arteries), while abnormal images of diseased coronary arteries have a low similarity score. Accordingly, the image of a diseased coronary artery is preferably further classified into the categories "calcified," "non-calcified," or "mixed."

[0041] According to a preferred method, a classification network is additionally trained so that it is able to classify images using similarity measures generated by the Siamese network and / or data generated by the G / A network. Preferably, the classification network is trained using images from the second training dataset and / or the latent data of the G / A network and / or the output images of the G / A network generated from the second training dataset as an input feature set. The classification network is preferably trained using the latent data and / or the output images of the G / A network and / or the similarity measure of the Siamese network. The similarity measure is preferably used to filter out "normal examples." Accordingly, the preferred method can be extended by training a classifier on abnormal examples to support multi-class prediction.

[0042] According to a preferred method, the Siamese network is trained to generate a spatially resolved similarity measure of images. This means monitoring where the similarity is high and where it is low in the image. This can be achieved, in particular, by segmenting an image into sub-images and / or segmenting a stack of images (for example, a 3D image) into image sections and / or using the coordinates of pixels in the images. It is preferred that a classification depends on a region in an image and the respective similarity measure of that region. For example, if low similarity is found in a region where the heart is normally located, a heart condition is assumed to be present.

[0043] According to a preferred method, the training is end-to-end. Alternatively or additionally, results generated by the Siamese network are used to further train the G / A network, and / or results generated by the G / A network are used to further train the Siamese network.

[0044] In a preferred system according to the invention, components of the system are part of a data network, wherein the data network and an imaging system (in particular a medical system) are preferably in communication with each other, wherein the data network preferably comprises parts of the internet and / or a cloud-based computing system, and wherein the system according to the invention or a number of components of this system are preferably implemented in this cloud-based computing system. For example, the components of the system are part of a data network, wherein the data network and a medical imaging system that provides the image data are preferably in communication with each other. Such a networked solution could be implemented via an internet platform and / or in a cloud-based computing system.

[0045] The process may also incorporate elements of cloud computing. In the technical field of cloud computing, an IT infrastructure, such as storage space, processing power, and / or application software, is provided via a data network. Communication between the user and the cloud is achieved through data interfaces and / or data transmission protocols.

[0046] In connection with "cloud computing," according to a preferred embodiment of the method according to the invention, data is provided to a "cloud" via a data channel (for example, a data network). This "cloud" comprises a (remote) computing system, for example, a computer cluster, which typically does not include the user's local machine. This cloud can be made available, in particular, by the medical facility that also provides the (medical) imaging systems. Specifically, the image acquisition data is sent to a (remote) computer system (the "cloud") via a RIS (Radiology Information System) or a PACS (Picture Archiving and Communication System).

[0047] Within the scope of a preferred embodiment of the system according to the invention, the aforementioned components are located on the "cloud" side. A preferred system further comprises a local computing unit that is connected to the system via a data channel (for example, a data network, which is particularly designed as a RIS or PACS). The local computing unit has at least one data reception interface for receiving data. Furthermore, it is preferred if the local computer also has a transmission interface for sending data to the system.

[0048] The invention enables annotation processes to be carried out more efficiently and less costly through active learning, whereby the Siamese network identifies cases with high uncertainty from an unlabeled pool for annotation or outliers with high uncertainty from a labeled pool for further inspection.

[0049] Other objects and features of the present invention will become clear with reference to the following detailed descriptions, which are considered in conjunction with the accompanying drawings. It should be understood, however, that the drawings serve solely for illustration and not to define the limits of the invention.

[0050] They show: Fig. 1 a simplified CT system according to an embodiment of the invention, Fig. 2 an embodiment for training a G / A network with an estimation of a reconstruction loss, Fig. 3 an embodiment for training a G / A network with an estimation of a perceptual loss, Fig. 4 a schematic embodiment of a system according to the invention with a Siamese net, Fig. 5 a schematic embodiment of a system according to the invention with a Siamese network and a classification network, Fig. 6 a schematic embodiment of a system according to the invention with a Siamese net and Fig. 7 a block diagram of the process flow of a preferred training method according to the invention.

[0051] In the diagrams, identical numbers refer to identical objects throughout. Objects in the diagrams are not necessarily drawn to scale.

[0052] Fig. Figure 1 shows a simplified computed tomography system 1 with a control device 5, which includes a system 6 for carrying out the method according to the invention. The computed tomography system 1 has, as usual, a scanner 2 with a gantry in which an X-ray source 3 with a detector 4 rotates around a patient, and it records raw data RD, which are subsequently reconstructed into images by the control device 5.

[0053] It should be noted that the exemplary embodiment shown in this figure is only one example of an imaging system and that the invention can theoretically be used in any imaging system employed in a medical or non-medical setting. Likewise, only those components essential for explaining the invention are shown. In principle, such imaging systems and associated control devices are known to those skilled in the field and therefore do not require a detailed explanation.

[0054] The imaging system (here the CT system 1) records images that are used for training the system 6 according to the invention, and after training, images from the imaging system are processed by the system 6 according to the invention.

[0055] To generate a training dataset (first training dataset T1 and second training dataset T2), a user can examine CT images and label them as normal or abnormal (for example, images showing disease-induced changes). The examination can be performed on an end device 7 that can communicate with the control device 5. This end device can also be used to examine results from the system 6 according to the invention.

[0056] Fig. Figure 2 shows an embodiment for training a G / A network 10, here an autoencoder 10, with an estimation of a reconstruction loss. In this example, the G / A network is preferably a variational autoencoder (VAE) and comprises an input layer 11, a coding network 12 as the first network 12, a latent space 13 (which can also be called a "feature space") for storing the latent data LD, a decoding network 14 as the second network 14, and an output layer 15.

[0057] Input images IP are provided to input layer 11 and encoded by the coding network 12 by forming latent data LD (for example, a feature set) in latent space 13. The latent data LD are then decoded again by a decoding network 14, and the output layer provides output images OP, which should serve as the input images (but are not identical to them).

[0058] By comparing the input images IP with their respective output images OP, it is possible to determine how well the G / A network 10 is matched. Training can be achieved by applying a loss function that maximizes similarity.

[0059] In this example, input images IP are directly compared with their output images OP using a reconstruction loss function.

[0060] Fig. Figure 3 shows an embodiment for training a G / A network 10 with an estimation of perceptual loss. The network is similar to the one in Fig. The two depicted G / A networks 10 differ in that the output images OP are again encoded by a coding network 12. This coding network 12 should have identical preferences to the coding network 12 that encodes the input images and could be identical to it.

[0061] In this example, coded input images IP are compared with coded output images OP using a perceptual loss function.

[0062] Fig. Figure 4 shows a schematic embodiment of a system according to the invention with a Siamese net 8. A G / A net 10 (as in Fig. (2 shown) generates output images OP based on input images IP. In contrast to Fig. 2. A conjoined network 8 compares the input images IP with their respective output images OP. During the training phase, the conjoined network 8 is trained with normal and abnormal images and is able to determine a similarity measure S (also called a "similarity metric"). An example of a training procedure is shown in Fig. Figure 7 shows the output of the Siamese net (Figure 8) as the similarity measure S.

[0063] Fig. Figure 5 shows a schematic embodiment of a system 6 according to the invention with a Siamese network 8 and a classification network 9. A Fig. The arrangement shown in Figure 4 is extended by a classification network 9, which processes the results of the Siamese network 8. Normal results with a high degree of similarity are not processed by classification network 9. However, if the similarity falls below a certain predefined threshold, classification network 9 processes the results of Siamese network 8 and derives possible classifications for the input images IP (which are then abnormal and, for example, show pathologies).

[0064] Fig. Figure 6 shows a schematic embodiment of a system 6 according to the invention with a Siamese net 8. This example is similar to the one in Figure 6. Fig. 4. Example shown, with the difference that coded input images IP are compared with coded output images OP through the Siamese network 8.

[0065] Fig. Figure 7 shows a block diagram of the process flow of a preferred training method according to the invention.

[0066] In step I, an (untrained) G / A network 10 is provided.

[0067] In step II, an (untrained) Siamese net 8 is provided.

[0068] In step III, a first training dataset T1, comprising normal images, is provided.

[0069] In step IV, a second training dataset T2, which includes abnormal images, is provided.

[0070] In step V, the G / A network 10 is trained to generate latent data LD based on input images IP and output images OP based on the latent data LD (see, for example, Fig.2) to generate, wherein the training is performed using images from the first training data set T1, wherein a loss function is used for the training at least at the beginning of the training, the loss function increasing the similarity of the input images IP and the respective output images IP.

[0071] In step VI, the Siamese network 8 is trained to generate similarity measures S between input images IP and respective output images OP, whereby the training with images of the first training data set T1 and the second training data set T2 is carried out by using images of both training data sets T1, T2 as input images for the G / A network 10 and comparing output images OP of the G / A network 10 with their respective input images IP by the Siamese network 8.

[0072] Although the present invention has been disclosed in the form of preferred embodiments and modifications thereof, it is understood that numerous additional modifications and alterations could be made to it without altering the scope of protection of the invention. For the sake of clarity, it should be understood that the use of "one" in this application does not exclude multiple embodiments and that "comprehensive" does not exclude other steps or elements. The mention of a "unit" or a "device" does not preclude the use of more than one unit or device.

Claims

[1] Method for generating a system (6) for detecting anomalies in images, comprising the following steps: - Providing a generative network and / or an autoencoder (10), - Providing a Siamese net (8), - Providing an initial training dataset (T1) consisting of normal images, - Providing a second training dataset (T2) that includes abnormal images, - Training the generative network and / or the autoencoder (10) to generate latent data (LD) from input images (IP) and output images (OP) from the latent data (LD), wherein the training is performed using images from the first training data set, wherein a loss function is used for training at least at the beginning of the training, wherein the loss function increases the similarity of the input images (IP) and respective output images (OP), - Training the Siamese network (8) to generate similarity measures (S) between input images (IP) and respective output images (OP), wherein the training with images of the first training data set (T1) and the second training data set (T2) is carried out by using images of both training data sets (T1, T2) as input images (IP) for the generative network and / or the autoencoder (10) and comparing output images (OP) of the generative network and / or the autoencoder (10) with their respective input images (IP) by the Siamese network (8). [2] Method according to claim 1, wherein the generative network and / or the autoencoder (10) is trained by comparing an input image (IP) with its output image (OP) generated by the generative network and / or the autoencoder (10), in particular using a reconstruction loss function, and / or by comparing data generated by a first network (12) of the generative network and / or the autoencoder (10) with data from output images (OP) that were additionally processed by the first network (12), in particular using a perceptual loss function, wherein the training is preferably supported by a second Siamese network (8) that has already been trained to replace a reconstruction loss function and / or a perceptual loss function. [3] Method according to any of the preceding claims, wherein the Siamese network (8) is trained to generate similarity measures (S) between the input images (IP) and respective output images (OP), directly by comparing the images and / or indirectly by comparing data generated by means of a first network (12) of the generative network and / or the autoencoder (10), in particular an encoder network (12), with data generated by additional processing of the respective output images (OP) with the first network (12). [4] Method according to any of the preceding claims, wherein the generative network and / or autoencoder (10) is a generative adversarial network (GAN) or a variable autoencoder (VAE). [5] Method according to any of the preceding claims, wherein the Siamese network (8) is trained to generate a similarity threshold on the similarity measures (S), the similarity threshold indicating the processing of an abnormal image by the generative network and / or the autoencoder (10). [6] Method according to one of the preceding claims, wherein the Siamese network (8) is designed to normalize similarity measures (S), the normalization preferably being based on a validation data set. [7] Method according to one of the preceding claims, wherein a classification network (9) is additionally trained so that it is able to classify images using similarity measures (S) generated by the Siamese network (8), wherein the classification network (9) is preferably trained using images from the second training data set (T2) and / or the latent data (LD) and / or the output images (OP) generated by the generative network and / or the autoencoder (10) on the basis of the second training data set (T2) and preferably also the similarity measure (S) of the Siamese network (8). [8] Method according to one of the preceding claims, wherein the Siamese network (8) is trained to generate a spatially resolved similarity measure (S) of images, wherein a classification preferably depends on an area in an image and the respective similarity measure (S) of this area. [9] Method according to any of the preceding claims, wherein the training is end-to-end training and / or wherein results generated by the Siamese network (8) are used to further train the generative network and / or the autoencoder (10), and / or wherein results generated by the generative network and / or the autoencoder (10) are used to further train the Siamese network (8). [10] System for detecting anomalies in images, which includes the following: - a generative network and / or an autoencoder (10) that has been trained by the method according to one of the preceding claims, - a Siamese network (8) trained by the method according to one of the preceding claims and connected to the generative network and / or the autoencoder (10) to compare input images (IP) with their output images (OP) generated by the generative network and / or the autoencoder (10). [11] System according to claim 10, comprising a classification network connected to the output of the Siamese network (8) such that it preferably receives a similarity measure (S) if it is beyond a predefined similarity threshold. [12] Method for detecting anomalies in images using a system (6) according to claim 10 or 11, comprising the following steps: - Providing an image as an input image (IP) for the system (6), - Receiving a similarity measure (S) for this image with the system (6), - if the similarity measure (S) is beyond a predefined similarity threshold, classifying an abnormality in the image, in particular depending on the area of ​​the abnormality, preferably with a classification network trained according to claim 7, - where input images (IP) are optionally processed multiple times to generate multiple output images (OP) and respective similarity measures (S) based on an input image (IP), and in particular to generate a probability distribution over the similarity measures (S). [13] Imaging system (1) comprising a system (6) according to claim 10 or 11 and / or configured to perform a method according to claim 12. [14] Computer program product comprising a computer program that can be directly loaded into a system (6) or a control device (5) for an imaging system (1), which includes program elements for performing steps of the method according to any one of claims 1 to 9 or 12 when the computer program is executed by the system (6) or the control device (5). [15] Computer-readable medium on which program elements are stored which can be read and executed by a computer unit to perform steps of the method according to any one of claims 1 to 9 or 12 when the program elements are executed by the computer unit.