Reconstruction model training method, abnormal information detection method and device, and storage medium

CN117011664BActive Publication Date: 2026-10-30TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211042612.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-29
Publication Date
2026-10-30
Estimated Expiration
2042-08-29

AI Technical Summary

Technical Problem

[0002]相关技术中,通常依赖生成对抗网络对图像进行异常检测,生成对抗网络的训练过程较复杂,训练速度较慢,导致对图像进行异常检测的效率较低,并且依赖生成对抗网络对图像进行异常检测时,对图像的特征信息的分析侧重于图像的全局特征,对图像中的异常区域的敏感度比较低,对图像进行异常检测的准确度较低

Benefits of technology

[0027]本申请实施例通过获取样本图像;通过初始重构模型中的初始编码单元对所述样本图像进行编码,得到所述样本图像对应的多层特征信息,其中,所述初始编码单元包括多个第一初始卷积单元与多个第一初始下采样单元,所述第一初始卷积单元与所述特征信息一一对应;通过所述初始重构模型中的初始解码单元对所述多层特征信息进行解码,得到所述样本图像的第一重构图像,所述初始解码单元中包括第二初始下采样单元、多个第二初始卷积单元、多个初始上采样单元,以及多个特征融合单元,所述多个特征融合单元与所述多层特征信息一一对应,所述多个特征融合单元用于将权重为预设权重的所述多层特征信息,以及所述多个初始上采样单元输出的与所述多层特征信息对应的多个第一待拼接特征信息进行融合;基于所述样本图像、所述第一重构图像,以及所述预设权重,对所述初始重构模型进行训练得到目标重构模型,其中,所述目标重构模型包括:目标编码单元与目标解码单元,其中,所述预设权重在对所述初始重构模型进行训练得到目标重构模型过程中递减,其中,所述目标重构模型用于重构待分析图像信息对应的目标重构图像,以根据所述待分析图像信息与所述目标重构图像确定所述待分析图像信息对应的异常检测结果的方案,可通过卷积与下采样提取样本图像的高维的特征信息,并进一步通过对样本图像的多层特征信息的融合,重构出样本图像对应的第一重构图像,在训练得出目标重构模型过程中逐步递减样本图像的较全局的特征信息的融合权重,以提高针对样本图像的高维的特征信息,即较全局的特征信息对应的待拼接特征信息的权重,进而提高了对样本图像中的异常区域的敏感度,提高了对图像进行异常检测的准确度。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117011664B_ABST
    Figure CN117011664B_ABST
Patent Text Reader

Abstract

Provided are a reconstruction model training method, an abnormal information detection method, a device, and a storage medium, which can be applied to various scenarios such as image processing, medical image analysis, intelligent transportation, cloud technology, and the like. The method comprises: encoding a sample image through a plurality of initial convolution units and a plurality of initial down-sampling units in an initial reconstruction model to obtain multi-layer feature information; decoding the multi-layer feature information through an initial down-sampling unit, a plurality of initial convolution units, a plurality of initial up-sampling units, and a plurality of feature fusion units in the initial reconstruction model to obtain a first reconstruction image, the feature fusion units being configured to fuse feature information with a preset weight and to-be-spliced feature information corresponding to the feature information; and training the initial reconstruction model to obtain a target reconstruction model, the preset weight being decreased in the training process, and the target reconstruction model being capable of improving the accuracy of image abnormality detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, specifically to a reconstruction model training method, an anomaly detection method, device, and storage medium. Background Technology

[0002] In related technologies, generative adversarial networks (GANs) are typically used for anomaly detection in images. However, the training process for GANs is complex and slow, resulting in low efficiency in anomaly detection. Furthermore, when relying on GANs for anomaly detection, the analysis of image feature information focuses on global features, which has low sensitivity to abnormal regions in the image, leading to low accuracy in anomaly detection. Summary of the Invention

[0003] This application provides a reconstruction model training method, anomaly detection method, apparatus, storage medium, computer equipment, and computer program product, which can reduce attention to the global features of an image and focus on the analysis of high-dimensional feature information of the image, thereby improving the accuracy of anomaly detection in images.

[0004] On one hand, embodiments of this application provide a method for reconstructing a model training method, the method comprising:

[0005] Acquire sample images;

[0006] The sample image is encoded by the initial encoding unit in the initial reconstruction model to obtain the multi-layer feature information corresponding to the sample image. The initial encoding unit includes multiple first initial convolution units and multiple first initial downsampling units, and the first initial convolution units correspond one-to-one with the feature information.

[0007] The multi-layer feature information is decoded by the initial decoding unit in the initial reconstruction model to obtain the first reconstructed image of the sample image. The initial decoding unit includes a second initial downsampling unit, multiple second initial convolution units, multiple initial upsampling units, and multiple feature fusion units. The multiple feature fusion units correspond one-to-one with the multi-layer feature information. The multiple feature fusion units are used to fuse the multi-layer feature information with preset weights and the multiple first feature information to be spliced ​​output by the multiple initial upsampling units corresponding to the multi-layer feature information.

[0008] Based on the sample image, the first reconstructed image, and the preset weights, the initial reconstruction model is trained to obtain a target reconstruction model. The target reconstruction model includes a target encoding unit and a target decoding unit. The preset weights decrease during the training of the initial reconstruction model to obtain the target reconstruction model. The target reconstruction model is used to reconstruct the target reconstructed image corresponding to the image information to be analyzed, so as to determine the anomaly detection result corresponding to the image information to be analyzed based on the image information to be analyzed and the target reconstructed image.

[0009] On the other hand, embodiments of this application provide an anomaly detection method, including:

[0010] Obtain the image information to be analyzed;

[0011] The image information to be analyzed is input into a preset target reconstruction model to obtain the target reconstruction image corresponding to the image information to be analyzed.

[0012] Based on the image information to be analyzed and the target reconstructed image, an anomaly detection result corresponding to the image information to be analyzed is determined, wherein the anomaly detection result includes first indication information for indicating whether the image information to be analyzed is an abnormal image, and / or second indication information for indicating abnormal regions in the image information to be analyzed;

[0013] The target reconstruction model is the target reconstruction model determined by the reconstruction model training method described above.

[0014] On the other hand, embodiments of this application provide a reconstructed model training apparatus, including:

[0015] The acquisition module is used to acquire sample images;

[0016] The encoding module is used to encode the sample image through the initial encoding unit in the initial reconstruction model to obtain the multi-layer feature information corresponding to the sample image. The initial encoding unit includes multiple first initial convolutional units and multiple first initial downsampling units, and the first initial convolutional units correspond one-to-one with the feature information.

[0017] The decoding module is used to decode the multi-layer feature information through the initial decoding unit in the initial reconstruction model to obtain the first reconstructed image of the sample image. The initial decoding unit includes a second initial downsampling unit, multiple second initial convolution units, multiple initial upsampling units, and multiple feature fusion units. The multiple feature fusion units correspond one-to-one with the multi-layer feature information. The multiple feature fusion units are used to fuse the multi-layer feature information with preset weights and multiple first feature information to be spliced ​​output by the multiple initial upsampling units corresponding to the multi-layer feature information.

[0018] A training module is used to train the initial reconstruction model to obtain a target reconstruction model based on the sample image, the first reconstructed image, and the preset weights. The target reconstruction model includes a target encoding unit and a target decoding unit. The preset weights decrease during the training of the initial reconstruction model to obtain the target reconstruction model. The target reconstruction model is used to reconstruct the target reconstruction image corresponding to the image information to be analyzed, so as to determine the anomaly detection result corresponding to the image information to be analyzed based on the image information to be analyzed and the target reconstruction image.

[0019] On the other hand, embodiments of this application provide an anomaly detection device, including:

[0020] The acquisition unit is used to acquire information about the image to be analyzed.

[0021] The input unit is used to input the image information to be analyzed into a preset target reconstruction model to obtain the target reconstruction image corresponding to the image information to be analyzed.

[0022] The determining unit is configured to determine an anomaly detection result corresponding to the image information to be analyzed based on the image information to be analyzed and the target reconstructed image, wherein the anomaly detection result includes first indication information for indicating whether the image information to be analyzed is an abnormal image, and / or second indication information for indicating an abnormal region in the image information to be analyzed;

[0023] The target reconstruction model is the target reconstruction model determined by the reconstruction model training method described above.

[0024] On the other hand, a computer-readable storage medium is provided, the computer-readable storage medium storing a computer program adapted for loading by a processor to execute the reconstruction model training method or the anomaly detection method as described in any of the above embodiments.

[0025] On the other hand, a computer device is provided, the computer device including a processor and a memory, the memory storing a computer program, the processor executing the reconstruction model training method or the anomaly detection method as described in any of the above embodiments by calling the computer program stored in the memory.

[0026] On the other hand, embodiments of this application provide a computer program product, including computer instructions, which, when executed by a processor, implement the reconstruction model training method or the anomaly detection method as described in any of the above embodiments.

