Image unsupervised anomaly detection method, system, product, medium and equipment

Through the dual heterogeneous knowledge distillation network combined with the encoder decoder structure of the teacher and student network, the problem of subtle abnormal detection in OCT retinal images is solved, efficient abnormal identification and positioning of retinal images is achieved, and early detection capabilities of ophthalmic diseases are improved.

CN119992281BActive Publication Date: 2025-09-02SHANDONG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510062071.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-15
Publication Date
2025-09-02
Estimated Expiration
2045-01-15

AI Technical Summary

Technical Problem

The existing unsupervised abnormality detection methods are difficult to effectively identify and locate subtle local abnormal changes in OCT retinal images, and the convergence of characteristics between student networks and teacher networks leads to detection difficulties, which is difficult to meet the needs of early detection of ophthalmic diseases.

Method used

A dual heterogeneous knowledge distillation network is adopted, combining the encoder and decoder structures of the teacher network and the student network, and feature interaction is performed through multi-scale feature generation units, and a hybrid self-task module is used to capture remote spatial dependencies, and the feature deviation value is calculated to generate anomaly detection score.

Benefits of technology

It improves the accuracy of abnormal detection of OCT retinal images, can identify structural and subtle pathological abnormalities, provide accurate positioning information, and support early detection of ophthalmic diseases.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119992281B_ABST
    Figure CN119992281B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of image anomaly detection technology. A method, system, product, medium, and device for unsupervised image anomaly detection are proposed. A first OCT image feature is extracted based on an OCT image and an encoder of a teacher network; a second OCT image feature is extracted based on the OCT image and an encoder of a student network; the second OCT image feature is fed into a global decoder branch for compression to obtain a one-dimensional feature, which is then restored to a global student feature through multiple consecutive upsampling and mixing with a task module; the second OCT image feature is fed into a local decoder branch to obtain a local student feature; a first deviation value between the first OCT image feature and the global student feature is calculated, and a second deviation value between the first OCT image feature and the local student feature is calculated, with the sum of the first and second deviation values ​​being used as an anomaly detection score. The present invention improves the accuracy of anomaly detection in OCT retinal images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image anomaly detection, and in particular to an unsupervised image anomaly detection method, system, product, medium and equipment. Background Art

[0002] The statements in this section merely provide background art related to the present invention and do not necessarily constitute prior art.

