Methods, systems, devices, and media for retinal oct image anomaly detection

By combining a pre-trained model with a hybrid loss function, the problem of misjudgment in retinal OCT image anomaly detection is solved, and accurate detection of image anomalies other than pathological factors is achieved. This avoids dependence on label data and improves the accuracy and efficiency of detection.

CN116758028BActive Publication Date: 2025-11-28PING AN TECH (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310709437.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-14
Publication Date
2025-11-28
Estimated Expiration
2043-06-14

AI Technical Summary

Technical Problem

Existing methods for detecting abnormalities in retinal OCT images are difficult to accurately detect image abnormalities other than pathological factors, and are prone to misinterpreting clear patient images as abnormal data.

Method used

A pre-trained anomaly detection model is used, which performs feature representation mapping and interpolation processing through an encoder and decoder with shared parameters. It is trained by combining hybrid loss functions (MSE and MS-SSIM) to achieve unsupervised learning and detect abnormal data in retinal OCT images.

Benefits of technology

It enables accurate detection and sorting of retinal OCT image abnormalities caused by factors other than pathology, avoids the need for a large amount of labeled data, improves detection accuracy, and reduces the probability of misjudging clear patient images as abnormal.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116758028B_ABST
    Figure CN116758028B_ABST
Patent Text Reader

Abstract

The application discloses a method, system, device and medium for retinal OCT image anomaly detection, and the method comprises the following steps: acquiring a retinal OCT image to be detected; inputting a normal image obtained based on a preset normal picture data set and the retinal OCT image to be detected into a pre-trained anomaly detection model to obtain a detection result. The application utilizes linear interpolation to obtain intermediate similar feature vector samples in the same space and a derived network structure to find abnormal data in the retinal OCT image, and meanwhile, clear patient images are not treated as abnormal data; the network adopts an unsupervised mode, and the need for a large number of data labels is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of image detection and anomaly detection, and particularly relates to a method, system, device and medium for retinal OCT (Optical Coherence Tomography) image anomaly detection. BACKGROUND

[0002] Anomaly detection has always been a very important sub-branch in machine learning. In various artificial intelligence application landing applications (for example, computer vision, data mining, natural language processing, etc.), anomaly detection algorithms are a popular research direction. In the big data era, manual data processing speed has far failed to keep up with machines, and faster detection of abnormal conditions in data has become a very important task. Before the widespread promotion of deep learning, there are many traditional anomaly detection algorithms (for example, Gaussian fitting, semi-supervised learning, etc.). After the advent of deep learning, deep learning is applied to various anomaly detection tasks, i.e. DAD (Deep Anomaly Detection), which has achieved great success.

[0003] Anomaly detection is a technology for identifying abnormal conditions and mining non-logical data. Its application in the medical field has become particularly widespread and important. Specifically, preliminary screening anomaly detection of retinal image types is an important step in machine reading. In theory, traditional clustering or feature recognition methods can find some abnormal images and abnormal points, provided that the type of abnormal data is known. For data image types that cannot obtain a large number of accurate labels but produce a large amount of raw data every day, unsupervised learning is the most friendly. In addition, retinal images not only have multiple abnormal types of diseases such as glaucoma, diabetic retinopathy, and macular degeneration, but also have a high probability of image invalidity due to the light-avoiding nature of the eye and the movement of the eyeball during shooting. The resulting image abnormalities include ghosting and low clarity. In summary, on the basis of disease abnormalities, adding conditions such as the inability of the image center to align with the retinal center and the abnormality of the gray value of part of the pixel points of the image, the existing anomaly detection method cannot accurately detect and sort the retinal OCT image abnormalities caused by factors other than pathology. SUMMARY

[0004] The present application aims to provide a method, system, device and medium for retinal OCT image anomaly detection to solve one or more of the above technical problems. The disclosed method can accurately detect and sort retinal OCT image abnormalities caused by factors other than pathology, and will not treat clear patient images as abnormal data.

[0005] To achieve the above object, the present application adopts the following technical solutions:

[0006] The method for retinal OCT image anomaly detection provided in the first aspect of the present application comprises the following steps:

[0007] Obtaining a retinal OCT image to be detected;

[0008] Inputting a normal image obtained based on a preset normal image data set and the retinal OCT image to be detected into a pre-trained anomaly detection model to obtain a detection result;

[0009] The training step of the pre-trained anomaly detection model comprises:

[0010] Obtaining two normal images y1 and z1 based on a preset normal image data set;

[0011] Inputting the normal image y1 into a first encoder to obtain a feature representation y2; inputting the normal image z1 into a second encoder to obtain a feature representation z2; wherein the first encoder and the second encoder share parameters;

[0012] Inputting the feature representation y2 into a first decoder to obtain a feature representation y3; mapping the feature representation y2 and the feature representation z2 to the same space and performing interpolation processing to obtain an interpolation result, and inputting the interpolation result into a second decoder to obtain a feature representation z3; wherein the first decoder and the second decoder share parameters;

[0013] Performing loss function calculation based on the feature representation z3 and the normal image y1, and performing gradient and parameter updating based on the calculation result to finally obtain the pre-trained anomaly detection model.

[0014] The method is further improved in that, in the step of performing loss function calculation based on the feature representation z3 and the normal image y1,

[0015] The expression of the loss function is

[0016]

[0017] In the formula, is the loss function; α is the weight of the structural loss , β is the weight of the mean square error , α, β > 0; is the structural loss, which is the inverse number of the matrix structural similarity between the input image and the feature representation; is the mean square error between the input image and the feature representation after interpolation decoding.

[0018] The method is further improved in that, in the loss function,

[0019]

[0020] In the formula, n is the total number, i represents the i-th, y i represents the input picture, is the feature representation after interpolation decoding.

[0021] The further improvement of the method is that in the loss function,

[0022]

[0023] In the formula, is the feature representation is the average value of the pixels; μ y is the average value of the pixels of the picture y; is the feature representation is the variance of the feature representation; is the variance of the picture y; is the covariance of the picture y and the feature representation C1 and C2 are two constants for maintaining stability.

[0024] The further improvement of the method is that in the step of mapping the feature representation y2 and the feature representation z2 to the same space and performing interpolation processing to obtain an interpolation result, when performing interpolation processing, a linear interpolation method is used.

[0025] The further improvement of the method is that the step of inputting the normal image obtained based on the preset normal picture data set and the to-be-detected retinal OCT image into the pre-trained anomaly detection model to obtain a detection result specifically includes:

[0026] The normal image obtained based on the preset normal picture data set and the to-be-detected retinal OCT image are input into the pre-trained anomaly detection model, and if the calculation result of the loss function is greater than a preset threshold, the to-be-detected retinal OCT image is an abnormal picture.

[0027] The second aspect of the present application provides a system for retinal OCT image anomaly detection, comprising:

[0028] An image acquisition module is configured to acquire a to-be-detected retinal OCT image.

[0029] A detection result acquisition module is configured to input a normal image obtained based on a preset normal picture data set and the to-be-detected retinal OCT image into a pre-trained anomaly detection model to obtain a detection result.

[0030] The training steps of the pre-trained anomaly detection model include:

[0031] obtaining two normal images y1 and z1 based on a preset normal image dataset;

[0032] inputting the normal image y1 into a first encoder to obtain a feature representation y2; inputting the normal image z1 into a second encoder to obtain a feature representation z2; wherein the first encoder and the second encoder share parameters;

[0033] inputting the feature representation y2 into a first decoder to obtain a feature representation y3; mapping the feature representation y2 and the feature representation z2 to the same space and performing interpolation processing to obtain an interpolation result, and inputting the interpolation result into a second decoder to obtain a feature representation z3; wherein the first decoder and the second decoder share parameters;

[0034] performing loss function calculation based on the feature representation z3 and the normal image y1, performing gradient and parameter updating based on a calculation result, and finally obtaining a pre-trained abnormality detection model.

[0035] Further improvement of the system of the present application is that in the step of performing loss function calculation based on the feature representation z3 and the normal image y1,

[0036] the expression of the loss function is

[0037]

[0038] wherein, is the loss function; α is the weight of the structural loss , β is the weight of the mean square error , α, β > 0; is the structural loss, which is the inverse number of the matrix structural similarity between the input picture and the feature representation; is the mean square error between the input picture and the feature representation after interpolation decoding.

[0039] The third aspect of the present application provides an electronic device, comprising:

[0040] at least one processor; and

[0041] a memory in communication connection with the at least one processor; wherein

[0042] the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute any of the above-mentioned methods for retinal OCT image abnormality detection.

[0043] The fourth aspect of the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the method for retinal OCT image anomaly detection according to any one of the above aspects of the present application.

[0044] Compared with the prior art, the present application has the following beneficial effects:

[0045] The method disclosed by the present application can accurately detect and sort retinal OCT image anomalies caused by factors other than pathology, and will not process clear patient images as abnormal data; specifically, it uses linear interpolation to find intermediate similar feature vector samples in the same space and derived network structures to find abnormal data in the retinal OCT image, while avoiding processing clear patient images as abnormal data; in addition, the network adopts an unsupervised manner, avoiding the need for a large number of data labels.

[0046] In the present application, a hybrid loss function is used for global structure comparison, avoiding the judgment errors of a single loss function in special cases; in addition, MSE is selected because it uses a square operation method inside, which will amplify the error of abnormal points with large errors, achieving better measurement effect. BRIEF DESCRIPTION OF DRAWINGS

[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following briefly introduces the drawings needed in the embodiment or prior art description; obviously, the drawings in the following description are some embodiments of the present application, and those skilled in the art can also obtain other drawings according to these drawings without creative labor.

[0048] Figure 1 is a flowchart of a method for retinal OCT image anomaly detection provided by an embodiment of the present application;

[0049] Figure 2 is a network flowchart in an embodiment of the present application;

[0050] Figure 3 is a schematic diagram of a system for retinal OCT image anomaly detection provided by an embodiment of the present application. DETAILED DESCRIPTION

[0051] In the following, the technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings in the embodiments of the present application in order to make the technical personnel in the technical field better understand the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by the ordinary skilled in the art without creative work should belong to the scope of protection of the present application.

[0052] It should be noted that the terms "first", "second", and the like in the specification and claims of the present application and the above-described drawings are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device that includes a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0053] The present application will be described in further detail below with reference to the drawings:

[0054] Please refer to Figure 1 The method for retinal OCT image anomaly detection provided by the embodiments of the present application comprises the following steps:

[0055] Step 1, obtaining a retinal OCT image to be detected;

[0056] Step 2, inputting the retinal OCT image obtained in step 1 into a pre-trained anomaly detection model, and outputting a detection result through the pre-trained anomaly detection model.

[0057] Please refer to Figure 2In this embodiment of the invention, the steps for obtaining the pre-trained anomaly detection model specifically include: the anomaly detection model is set up with an interface for two input images; during the model training phase, the two interfaces are used to input two images y1 and z1 from the normal image dataset, respectively. After the two images are passed through the first encoder (ResNet) and the second encoder, feature representations y2 and z2 of the images are obtained respectively; the feature representations y2 and z2 are mapped to the same space and interpolated, and then passed through the second decoder to obtain feature representation z3. The feature representation y2 is passed directly through the first decoder without spatial mapping to obtain feature representation y3; based on the feature representation z3 and the original input image y1, the loss function is calculated, the gradient and parameters are updated, and finally the trained anomaly detection model is obtained; it should be emphasized that the first encoder and the second encoder share parameters, and the first decoder and the second decoder share parameters; this embodiment of the invention specifically proposes an unsupervised network structure, in which interpolation is applied to select feature representation vectors, and hybrid loss is used as the standard for judging abnormal image data.

[0058] In this embodiment of the invention, the specific expression of the loss function used in the process of calculating the loss function based on the feature representation z3 and the original input image y1, updating the gradient and parameters, and finally obtaining the trained anomaly detection model is as follows:

[0059]

[0060] The final loss function is denoted as , where is the structural loss. and mean square error A linear combination of α and β, with weights α and β > 0; Given an input image y and its interpolated and decoded feature representation. The mean square error between them; It is the structural loss, given the input image y and its feature representation. The negative number of the matrix structure similarity (SSIM);

[0061]

[0062]

[0063]

[0064] in, It is a feature Average pixel value; μ y It is the average value of the y-pixels in the image. It is a feature The variance; It is the variance of image y; is the covariance of the picture y and the feature MS-SSIM is the same as the basic formula of SSIM.

[0065] In the embodiment of the application, the network structure derived from the linear interpolation of the intermediate similar feature vectors in the same space and the characteristics of the global structure contrast of MSE and MS-SSIM are used to find abnormal data in the retinal OCT image, and the clear patient image is not treated as abnormal data, the network adopts an unsupervised manner, and the demand for a large amount of data label is avoided. A hybrid loss function is used for global structure contrast, which avoids the judgment error of a single loss function in special cases, and MSE plays an amplification role of abnormal data. The processing method and the loss function proposed in the application are used to solve the image abnormality problem caused by factors other than pathology, which are ghosting, artifacts, low clarity, image center alignment, abnormal gray value and the like, and mainly detect and sort this kind of abnormal image.

[0066] In step 2 of the embodiment of the application, the parameters in the network are fixed based on the trained abnormality detection model, and then the pictures in the prediction set are directly predicted to obtain the detection result.

[0067] Specifically, the sample of the normal picture data set includes 17,922 pictures with a size of 256*256 and labeled data; the training method adopted is an unsupervised training method of contrast learning, two pictures y1 and z1 are obtained by sampling the normal picture data set, and are input into the model to obtain corresponding feature representations y3 and z3, at this time, the z3 after interpolation and decoding contains the feature information of the normal picture, at this time, the structural error and the mean square error between the picture input y1 and the feature representation z3 are minimized at the same time, and the gradient is updated, so that the model gradually learns the same features existing in the normal picture, and the normal picture is encoded similarly, that is, the similar feature representation is obtained, so that the value of the loss function is as small as possible;

[0068] In the prediction, the picture to be predicted is input, if the picture is an abnormal picture, the difference between the normal picture and the abnormal picture is large, and the corresponding structure error and mean square error are large, which can be well reflected on the loss function, and then the abnormal detection is realized. The features of the normal pictures are similar, and the features between the normal pictures and the abnormal pictures are different. Through the comparison of similarity and difference, the training method of the application can not only achieve the effect of supervised training, but also solve the problem of difficult labeling data in supervised training. Finally, the abnormal affecting the image generation process itself is removed, and the picture capable of being normally used for case differentiation is obtained. Exemplarily, the abnormalities affecting the image generation process itself include image ghosting, artifacts, low clarity, image center alignment and gray value abnormality and the like. The application mainly detects and sorts this kind of abnormal images.

[0069] The embodiment of the application uses the published OCT dataset, Labeled Optical Coherence Tomography (OCT) and Chest X-Ray Images for Classification published by Daniel Kermany et al., the categories include normal images and macular edema images, and the dataset has been divided into a training set and a test set, 17,922 pictures without image processing with non-pathological factors are used for training, and the public test set is used for prediction. The prediction result shows that the method proposed in the application can achieve an AUC value of 96.0% on the OCT dataset, which is 2% higher than the existing method.

[0070] Principle of the embodiment of the present application: When the abnormal features of the image occur, most of them will reflect on the global structural changes. In order to prevent multiple images with the same micro-abnormal features from being separated out, an interpolation method is used to narrow the distance between clusters. The encoder in the structure can use the basic structure of Res-Net18. In the feature space where y2 and z2 enter together, a linear interpolation method is used to directly average the two feature representations. The output after the decoder (the encoder and the decoder are shared parameters) is used to judge the z3 and the original input y1 by the mixed LOSS of MS-SSIM and MSE. The purpose is to detect the structural similarity of the two from the pixel level, including the contrast and gray scale of the local features. MSE is selected because it uses a square operation inside. For abnormal points with large errors, the error will be amplified to achieve better measurement effect. In summary, the present application uses linear interpolation to find the intermediate similar feature vector in the feature space and the derived network structure, as well as the global structure contrast of MSE and MS-SSIM, to find abnormal data in the retinal OCT image, while not treating clear patient images as abnormal data. The network uses an unsupervised method to avoid the need for a large number of data labels. The mixed loss function is used in the global structure comparison to avoid the judgment error of a single loss function in special cases. MSE also plays a role in amplifying abnormal data.

[0071] The following is an apparatus embodiment of the present application, which can be used to execute the method embodiment of the present application. For details not covered in the apparatus embodiment, please refer to the method embodiment of the present application.

[0072] Please refer to Figure 3 The embodiment of the present application provides a system for retinal OCT image anomaly detection, comprising:

[0073] An image acquisition module is configured to acquire a retinal OCT image to be detected.

[0074] A detection result acquisition module is configured to input a normal image acquired based on a preset normal image data set and the retinal OCT image to be detected into a pre-trained anomaly detection model to obtain a detection result.

[0075] The pre-trained anomaly detection model comprises the following steps:

[0076] Two normal images y1 and z1 are acquired based on a preset normal image data set.

[0077] The normal image y1 is input into a first encoder to obtain a feature representation y2; the normal image z1 is input into a second encoder to obtain a feature representation z2; wherein the first encoder and the second encoder share parameters;

[0078] The feature representation y2 is input into a first decoder to obtain a feature representation y3; the feature representation y2 and the feature representation z2 are mapped to the same space and are subjected to interpolation processing to obtain an interpolation result, and the interpolation result is input into a second decoder to obtain a feature representation z3; wherein the first decoder and the second decoder share parameters;

[0079] Loss function calculation is performed based on the feature representation z3 and the normal image y1, gradient and parameter updating are performed based on a calculation result, and finally a pre-trained abnormality detection model is obtained.

[0080] In the system provided by the embodiment of the application, the existing image abnormality detection architecture is innovated by using a contrast learning method, the contrast learning belongs to unsupervised or self-supervised learning, the effect of the model of the application is very close to that of a supervised model; the unsupervised learning means that the model does not depend on labeled data and learns knowledge from unlabeled images, and the model is learned by automatically constructing similar instances and dissimilar instances; for image abnormality detection, a hybrid LOSS judgment is used, which can detect the structural similarity of the two at the pixel level, including the contrast of local features, grayscale, etc., and the reason for selecting MSE is that the operation method inside is square, and for abnormal points with large errors, the errors will be amplified, so that a better measurement effect is achieved.

[0081] In still another embodiment of the present application, a computer device is provided, which comprises a processor and a memory, the memory being configured to store a computer program, the computer program comprising program instructions, and the processor being configured to execute the program instructions stored in the computer storage medium. The processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic, discrete hardware components, etc., which are the computing core and control core of the terminal, and are suitable for implementing one or more instructions, and are particularly suitable for loading and executing one or more instructions in the computer storage medium to implement a corresponding method flow or a corresponding function; the processor in the embodiments of the present application can be applied to the operation of the method for retinal OCT image anomaly detection.

[0082] In still another embodiment of the present application, the present application further provides a storage medium, specifically a computer readable storage medium (Memory), which is a memory device in a computer device, and is configured to store programs and data. It can be understood that the computer readable storage medium herein can include an internal storage medium in the computer device, and of course can also include an expansion storage medium supported by the computer device. The computer readable storage medium provides a storage space, which stores an operating system of the terminal. In addition, one or more instructions suitable for being loaded and executed by the processor are also stored in the storage space, and these instructions can be one or more computer programs (including program codes). It should be noted that the computer readable storage medium herein can be a high-speed RAM memory, or a non-volatile memory such as at least one disk memory. One or more instructions stored in the computer readable storage medium can be loaded and executed by the processor to implement the corresponding steps of the method for retinal OCT image anomaly detection in the above embodiments.

[0083] The embodiments of the present application can acquire and process related data based on artificial intelligence technology. The artificial intelligence (AI) is a theory, method, technology and application system for using a digital computer or a machine controlled by a digital computer to simulate, extend and expand human intelligence, perceive environment, acquire knowledge and use knowledge to obtain optimal results. Artificial intelligence basic technologies generally include technologies such as sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, and the like. Artificial intelligence software technologies mainly include computer vision technology, robot technology, biometric identification technology, speech processing technology, natural language processing technology, and machine learning / deep learning, and the like. The server can be a stand-alone server, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and basic cloud computing services such as big data and artificial intelligence platforms.

[0084] Those skilled in the art will understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage, etc.) containing computer-usable program code.