[0027] This application embodiment acquires a sample image; encodes the sample image using an initial encoding unit in an initial reconstruction model to obtain multi-layer feature information corresponding to the sample image, wherein the initial encoding unit includes multiple first initial convolutional units and multiple first initial downsampling units, and the first initial convolutional units correspond one-to-one with the feature information; decodes the multi-layer feature information using an initial decoding unit in the initial reconstruction model to obtain a first reconstructed image of the sample image, wherein the initial decoding unit includes a second initial downsampling unit, multiple second initial convolutional units, multiple initial upsampling units, and multiple feature fusion units, and the multiple feature fusion units correspond one-to-one with the multi-layer feature information, the multiple feature fusion units being used to fuse the multi-layer feature information with preset weights and multiple first feature information to be concatenated output by the multiple initial upsampling units corresponding to the multi-layer feature information; based on the sample image, the first reconstructed image, and the preset weights... The initial reconstruction model is trained to obtain a target reconstruction model, which includes a target encoding unit and a target decoding unit. The preset weights are decreased during the training process to obtain the target reconstruction model. The target reconstruction model is used to reconstruct a target reconstructed image corresponding to the image information to be analyzed, thus determining the anomaly detection result based on the image information to be analyzed and the target reconstructed image. This can be achieved by extracting high-dimensional feature information from the sample image through convolution and downsampling, and further reconstructing a first reconstructed image corresponding to the sample image through the fusion of multi-layer feature information. During the training process to obtain the target reconstruction model, the fusion weights of the more global feature information of the sample image are gradually decreased to increase the weights of the high-dimensional feature information of the sample image, i.e., the more global feature information, corresponding to the feature information to be stitched together. This improves the sensitivity to abnormal regions in the sample image and increases the accuracy of anomaly detection. Attached Figure Description

[0028] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0029] Figure 1a This is a schematic diagram of the structure of the data processing system provided in the embodiments of this application.

[0030] Figure 1b This is a schematic diagram of the structure of another data processing system provided in an embodiment of this application.

[0031] Figure 2a This is a flowchart illustrating the reconstructed model training method provided in an embodiment of this application.

[0032] Figure 2b This is a schematic diagram of a scenario for the reconstructed model training method provided in an embodiment of this application.

[0033] Figure 2c This is a schematic diagram showing the relationship between the sample image, the initial reconstruction model, and the first reconstructed image provided in the embodiments of this application.

[0034] Figure 2d This is a schematic diagram showing the relationship between the test image provided in this application embodiment, the second reconstructed image corresponding to the test image determined by the target reconstruction model, and the anomaly discrimination unit.

[0035] Figure 2e This is a schematic diagram illustrating the effect comparison of an embodiment of this application.

[0036] Figure 3 This is a flowchart illustrating the abnormal information detection method provided in an embodiment of this application.

[0037] Figure 4 This is a schematic diagram of the structure of the reconstruction model training device provided in the embodiments of this application.

[0038] Figure 5 This is a schematic diagram of the anomaly detection device provided in an embodiment of this application.

[0039] Figure 6 A schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0040] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0041] The embodiments of this application can be applied to various scenarios such as image processing, medical image analysis, intelligent transportation, and cloud technology.

[0042] This application provides a reconstruction model training method, an anomaly detection method, apparatus, and storage medium. Specifically, the reconstruction model training method of this application can be executed by a computer device, which can be a terminal or a server. The terminal can be a smartphone, tablet, laptop, smart voice interaction device, smart home appliance, wearable smart device, aircraft, smart vehicle terminal, etc. The terminal can also include a client, which can be a video client, browser client, or instant messaging client, etc. The server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery network (CDN), and big data and artificial intelligence platforms.

[0043] For example, when the method is run on a terminal, the terminal can download and install applications for reconstructing model training methods or anomaly detection methods. When the terminal actually runs the aforementioned methods, it is used to display a graphical user interface and interact with the user through the graphical user interface.

[0044] First, some of the nouns or terms that appear in the description of the embodiments of this application are explained as follows:

[0045] Artificial intelligence (AI) is the theory, methods, technology, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that attempts to understand the essence of intelligence and produce a new kind of intelligent machine that can react in a way similar to human intelligence. AI studies the design principles and implementation methods of various intelligent machines, enabling them to possess the functions of perception, reasoning, and decision-making.

[0046] Cloud technology refers to a hosting technology that unifies hardware, software, and network resources within a wide area network (WAN) or local area network (LAN) to achieve data computation, storage, processing, and sharing. Based on the cloud computing business model, cloud technology encompasses network technology, information technology, integration technology, management platform technology, and application technology. It can form resource pools, providing flexible and convenient on-demand access. Cloud computing technology will become a crucial support. Backend services of technical network systems require substantial computing and storage resources, such as video websites, image websites, and many portal websites. With the rapid development and application of the internet industry, every item may have its own identification mark in the future, requiring transmission to backend systems for logical processing. Data at different levels will be processed separately, and various industry data will require robust system support, which can only be achieved through cloud computing.

[0047] A blockchain system can be a distributed system formed by clients and multiple nodes (any form of computing device connected to the network, such as servers and user terminals) connected through network communication. The nodes form a peer-to-peer (P2P) network. The P2P protocol is an application layer protocol running on top of the Transmission Control Protocol (TCP). In a distributed system, any machine, such as a server or terminal, can join and become a node. A node includes a hardware layer, a middleware layer, an operating system layer, and an application layer.

[0048] Deep Learning (DL) is a branch of machine learning that attempts to perform high-level abstractions of data using multiple processing layers with complex structures or multiple nonlinear transformations. Deep learning learns the inherent patterns and hierarchical representations of training sample data; the information gained during this learning process greatly aids in interpreting data such as text, images, and sound. The ultimate goal of deep learning is to enable machines to possess analytical and learning capabilities similar to humans, capable of recognizing data such as text, images, and sound. Deep learning is a complex machine learning algorithm, and its performance in speech and image recognition far surpasses previous related technologies.

[0049] Neural Network (NN): A deep learning model in the fields of machine learning and cognitive science that mimics the structure and function of biological neural networks.

[0050] Intelligent transportation fully utilizes next-generation information technologies such as the Internet of Things, spatial sensing, cloud computing, and mobile internet across the entire transportation sector. It comprehensively applies theories and tools from transportation science, systems methods, artificial intelligence, and knowledge mining. With the goals of comprehensive perception, deep integration, proactive service, and scientific decision-making, it builds a real-time dynamic information service system, deeply mines transportation-related data, forms problem analysis models, and enhances the industry's ability to optimize resource allocation, improve public decision-making capabilities, enhance industry management capabilities, and improve public service capabilities. This promotes safer, more efficient, more convenient, more economical, more environmentally friendly, and more comfortable operation and development of transportation, and drives the transformation and upgrading of transportation-related industries.

[0051] Intelligent Traffic Systems (ITS), also known as Intelligent Transportation Systems, effectively integrate advanced science and technology (information technology, computer technology, data communication technology, sensor technology, electronic control technology, automatic control theory, operations research, artificial intelligence, etc.) into transportation, service control, and vehicle manufacturing. This strengthens the connection between vehicles, roads, and users, thereby forming a comprehensive transportation system that ensures safety, improves efficiency, enhances the environment, and saves energy.

[0052] Skip connection: In a neural network, skipping certain layers from one layer and using the output of the skipped layer as the input of the next layer.

[0053] HOG: Histogram of Oriented Gradients: A feature descriptor used for object detection in computer vision and image processing.

[0054] Autoencoder: An end-to-end network structure consisting of an encoder and a decoder.

[0055] U-Net: A network in an autoencoder that uses multiple skip connections between the encoder and decoder.

[0056] Normal samples and abnormal samples: Normal samples refer to data in a dataset that conforms to the distribution of the majority of samples; otherwise, they are abnormal samples.

[0057] Anomaly detection: The process of detecting samples in a dataset that deviate significantly from the expected distribution of normal samples.

[0058] MemAE: Memory Auto Encoder;

[0059] AnoGAN, anomaly detection Generative Adversarial Network, is an anomaly detection method based on generative adversarial networks.

[0060] f-AnoGAN, a fast anomaly detection Generative Adversarial Network, is a fast anomaly detection method based on generative adversarial networks.

[0061] SparseGAN: A generative adversarial network based on sparse constraints;

[0062] Proxyano: Proxy anomaly detection, anomaly detection based on proxy tasks;

[0063] GANomaly: Semi-Supervised Anomaly Detection via Adversarial Training.

[0064] Please refer to Figure 1a , Figure 1a This is a schematic diagram of the structure of a data processing system provided in an embodiment of this application. The data processing system includes a terminal 10 and a server 20, etc.; the terminal 10 and the server 20 are connected via a network, such as a wired or wireless network.

[0065] Terminal 10 can be used to display a graphical user interface. Terminal 10 is used to interact with the user through the graphical user interface, for example, by downloading and installing a corresponding client and running it, by calling and running a corresponding mini-program, or by presenting a corresponding graphical user interface when logging into a website.

[0066] In this embodiment, the server 20 is used to determine a target reconstruction model. When determining the target reconstruction model, relevant personnel can upload multiple sample images to the server 20 using their terminal devices. The server 20 determines the target reconstruction model based on these multiple sample images. After determining the target reconstruction model, the server 20 can also obtain image information to be analyzed from the terminal 10; input the image information to be analyzed into the target reconstruction model to obtain the target reconstruction image corresponding to the image information to be analyzed; and determine an anomaly detection result corresponding to the image information to be analyzed based on the image information to be analyzed and the target reconstruction image. The anomaly detection result includes first indication information indicating whether the image information to be analyzed is an abnormal image, and / or second indication information indicating abnormal regions in the image information to be analyzed.

[0067] After determining the anomaly detection result corresponding to the image information to be analyzed, the server 20 also sends the anomaly detection result corresponding to the image information to be analyzed to the terminal 10 for display.

[0068] In some optional embodiments of this application, see Figure 1b As shown, the data processing system also includes: a terminal 30; after the server 20 determines the anomaly detection result corresponding to the image information to be analyzed, it is also used to send the anomaly detection result corresponding to the image information to be analyzed to the terminal 30 for display by the terminal 30.