[0003] In ophthalmology, OCT retinal images are an important means of assessing retinal health and diagnosing eye diseases, especially playing a key role in the early detection of diseases such as glaucoma, macular degeneration, and diabetic retinopathy. However, traditional manual diagnostic methods rely on expert experience and are affected by factors such as physician subjectivity, fatigue, and time pressure, which may lead to missed or misdiagnoses. In addition, with the advancement of OCT technology, the amount of medical imaging data has increased dramatically, and the efficiency and consistency of manual inspections face severe challenges, making it difficult to meet the efficient and accurate needs of modern ophthalmology clinics. Therefore, automated anomaly detection technology based on computer vision and deep learning has become an effective means to address these problems. As a high-resolution three-dimensional imaging technology, OCT retinal images provide extremely rich retinal structural information, which is crucial for detecting subtle lesions. Through the introduction of deep learning technologies (such as convolutional neural networks (CNN) and generative adversarial networks (GAN), computer vision systems can automatically learn the features of retinal images and effectively identify potential anomalies.

[0004] Abnormalities in OCT retinal images are complex and diverse, and the early symptoms of retinal diseases are often not obvious, making it difficult to collect sufficient abnormal samples for supervised learning. Therefore, unsupervised anomaly detection methods have become a research focus. These methods rely solely on normal retinal images for training and detect potential anomalies by learning the features of normal images. Existing unsupervised anomaly detection methods based on knowledge distillation achieve anomaly detection by exploiting the differences in feature learning between the teacher network and the student network. However, due to the generalization ability of the network, the features learned by the student network tend to be similar to those of the teacher network, making it difficult for the model to effectively distinguish between normal and abnormal samples, thereby making anomaly detection more difficult. In addition, existing unsupervised anomaly detection methods mainly focus on detecting global anomalies. However, when dealing with complex pathological abnormalities or early localized abnormalities (such as subtle lesions and localized retinal changes), they still have significant shortcomings and cannot effectively identify and locate these subtle abnormal changes. Summary of the Invention

[0005] In order to address the deficiencies of the existing technology, the present invention provides a method, system, product, medium and equipment for unsupervised image anomaly detection, which improves the accuracy of OCT retinal image anomaly detection and can provide important technical support for the early detection and clinical diagnosis of ophthalmic diseases.

[0006] In order to achieve the above object, the present invention adopts the following technical solutions:

[0007] In a first aspect, the present invention provides a method for unsupervised anomaly detection in images.

[0008] An unsupervised anomaly detection method for an image includes the following steps:

[0009] Acquire the OCT image to be detected;

[0010] extracting a first OCT image feature based on the OCT image and an encoder of a teacher network;

[0011] Extracting a second OCT image feature based on the OCT image and the encoder of the student network;

[0012] The second OCT image feature is fed into the global decoder branch for compression to obtain a one-dimensional feature, and the one-dimensional feature is restored to a global student feature through continuous multiple upsampling and mixing with the task module;

[0013] Sending the second OCT image feature to the local decoder branch to obtain a local student feature;

[0014] A first deviation value between the first OCT image feature and the global student feature is calculated, and a second deviation value between the first OCT image feature and the local student feature is calculated. The sum of the first deviation value and the second deviation value is used as an abnormality detection score, and abnormality detection of the OCT image is performed according to the abnormality detection score.

[0015] As a further limitation of the first aspect of the present invention, the OCT image is a pre-processed OCT image, and the pre-processing includes: size scaling, normalization and standardization.

[0016] As a further limitation of the first aspect of the present invention, the one-dimensional features are restored to global student features through continuous multiple upsampling and mixing from the task module, comprising:

[0017]

[0018] in, Indicates splicing, F sG is the global student characteristic, F s2is a one-dimensional feature, Mamba is a mixed self-task module, C1 represents the dimension of the encoded image, H1 represents the height of the encoded image, and W1 represents the width of the encoded image.

[0019] As a further limitation of the first aspect of the present invention, the second OCT image feature is fed into a local decoder branch to obtain a local student feature, comprising:

[0020]

[0021] Among them, F sL is a local student feature. DW-Conv3×3(·) is a 3×3 depth convolution. ↑p(·) indicates that the feature is upsampled to the original resolution by the nearest neighbor interpolation at a specific level. Indicates pooling the input features to Size, F L′ =DW-Conv3×3(F s1 ∈R C1×H1×W1 )), F s1 is the second OCT image feature.

[0022] As a further limitation of the first aspect of the present invention, the distillation loss is used to guide the student decoder network to learn, and the knowledge distillation loss L A for:

[0023] L A =L G +L L ;

[0024] Among them, L G =||F t ∈R C1×H1×W1 -F sG ∈R C1×H1×W1 || 2 , L L =||F t ∈R C1×H1×W1 -F sL ∈R C1×H1×W1 || 2 , F t is the first OCT image feature, F sL is the local student characteristic, F sG It is a global student characteristic.

[0025] As a further limitation of the first aspect of the present invention, the sum of the first deviation value and the second deviation value is used as the abnormality detection score S, including:

[0026] S=F t -F sL +F t -F sG;

[0027] Among them, F t is the first OCT image feature, F sL is the local student characteristic, F sG for global student characteristics;

[0028] The image is judged to be abnormal according to the set threshold. If the abnormality detection score S is greater than the set threshold, it is judged to be abnormal; otherwise, there is no abnormality.