[0085] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing apparatus to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing apparatus produce a device that implements the functions specified in the flowcharts and / or block diagrams. Figure 1 The functions specified in a flow or multiple flows and / or blocks Figure 1 The functions specified in a flow or multiple flows and / or blocks

[0086] These computer program instructions can also be stored in a computer-readable memory that can direct the computer or other programmable data processing apparatus to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including instruction devices that implement the functions specified in the flowcharts and / or block diagrams. Figure 1 The functions specified in a flow or multiple flows and / or blocksFigure 1 the function specified in the one or more blocks.

[0087] These computer program instructions can also be loaded into computer or other programmable data processing devices, so that a series of operation steps are performed on the computer or other programmable data processing devices to generate computer-implemented processes, thus the instructions executed on the computer or other programmable data processing devices provide a process for implementing the flow Figure 1 the flow or flows and / or blocks Figure 1 the steps of the function specified in the one or more blocks.

[0088] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application rather than limit the technical solutions of the present application. Although the present application has been described in detail with reference to the above embodiments, it should be understood by those of ordinary skill in the art that the specific embodiments of the present application can be modified or replaced equivalently without departing from the spirit and scope of the present application, and any modification or equivalent replacement without departing from the spirit and scope of the present application should be covered in the protection scope of the claims of the present application.