[0069] The server 20 can also send the target reconstruction model to the terminal 10, enabling the terminal 10 to acquire the image information to be analyzed; input the image information to be analyzed into the target reconstruction model to obtain the target reconstruction image corresponding to the image information to be analyzed; and determine the anomaly detection result corresponding to the image information to be analyzed based on the image information to be analyzed and the target reconstruction image, wherein the anomaly detection result includes first indication information for indicating whether the image information to be analyzed is an abnormal image, and / or second indication information for indicating abnormal regions in the image information to be analyzed, and display the anomaly detection result corresponding to the image information to be analyzed.

[0070] Optionally, server 20 is used for:

[0071] Acquire sample images;

[0072] The sample image is encoded by the initial encoding unit in the initial reconstruction model to obtain the multi-layer feature information corresponding to the sample image. The initial encoding unit includes multiple first initial convolution units and multiple first initial downsampling units, and the first initial convolution units correspond one-to-one with the feature information.

[0073] The multi-layer feature information is decoded by the initial decoding unit in the initial reconstruction model to obtain the first reconstructed image of the sample image. The initial decoding unit includes a second initial downsampling unit, multiple second initial convolution units, multiple initial upsampling units, and multiple feature fusion units. The multiple feature fusion units correspond one-to-one with the multi-layer feature information. The multiple feature fusion units are used to fuse the multi-layer feature information with preset weights and the multiple first feature information to be spliced ​​output by the multiple initial upsampling units corresponding to the multi-layer feature information.

[0074] Based on the sample image, the first reconstructed image, and the preset weights, the initial reconstruction model is trained to obtain a target reconstruction model. The target reconstruction model includes a target encoding unit and a target decoding unit. The preset weights decrease during the training of the initial reconstruction model to obtain the target reconstruction model. The target reconstruction model is used to reconstruct the target reconstructed image corresponding to the image information to be analyzed, so as to determine the anomaly detection result corresponding to the image information to be analyzed based on the image information to be analyzed and the target reconstructed image.

[0075] In this embodiment of the application, when performing anomaly detection, terminal 10 can specifically be used for:

[0076] Obtain the image information to be analyzed;

[0077] The image information to be analyzed is input into a preset target reconstruction model to obtain the target reconstruction image corresponding to the image information to be analyzed.

[0078] Based on the image information to be analyzed and the target reconstructed image, an anomaly detection result corresponding to the image information to be analyzed is determined, wherein the anomaly detection result includes first indication information for indicating whether the image information to be analyzed is an abnormal image, and / or second indication information for indicating abnormal regions in the image information to be analyzed.

[0079] The following will provide detailed descriptions of each example. It should be noted that the order of description of the following examples is not intended to limit the priority of the examples.

[0080] The embodiments of this application provide a method for reconstructing model training, which can be executed by a terminal or a server, or by both a terminal and a server. The embodiments of this application illustrate the method for reconstructing model training by a server.

[0081] Figure 2a This is a flowchart illustrating the reconstructed model training method provided in an embodiment of this application. The method includes the following steps S201-S204:

[0082] S201. Obtain sample images;

[0083] The sample images are multiple, and can specifically be images of normal samples that do not contain any abnormalities and are pre-stored by relevant personnel.

[0084] Optionally, the sample images can be images from the medical field, such as images of a user's physical examination.

[0085] S202. The sample image is encoded by the initial encoding unit in the initial reconstruction model to obtain the multi-layer feature information corresponding to the sample image. The initial encoding unit includes multiple first initial convolution units and multiple first initial downsampling units, and the first initial convolution units correspond one-to-one with the feature information.

[0086] Optionally, the kernel of the aforementioned first initial convolutional unit can be a 3*3 convolutional kernel.

[0087] In some optional embodiments of this application, the multi-layer feature information includes top-level feature information and multi-layer non-top-level feature information, the plurality of first initial convolutional units include a top-level first initial convolutional unit and a plurality of non-top-level first initial convolutional units, the plurality of first initial downsampling units correspond one-to-one with the plurality of non-top-level first initial convolutional units, and the plurality of non-top-level first initial convolutional units correspond one-to-one with the multi-layer non-top-level feature information;

[0088] Specifically, the output of the first initial downsampling unit is the input of its corresponding non-top-level first initial convolutional unit.

[0089] Each non-top-level feature is output by its corresponding non-top-level first initial convolutional unit.

[0090] Optionally, in step 202 above, the sample image is encoded by the initial encoding unit in the initial reconstruction model to obtain the multi-layer feature information corresponding to the sample image, including the following steps S2021-S2024:

[0091] S2021. The sample image is convolved by the top-level first initial convolutional unit in the initial encoding unit of the initial reconstruction model to obtain the top-level feature information.

[0092] Optionally, the initial number of channels in the sample image can be the first number of channels;

[0093] When performing convolution processing on the sample image through the top-level first initial convolution unit, the sample image can be convolved for the first time through the top-level first initial convolution unit to obtain an intermediate result with the number of channels equal to the second number of channels; and the intermediate result can be convolved again through the top-level first initial convolution unit to obtain top-level feature information with the number of channels equal to the second number of channels.

[0094] The number of the second channel is greater than the number of the first channel. Optionally, the number of the first channel can be 1 and the number of the second channel can be 64.

[0095] This application also provides a scenario illustration of a reconstructed model training method, such as... Figure 2b As shown, Figure 2bIn this context, "x" can refer to the sample image, and E1 represents the top-level feature information.

[0096] S2022. The top-level feature information is used as the first feature information to be processed;

[0097] S2023. The first feature information to be processed is processed by one of the plurality of first initial downsampling units and the non-top-level first initial convolutional unit corresponding to the first initial downsampling unit to obtain the non-top-level feature information corresponding to the non-top-level first initial convolutional unit of the first initial downsampling unit.

[0098] The first initial downsampling unit can be a max-pooling unit, used to perform max-pooling on the first feature information to be processed, obtaining a pooling result. Then, the pooling result is convolved by the non-top-level first initial convolutional unit corresponding to the first initial downsampling unit to obtain the non-top-level feature information corresponding to the non-top-level first initial convolutional unit. Figure 2b E2 in the equation represents the non-top-level feature information corresponding to the first initial downsampling unit and the first initial convolutional unit.

[0099] S2024. Determine whether the non-top-level feature information corresponding to each of the multiple non-top-level first initial convolutional units has been determined. If yes, then the top-level feature information and the multiple non-top-level feature information corresponding to the multiple non-top-level first initial convolutional units are used as the multi-layer feature information. If no, then the most recently determined non-top-level feature information is used as the new first feature information to be processed, and the process is returned to execute the first feature information to be processed by processing the first feature information through one of the multiple first initial downsampling units and the non-top-level first initial convolutional unit corresponding to the first initial downsampling unit until the non-top-level feature information corresponding to each of the multiple non-top-level first initial convolutional units is determined, and the top-level feature information and the multiple non-top-level feature information corresponding to the multiple non-top-level first initial convolutional units are used as the multi-layer feature information.

[0100] In some optional embodiments of this application, the number of first initial downsampling units is 3, and the number of non-top-level feature information is also 3.

[0101] Specifically, see Figure 2b As shown, Figure 2b E3 and E4 in the data are both non-top-level feature information. Figure 2b The numbers “64”, “128”, “256”, and “512” represent the number of channels.

[0102] The aforementioned multi-layered feature information, from the top layer to the bottom layer, shows that the size of the feature information in each channel gradually decreases.

[0103] Optionally, when the number of the aforementioned multi-layer feature information is 4, the number of channels of the feature information from the top layer to the bottom layer are 64, 128, 256 and 512 respectively, of which the number of channels of the bottom layer feature information is 512.

[0104] S203. The multi-layer feature information is decoded by the initial decoding unit in the initial reconstruction model to obtain the first reconstructed image of the sample image. The initial decoding unit includes a second initial downsampling unit, multiple second initial convolution units, multiple initial upsampling units, and multiple feature fusion units. The multiple feature fusion units correspond one-to-one with the multi-layer feature information. The multiple feature fusion units are used to fuse the multi-layer feature information with preset weights and the multiple first feature information to be spliced ​​output by the multiple initial upsampling units corresponding to the multi-layer feature information.

[0105] Optionally, the multi-layer feature information includes low-level feature information, specifically, Figure 2b E4 in the above refers to the low-level feature information. In the aforementioned S203, the multi-layer feature information is decoded by the initial decoding unit in the initial reconstruction model to obtain the first reconstructed image of the sample image, including the following S2031-S2032:

[0106] S2031. The underlying feature information is processed by the second initial downsampling unit in the initial decoding unit of the initial reconstruction model to obtain the intermediate feature information corresponding to the underlying feature information;

[0107] Specifically, the second initial downsampling unit is a max pooling unit, used to perform max pooling processing on the bottom feature information to obtain the intermediate feature information corresponding to the bottom feature information.

[0108] S2032. The intermediate feature information and the multi-layer feature information are processed by the multiple second initial convolution units, the multiple initial upsampling units, and the multiple feature fusion units in the initial decoding unit of the initial reconstruction model to obtain the first reconstructed image of the sample image.

[0109] Optionally, the plurality of second initial convolutional units include a top-level second initial convolutional unit and a plurality of non-top-level second initial convolutional units, wherein the plurality of non-top-level second initial convolutional units correspond one-to-one with the plurality of initial upsampling units, and the plurality of initial upsampling units correspond one-to-one with the multi-layer feature information;

[0110] The output of the non-top-level second initial convolutional unit is the input of the initial upsampling unit corresponding to the non-top-level second initial convolutional unit.

[0111] In the aforementioned S2032, the intermediate feature information and the multi-layer feature information are processed by the plurality of second initial convolutional units, the plurality of initial upsampling units, and the plurality of feature fusion units in the initial decoding unit of the initial reconstruction model to obtain the first reconstructed image of the sample image, including the following S0321-S0324:

[0112] S0321. Use the intermediate feature information as the second feature information to be processed;

[0113] S0322. The second feature information to be processed is processed by an initial upsampling unit corresponding to one of the multiple non-top-level second initial convolutional units, to obtain the feature information to be fused corresponding to the second feature information to be processed.

[0114] Wherein, the feature information to be fused corresponding to the second feature information to be processed is the feature information to be fused corresponding to the initial upsampling unit that outputs the second feature information to be processed.

[0115] The convolution kernel of the non-top-level second initial convolution unit can be a 3*3 convolution kernel.

[0116] Optionally, in S0322, the aforementioned processing of the second feature information to be processed by one of the plurality of non-top-level second initial convolutional units and the initial upsampling unit corresponding to the non-top-level second initial convolutional unit to obtain the feature information to be fused corresponding to the second feature information to be processed includes:

[0117] The second feature information to be processed is convolved by one of the multiple non-top-level second initial convolutional units to obtain a convolution result. The convolution result is then processed by the initial upsampling unit corresponding to the non-top-level second initial convolutional unit to obtain the feature information to be fused corresponding to the second feature information to be processed.

[0118] Specifically, such as Figure 2b As shown, z is the convolution result, and D4 is the feature information to be fused corresponding to the second feature information to be processed.

[0119] S0323. Using one of the multiple feature fusion units in the initial reconstruction model, the feature information corresponding to the feature fusion unit with a preset weight is fused with the feature information to be fused to obtain the fusion result corresponding to the feature fusion unit.

[0120] The initial upsampling unit corresponds one-to-one with the feature fusion unit. The output of the initial upsampling unit is one of the inputs of the feature fusion unit corresponding to the initial upsampling unit, and the other input of the feature fusion unit is the feature information corresponding to the feature fusion unit.

[0121] Specifically, the input of the feature fusion unit includes the feature information corresponding to the feature fusion unit and the most recently determined feature information to be fused, and the output of the feature fusion unit is the fusion result corresponding to the feature fusion unit.

[0122] In some optional embodiments of this application, each feature fusion unit includes a summation unit and a splicing unit. In the aforementioned S0323, through one of the multiple feature fusion units in the initial reconstruction model, the feature information corresponding to the feature fusion unit with a preset weight is fused with the feature information to be fused to obtain the fusion result corresponding to the feature fusion unit, including the following S0323-S0324:

[0123] S0323. Using the summation unit in one of the multiple feature fusion units in the initial reconstruction model, the target weight of the feature information to be fused is determined according to the preset weight; the feature information corresponding to the feature fusion unit with the preset weight is weighted and summed with the feature information to be fused with the target weight to obtain the summation result;

[0124] S0324. By using the splicing unit in the feature fusion unit, the summation result and the feature information to be fused are spliced ​​together to obtain the fusion result corresponding to the feature fusion unit.

[0125] For details, please refer to Figure 2b As shown, α is a preset weight. Determining the target weight of the feature information to be fused based on the preset weight includes: taking the difference between 1 and the preset weight as the target weight.

[0126] Optionally, the feature information corresponding to the feature fusion unit with a preset weight and the feature information to be fused with a target weight are weighted and summed to obtain the summation result, which can be achieved by the following formula:

[0127]

[0128] Among them, M i For the summation result, α is the preset weight, and E i For the feature information corresponding to the feature fusion unit, D i The feature information to be fused is α∈[0,1].

[0129] In this case, the feature information input to the same feature fusion unit and the feature information to be fused have the same feature size and the same number of channels for each channel.

[0130] Optionally, the initial value of the preset weights can be 1, and the preset weights can be 0 when the target reconstruction model is determined.

[0131] Optionally, the aforementioned feature fusion unit uses a splicing unit to splice the summation result with the feature information to be fused to obtain the fusion result corresponding to the feature fusion unit, which can be achieved through the following formula:

[0132] D = Concat(M) i D i )

[0133] Among them, M i To find the sum, D i For the feature information to be fused, Concat(·) is used to stitch M together. i With D i The splicing function, where D is the fusion result.

[0134] S0324. Determine whether the fusion result corresponding to each feature fusion unit in the plurality of feature fusion units has been determined. If yes, process the most recently determined fusion result through the top-level second initial convolution unit to obtain the first reconstructed image of the sample image. If no, take the most recently determined fusion result as the new second feature information to be processed, and return to execute the second feature information to be processed through one of the plurality of non-top-level second initial convolution units and the initial upsampling unit corresponding to the non-top-level second initial convolution unit until the fusion result corresponding to each feature fusion unit in the plurality of feature fusion units is determined. Then process the most recently determined fusion result through the top-level second initial convolution unit to obtain the first reconstructed image of the sample image.

[0135] For details, please refer to Figure 2b As shown, D3, D2, and D1 are multiple feature information to be fused, and their determination times are from front to back.

[0136] S204. Based on the sample image, the first reconstructed image, and the preset weights, the initial reconstruction model is trained to obtain a target reconstruction model, wherein the target reconstruction model includes a target encoding unit and a target decoding unit, wherein the preset weights decrease during the training of the initial reconstruction model to obtain the target reconstruction model, wherein the target reconstruction model is used to reconstruct the target reconstructed image corresponding to the image information to be analyzed, so as to determine the anomaly detection result corresponding to the image information to be analyzed based on the image information to be analyzed and the target reconstructed image;

[0137] Optionally, the relationship diagram between the sample image, the initial reconstruction model, and the first reconstructed image can be found in [reference needed]. Figure 2c As shown.

[0138] Optionally, in S204, the initial reconstruction model is trained to obtain the target reconstruction model based on the sample image, the first reconstructed image, and the preset weights, including:

[0139] S041. Obtain the preset second loss function;

[0140] S042. Input the sampled image and the first reconstructed image into the second loss function to obtain the second loss information;

[0141] S043. Determine whether the second loss information meets the second preset condition. If yes, use the initial reconstruction model as the target reconstruction model. If no, use the second loss information to determine the second model parameters to be updated of the initial reconstruction model. Use the second model parameters to be updated as the model parameters of the initial reconstruction model. Return to execute the encoding of the sample image through the initial encoding unit in the initial reconstruction model to obtain the multi-layer feature information corresponding to the sample image until the second loss information meets the second preset condition. Use the initial reconstruction model as the target reconstruction model. The second model parameters to be updated include: the parameters to be updated in the initial encoding unit and the parameters to be updated in the initial decoding unit.

[0142] Optionally, when the second loss information is less than a preset threshold, it is determined that the second loss information meets the second preset condition; when the second loss information is not less than the preset threshold, it is determined that the second loss information does not meet the second preset condition.

[0143] After the preset weights decrease to 0 according to the preset step size, there is no need to execute the aforementioned S043; the aforementioned process of using the initial reconstruction model as the target reconstruction model can be directly initiated.

[0144] Optionally, the above method further includes: determining an anomaly detection model based on the target reconstruction model.

[0145] Optionally, an anomaly detection model is determined based on the target reconstruction model, including:

[0146] A connection is created between the target reconstruction model and a preset anomaly discrimination unit to obtain the anomaly information detection model. The target reconstruction model is used to output the target reconstruction image corresponding to the image information to be analyzed based on the acquired image information to be analyzed. The anomaly discrimination unit is used to determine the anomaly detection result based on the image information to be analyzed and the target reconstruction image.

[0147] The anomaly detection result includes first indication information for indicating whether the image information to be analyzed is an abnormal image, and / or second indication information for indicating abnormal regions in the image information to be analyzed.

[0148] Optionally, the first indication information may also include scoring information, where a higher score indicates a higher similarity value between the image information to be analyzed and the target reconstructed image.

[0149] In some optional embodiments of this application, when the aforementioned anomaly discrimination unit is used to determine the anomaly detection result based on the image information to be analyzed and the target reconstructed image, it is specifically used for:

[0150] The similarity value between the image information to be analyzed and the target reconstructed image is determined. If the similarity value is less than a preset similarity value, the image information to be analyzed is determined to be an abnormal image, and a first indication message is output to indicate that the image information to be analyzed is an abnormal image.

[0151] Optionally, the first instruction information can be text information.

[0152] In some other optional embodiments of this application, when the aforementioned anomaly discrimination unit is used to determine the anomaly detection result based on the image information to be analyzed and the target reconstructed image, it is specifically used for:

[0153] Calculate the difference (or the absolute value of the difference) between the image information to be analyzed and the target reconstructed image to obtain the difference result. The difference result includes the pixel value difference corresponding to each pixel in the image information to be analyzed. The larger the pixel value difference corresponding to each pixel in the image information to be analyzed, the greater the possibility that the pixel belongs to an abnormal region.

[0154] In the difference result, the pixel value difference of pixels whose pixel value difference is less than a preset threshold is set to 0, and the processed difference result is obtained.

[0155] An anomaly detection result is generated based on the processed difference result. Specifically, the anomaly detection result can be an image, which serves as a second indication information for indicating abnormal regions in the image information to be analyzed.

[0156] In some optional embodiments of this application, the absolute value of the difference between the image information to be analyzed and the target reconstructed image is calculated to obtain the difference result, which can be achieved by the following formula:

[0157]

[0158] Where, x t For the image information to be analyzed, The image is reconstructed for the target, and F1 is the difference result.

[0159] In some optional embodiments of this application, the above method further includes:

[0160] Acquire a test image, wherein the test image is an abnormal image (abnormal sample);