[0029] In a second aspect, the present invention provides an image unsupervised anomaly detection system.

[0030] An unsupervised anomaly detection system for images, comprising:

[0031] An image acquisition unit is configured to: acquire an OCT image to be detected;

[0032] a teacher network feature extraction unit, configured to: extract a first OCT image feature based on the OCT image and an encoder of the teacher network;

[0033] A student network feature extraction unit is configured to extract a second OCT image feature based on the OCT image and an encoder of the student network;

[0034] a global student feature extraction unit configured to: send the second OCT image feature to a global decoder branch for compression to obtain a one-dimensional feature, and restore the one-dimensional feature into a global student feature through continuous multiple upsampling and mixing with the task module;

[0035] A local student feature extraction unit is configured to: send the second OCT image feature to a local decoder branch to obtain a local student feature;

[0036] The anomaly detection score generating unit is configured to: calculate a first deviation value between the first OCT image feature and the global student feature, calculate a second deviation value between the first OCT image feature and the local student feature, take the sum of the first deviation value and the second deviation value as the anomaly detection score, and perform anomaly detection on the OCT image according to the anomaly detection score.

[0037] In a third aspect, the present invention provides a computer device comprising: a processor and a computer-readable storage medium;

[0038] a processor adapted to execute a computer program;

[0039] A computer-readable storage medium having a computer program stored therein, wherein when the computer program is executed by the processor, the method for unsupervised anomaly detection in images according to the first aspect of the present invention is implemented.

[0040] In a fourth aspect, the present invention provides a computer-readable storage medium storing a computer program, wherein the computer program is suitable for being loaded by a processor and executing the image unsupervised anomaly detection method as described in the first aspect of the present invention.

[0041] In a fifth aspect, the present invention provides a computer program product, comprising a computer program, which, when executed by a processor, implements the unsupervised image anomaly detection method as described in the first aspect of the present invention.

[0042] Compared with the prior art, the present invention has the following beneficial effects:

[0043] 1. Aiming at the problem of unsupervised anomaly detection in OCT retinal images, this paper designs a dual-heterogeneous knowledge distillation network. This network detects anomalies in images by utilizing the feature extraction differences between the teacher network and the student network. It can not only detect structural anomalies in the retina (such as retinopathy, macular degeneration, etc.), but also effectively identify subtle pathological abnormalities.

[0044] 2. The teacher network of the present invention adopts an encoder structure, and the student network adopts an encoder plus decoder structure. The encoder part of the student network uses a convolutional neural network (CNN), and the decoder combines the CNN and Mamba network models. In order to improve the model's ability to capture long-distance dependencies, the student network designs a hybrid self-task Mamba module to capture remote spatial dependencies through the Mamba network.

[0045] 3. The dual-heterogeneous knowledge distillation network of the present invention adopts a multi-scale feature generation unit (MFGU) to interact with non-local features to enhance the model's ability to reconstruct details.

[0046] 4. Through the design of dual heterogeneous knowledge distillation, the present invention enables the teacher network and the student network to complement each other, thereby effectively detecting abnormal areas in OCT retinal images and providing accurate positioning information.

[0047] Advantages of additional aspects of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] The accompanying drawings, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0049] Figure 1 A schematic diagram of the process of the unsupervised anomaly detection method for images provided in Example 1 of the present invention;

[0050] Figure 2 A schematic diagram of an unsupervised anomaly detection system for images provided in Example 2 of the present invention;

[0051] Figure 3 A schematic diagram of a computer device provided in Example 3 of the present invention. DETAILED DESCRIPTION

[0052] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0053] It should be noted that the following detailed descriptions are exemplary and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which the present invention belongs.

[0054] In the absence of conflict, the embodiments of the present invention and the features thereof may be combined with each other.

[0055] Example 1:

[0056] This implementation proposes an unsupervised anomaly detection method for images, which includes the following steps:

[0057] S1: Data acquisition and preprocessing.