Claims

1. A method for detecting abnormalities in retinal OCT images, characterized in that, Includes the following steps: Acquire the OCT image of the retina to be detected; Normal images obtained from a preset normal image dataset and the retinal OCT image to be detected are input into a pre-trained anomaly detection model to obtain detection results. The training steps of the pre-trained anomaly detection model include: Two normal images, y1 and z1, are obtained based on a pre-defined normal image dataset. A normal image y1 is input into the first encoder to obtain feature representation y2; a normal image z1 is input into the second encoder to obtain feature representation z2; wherein the first encoder and the second encoder share parameters; Feature representation y2 is input into the first decoder to obtain feature representation y3; feature representation y2 and feature representation z2 are mapped to the same space and interpolated to obtain interpolation result; the interpolation result is input into the second decoder to obtain feature representation z3; wherein, the first decoder and the second decoder share parameters; The loss function is calculated based on the feature representation z3 and the normal image y1. The gradient and parameters are updated based on the calculation results, and finally a pre-trained anomaly detection model is obtained.

2. The method for detecting abnormalities in retinal OCT images according to claim 1, characterized in that, In the step of calculating the loss function based on feature representation z3 and normal image y1 The expression for the loss function is, In the formula, Here, α is the loss function; α is the structural loss. The weights, where β is the mean square error. The weights, α, β > 0; The structural loss is the negative of the structural similarity between the input image and the feature representation matrix. The mean square error is the difference between the input image and the feature representation after interpolation and decoding.