[0161] The test image is input into the aforementioned anomaly detection model to obtain a detection result, wherein the detection result includes: first indication information for indicating whether the test image is an anomalous image, and / or second indication information for indicating anomaly regions in the test image.

[0162] If the detection result indicates that the test image is a normal image, the above method further includes:

[0163] Adjust the model parameters in the target reconstruction model of the anomaly detection model, use the target reconstruction model as the initial reconstruction model, and retrain the new target reconstruction model based on the initial reconstruction model.

[0164] Optionally, the relationship diagram between the test image, the second reconstructed image corresponding to the test image determined by the target reconstruction model, and the anomaly detection unit can be found in [reference needed]. Figure 2d As shown.

[0165] Optionally, the model parameters in the initial reconstruction model can be adjusted according to the adjustment instructions of relevant personnel.

[0166] In some optional embodiments of this application, the method includes the following steps S01-S02:

[0167] S01. Obtain the preset feature extraction operator;

[0168] S02. Determine the first directional gradient histogram feature corresponding to the sample image based on the preset feature extraction operator and the sample image;

[0169] The preset feature extraction operator can refer to the cell unit used to determine the first directional gradient histogram feature corresponding to the sample image.

[0170] The method further includes:

[0171] The second directional gradient histogram feature corresponding to the first reconstructed image is determined based on the preset feature extraction operator and the first reconstructed image;

[0172] In the aforementioned S204, training the initial reconstruction model to obtain the target reconstruction model based on the sample image, the first reconstructed image, and the preset weights includes: training the initial reconstruction model to obtain the target reconstruction model based on the sample image, the first reconstructed image, the first directional gradient histogram features, the second directional gradient histogram features, and the preset weights.

[0173] Optionally, the aforementioned training of the initial reconstruction model to obtain the target reconstruction model based on the sample image, the first reconstructed image, the first histogram of directional gradients (HCG) features, the second histogram of directional gradients (HCG) features, and the preset weights may include the following steps S2041-S2043:

[0174] S2041. Obtain the preset first loss function;

[0175] S2042. Input the sampled image, the first reconstructed image, the first directional gradient histogram feature, and the second directional gradient histogram feature into the first loss function to obtain the first loss information;

[0176] In some optional embodiments of this application, the first loss function can be a mean squared loss function. The sampled image, the first reconstructed image, the first histogram of directional gradients (HCG) feature, and the second histogram of directional gradients (HCG) feature are input into the first loss function to obtain the first loss information, which can be achieved through the following formula:

[0177]

[0178] Where x is the sample image, For the first reconstructed image, x h The first-direction gradient histogram features are... F1 represents the second directional gradient histogram feature, and F2 represents the first loss information.

[0179] S2043. Determine whether the first loss information meets the first preset condition. If yes, use the initial reconstruction model as the target reconstruction model. If no, use the first loss information to determine the first model parameter to be updated of the initial reconstruction model. Use the first model parameter to be updated as the model parameter of the initial reconstruction model. Return to execute the encoding of the sample image through the initial encoding unit in the initial reconstruction model to obtain the multi-layer feature information corresponding to the sample image until the first loss information meets the first preset condition. Use the initial reconstruction model as the target reconstruction model. The parameter to be updated includes the parameter to be updated in the initial encoding unit and the parameter to be updated in the initial decoding unit.

[0180] Optionally, the above method further includes: after the preset weight is reduced to 0 according to a preset step size, without executing the aforementioned S2043, directly starting the aforementioned initial reconstruction model as the target reconstruction model.

[0181] Optionally, the first model parameter to be updated in the initial reconstruction model can be determined by using the first loss information according to the principle of minimizing the first loss information. For specific methods of using the first loss information to determine the first model parameter to be updated in the initial reconstruction model, please refer to related technologies, which are not limited in this application.

[0182] Optionally, when the first loss information is less than a preset threshold, it is determined that the first loss information meets the first preset condition; when the first loss information is not less than the preset threshold, it is determined that the first loss information does not meet the first preset condition.

[0183] In some optional embodiments of this application, in S01, obtaining a preset feature extraction operator may include: obtaining a plurality of candidate feature extraction operators, wherein different candidate feature extraction operators among the plurality of candidate feature extraction operators have different sizes; and selecting one candidate feature extraction operator from the plurality of candidate feature extraction operators as the preset feature extraction operator.

[0184] Optionally, the candidate feature extraction operator may refer to a cell unit used to determine the first directional gradient histogram feature corresponding to the sample image. The size of the multiple candidate feature extraction operators may include: 4*4, 8*8, 16*16. This application does not limit the size of the candidate feature extraction operator.

[0185] Optionally, the sample image can be encoded once by the initial encoding unit in the initial reconstruction model each time it is returned, and a preset feature extraction operator can be obtained once.

[0186] In some optional embodiments of this application, if the size of the aforementioned sample image is larger than a preset size, the above method further includes:

[0187] The sample image is split into multiple sample sub-images;

[0188] The multiple sample sub-images are used as new multiple sample images.

[0189] Optionally, the sample image can be encoded once by the initial encoding unit in the initial reconstruction model each time it is returned, and the preset weight can be reduced once according to the preset step size control.

[0190] In some optional embodiments of this application, Figure 2b X in h (i.e., "(a)") represents multiple first-direction gradient histogram features determined by multiple candidate feature extraction operators, x h The first directional gradient histogram feature is determined based on the sample image.

[0191] The scheme in this application allows for the analysis of the internal structure of sample images at different granularities by changing the size of the preset feature extraction operator during the training process of the target reconstruction model, thereby improving the accuracy of sample image reconstruction.

[0192] In some optional embodiments of this application, the network structure of the aforementioned initial reconstruction model can be a U-net structure, specifically, it can be... Figure 2b The U-net structure based on skip connections in the text.

[0193] During the training process from the initial reconstruction model to the target reconstruction model, the preset weights can gradually decrease from 1 to 0. The training focus of the initial reconstruction model gradually shifts from the horizontal direction of the skip connections in the initial decoding unit to the vertical direction from top to bottom. Therefore, the global feature information of the image learned in the early stages is gradually aggregated into high-dimensional feature information. Finally, when the preset weights are 0, the network structure of the initial reconstruction model is an encoder-decoder network without skip connections.

[0194] Optionally, the target reconstruction model in this application can be represented as:

[0195]

[0196] Where Dec(·) and Enc(·) represent the target encoding unit and target decoding unit of the target reconstruction model, respectively. The target encoding unit is the initial encoding unit in the trained initial reconstruction model, and the target decoding unit is the initial encoding unit in the trained initial reconstruction model.

[0197] In this application, when fusing feature information and the corresponding first feature information to be stitched together, the preset weights of the feature information gradually decrease as the training progress of the target reconstruction model. This allows for oversampling of the feature information, resulting in a gradual increase in the weights of the first feature information to be stitched together. This introduces the analysis of high-dimensional information in the sample image, improving the accuracy of sample image reconstruction. Furthermore, by introducing a weight decay training method for skip connections in U-Net, this application avoids the initial reconstruction model from ignoring high-dimensional features of the image by passing information through skip connections. This enhances the feature aggregation capability of the initial reconstruction model during training, reduces the occurrence of identity mapping in the initial reconstruction model, learns more effective features of normal images, and further improves its performance for anomaly detection in images.

[0198] In some optional embodiments of this application, in addition to the introduction of the directional gradient histogram features mentioned above, the aforementioned target reconstruction model can also be trained based on the introduction of other information, such as:

[0199] The above method further includes: performing discrete wavelet transform processing on the sample image to obtain a first auxiliary feature; the method further includes: performing discrete wavelet transform processing on the first reconstructed image to obtain a first reference feature; and training the initial reconstruction model to obtain a target reconstruction model based on the sample image, the first reconstructed image, and the preset weights, including: training the initial reconstruction model to obtain a target reconstruction model based on the sample image, the first reconstructed image, the first auxiliary feature, the first reference feature, and the preset weights.

[0200] In some optional embodiments of this application, the above method further includes: performing scale-invariant feature transformation on the sample image to obtain a second auxiliary feature; the method further includes: performing scale-invariant feature transformation on the first reconstructed image to obtain a second reference feature; and training the initial reconstruction model to obtain a target reconstruction model based on the sample image, the first reconstructed image, and the preset weights, including: training the initial reconstruction model to obtain a target reconstruction model based on the sample image, the first reconstructed image, the second auxiliary feature, the second reference feature, and the preset weights.

[0201] This application embodiment acquires a sample image; encodes the sample image using an initial encoding unit in an initial reconstruction model to obtain multi-layer feature information corresponding to the sample image, wherein the initial encoding unit includes multiple first initial convolutional units and multiple first initial downsampling units, and the first initial convolutional units correspond one-to-one with the feature information; decodes the multi-layer feature information using an initial decoding unit in the initial reconstruction model to obtain a first reconstructed image of the sample image, wherein the initial decoding unit includes a second initial downsampling unit, multiple second initial convolutional units, multiple initial upsampling units, and multiple feature fusion units, and the multiple feature fusion units correspond one-to-one with the multi-layer feature information, the multiple feature fusion units being used to fuse the multi-layer feature information with preset weights and multiple first feature information to be concatenated output by the multiple initial upsampling units corresponding to the multi-layer feature information; based on the sample image, the first reconstructed image, and the preset weights... The initial reconstruction model is trained to obtain a target reconstruction model, which includes a target encoding unit and a target decoding unit. The preset weights are decreased during the training process to obtain the target reconstruction model. The target reconstruction model is used to reconstruct a target reconstructed image corresponding to the image information to be analyzed, thus determining the anomaly detection result based on the image information to be analyzed and the target reconstructed image. This can be achieved by extracting high-dimensional feature information from the sample image through convolution and downsampling, and further reconstructing a first reconstructed image corresponding to the sample image through the fusion of multi-layer feature information. During the training process to obtain the target reconstruction model, the fusion weights of the more global feature information of the sample image are gradually decreased to increase the weights of the high-dimensional feature information of the sample image, i.e., the more global feature information, corresponding to the feature information to be stitched together. This improves the sensitivity to abnormal regions in the sample image and increases the accuracy of anomaly detection.