[0058] First, the OCT device is used to image the object and collect and obtain the original RAW data; then, the raw data is processed using an image reconstruction algorithm to generate an OCT image, and the image is subjected to necessary preprocessing operations.

[0059] S1.1: Collect image data and define the original image as X∈R C×H×W , where C represents the original image dimension, H represents the height of the original image, and W represents the width of the original image. The original image data is resized using the following formula:

[0060]

[0061]

[0062] Among them, S(x, y) represents the corresponding pixel point in the scaled image, (x, y) is the pixel coordinate, X represents the original image, and X w and X h Indicates the width and height of the original image, S w and S h Represents the width and height of the scaled image, k w and k h Indicates the scaling factor.

[0063] S1.2: Normalize the image data using the following formula:

[0064]

[0065] Among them, S max and S min They represent the maximum and minimum values ​​of the specific values ​​of all pixels in the image, respectively. c represents the image dimension, h represents the height of the image, and w represents the width of the image.

[0066] S1.3: Normalize the image data using the following formula:

[0067]

[0068] Among them, mean represents the mean of each channel, and std represents the standard deviation of each channel.

[0069] S2: Input the image to the teacher network.

[0070] Use the teacher network to train on the ImageNet dataset to extract image features X∈R C×H×W , and use the encoder part of the teacher network to extract the features F of the OCT image t ∈R C1×H1×W1 , where C1 represents the dimension of the encoded image, H1 represents the height of the encoded image, and W1 represents the width of the encoded image.

[0071] S3: Input the image to the student network.

[0072] The OCT images are simultaneously input into the student network. The student network adopts a single encoder and dual decoder structure and uses distillation loss to train the network model. Specifically, it includes:

[0073] S3.1: OCT is input into the student network. The student network adopts a multi-task network model, in which the encoder adopts a CNN network model, and the dual decoders are a global decoder branch and a local decoder branch, which are used to realize the detection of global anomalies and local anomalies.

[0074] S3.2: Input image X∈R C×H×W , the feature F of the student network is obtained through the encoding layer of the student network s1 ∈R C1 ×H1×W1 .

[0075] S3.3: Feature F s1 ∈R C1×H1×W1 Send it to the global decoder branch for feature compression and compress it into a one-dimensional feature F s2 ∈R C1×1×1 , then the feature Fs2 ∈R C1×1×1 After four consecutive upsampling and mixing of self-task modules, the global student feature F is restored sG ∈R C1×H1×W1 , the hybrid self-task module adopts CNN+Mamba structure. The specific formula is:

[0076]

[0077] in, Indicates splicing.

[0078] S3.4: Feature F s1 ∈R C1×H1×W1 The local decoder branch is sent to the multi-scale feature generation unit (MFGU) to obtain the local student feature F sL ∈R C1×H1×W1 , the specific formula is:

[0079] F L′ =DW-Conv3×3(F s1 ∈R C1×H1×W1 )) (6);

[0080]

[0081] Among them, DW-Conv3×3(·) is a 3×3 depth convolution, ↑p(·) means that the features are upsampled to the original resolution by the nearest neighbor interpolation at a specific level, and Indicates pooling the input features to size,.

[0082] The distillation loss is used to guide the student decoder network to learn. The optimization goal of the knowledge distillation module is:

[0083] L A =L G +L L (8);

[0084] L G =||F t ∈R C1×H1×W1 -F sG ∈R C1×H1×w1 || 2 (9);

[0085] L L =||F t ∈R C1×H1×W1 -F sL ∈R C1×H1×W1 || 2 (10).

[0086] S4: Calculate anomaly detection score.

[0087] After the model training is completed, during testing, the test data can be input into the teacher network and the student network for testing to obtain anomaly detection scores.

[0088] S4.1: The feature map F is interpolated by bilinear interpolation. t ∈R C1×H1×W1 , F sL ∈R C1×H1×W1 and F sG ∈R C1×H1×W1 The image is resized to the original resolution and smoothed with a Gaussian kernel of σ = 4.