3. The method for detecting abnormalities in retinal OCT images according to claim 2, characterized in that, In the loss function, In the formula, n is the total number, i represents the i-th element, and y i This indicates that an image is being input. This is the feature representation after interpolation and decoding.

4. The method for detecting abnormalities in retinal OCT images according to claim 2, characterized in that, In the loss function, In the formula, It is a feature representation Average pixel value; μ y It is the average value of the y-pixels in the image; It is a feature representation The variance; It is the variance of image y; It is the image y and feature representation The covariance; C1 and C2 are two constants used to maintain stability.

5. The method for detecting abnormalities in retinal OCT images according to claim 1, characterized in that, In the step of mapping feature representation y2 and feature representation z2 to the same space and performing interpolation to obtain the interpolation result, linear interpolation is used during the interpolation process.

6. The method for detecting abnormalities in retinal OCT images according to claim 1, characterized in that, The step of inputting normal images obtained from a preset normal image dataset and the retinal OCT image to be detected into a pre-trained anomaly detection model to obtain detection results specifically includes: Normal images obtained from a preset normal image dataset and the retinal OCT image to be detected are input into a pre-trained anomaly detection model. If the calculated result of the loss function is greater than a preset threshold, the retinal OCT image to be detected is an anomaly image.

7. A system for detecting abnormalities in retinal OCT images, characterized in that, include: Image acquisition module, used to acquire the retinal OCT image to be detected; The detection result acquisition module is used to input normal images obtained based on a preset normal image dataset and the retinal OCT image to be detected into a pre-trained anomaly detection model to obtain detection results. The training steps of the pre-trained anomaly detection model include: Two normal images, y1 and z1, are obtained based on a pre-defined normal image dataset. A normal image y1 is input into the first encoder to obtain feature representation y2; a normal image z1 is input into the second encoder to obtain feature representation z2; wherein the first encoder and the second encoder share parameters; Feature representation y2 is input into the first decoder to obtain feature representation y3; feature representation y2 and feature representation z2 are mapped to the same space and interpolated to obtain interpolation result; the interpolation result is input into the second decoder to obtain feature representation z3; wherein, the first decoder and the second decoder share parameters; The loss function is calculated based on the feature representation z3 and the normal image y1. The gradient and parameters are updated based on the calculation results, and finally a pre-trained anomaly detection model is obtained.

8. A system for detecting abnormalities in retinal OCT images according to claim 7, characterized in that, In the step of calculating the loss function based on feature representation z3 and normal image y1 The expression for the loss function is, In the formula, Here, α is the loss function; α is the structural loss. The weights, where β is the mean square error. The weights, α, β > 0; The structural loss is the negative of the structural similarity between the input image and the feature representation matrix. The mean square error is the difference between the input image and the feature representation after interpolation and decoding.

9. An electronic device, characterized in that, include: At least one processor; as well as, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the method for detecting anomalies in retinal OCT images as described in any one of claims 1 to 6.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method for detecting abnormalities in retinal OCT images as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Retina OCT image segmentation method based on unsupervised learning

    CN114612484A

  • Target detection model training method, electronic equipment and storage medium

    CN115984808A