[0202] Figure 3 This is a flowchart illustrating the anomaly detection method provided in an embodiment of this application. The method includes the following steps S301-S303:

[0203] S301. Obtain the image information to be analyzed;

[0204] The image information to be analyzed can be images from the medical field, such as images from a user's medical examination.

[0205] S302. Input the image information to be analyzed into a preset target reconstruction model to obtain the target reconstruction image corresponding to the image information to be analyzed.

[0206] S303. Determine the anomaly detection result corresponding to the image information to be analyzed based on the image information to be analyzed and the target reconstructed image, wherein the anomaly detection result includes first indication information for indicating whether the image information to be analyzed is an abnormal image, and / or second indication information for indicating abnormal regions in the image information to be analyzed;

[0207] Optionally, determining the anomaly detection result corresponding to the image information to be analyzed based on the image information to be analyzed and the target reconstructed image may include:

[0208] The similarity value between the image information to be analyzed and the target reconstructed image is determined. If the similarity value is less than a preset similarity value, the image information to be analyzed is determined to be an abnormal image, and a first indication message is output to indicate that the image information to be analyzed is an abnormal image.

[0209] Optionally, S303 can be implemented based on the aforementioned anomaly detection unit.

[0210] The target reconstruction model is the target reconstruction model determined by the aforementioned reconstruction model training method.

[0211] The solution proposed in this application can be applied to the field of medical technology. Specifically, it can determine whether there are abnormalities in the corresponding body parts of the user, as well as the corresponding abnormal areas, based on the user's medical examination images.

[0212] The method in this application evaluates the effectiveness of anomaly detection based on DRiD (Diabetic Retinopathy Image Dataset). The aforementioned sample images were obtained from DRiD, and the aforementioned test images were also obtained from DRiD.

[0213] Optionally, 134 normal images can be obtained from DRiD as sample images, and 81 images with lesion areas (abnormal images) can be obtained as test images. The pixel-level labels of the images with lesion areas can include four different types of lesions: hemorrhages, microaneurysms, hard exudates, and soft exudates.

[0214] When the size of the sample image is larger than the preset size, each sample image can be divided into 9 non-overlapping sub-images as multiple sample images, and 3 types of directional gradient histogram features determined according to cell units of different scales (cell unit sizes are 4×4, 8×8, and 16×16 respectively) can be extracted for each sub-image.

[0215] Optionally, during the aforementioned process of training the target reconstruction model, the Adam optimizer can determine new model parameters for the initial reconstruction model based on either the first or second loss information. Specifically, during the training of the target reconstruction model, the learning rate can be 1×10⁻⁴, the Adam optimizer weight decay step size is 5×10⁻⁵, and the batch size is 32. The preset weights are initialized to 1 and decay by Δ in each training epoch. The default value of Δ is 0.05, and decay stops when α reaches 0.

[0216] This application uses AUC (Area Under Curve, an evaluation metric), ACC (Accuracy, balanced accuracy), and F1 score to measure the accuracy of anomaly detection of images based on this scheme compared with the accuracy of anomaly detection of images based on other schemes.

[0217] The technical solution of this application involves three key functionalities: a skip connection structure, a weight decay function, and the introduction of directional gradient histogram features. To verify the effectiveness of each key function, this application compares the anomaly detection accuracy after introducing different key functions. As shown in Table 1, using only the skip connection structure cannot improve the network's anomaly detection performance (i.e., anomaly detection accuracy), while introducing the weight decay function can effectively improve the model's anomaly detection performance. Furthermore, introducing directional gradient histogram features can further improve anomaly detection performance, thus proving the effectiveness of this application. The data in Table 1 represent the anomaly detection accuracy values.

[0218] Table 1 compares the anomaly detection accuracy of this scheme based on different combinations of the three key functions introduced by DRiD.

[0219]

[0220] Figure 2e This diagram illustrates a comparison between the reconstruction results and reconstruction errors of a normal image based on the target reconstruction model provided in this embodiment, and the annotations of abnormal regions (lesions) in the normal image determined by the anomaly detection method provided in this embodiment, and the reconstruction results and reconstruction errors of an abnormal image based on the target reconstruction model provided in this embodiment, as well as the reconstruction errors output by the anomaly detection method provided in this embodiment, and the annotations of abnormal regions (lesions) in the abnormal image determined by the anomaly detection method provided in this embodiment. Figure 2eIt can be seen that the reconstruction results for normal images have a small reconstruction error, while the reconstruction results for abnormal images have a large reconstruction error. Furthermore, the reconstruction error determined by the method provided in the embodiments of this application matches the corresponding lesion annotations well, which also verifies the effectiveness of this application.

[0221] This paper also compares the anomaly detection performance (accuracy of anomaly detection) of the proposed solution with other solutions on three evaluation metrics: AUC, ACC, and F1-score. As shown in Table 2, on the DRiD dataset, the anomaly detection performance of the proposed solution surpasses that of autoencoder-based and generative adversarial network-based learning methods in related technologies, thus verifying the effectiveness of this application. The data in Table 2 represent the anomaly detection accuracy values.

[0222] Table 2 compares the anomaly detection performance of the proposed solution with other solutions on the three evaluation metrics of AUC, ACC, and F1-score.

[0223]

[0224] All of the above technical solutions can be combined in any way to form optional embodiments of this application, and will not be described in detail here.

[0225] To facilitate better implementation of the reconstruction model training method of this application, this application also provides a reconstruction model training apparatus. Please refer to... Figure 4 , Figure 4 This is a schematic diagram of the structure of the reconstruction model training device provided in an embodiment of this application. The reconstruction model training device 40 may include:

[0226] Acquisition module 41 is used to acquire sample images;

[0227] The encoding module 42 is used to encode the sample image through the initial encoding unit in the initial reconstruction model to obtain multi-layer feature information corresponding to the sample image. The initial encoding unit includes multiple first initial convolution units and multiple first initial downsampling units, and the first initial convolution units correspond one-to-one with the feature information.

[0228] Decoding module 43 is used to decode the multi-layer feature information through the initial decoding unit in the initial reconstruction model to obtain the first reconstructed image of the sample image. The initial decoding unit includes a second initial downsampling unit, multiple second initial convolution units, multiple initial upsampling units, and multiple feature fusion units. The multiple feature fusion units correspond one-to-one with the multi-layer feature information. The multiple feature fusion units are used to fuse the multi-layer feature information with preset weights and the multiple first feature information to be spliced ​​output by the multiple initial upsampling units corresponding to the multi-layer feature information.

[0229] Training module 44 is used to train the initial reconstruction model to obtain a target reconstruction model based on the sample image, the first reconstructed image, and the preset weights. The target reconstruction model includes a target encoding unit and a target decoding unit. The preset weights decrease during the training of the initial reconstruction model to obtain the target reconstruction model. The target reconstruction model is used to reconstruct the target reconstruction image corresponding to the image information to be analyzed, so as to determine the anomaly detection result corresponding to the image information to be analyzed based on the image information to be analyzed and the target reconstruction image.

[0230] Optionally, the reconstructed model training device 40 can also be used for:

[0231] Obtain the preset feature extraction operator;

[0232] The first directional gradient histogram feature corresponding to the sample image is determined based on the preset feature extraction operator and the sample image;

[0233] The reconstructed model training device 40 is also used for:

[0234] The second directional gradient histogram feature corresponding to the first reconstructed image is determined based on the preset feature extraction operator and the first reconstructed image;

[0235] When the training module 44 is used to train the initial reconstruction model to obtain the target reconstruction model based on the sample image, the first reconstructed image, and the preset weights, it is specifically used to: train the initial reconstruction model to obtain the target reconstruction model based on the sample image, the first reconstructed image, the first directional gradient histogram feature, the second directional gradient histogram feature, and the preset weights.

[0236] Optionally, when the training module 44 is used to train the initial reconstruction model to obtain the target reconstruction model based on the sample image, the first reconstructed image, the first histogram of directional gradients (HCG) features, the second histogram of directional gradients (HCG) features, and the preset weights, it is specifically used for:

[0237] Obtain the preset first loss function;

[0238] The sampled image, the first reconstructed image, the first directional gradient histogram feature, and the second directional gradient histogram feature are input into the first loss function to obtain the first loss information;

[0239] Determine whether the first loss information meets the first preset condition. If yes, use the initial reconstruction model as the target reconstruction model. If no, use the first loss information to determine the first model parameters to be updated of the initial reconstruction model. Use the first model parameters to be updated as the model parameters of the initial reconstruction model. Return to execute the encoding of the sample image through the initial encoding unit in the initial reconstruction model to obtain the multi-layer feature information corresponding to the sample image. Continue until the first loss information meets the first preset condition and the initial reconstruction model is used as the target reconstruction model. The parameters to be updated include the parameters to be updated in the initial encoding unit and the parameters to be updated in the initial decoding unit.

[0240] Optionally, the device is further configured to: determine that the first loss information meets a first preset condition when the first loss information is less than a preset threshold, and determine that the first loss information does not meet the first preset condition when the first loss information is not less than the preset threshold.

[0241] Optionally, when the device is used to acquire a preset feature extraction operator, it is specifically used for:

[0242] Multiple candidate feature extraction operators are obtained, wherein the different candidate feature extraction operators have different sizes;

[0243] Choose one of the multiple candidate feature extraction operators as the preset feature extraction operator.

[0244] Optionally, the multi-layer feature information includes top-level feature information and multi-layer non-top-level feature information, the plurality of first initial convolutional units include a top-level first initial convolutional unit and a plurality of non-top-level first initial convolutional units, the plurality of first initial downsampling units correspond one-to-one with the plurality of non-top-level first initial convolutional units, and the plurality of non-top-level first initial convolutional units correspond one-to-one with the multi-layer non-top-level feature information;

[0245] When the aforementioned device is used to encode the sample image through the initial encoding unit in the initial reconstruction model to obtain the multi-layer feature information corresponding to the sample image, it is specifically used for:

[0246] The sample image is convolved by the top-level first initial convolutional unit in the initial encoding unit of the initial reconstruction model to obtain the top-level feature information;

[0247] The top-level feature information is used as the first feature information to be processed;

[0248] The first feature information to be processed is processed by one of the plurality of first initial downsampling units and the non-top-level first initial convolutional unit corresponding to the first initial downsampling unit, to obtain the non-top-level feature information corresponding to the non-top-level first initial convolutional unit of the first initial downsampling unit.

[0249] If the non-top-level feature information corresponding to each of the multiple non-top-level first initial convolutional units is determined, then the top-level feature information and the multiple non-top-level feature information corresponding to the multiple non-top-level first initial convolutional units are used as the multi-layer feature information. If not, the most recently determined non-top-level feature information is used as the new first feature information to be processed, and the process returns to processing the first feature information to be processed through one of the multiple first initial downsampling units and the non-top-level first initial convolutional unit corresponding to the first initial downsampling unit until the non-top-level feature information corresponding to each of the multiple non-top-level first initial convolutional units is determined, and the top-level feature information and the multiple non-top-level feature information corresponding to the multiple non-top-level first initial convolutional units are used as the multi-layer feature information.

[0250] Optionally, the multi-layer feature information includes low-layer feature information. When the aforementioned device is used to decode the multi-layer feature information through the initial decoding unit in the initial reconstruction model to obtain the first reconstructed image of the sample image, it is specifically used for:

[0251] The underlying feature information is processed by the second initial downsampling unit in the initial decoding unit of the initial reconstruction model to obtain the intermediate feature information corresponding to the underlying feature information;

[0252] The intermediate feature information and the multi-layer feature information are processed by the multiple second initial convolution units, the multiple initial upsampling units, and the multiple feature fusion units in the initial decoding unit of the initial reconstruction model to obtain the first reconstructed image of the sample image.

[0253] Optionally, the plurality of second initial convolutional units include a top-level second initial convolutional unit and a plurality of non-top-level second initial convolutional units, wherein the plurality of non-top-level second initial convolutional units correspond one-to-one with the plurality of initial upsampling units. When the aforementioned apparatus is used to process the intermediate feature information and the multi-layer feature information through the plurality of second initial convolutional units, the plurality of initial upsampling units, and the plurality of feature fusion units in the initial decoding unit of the initial reconstruction model to obtain the first reconstructed image of the sample image, it is specifically used for:

[0254] The intermediate feature information is used as the second feature information to be processed;

[0255] The second feature information to be processed is processed by an initial upsampling unit corresponding to one of the multiple non-top-level second initial convolutional units, thereby obtaining the feature information to be fused corresponding to the second feature information to be processed.

[0256] By using one of the multiple feature fusion units in the initial reconstruction model, the feature information corresponding to the feature fusion unit with a preset weight is fused with the feature information to be fused to obtain the fusion result corresponding to the feature fusion unit.

[0257] If the fusion result corresponding to each feature fusion unit in the plurality of feature fusion units has been determined, then the most recently determined fusion result is processed by the top-level second initial convolutional unit to obtain the first reconstructed image of the sample image; otherwise, the most recently determined fusion result is used as the new second feature information to be processed, and the process returns to execute the second feature information to be processed by the initial upsampling unit corresponding to one of the plurality of non-top-level second initial convolutional units until the fusion result corresponding to each feature fusion unit in the plurality of feature fusion units is determined. Then, the most recently determined fusion result is processed by the top-level second initial convolutional unit to obtain the first reconstructed image of the sample image.

[0258] Optionally, each feature fusion unit includes a summation unit and a splicing unit. When the aforementioned device is used to fuse feature information corresponding to the feature fusion unit with preset weights and the feature information to be fused with one of the multiple feature fusion units in the initial reconstruction model to obtain the fusion result corresponding to the feature fusion unit, it is specifically used for:

[0259] The target weight of the feature information to be fused is determined by the summation unit of one of the multiple feature fusion units in the initial reconstruction model according to the preset weight; the feature information corresponding to the feature fusion unit with the preset weight is weighted and summed with the feature information to be fused with the target weight to obtain the summation result;

[0260] The summation result and the feature information to be fused are spliced ​​together by the splicing unit in the feature fusion unit to obtain the fusion result corresponding to the feature fusion unit.

[0261] To facilitate better implementation of the anomaly detection method of this application, this application also provides an anomaly detection device. Please refer to... Figure 5 , Figure 5 This is a schematic diagram of the anomaly detection device provided in an embodiment of this application. The anomaly detection device 50 may include:

[0262] Acquisition unit 51 is used to acquire information about the image to be analyzed;

[0263] Input unit 52 inputs the image information to be analyzed into a preset target reconstruction model to obtain the target reconstruction image corresponding to the image information to be analyzed;

[0264] The determining unit 53 is used to determine the anomaly detection result corresponding to the image information to be analyzed based on the image information to be analyzed and the target reconstructed image, wherein the anomaly detection result includes first indication information for indicating whether the image information to be analyzed is an abnormal image, and / or second indication information for indicating an abnormal region in the image information to be analyzed;

[0265] The target reconstruction model is the target reconstruction model determined by the aforementioned reconstruction model training method.

[0266] Each unit or module of the aforementioned reconstruction model training device and anomaly detection device can be implemented entirely or partially through software, hardware, or a combination thereof. Each of these units can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each unit.

[0267] Optionally, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0268] Figure 6 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. The computer device may be... Figure 1aThe terminal 10 or server 20 shown. For example... Figure 6 As shown, the computer device 600 may include: a communication interface 601, a memory 602, a processor 603, and a communication bus 604. The communication interface 601, memory 602, and processor 603 communicate with each other via the communication bus 604. The communication interface 601 is used for data communication between the computer device 600 and external devices. The memory 602 can be used to store software programs and modules, and the processor 603 runs the software programs and modules stored in the memory 602, such as the software programs for the corresponding operations in the foregoing method embodiments.

[0269] Optionally, the processor 603 can call software programs and modules stored in the memory 602 to execute the above-mentioned reconstructed model training method or anomaly detection method.

[0270] This application also provides a computer-readable storage medium for storing a computer program. This computer-readable storage medium can be applied to a computer device, and the computer program causes the computer device to execute the corresponding processes in the methods described in the embodiments of this application; for brevity, these will not be elaborated further here.

[0271] This application also provides a computer program product including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the corresponding processes in the methods described in the embodiments of this application. For brevity, these details will not be elaborated further here.

[0272] This application also provides a computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the corresponding processes in the methods described in the embodiments of this application. For the sake of brevity, these details will not be elaborated further here.

[0273] It should be understood that the processor in the embodiments of this application may be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the above method embodiments can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor described above can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.

[0274] It is understood that the memory in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DR RAM). It should be noted that the memory used in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0275] It should be understood that the above-described memory is exemplary and not a limiting description. For example, the memory in the embodiments of this application may also be static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DR RAM), etc. That is to say, the memory in the embodiments of this application is intended to include, but is not limited to, these and any other suitable types of memory.

[0276] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can 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.

[0277] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0278] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0279] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0280] In addition, the functional units in the embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0281] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer or a server) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.

[0282] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for reconstructing model training, characterized in that, The method includes: Acquire sample images; The sample image is encoded by the initial encoding unit in the initial reconstruction model to obtain the multi-layer feature information corresponding to the sample image. The initial encoding unit includes multiple first initial convolution units and multiple first initial downsampling units, and the first initial convolution units correspond one-to-one with the feature information. The multi-layer feature information is decoded by the initial decoding unit in the initial reconstruction model to obtain the first reconstructed image of the sample image. The initial decoding unit includes a second initial downsampling unit, multiple second initial convolution units, multiple initial upsampling units, and multiple feature fusion units. The multiple feature fusion units correspond one-to-one with the multi-layer feature information. The multiple feature fusion units are used to fuse the multi-layer feature information with preset weights and the multiple first feature information to be spliced ​​output by the multiple initial upsampling units corresponding to the multi-layer feature information. Based on the sample image, the first reconstructed image, and the preset weights, the initial reconstruction model is trained to obtain a target reconstruction model. The target reconstruction model includes a target encoding unit and a target decoding unit. The preset weights decrease during the training of the initial reconstruction model to obtain the target reconstruction model. The target reconstruction model is used to reconstruct the target reconstructed image corresponding to the image information to be analyzed, so as to determine the anomaly detection result corresponding to the image information to be analyzed based on the image information to be analyzed and the target reconstructed image.

2. The method according to claim 1, characterized in that, The method includes: Obtain the preset feature extraction operator; The first directional gradient histogram feature corresponding to the sample image is determined based on the preset feature extraction operator and the sample image; The method further includes: The second directional gradient histogram feature corresponding to the first reconstructed image is determined based on the preset feature extraction operator and the first reconstructed image; Training the initial reconstruction model to obtain the target reconstruction model based on the sample image, the first reconstructed image, and the preset weights includes: training the initial reconstruction model to obtain the target reconstruction model based on the sample image, the first reconstructed image, the first directional gradient histogram features, the second directional gradient histogram features, and the preset weights.