[0089] S4.2: The anomaly detection score S is obtained by the difference between the feature map E output by the teacher network and the feature map output by the student network. The specific formula is:

[0090] S=mean(F t -F sL +F t -F sG ) (11).

[0091] S4.3: After obtaining the anomaly detection score S, determine whether the image is abnormal based on the set threshold. For example, if the anomaly detection score S is greater than the set threshold, it is determined to be abnormal; otherwise, there is no abnormality.

[0092] Example 2:

[0093] like Figure 2 As shown, this implementation provides an image unsupervised anomaly detection system, including:

[0094] An image acquisition unit is configured to: acquire an OCT image to be detected;

[0095] a teacher network feature extraction unit, configured to: extract a first OCT image feature based on the OCT image and an encoder of the teacher network;

[0096] A student network feature extraction unit is configured to extract a second OCT image feature based on the OCT image and an encoder of the student network;

[0097] a global student feature extraction unit configured to: send the second OCT image feature to a global decoder branch for compression to obtain a one-dimensional feature, and restore the one-dimensional feature into a global student feature through continuous multiple upsampling and mixing with the task module;

[0098] A local student feature extraction unit is configured to: send the second OCT image feature to a local decoder branch to obtain a local student feature;

[0099] The anomaly detection score generating unit is configured to: calculate a first deviation value between the first OCT image feature and the global student feature, calculate a second deviation value between the first OCT image feature and the local student feature, take the sum of the first deviation value and the second deviation value as the anomaly detection score, and perform anomaly detection on the OCT image according to the anomaly detection score.

[0100] The specific working process of each of the above units is described in Example 1 and will not be repeated here.

[0101] It is understandable that each of the above-mentioned units can be separately or entirely combined into one or several other units to constitute, or a certain unit (or units) thereof can also be further split into multiple smaller units in function to constitute, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application. The above-mentioned units are divided based on logical functions. In practical applications, the function of a unit can also be realized by multiple units, or the function of multiple units can be realized by one unit. In other embodiments of the present application, the system can also include other units. In practical applications, these functions can also be implemented with the assistance of other units, and can be implemented by the collaboration of multiple units.

[0102] According to another embodiment of the present application, the system described in this embodiment can be constructed and the method of Example 1 of the present application can be implemented by running a computer program (including program code) capable of executing the steps involved in the corresponding method described in Example 1 on a general-purpose computing device such as a computer, which includes processing elements and storage elements such as a central processing unit (CPU), random access memory (RAM), and read-only memory (ROM). The computer program can be recorded on, for example, a computer-readable recording medium, and loaded into the above-mentioned computing device through the computer-readable recording medium and run therein.

[0103] Example 3:

[0104] like Figure 3 As shown, this implementation provides an electronic device, which includes a processor 1001, a communication interface 1002, and a computer-readable storage medium 1003. The processor 1001, the communication interface 1002, and the computer-readable storage medium 1003 may be connected via a bus or other means.

[0105] Among them, the communication interface 1002 is used to receive and send data, the computer-readable storage medium 1003 can be stored in the memory of the electronic device, the computer-readable storage medium 1003 is used to store a computer program, the computer program includes program instructions, and the processor 1001 is used to execute the program instructions stored in the computer-readable storage medium 1003.

[0106] The processor 1001 (or CPU (Central Processing Unit)) is the computing core and control core of the electronic device, which is suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions to implement corresponding method processes or corresponding functions.

[0107] The processor 1001 is configured to execute the following process:

[0108] Acquire the OCT image to be detected;

[0109] extracting a first OCT image feature based on the OCT image and an encoder of a teacher network;

[0110] Extracting a second OCT image feature based on the OCT image and the encoder of the student network;

[0111] The second OCT image feature is fed into the global decoder branch for compression to obtain a one-dimensional feature, and the one-dimensional feature is restored to a global student feature through continuous multiple upsampling and mixing with the task module;

[0112] Sending the second OCT image feature to the local decoder branch to obtain a local student feature;

[0113] A first deviation value between the first OCT image feature and the global student feature is calculated, and a second deviation value between the first OCT image feature and the local student feature is calculated. The sum of the first deviation value and the second deviation value is used as an abnormality detection score, and abnormality detection of the OCT image is performed according to the abnormality detection score.

[0114] The detailed process is described in Example 1 and will not be repeated here.

[0115] Example 4:

[0116] This implementation provides a computer-readable storage medium (Memory). This computer-readable storage medium is a memory device in an electronic device that is used to store programs and data. It is understood that the computer-readable storage medium herein can include both built-in storage media in the electronic device and, of course, extended storage media supported by the electronic device. The computer-readable storage medium provides storage space that stores the processing system of the electronic device.

[0117] Furthermore, the storage space also stores one or more instructions suitable for being loaded and executed by the processor. These instructions may be one or more computer programs (including program code). It should be noted that the computer-readable storage medium herein may be a high-speed RAM memory or a non-volatile memory, such as at least one disk storage; optionally, it may be at least one computer-readable storage medium located remotely from the aforementioned processor.

[0118] In one embodiment, the computer-readable storage medium stores one or more instructions; the processor loads and executes the one or more instructions stored in the computer-readable storage medium to implement the following process:

[0119] Acquire the OCT image to be detected;

[0120] extracting a first OCT image feature based on the OCT image and an encoder of a teacher network;

[0121] Extracting a second OCT image feature based on the OCT image and the encoder of the student network;

[0122] The second OCT image feature is fed into the global decoder branch for compression to obtain a one-dimensional feature, and the one-dimensional feature is restored to a global student feature through continuous multiple upsampling and mixing with the task module;

[0123] Sending the second OCT image feature to the local decoder branch to obtain a local student feature;

[0124] A first deviation value between the first OCT image feature and the global student feature is calculated, and a second deviation value between the first OCT image feature and the local student feature is calculated. The sum of the first deviation value and the second deviation value is used as an abnormality detection score, and abnormality detection of the OCT image is performed according to the abnormality detection score.

[0125] The detailed process is described in Example 1 and will not be repeated here.

[0126] Example 5:

[0127] This implementation provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform the following process:

[0128] Acquire the OCT image to be detected;

[0129] extracting a first OCT image feature based on the OCT image and an encoder of a teacher network;

[0130] Extracting a second OCT image feature based on the OCT image and the encoder of the student network;

[0131] The second OCT image feature is fed into the global decoder branch for compression to obtain a one-dimensional feature, and the one-dimensional feature is restored to a global student feature through continuous multiple upsampling and mixing with the task module;

[0132] Sending the second OCT image feature to the local decoder branch to obtain a local student feature;

[0133] A first deviation value between the first OCT image feature and the global student feature is calculated, and a second deviation value between the first OCT image feature and the local student feature is calculated. The sum of the first deviation value and the second deviation value is used as an abnormality detection score, and abnormality detection of the OCT image is performed according to the abnormality detection score.

[0134] The detailed process is described in Example 1 and will not be repeated here.

[0135] Those skilled in the art will appreciate that the units and algorithmic steps of each example described in conjunction with the embodiments disclosed in this application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional technical personnel may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0136] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted via a computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can access or a data processing device such as a server or data center that includes one or more available media integrations. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).

[0137] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be within the scope of protection of the present invention.

Claims