3. The method according to claim 2, characterized in that, The method includes: training the initial reconstruction model to obtain a target reconstruction model based on the sample image, the first reconstructed image, the first histogram of directional gradients (HCG) features, the second histogram of directional gradients (HCG) features, and the preset weights, including: Obtain the preset first loss function; The sampled image, the first reconstructed image, the first directional gradient histogram feature, and the second directional gradient histogram feature are input into the first loss function to obtain the first loss information; Determine whether the first loss information meets the first preset condition. If yes, use the initial reconstruction model as the target reconstruction model. If no, use the first loss information to determine the first model parameters to be updated of the initial reconstruction model. Use the first model parameters to be updated as the model parameters of the initial reconstruction model. Return to execute the encoding of the sample image through the initial encoding unit in the initial reconstruction model to obtain the multi-layer feature information corresponding to the sample image. Continue until the first loss information meets the first preset condition. Use the initial reconstruction model as the target reconstruction model. The parameters to be updated include the parameters to be updated in the initial encoding unit and the parameters to be updated in the initial decoding unit.

4. The method according to claim 3, characterized in that, The method further includes: when the first loss information is less than a preset threshold, determining that the first loss information meets a first preset condition; when the first loss information is not less than the preset threshold, determining that the first loss information does not meet the first preset condition.

5. The method according to claim 3, characterized in that, Obtain the preset feature extraction operator, including: Multiple candidate feature extraction operators are obtained, wherein the different candidate feature extraction operators have different sizes; Choose one of the multiple candidate feature extraction operators as the preset feature extraction operator.

6. The method according to claim 1, characterized in that, The multi-layer feature information includes top-layer feature information and multi-layer non-top-layer feature information. The plurality of first initial convolutional units include a top-layer first initial convolutional unit and a plurality of non-top-layer first initial convolutional units. The plurality of first initial downsampling units correspond one-to-one with the plurality of non-top-layer first initial convolutional units, and the plurality of non-top-layer first initial convolutional units correspond one-to-one with the multi-layer non-top-layer feature information. The sample image is encoded using the initial encoding unit in the initial reconstruction model to obtain multi-layer feature information corresponding to the sample image, including: The sample image is convolved by the top-level first initial convolutional unit in the initial encoding unit of the initial reconstruction model to obtain the top-level feature information; The top-level feature information is used as the first feature information to be processed; The first feature information to be processed is processed by one of the plurality of first initial downsampling units and the non-top-level first initial convolutional unit corresponding to the first initial downsampling unit, to obtain the non-top-level feature information corresponding to the non-top-level first initial convolutional unit of the first initial downsampling unit. If the non-top-level feature information corresponding to each of the plurality of non-top-level first initial convolutional units is determined, then the top-level feature information and the plurality of non-top-level feature information corresponding to the plurality of non-top-level first initial convolutional units are used as the multi-layer feature information. If not, then the most recently determined non-top-level feature information is used as the new first feature information to be processed, and the process returns to processing the first feature information to be processed through one of the plurality of first initial downsampling units and the non-top-level first initial convolutional unit corresponding to the first initial downsampling unit until the non-top-level feature information corresponding to each of the plurality of non-top-level first initial convolutional units is determined, and the top-level feature information and the plurality of non-top-level feature information corresponding to the plurality of non-top-level first initial convolutional units are used as the multi-layer feature information.

7. The method according to claim 1, characterized in that, The multi-layer feature information includes low-layer feature information. The multi-layer feature information is decoded by the initial decoding unit in the initial reconstruction model to obtain the first reconstructed image of the sample image, including: The underlying feature information is processed by the second initial downsampling unit in the initial decoding unit of the initial reconstruction model to obtain the intermediate feature information corresponding to the underlying feature information; The intermediate feature information and the multi-layer feature information are processed by the multiple second initial convolution units, the multiple initial upsampling units, and the multiple feature fusion units in the initial decoding unit of the initial reconstruction model to obtain the first reconstructed image of the sample image.

8. The method according to claim 7, characterized in that, The plurality of second initial convolutional units include a top-level second initial convolutional unit and a plurality of non-top-level second initial convolutional units. Each of the non-top-level second initial convolutional units corresponds one-to-one with one of the plurality of initial upsampling units. Through the plurality of second initial convolutional units in the initial decoding unit of the initial reconstruction model, the plurality of initial upsampling units, and the plurality of feature fusion units, the intermediate feature information and the multi-layer feature information are processed to obtain the first reconstructed image of the sample image, including: The intermediate feature information is used as the second feature information to be processed; The second feature information to be processed is processed by an initial upsampling unit corresponding to one of the multiple non-top-level second initial convolutional units, thereby obtaining the feature information to be fused corresponding to the second feature information to be processed. By using one of the multiple feature fusion units in the initial reconstruction model, the feature information corresponding to the feature fusion unit with a preset weight is fused with the feature information to be fused to obtain the fusion result corresponding to the feature fusion unit. If the fusion result corresponding to each feature fusion unit in the plurality of feature fusion units has been determined, then the most recently determined fusion result is processed by the top-level second initial convolutional unit to obtain the first reconstructed image of the sample image; otherwise, the most recently determined fusion result is used as the new second feature information to be processed, and the process returns to execute the second feature information to be processed by the initial upsampling unit corresponding to one of the plurality of non-top-level second initial convolutional units until the fusion result corresponding to each feature fusion unit in the plurality of feature fusion units is determined. Then, the most recently determined fusion result is processed by the top-level second initial convolutional unit to obtain the first reconstructed image of the sample image.

9. The method according to claim 8, characterized in that, Each feature fusion unit includes a summation unit and a concatenation unit. Through one of the multiple feature fusion units in the initial reconstruction model, feature information corresponding to the feature fusion unit with preset weights is fused with the feature information to be fused to obtain the fusion result corresponding to the feature fusion unit, including: The target weight of the feature information to be fused is determined by the summation unit of one of the multiple feature fusion units in the initial reconstruction model according to the preset weight; the feature information corresponding to the feature fusion unit with the preset weight is weighted and summed with the feature information to be fused with the target weight to obtain the summation result; The summation result and the feature information to be fused are spliced ​​together by the splicing unit in the feature fusion unit to obtain the fusion result corresponding to the feature fusion unit.

10. An anomaly detection method, characterized in that, include: Obtain the image information to be analyzed; The image information to be analyzed is input into a preset target reconstruction model to obtain the target reconstruction image corresponding to the image information to be analyzed. Based on the image information to be analyzed and the target reconstructed image, an anomaly detection result corresponding to the image information to be analyzed is determined, wherein the anomaly detection result includes first indication information for indicating whether the image information to be analyzed is an abnormal image, and / or second indication information for indicating abnormal regions in the image information to be analyzed; The target reconstruction model is the target reconstruction model determined by the reconstruction model training method according to any one of claims 1-9.

11. A reconstruction model training device, characterized in that, The device includes: The acquisition module is used to acquire sample images; The encoding module is used to encode the sample image through the initial encoding unit in the initial reconstruction model to obtain the multi-layer feature information corresponding to the sample image. The initial encoding unit includes multiple first initial convolutional units and multiple first initial downsampling units, and the first initial convolutional units correspond one-to-one with the feature information. The decoding module is used to decode the multi-layer feature information through the initial decoding unit in the initial reconstruction model to obtain the first reconstructed image of the sample image. The initial decoding unit includes a second initial downsampling unit, multiple second initial convolution units, multiple initial upsampling units, and multiple feature fusion units. The multiple feature fusion units correspond one-to-one with the multi-layer feature information. The multiple feature fusion units are used to fuse the multi-layer feature information with preset weights and multiple first feature information to be spliced ​​output by the multiple initial upsampling units corresponding to the multi-layer feature information. A training module is used to train the initial reconstruction model to obtain a target reconstruction model based on the sample image, the first reconstructed image, and the preset weights. The target reconstruction model includes a target encoding unit and a target decoding unit. The preset weights decrease during the training of the initial reconstruction model to obtain the target reconstruction model. The target reconstruction model is used to reconstruct the target reconstruction image corresponding to the image information to be analyzed, so as to determine the anomaly detection result corresponding to the image information to be analyzed based on the image information to be analyzed and the target reconstruction image.

12. An anomaly detection device, characterized in that, The device includes: The acquisition unit is used to acquire information about the image to be analyzed. The input unit is used to input the image information to be analyzed into a preset target reconstruction model to obtain the target reconstruction image corresponding to the image information to be analyzed. The determining unit is configured to determine an anomaly detection result corresponding to the image information to be analyzed based on the image information to be analyzed and the target reconstructed image, wherein the anomaly detection result includes first indication information for indicating whether the image information to be analyzed is an abnormal image, and / or second indication information for indicating an abnormal region in the image information to be analyzed; The target reconstruction model is the target reconstruction model determined by the reconstruction model training method according to any one of claims 1-10.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program adapted for loading by a processor to perform the method as described in any one of claims 1-10.

14. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing a computer program, and the processor executing the method according to any one of claims 1-10 by calling the computer program stored in the memory.

15. A computer program product comprising computer instructions, characterized in that, When the computer instructions are executed by the processor, they implement the method according to any one of claims 1-10.

Citation Information

Patent Citations

  • Logging curve reconstruction method based on nonlinear autoregressive neural network model

    CN113947198A

  • Terahertz super-resolution reconstruction method and system based on feature convolutional neural network

    CN114820308A