1. An unsupervised anomaly detection method for an image, characterized in that: The following processes are included: Acquire the OCT image to be detected; extracting a first OCT image feature based on the OCT image and an encoder of a teacher network; Extracting a second OCT image feature based on the OCT image and the encoder of the student network; The second OCT image feature is fed into the global decoder branch for compression to obtain a one-dimensional feature, and the one-dimensional feature is restored to a global student feature through continuous multiple upsampling and mixing with the task module; Sending the second OCT image feature to the local decoder branch to obtain a local student feature; Calculating a first deviation value between the first OCT image feature and the global Student feature, calculating a second deviation value between the first OCT image feature and the local Student feature, taking the sum of the first deviation value and the second deviation value as an abnormality detection score, and performing abnormality detection on the OCT image according to the abnormality detection score; The one-dimensional features are restored to global student features through continuous multiple upsampling and mixing from the task module, including: ; in, Indicates splicing, is the global student characteristic, is a one-dimensional feature, For the hybrid self-task module, Represents the encoded image dimension, Indicates the height of the encoded image. Indicates the width of the encoded image; The second OCT image feature is fed into the local decoder branch and passed through the multi-scale feature generation unit to obtain the local student feature, including: ; in, is the local student characteristic, is a 3×3 depthwise convolution, Indicates that the features are upsampled to the original resolution at a specific level by means of a fast nearest neighbor interpolation. Indicates pooling the input features to The size, , is the second OCT image feature, Represents the encoded image dimension, Indicates the height of the encoded image. Indicates the width of the encoded image.

2. The unsupervised anomaly detection method for images according to claim 1, wherein: The OCT image is a pre-processed OCT image, and the pre-processing includes: size scaling, normalization and standardization.

3. The unsupervised anomaly detection method for images according to claim 1 or 2, wherein: Distillation loss is used to guide the student decoder network to learn, and knowledge distillation loss for: ; in, , , is the first OCT image feature, is the local student characteristic, is the global student characteristic, Represents the norm operation.

4. The unsupervised anomaly detection method for images according to claim 1 or 2, wherein: The sum of the first deviation value and the second deviation value is the anomaly detection score ,include: ; in, is the first OCT image feature, is the local student characteristic, for global student characteristics; Determine whether the image is abnormal based on the set threshold, and the abnormality detection score If the value is greater than the set threshold, it is considered abnormal; otherwise, there is no abnormality.

5. An unsupervised image anomaly detection system, characterized in that: The method for unsupervised anomaly detection in an image according to any one of claims 1 to 4 comprises: An image acquisition unit is configured to: acquire an OCT image to be detected; a teacher network feature extraction unit, configured to: extract a first OCT image feature based on the OCT image and an encoder of the teacher network; A student network feature extraction unit is configured to extract a second OCT image feature based on the OCT image and an encoder of the student network; a global student feature extraction unit configured to: send the second OCT image feature to a global decoder branch for compression to obtain a one-dimensional feature, and restore the one-dimensional feature into a global student feature through continuous multiple upsampling and mixing with the task module; A local student feature extraction unit is configured to: send the second OCT image feature to a local decoder branch to obtain a local student feature; The anomaly detection score generating unit is configured to: calculate a first deviation value between the first OCT image feature and the global student feature, calculate a second deviation value between the first OCT image feature and the local student feature, take the sum of the first deviation value and the second deviation value as the anomaly detection score, and perform anomaly detection on the OCT image according to the anomaly detection score.

6. A computer device, characterized in that: include: a processor and a computer-readable storage medium; a processor adapted to execute a computer program; A computer-readable storage medium having a computer program stored therein, wherein when the computer program is executed by the processor, the method for unsupervised anomaly detection in an image according to any one of claims 1 to 4 is implemented.

7. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which is suitable for being loaded by a processor and executing the image unsupervised anomaly detection method according to any one of claims 1 to 4.

8. A computer program product, characterized in that The computer program product includes a computer program, and when the computer program is executed by a processor, it implements the image unsupervised anomaly detection method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Knowledge distillation-based unsupervised industrial image anomaly detection method and system

    CN114240892A

  • Industrial scene unknown type defect segmentation method based on self-supervised heterogeneous network

    CN114742799A