Anomaly detection method and device based on multi-channel cascade feedback, and storage medium
Through the combination of a multi-path cascade feedback network and shallow autoencoder, the problem of difficulty in selecting features and time-consuming labeling in the prior art is solved, and the ability to efficiently detect surface abnormalities in industrial quality inspection is realized, especially in shape , position and color change greatly.
Patent Information
- Application Number
- CN202011495943.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-17
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2040-12-17
AI Technical Summary
Existing deep learning methods have difficulty in selecting features, requiring a large amount of labeling data and time-consuming problems in industrial quality inspection. Especially when the shape, posture and color of objects are greatly changed, it is difficult to effectively detect surface abnormalities.
By using an abnormality detection method based on multi-path cascade feedback, a multi-path cascade feedback network is constructed, a shallow autoencoder is used to form a network node, and a multiple normal sample images are used for unsupervised learning, and the image detection model is obtained through the image Euclidean distance characterization calculates the loss function and identifies the surface anomaly region.
It realizes efficient detection of surface abnormalities under large changes in shape, position and color, reduces the amount of parameters, simplifies the training process, speeds up the convergence speed of loss function, and improves the construction efficiency and pixel accuracy of the detection model.
Smart Images

Figure CN112419318B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to an anomaly detection method and device based on multi-path cascade feedback, and a storage medium. Background Art
[0002] In recent years, deep learning has become the focus of attention in various fields at home and abroad. Deep learning includes supervised learning and unsupervised learning. In the field of computer vision, supervised learning refers to training neural networks through one-to-one correspondence between images and annotation information, so that they can complete tasks such as classification, target detection, and semantic segmentation; unsupervised learning refers to training neural networks only with unannotated image information, so that they can complete tasks such as clustering, anomaly detection, and image generation. In the field of industrial quality inspection, the most widely used methods are manual feature selection methods and supervised deep learning methods (hereinafter referred to as supervised learning methods).
[0003] There are still some limitations in the manual feature selection method: the shape, posture, color and other information of the object to be detected need to change within a certain range. When the shape, posture and color information of the object change too much, it is difficult to judge the pixel accuracy of abnormal areas (such as holes, cracks, cuts, printing, etc. on the surface of the object) and normal areas through manual standards. Whether between standard images and defective images, between standard images and standard images, or between defective images of the same type, it is often difficult to detect by manually selecting features when the shape and posture of the object surface change within a large range.
[0004] In recent years, supervised learning methods have become popular to solve the problem of manual feature selection methods being ineffective. By designing a convolutional neural network, images of objects to be detected (including a large number of normal images and abnormal images) are collected and labeled to form a data set, and then the convolutional neural network is trained using the data set to achieve automatic feature selection and judgment. Although supervised learning methods can still generate results with high accuracy and robustness when the shape, posture, color and other information of the object vary widely, there are also some obvious shortcomings. On the one hand, it is difficult to obtain a sufficient number and variety of abnormal samples. On the other hand, the labeling of a large number of images directly leads to time-consuming and high-cost problems. Summary of the invention
[0005] The main technical problem solved by the present invention is: how to overcome the shortcomings of existing deep learning methods in industrial quality inspection. To solve the above technical problems, the present application provides an anomaly detection method and device based on multi-path cascade feedback, and a storage medium.
[0006] According to the first aspect, an embodiment provides an abnormality detection method based on multi-path cascade feedback, which includes: obtaining an image to be detected of an object to be detected; inputting the image to be detected into a preset image detection model to obtain a reconstructed image output by each network node in the image detection model; the image detection model is constructed with a multi-path cascade feedback network, and each of the cascade feedback networks includes a plurality of network nodes formed by cascade feedback of a plurality of shallow autoencoders; evaluating the image reconstruction quality of corresponding network nodes in any two cascade feedback networks according to the reconstructed images output by each network node to determine a reconstructed image with a surface abnormality area; comparing the determined reconstructed image with the image to be detected to obtain the surface abnormality area of the object to be detected.
[0007] The construction process of the image detection model includes: establishing at least two cascade feedback networks, and setting network nodes with the same serial number in each cascade feedback network to form a corresponding relationship; configuring a corresponding loss function according to the established network structure; using multiple normal sample images of the object to be detected to train each cascade feedback network, updating the network parameters through the loss function, and obtaining the image detection model after the training is completed.
[0008] Establishing each of the cascade feedback networks includes: using convolutional neural units to form each shallow autoencoder; the shallow autoencoder includes an encoder composed of a convolutional layer and a downsampling layer, and a decoder composed of an upsampling layer and a convolutional layer; the encoder is used to receive the image input by the shallow autoencoder and convert it into semantic information, and the decoder is used to restore the semantic information and output a reconstructed image; sorting the multiple shallow autoencoders in sequence, feeding back the output of each shallow autoencoder to the input of the next shallow autoencoder, and using each shallow autoencoder as a network node in the cascade feedback network; establishing each of the cascade feedback networks according to the cascade form of the obtained network nodes.
[0009] The loss function corresponding to the network structure configuration established includes: for any of the cascade feedback networks, calculating the image reconstruction quality represented by the Euclidean distance of the images corresponding to the first and last network nodes in the cascade feedback network and satisfying
[0010]
[0011] For any two of the cascade feedback networks, the image reconstruction quality represented by the Euclidean distance of the images corresponding to a number of network nodes with the same sequence number in the two cascade feedback networks is calculated and meets
[0012]
[0013] The calculated image reconstruction quality is used to configure the loss function corresponding to each cascade feedback network, which is expressed as:
[0014]
[0015] Wherein, x0 is the image input to the first network node in the cascade feedback network, is the reconstructed image output by the first network node in the jth cascade feedback network, is the reconstructed image output by the Nth network node in the jth cascade feedback network; j, m, k are all serial numbers of the cascade feedback network, i is the serial number of the network node, N is the number of each network node in the cascade feedback network, and n is the number of several network nodes with the same serial number.
[0016] The method uses multiple normal sample images of the object to be detected to train each of the cascade feedback networks, updates the network parameters through the loss function, and obtains the image detection model after the training is completed, including: obtaining multiple normal sample images of the object to be detected; the normal sample images do not contain the abnormal surface area of the object to be detected; using the normal sample images as the image input to the first network node in each of the cascade feedback networks, and inputting each of the normal sample images in turn into each of the cascade feedback networks for training; terminating the training when the difference between the before and after calculations of the loss function corresponding to each of the cascade feedback networks is less than a preset threshold, or the corresponding loss function reaches a preset number of iterations; and obtaining the image detection model of the object to be detected by using each of the cascade feedback networks with updated network parameters at the end of the training.
[0017] The step of inputting the image to be detected into a preset image detection model to obtain a reconstructed image output by each network node in the image detection model includes: inputting the image to be detected into each cascade feedback network in the image detection model, and each network node in each cascade feedback network outputs a reconstructed image.
[0018] The method of evaluating the image reconstruction quality of corresponding network nodes in any two paths of the cascade feedback network according to the reconstructed images output by each network node to determine the reconstructed image with the surface abnormal area includes: constructing an evaluation function of the surface abnormal area by using the image reconstruction quality of corresponding network nodes in any two paths of the cascade feedback network in the image detection model, wherein the evaluation function is expressed by any of the following formulas:
[0019]
[0020] in, The reconstructed image output by the ith network node when the image to be detected is input into the mth cascade feedback network, The reconstructed image output by the i-th network node when the k-th cascade feedback network is input for the image to be detected, i being the serial number of the network node; when the value of the evaluation function is greater than or equal to a predetermined value, it is determined that the reconstructed image participating in the calculation contains the surface abnormal area of the object to be detected, thereby determining the reconstructed image with the surface abnormal area.
[0021] The step of comparing the determined reconstructed image with the image to be detected to obtain the abnormal surface area of the object to be detected includes: obtaining the abnormal surface area of the object to be detected by comparing the difference between the determined reconstructed image and the image to be detected, and / or obtaining the confidence level corresponding to the abnormal surface area; and outputting the image to be detected of the object to be detected and the abnormal surface area of the object to be detected.
[0022] According to the second aspect, an embodiment provides an image detection device, which includes: an image acquisition component, used to acquire an image to be detected of an object to be detected; a processor, connected to the image acquisition component, and used to obtain a surface abnormality area of the object to be detected in the image to be detected by the abnormality detection method described in the first aspect above; a display, connected to the processor, and used to display the image to be detected and the surface abnormality area of the object to be detected.
[0023] The processor includes: the model construction module, which is used to construct the image detection model; the image detection model is constructed with multiple cascade feedback networks, and each cascade feedback network includes multiple network nodes formed by multiple shallow autoencoders through cascade feedback, and the network nodes with the same sequence number in each cascade feedback network form a corresponding relationship; the image processing module is used to evaluate the image reconstruction quality of corresponding network nodes in any two cascade feedback networks according to the reconstructed images output by each network node in the image detection model, so as to select the reconstructed image with the surface abnormal area; the abnormality detection module is used to compare the determined reconstructed image with the image to be detected, so as to obtain the surface abnormal area of the object to be detected.
[0024] According to the third aspect, an embodiment provides a computer-readable storage medium, characterized in that it includes a program, and the program can be executed by a processor to implement the anomaly detection method described in the first aspect above.
[0025] The beneficial effects of this application are:
[0026] According to the above-mentioned embodiment, an abnormality detection method, device and storage medium based on multi-path cascade feedback are provided, wherein the abnormality detection method comprises: obtaining an image to be detected of an object to be detected; inputting the image to be detected into a preset image detection model to obtain a reconstructed image output by each network node in the image detection model; the image detection model is constructed with a multi-path cascade feedback network, and each cascade feedback network comprises a plurality of network nodes formed by cascade feedback of a plurality of shallow autoencoders; the image reconstruction quality of the corresponding network nodes in any two cascade feedback networks is evaluated according to the reconstructed images output by each network node to determine a reconstructed image with a surface abnormality area; and the determined reconstructed image is compared with the image to be detected to obtain the surface abnormality area of the object to be detected. First, since the image detection model is constructed with a multi-way cascade feedback network, the surface abnormal features of the object to be detected can be determined by the image feature differences between any two cascade feedback networks, providing a new solution for image abnormality detection; second, the image detection model is trained using a multi-way cascade feedback network. Using an unsupervised learning approach, only a number of normal images need to be used for training. No abnormal sample images or prior annotations are required, which not only makes it easy to obtain training sets, but also does not require time and effort for annotation, thereby improving the efficiency of building image detection models; third, a shallow autoencoder is used in each cascade feedback network to form a network node. This structure, similar to a recurrent neural network, allows each network node to be The parameters remain completely consistent, and the number of parameters can be greatly reduced compared with the existing methods, which has the advantages of easy transmission, storage and deployment, thereby reducing the overall training difficulty of the multi-way cascade feedback network and accelerating the convergence speed of the loss function; fourthly, the image to be detected is input into the image detection model, which is convenient for detecting and obtaining the reconstructed image output by each network node in the image detection model, thereby providing convenience for evaluating the image reconstruction quality of the corresponding network nodes in any two cascade feedback networks; fifthly, the reconstructed image output by each network node in the image detection model has the characteristics of high pixel accuracy and good feature reconstruction effect, which makes the reconstruction error of the abnormal area relatively large, and the detection of surface abnormal areas can be completed by separating the abnormal area from the normal area through simple standards. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 This is a flowchart of a method for constructing an image detection model in Example 1 of the present application;
[0028] Figure 2 A flow chart for establishing each cascade feedback network;
[0029] Figure 3 A flowchart for configuring the loss function corresponding to each cascade feedback network;
[0030] Figure 4 Flowchart for training an image detection model;
[0031] Figure 5 is a schematic diagram of the structure of a shallow autoencoder, where Figure 5a The connection diagram of the encoder and decoder is shown in Figure 2. Figure 5b Schematic diagram of the connection between convolutional layer, downsampling layer and upsampling layer;
[0032] Figure 6 Schematic diagram of the principle of cascade feedback of multiple shallow autoencoders;
[0033] Figure 7 It is a schematic diagram of the principle of configuring a two-way cascade feedback network;
[0034] Figure 8 This is a flow chart of an anomaly detection method based on multi-path cascade feedback in Embodiment 2 of the present application;
[0035] Fig. 9 A flow chart for determining a reconstructed image having a surface anomaly region;
[0036] FIG10 is the detection result of the object to be detected, where Fig.10a is the detection result of the object to be detected without abnormal area, Fig.10b is the detection result of the object to be detected with a hole area. Fig.10c is the detection result of the object to be detected with a bursting area, Fig.10d is the detection result of the object to be detected with the cut mark area. Fig.10e is the detection result of the object to be detected with a printed area;
[0037] Fig.11 This is a schematic diagram of the structure of the image detection device in the third embodiment of the present application;
[0038] Fig.12 is a schematic diagram of the structure of the processor;
[0039] Fig.13 This is a schematic diagram of the structure of the image detection device in Example 4 of the present application. DETAILED DESCRIPTION
[0040] The present invention is further described in detail below by specific embodiments in conjunction with the accompanying drawings. Wherein similar elements in different embodiments adopt associated similar element numbers. In the following embodiments, many detailed descriptions are for making the present application better understood. However, those skilled in the art can easily recognize that some features can be omitted in different situations, or can be replaced by other elements, materials, methods. In some cases, some operations related to the present application are not shown or described in the specification, this is to avoid the core part of the present application being overwhelmed by too much description, and for those skilled in the art, it is not necessary to describe these related operations in detail, and they can fully understand the related operations according to the description in the specification and the general technical knowledge in the art.
[0041] In addition, the features, operations or characteristics described in the specification can be combined in any appropriate manner to form various implementations. At the same time, the steps or actions in the method description can also be interchanged or adjusted in a manner that is obvious to those skilled in the art. Therefore, the various sequences in the specification and the drawings are only for the purpose of clearly describing a certain embodiment and are not meant to be a required sequence, unless otherwise specified that a certain sequence must be followed.
[0042] The serial numbers of the components in this document, such as "first", "second", etc., are only used to distinguish the objects described and do not have any order or technical meaning. The "connection" and "coupling" mentioned in this application, unless otherwise specified, include direct and indirect connections (couplings).
[0043] The main unsupervised image detection methods include Generative Adversarial Network (GAN), Auto Encoder (AE), and Variational Auto Encoder (VAE). Among them, the Generative Adversarial Network (GAN) consists of a generative network and a discriminative network. The Generative Adversarial Network randomly samples from the latent space as input, and its output needs to imitate the real samples of the training set as much as possible. Among them, the Auto Encoder (AE) consists of an encoder and a decoder. The image information is generated by the encoder to generate high-dimensional, low-resolution semantic information, and the semantic information is directly used as the latent variable. The decoder restores the latent variable to an image with the same format as the original image through upsampling and convolutional neural network. The output image needs to imitate the input image as much as possible to achieve the effect of image reconstruction. Among them, the variational autoencoder (VAE) is also composed of an encoder and a decoder. The encoder generates high-dimensional, low-resolution semantic information from image information. By calculating the mean, variance and other information of the semantic information generated by the encoder, latent variables are sampled in random distributions such as Gaussian noise. The decoder restores the latent variables to image information through upsampling and convolutional neural networks. Its output needs to imitate the input image as much as possible to achieve the effect of image reconstruction.
[0044] The above-mentioned generative adversarial network, autoencoder, and variational autoencoder are applied in the anomaly detection scenario. Their working principle is: first use normal images to train the neural network, and its output needs to imitate the input image as much as possible, that is, the neural network has a small reconstruction error in the normal area (the input original image I outputs the reconstructed image O through the corresponding neural network, and the reconstruction error refers to the difference between the reconstructed image O and the original image I). At the same time, since the abnormal image data is not used for training, the neural network often has a large reconstruction error in the abnormal area. By generating reconstruction errors, we judge that the area with a small reconstruction error is a normal area, and the area with a large reconstruction error is an abnormal area, so as to detect the abnormal area with pixel accuracy. However, there are still some application deficiencies in using any of these methods alone. The shortcomings of the generative adversarial network and the variational autoencoder are: since the information of the original image is not fully utilized, it is difficult to generate a reconstructed image with high pixel accuracy (that is, the generated image can only be roughly close to the input image, and the position accuracy and numerical accuracy of the pixels of the generated reconstructed image are poor), and it is difficult to formulate a judgment standard to distinguish between defective areas and normal areas. The shortcomings of the autoencoder are: due to the use of multi-layer downsampling, the pixel position accuracy is poor, the reconstruction effect of smaller features is poor, and it is difficult to judge normal areas and abnormal areas by comparing the differences between the original image and the reconstructed image (i.e. generating reconstruction errors).
[0045] For image reconstruction, several methods are needed to solve the accuracy of feature reconstruction. One is to use a deeper network structure and ensure the position accuracy and feature accuracy of the output detection by fusing the bottom-level features with the high-level features; the other is to use a wider network structure and ensure the adaptability to objects of different sizes by fusing the features of different receptive field sizes. A large receptive field has a good effect on the detection of large objects, and a small receptive field meets the detection requirements of small objects. In the technical solution of this application, for the input image x, it is necessary to construct a function To better reflect the transformation and mapping relationship between the input image and the output image, where ω is the reconstruction and solution parameter.
[0046] When using an autoencoder to reconstruct an image, if a deep convolutional neural network structure (i.e., multiple convolutional layers and downsampling layers) is used, the reconstruction errors of normal and abnormal regions can be compared to distinguish the two. However, due to the presence of multiple convolutional layers and downsampling layers, the generated reconstructed image has disadvantages such as poor pixel position accuracy and poor reconstruction effect on smaller features. If a shallow convolutional neural network structure is used, the pixel position accuracy is higher and the reconstruction effect on smaller features is better. However, since the number of convolutional layers and downsampling layers of the shallow autoencoder is small, it means that the encoder uses semantic encoding generated by relatively low-level features. In the reconstruction process, the abnormal region is very likely to contain similar low-level features. Therefore, the reconstruction error of the abnormal image may be close to that of the normal image in terms of value, and it is difficult to distinguish the two by comparing the reconstruction errors of the normal and abnormal regions. Then, the generated reconstructed image should meet the following requirements: high pixel accuracy, good reconstruction effect of smaller features, and large reconstruction error of the abnormal region, so that the abnormal region and the normal region can be separated by a simple standard in the end.
[0047] The technical solution of the present application is to construct an image detection model based on the idea of cascading and feedback. The purpose of the cascade process is to build a deeper network structure while maintaining the position information and feature information unique to the shallow network; the purpose of the feedback is to maintain the normal structural features during the reconstruction process and gradually increase the distance between abnormal features and normal features. The present application adopts a combination of a recurrent convolutional neural network (RNN) and an autoencoder (Auto Encoder), generates a high-quality reconstruction of the original image through a shallow autoencoder, and inputs the output reconstructed image into the shallow autoencoder again, and so on, continuously using the reconstruction result of the previous iteration as the input of this iteration, and gradually amplifying the reconstruction error of the abnormal area after multiple iterations, while the reconstructed image of the normal area remains basically unchanged. Because the shallow autoencoder contains fewer continuous downsampling layers, the reconstructed image always maintains a high pixel position accuracy and a good reconstruction effect of smaller features during the reconstruction process.
[0048] The technical solution of the present application is described in detail below with reference to the embodiments.
[0049] Embodiment 1
[0050] Since in the process of detecting abnormal surface areas of the object to be detected, it is necessary to input the image to be detected into a preset image detection model to obtain the reconstructed image output by each network node in the image detection model, it is necessary to build an image detection model before abnormality detection. In order to better help technical personnel understand the technical solution of the present application, this embodiment will specifically explain how to build an image detection model.
[0051] Please refer to Figure 1 , this embodiment discloses a method for constructing an image detection model, which includes steps S110-S130, which are described below respectively.
[0052] Step S110: establishing at least two cascade feedback networks, and setting network nodes with the same sequence number in each cascade feedback network to form a corresponding relationship.
[0053] Each cascade feedback network is a network structure formed by cascade feedback of multiple shallow autoencoders. The multiple shallow autoencoders are arranged in sequence to form a hierarchical structure state, and then the output of each shallow autoencoder is fed back to the input of the next shallow autoencoder. At this time, each shallow autoencoder is used as a network node in the cascade feedback network.
[0054] It should be noted that a shallow autoencoder is an autoencoder with fewer convolutional and downsampling layers, and is also an artificial neural network that achieves efficient representation of output data through unsupervised learning. This efficient representation of output data is called encoding, and the capacity of the encoded information is generally much smaller than the input data, making the autoencoder useful for dimensionality reduction. More importantly, shallow autoencoders can be used as powerful feature detectors for pre-training of deep neural networks.
[0055] Step S120, configuring a corresponding loss function according to the established network structure.
[0056] Since there are multiple network nodes in each cascade feedback network, and each network node is connected in the form of cascade feedback, the input and output of each network node can be represented, so that the image reconstruction quality corresponding to the cascade feedback network can be obtained by calculating the Euclidean distance of the image; in addition, since the network nodes with the same serial number in each cascade feedback network form a corresponding relationship, the image reconstruction quality corresponding to any two cascade feedback networks can also be calculated, so as to configure the loss function corresponding to the multi-channel cascade feedback network (at least two cascade feedback networks).
[0057] Step S130, using multiple normal sample images of the object to be detected to train each cascade feedback network, updating the network parameters through the loss function, and obtaining the image detection model after the training is completed.
[0058] In order to learn the surface features of the object to be detected, multiple normal sample images can be input into the network structure composed of each cascade feedback network in turn for training; the training is terminated when the difference between the before and after calculations of the loss function corresponding to each cascade feedback network is less than a preset threshold, or the corresponding loss function reaches a preset number of iterations, so that the trained cascade feedback networks are used as image detection models for the object to be detected.
[0059] It should be noted that the objects to be detected here can be products on an industrial assembly line, mechanical parts in an object box, tools on an operating table, etc. When capturing an image of the surface of the object to be detected, the surface features of the object will be displayed or presented on the corresponding pattern. If there are holes, cracks, cuts, printing, dust, flaws, dirt and other defects on the surface of the object to be detected, the captured image will be an abnormal sample image; if there are no such defects on the surface of the object to be detected, the captured image will be a normal sample image.
[0060] In this embodiment, see Figure 2 The above-mentioned step S110 mainly involves the process of establishing at least two cascade feedback networks. Since the structure of each cascade feedback network is the same but the parameters are different, for the convenience of explanation, any one cascade feedback network will be taken as an example for explanation. The process of establishing any one cascade feedback network includes steps S111-S113, which are described as follows respectively.
[0061] Step S111, using convolutional neural units to form each shallow autoencoder.
[0062] See also Figure 5a and Figure 5b , the shallow autoencoder includes an encoder composed of a convolutional layer and a downsampling layer, and a decoder composed of an upsampling layer and a convolutional layer; the convolutional layer and downsampling layer contained in the encoder have a one-to-one correspondence with the convolutional layer and upsampling layer contained in the decoder. In addition, the encoder is used to receive the image input by the shallow autoencoder and convert it into semantic information, such as performing latent semantic encoding on the features A, B, C, and D in the input image; correspondingly, the decoder is used to restore the semantic information and output the reconstructed image, such as outputting the image features A′, B′, C′, and D′, where the features A′, B′, C′, and D′ usually only differ from the features A, B, C, and D in terms of information capacity.
[0063] For each shallow autoencoder, since fewer convolution operations and downsampling operations are used, it is easy to ensure that the pixel position accuracy of the reconstructed image is high, and the reconstruction effect of smaller features is better. The working principle of the shallow autoencoder can be expressed as follows:
[0064]
[0065] Where x is the input image, is the output feature, z is the latent semantic code, E is the encoder neural network, and D is the decoder neural network. The goal of the shallow autoencoder is to make the output Try to keep it consistent with input x.
[0066] It should be noted that shallow encoders work by simply learning to copy inputs to outputs, a task that can be made extremely difficult by adding constraints to the neural network in different ways. For example, the size of the internal representation can be limited, or noise can be added to the training data and the autoencoder can be trained to recover the original features. These constraints prevent the autoencoder from mechanically copying the input to the output and force it to learn an efficient representation of the data.
[0067] Since the shallow autoencoder has fewer convolutional layers and downsampling layers, it means that the encoder uses relatively low-level features to generate semantic codes. During the reconstruction process, the abnormal area is very likely to contain similar low-level features. Therefore, the reconstruction error of the abnormal image may be numerically close to that of the normal image.
[0068] Step S112, sorting the multiple shallow autoencoders in sequence, feeding back the output of each shallow autoencoder to the input of the next shallow autoencoder, and using each shallow autoencoder as a network node in the cascade feedback network.
[0069] See also Figure 6 , assuming that each cascade feedback network contains N shallow autoencoders, then shallow autoencoder 1, shallow autoencoder 2, ..., shallow autoencoder N can be sorted in sequence, and the normal sample image is input to shallow autoencoder 1. After the image passes through shallow autoencoder 1, the image reconstruction result is obtained. The reconstructed image R1 is used as input to shallow autoencoder 2 to obtain the image reconstruction result. The reconstructed image R2 is input to the next shallow autoencoder, and so on. The output of the previous iteration is continuously used as the input of the next iteration. After multiple cycles of iteration, the reconstruction error is gradually amplified. In the final image reconstruction result, that is, the reconstructed image R N In the reconstruction, the reconstruction error of the abnormal area will be significantly greater than that of the normal area, so the abnormal area can be distinguished from the normal area.
[0070] The image iteration process of shallow autoencoding can be expressed using a formula:
[0071]
[0072] Among them, φ is a shallow autoencoder, ω is the weight parameter of the neural network, x0 is the input image of the cascade feedback network (the input image in the training stage is a normal sample image), is the reconstructed image generated by x0 after passing through the first network node, yes The reconstructed image generated by the nth (n>0) node (this article uses ~ to distinguish the reconstruction result from the original image, and the one with ~ is the reconstruction result).
[0073] See also Figure 6 , N shallow autoencoders are structurally similar to a cascade feedback network, and the constituent units are each shallow autoencoder, which contains several shallow autoencoders with the same (or different) parameters, and each shallow autoencoder can be called a network node. It should be noted that these network nodes are trained using normal sample images, and the training goal is to make the output of the network node as consistent as possible with the input normal image, so that a trained neural network can be obtained.
[0074] Step S113, each network node is set as a node group, and a cascade feedback network is established by cascading each network node in the node group. Figure 6 The N network nodes in are set as a node group, so that the cascade feedback forms a cascade feedback network.
[0075] It should be noted that the above steps S111-S113 are only the process of establishing a cascade feedback network. Other cascade feedback networks in the image detection model can be established in the same way. In order to ensure that there are certain differences between the cascade feedback networks, different parameters can be configured for the network nodes in the cascade feedback networks of different paths.
[0076] In this embodiment, see Figure 3 The above-mentioned step S120 mainly involves the process of configuring the loss function, which may specifically include steps S121-S123, which are described as follows.
[0077] Step S121, for any cascade feedback network, calculate the image reconstruction quality represented by the Euclidean distance of the images corresponding to the first and last network nodes in the cascade feedback network and satisfy
[0078]
[0079] Among them, x0 is the image input to the first network node in the cascade feedback network, is the reconstructed image output by the first network node in the jth cascade feedback network, It is the reconstructed image output by the Nth network node in the jth cascade feedback network.
[0080] In any cascade feedback network, assuming there are N network nodes, and the input of the cascade feedback network is x0, then the input of the first network node in the network is x0, and the output is The second network node input is The output is By analogy, we can know that the input of the Nth network node is The output is In addition, the image reconstruction quality Loss b The configuration is mainly based on the difference between the reconstruction result of the cascade feedback network and the original image.
[0081] For image reconstruction quality Loss b , which represents the quality of the reconstruction result of the training image, mainly consists of two parts: the Euclidean distance between the reconstruction result output by the first node and the training image, and the Euclidean distance between the reconstruction result output by the last node and the training image. It can be understood that using normal sample images to train the cascade feedback network can ensure that each network node of the cascade feedback network has a good reconstruction result for the normal area (smaller Euclidean distance from the original image), while for the abnormal area that has not been trained, the reconstruction result is poor (larger Euclidean distance from the original image).
[0082] Step S122, for any two cascade feedback networks, calculate the image reconstruction quality represented by the Euclidean distance of the images corresponding to a number of network nodes with the same sequence number in the two cascade feedback networks, which can be expressed as:
[0083]
[0084] Wherein, j, m, k are the serial numbers of the cascade feedback network, i is the serial number of the network node, N is the number of each network node in the cascade feedback network, and n is the number of network nodes with the same serial number; It is the reconstructed image output by the i-th network node in the *-th cascade feedback network.
[0085] Step S123, using the calculated image reconstruction quality to configure the loss function corresponding to each cascade feedback network, expressed as:
[0086]
[0087] It can be understood that the loss function Loss is the image reconstruction quality corresponding to each cascade feedback network and the combination of the image reconstruction quality corresponding to every two cascade feedback networks.
[0088] It can be understood that for a network structure composed of multiple cascade feedback networks, the key to its training is to construct the corresponding loss function. The quality of the loss function reflects the ability to build the image detection model to a certain extent. When Loss is configured as the loss function corresponding to each cascade feedback network, the difference between the reconstruction result of each cascade feedback network and the original image is taken into account, as well as the difference between the reconstruction results output by the corresponding nodes of any two cascade feedback networks.
[0089] for example Figure 7 , a two-way cascade feedback network can be constructed. The network nodes in the first cascade feedback network are represented as AE1-1, AE1-2, ..., AE1-N, and the network nodes in the second cascade feedback network are represented as AE2-1, AE2-2, ..., AE2-N. The two networks do not share parameters with each other, and the network nodes correspond one to one. It is necessary to compare the reconstruction results between the corresponding network nodes. In normal areas, the reconstruction results of each network node are slightly different, and in abnormal areas, the reconstruction results of each network node are relatively different; then the abnormal area can be obtained by selecting the area with a large difference in reconstruction results. In Figure 7 In the example, the network node structure of each cascade feedback network is the same (or similar), and the difference lies in the parameters. Since each cascade feedback network has N nodes, in order to facilitate the distinction, we use represents the reconstructed image output by the i-th network node in a cascade feedback network, Represents the reconstructed image output by the i-th network node in another cascade feedback network.
[0090] If the node function of the cascade feedback network α is The node function of the cascade feedback network β is Then the loss function Loss can be obtained by Loss c 、Loss b1 and Loss b2 composition.
[0091]
[0092] Loss b1 Represents the image reconstruction quality of the cascade feedback network α (network node is represented by AE1) for the normal sample image, Loss b2 Represents the image reconstruction quality of the cascade feedback network β (network node is represented by AE2) for normal sample training images, Loss c Represents the Euclidean distance of the outputs of the network nodes with the same sequence number in the cascade feedback network α and the cascade feedback network β (for example, the i-th (1≤i≤N) node of the cascade feedback network α and the i-th node of the cascade feedback network β, and these two network nodes are called network nodes with the same sequence number). Then Figure 7 The loss function corresponding to the two-way cascade feedback network is expressed as follows
[0093] Loss=Loss c +Loss b1 +Loss b2 .
[0094] for Figure 7 The two-way cascade feedback network in the training is trained with normal sample images (only the normal surface area of the object to be detected) to ensure that each network node in the cascade feedback network α and the cascade feedback network β has a good reconstruction result for the normal area, and the output difference of the network nodes with the same sequence number is small. For the abnormal area that has not been trained, the reconstruction results of the cascade feedback network α and the cascade feedback network β are poor and the output difference of the nodes with the same sequence number is large.
[0095] In this embodiment, see Figure 4 The above-mentioned step S140 mainly involves the process of training to obtain the image detection model, which may specifically include steps S131-S133, which are described as follows.
[0096] Step S131, obtaining a plurality of normal sample images of the object to be detected. The normal sample images here do not contain abnormal surface areas of the object to be detected.
[0097] Step S132, using the normal sample image as the image input to the first network node in each cascade feedback network, and inputting each normal sample image into each cascade feedback network in turn for training.
[0098] Step S133, the training is terminated when the difference between the before and after calculations of the loss function corresponding to each cascade feedback network is less than a preset threshold, or the corresponding loss function reaches a preset number of iterations; and, at the end of the training, the image detection model of the object to be detected is obtained using each cascade feedback network with updated network parameters.
[0099] It can be understood that in this embodiment, a multi-path cascade feedback network is used to train the image detection model. The unsupervised learning method only requires multiple normal images to participate in the training. No abnormal sample images and prior annotations are required. It is not only easy to obtain the training set, but also does not require time and effort for annotation, which is conducive to improving the efficiency of building the image detection model.
[0100] It can be understood that in this embodiment, a shallow autoencoder is used in each cascade feedback network to form a network node. This structure similar to a recurrent neural network can keep the parameters of each network node completely consistent, and the number of parameters can be greatly reduced compared to the existing method, which has the advantage of being easy to transmit, store and deploy, thereby simplifying the network training process and accelerating the convergence speed of the loss function.
[0101] Embodiment 2
[0102] Please refer to Figure 8 , the present application discloses an anomaly detection method based on multi-path cascade feedback, which includes steps S210-S240, which are described below respectively.
[0103] Step S210, obtaining an image of the object to be detected. The image to be detected may contain a normal surface area and an abnormal surface area of the object to be detected, so it is necessary to obtain the abnormal surface area by image detection.
[0104] Step S220, inputting the image to be detected into the constructed image detection model, and detecting to obtain the reconstructed image output by each network node in the image detection model.
[0105] In a specific embodiment, the image to be detected is input into each cascade feedback network in the image detection model, and each network node in each cascade feedback network outputs a reconstructed image.
[0106] It should be noted that the image detection model here is an image detection model constructed by the construction method in Example 1, and the image detection model is constructed with a multi-channel cascade feedback network, and each cascade feedback network includes a plurality of network nodes formed by cascade feedback of a plurality of shallow autoencoders. Since the image detection model is a trained multi-channel cascade feedback network, and each cascade feedback network includes a plurality of shallow autoencoders formed by cascade feedback, each shallow autoencoder serves as a network node in the cascade feedback network.
[0107] For any network node in each cascade feedback network, the reconstructed image output by it can be expressed as
[0108]
[0109] Among them, φ is a shallow autoencoder, ω is the weight parameter of the neural network, The input image of the lth network node in the mth cascade feedback network when the image to be detected is input into the image detection model. The reconstructed image output by the lth network node in the mth cascade feedback network when the image to be detected is input into the image detection model.
[0110] Step S230 , evaluating the image reconstruction quality of corresponding network nodes in any two cascade feedback networks according to the reconstructed images output by each network node, so as to determine the reconstructed image with the surface abnormality area.
[0111] For any two cascade feedback networks, since their network parameters are different, the reconstructed images output by network nodes with the same serial number will have different reconstruction effects on the surface abnormal area. At this time, this difference can be used to obtain the image reconstruction quality of the corresponding network node.
[0112] Step S240: Compare the determined reconstructed image with the image to be detected to obtain the surface abnormal area of the object to be detected.
[0113] In a specific embodiment, the surface abnormality area of the object to be detected is obtained by comparing the difference between the determined reconstructed image and the image to be detected, and / or the confidence corresponding to the surface abnormality area is obtained; the image to be detected of the object to be detected and the surface abnormality area of the object to be detected are output.
[0114] In this embodiment, see Fig. 9 The above-mentioned step S230 mainly involves the process of determining the reconstructed image with the surface abnormality area, which may specifically include steps S231-S232, which are respectively described as follows.
[0115] Step S231, constructing an evaluation function for the surface abnormality area using the image reconstruction quality of corresponding network nodes in any two cascade feedback networks in the image detection model.
[0116] In a specific embodiment, after obtaining the image to be detected and inputting it into the image detection model, the reconstructed images output by each network node in any two cascade feedback networks are used to construct an evaluation function for the surface abnormal area. The evaluation function is expressed by any of the following formulas:
[0117]
[0118] in, The reconstructed image output by the i-th network node when the image to be detected is input into the m-th cascade feedback network, The reconstructed image output by the i-th network node when the image to be detected is input into the k-th cascade feedback network, where i is the sequence number of the network node.
[0119] For example, for Figure 7 In the two-way cascade feedback network, since network nodes AE1 and AE2 are actually shallow autoencoders with the same (or similar) structure and different parameters, shallow autoencoders with different parameters have different reconstruction results for abnormal areas. In the testing and deployment phase, the reconstructed images output by each network node of the two cascade feedback networks are matched one by one according to the same sequence number of the network nodes, and the Euclidean distance between the reconstructed images is calculated to obtain the evaluation function of the surface abnormal area, which can be expressed as:
[0120]
[0121] in, is the reconstructed image output by the ith network node when the image to be detected is input into the cascade feedback network α. is the reconstructed image output by the ith network node when the image to be detected is input into the cascade feedback network β, and n is the number of network nodes with the same sequence number.
[0122] Step S232, when the value of the evaluation function is greater than or equal to a predetermined value, it is determined that the reconstructed image involved in the calculation contains a surface abnormality region of the object to be detected, thereby determining a reconstructed image with a surface abnormality region.
[0123] for If the function value of any evaluation function represented by is greater than or equal to a predetermined value (which can be preset by the user or generated by the system by default), it indicates that There is a difference between the reconstructed image represented by and other reconstructed images, then the reconstructed image The area of the surface that contains the anomaly of the object to be detected.
[0124] It should be noted that when performing a difference comparison between the reconstructed image and the image to be detected, it is only necessary to calculate the grayscale difference between the reconstructed image and the image to be detected. The pixel points whose calculation results are greater than the preset threshold are the pixel points in the surface abnormality area; after counting the pixel points, the surface abnormality area of the object to be detected can be obtained.
[0125] For the hazelnut object to be detected, its image to be detected and the abnormal surface area can be referred to Figure 10. Fig.10a The left image in the figure is the image to be detected without abnormalities on the hazelnut surface, and the right image is the difference comparison result between the reconstructed image output by any network node and the image to be detected. The results show that there is no abnormal surface area on the hazelnut surface. Fig.10b The left image in the figure is the image to be detected with holes on the surface of the hazelnut, and the right image is the difference comparison result between the reconstructed image output by any network node and the image to be detected. The result shows that there is a surface abnormal area with the same shape as the hole on the surface of the hazelnut. Fig.10c The left image in the figure is a detection image with cracks on the surface of hazelnuts, and the right image is the difference comparison result between the reconstructed image output by any network node and the detection image. The results show that there is a surface abnormal area with the same shape as the cracks on the surface of hazelnuts. Fig.10d The left image in the figure is the image to be tested with a cut on the surface of the hazelnut, and the right image is the difference comparison result between the reconstructed image output by any network node and the image to be tested. The result shows that there is an abnormal surface area with the same shape as the cut on the surface of the hazelnut. Fig.10eThe left image in the figure is the image to be detected with printing on the surface of hazelnut, and the right image is the difference comparison result between the reconstructed image output by any network node and the image to be detected. The results show that there is a surface abnormal area with the same shape as the printing on the surface of hazelnut.
[0126] In FIG10 , the abnormal area on the surface of the hazelnut has a larger gray value because the difference is large, while the normal area on the surface of the hazelnut has a smaller gray value because the difference is small.
[0127] It can be understood that in this embodiment, the image to be detected is input into the image detection model to facilitate the detection of the reconstructed image output by each network node in the cascade feedback network. The generated reconstructed image has the characteristics of high pixel accuracy and good feature reconstruction effect, which makes the reconstruction error of the abnormal area relatively large. It is only necessary to separate the abnormal area from the normal area through simple standards to complete the detection of the surface abnormal area.
[0128] Embodiment 3
[0129] Please refer to FIG. 10 . This embodiment discloses an image detection device. The image detection device 3 mainly includes an image acquisition component 31 , a processor 32 and a display 33 , which are described below respectively.
[0130] The image acquisition component 31 is used to acquire the image to be detected of the object to be detected.
[0131] It should be noted that a CCD camera, a CMOS camera, a 3D camera or a video camera, and other grayscale or color cameras can be used to complete the acquisition of the image to be detected. If the camera / video camera takes a color image, the color image needs to be converted into a grayscale image to form the image to be detected. Of course, the image acquisition component 31 can also collect normal sample images of the object to be detected, thereby providing samples for the training of the cascade feedback network.
[0132] It should be noted that the normal sample images of the object to be detected are used to participate in the training of the cascade feedback network, and the image to be detected of the object to be detected is used to input the image detection model to identify the surface abnormal area in the image. In addition, the object to be detected involved can be a product on an assembly line, a part on a tool table, or a person, animal, plant or other object, which is not specifically limited here.
[0133] The processor 32 is connected to the image acquisition component 31, and the processor 32 is used to construct an image detection model through the construction method disclosed in Example 1, and / or obtain the surface abnormal area of the object to be detected in the image to be detected through the image detection method disclosed in Example 2.
[0134] The display 33 is connected to the processor 32, and is used to display the image to be detected and the surface abnormal area of the object to be detected.
[0135] In this implementation, see Fig.11 The processor 32 may include a model building module 321, an image processing module 322 and an anomaly detection module 323, which are described below respectively.
[0136] The model construction module 321 is used to train the pre-established multi-channel cascade feedback model using one or more normal sample images, and obtain the image detection model by updating the network parameters through a loss function. The image detection model here is constructed with a multi-channel cascade feedback network, and each cascade feedback network includes a plurality of shallow autoencoders formed by cascade feedback. The network nodes with the same sequence number in each cascade feedback network form a corresponding relationship. For the specific functions of the model construction module 321, please refer to steps S110-S130 in Example 1, which will not be repeated here.
[0137] The image processing module 322 is connected to the model building module 321, and is used to evaluate the image reconstruction quality of the corresponding network nodes in any two cascade feedback networks according to the reconstructed images output by each network node in the image detection model, so as to select the reconstructed image with the surface abnormal area. For the specific functions of the image processing module 322, please refer to steps S231-S232 in the second embodiment, which will not be repeated here.
[0138] The abnormality detection module 323 is connected to the image processing module 322 and is used to compare the determined reconstructed image with the image to be detected to obtain the surface abnormal area of the object to be detected. The specific function of the abnormality detection module 323 can be referred to step S240 in the second embodiment, which will not be repeated here.
[0139] Embodiment 4:
[0140] Based on the construction method disclosed in the first embodiment and the image detection method disclosed in the second embodiment, an image detection device is disclosed in this embodiment.
[0141] Please refer to Fig.12 The image detection device 4 mainly includes a memory 41 and a processor 42. The memory 41 is a computer-readable storage medium for storing a program, which may be a program code corresponding to the construction method S110-S130 in the first embodiment, or a program code corresponding to the image detection method S210-S240 in the second embodiment.
[0142] Of course, the memory 41 can also store some network weight parameters, network training process data, image detection process data, and can also store normal sample images, images to be detected, reconstructed images, detection results and other data.
[0143] The processor 42 is connected to the memory 41 and is used to execute the program stored in the memory 41 in a corresponding manner. The functions implemented by the processor 42 can refer to the processor 32 in the third embodiment, and will not be described in detail here.
[0144] Those skilled in the art will appreciate that all or part of the functions of the various methods in the above-mentioned embodiments can be implemented by hardware or by computer programs. When all or part of the functions in the above-mentioned embodiments are implemented by computer programs, the program can be stored in a computer-readable storage medium, and the storage medium can include: read-only memory, random access memory, disk, optical disk, hard disk, etc., and the program is executed by a computer to implement the above-mentioned functions. For example, the program is stored in the memory of the device, and when the program in the memory is executed by the processor, all or part of the above-mentioned functions can be implemented. In addition, when all or part of the functions in the above-mentioned embodiments are implemented by computer programs, the program can also be stored in a storage medium such as a server, another computer, disk, optical disk, flash disk or mobile hard disk, and can be downloaded or copied and saved in the memory of the local device, or the system of the local device is updated, and when the program in the memory is executed by the processor, all or part of the functions in the above-mentioned embodiments can be implemented.
[0145] The above specific examples are used to illustrate the present invention, which is only used to help understand the present invention and is not intended to limit the present invention. For those skilled in the art, according to the concept of the present invention, some simple deductions, modifications or substitutions can be made.
Claims
1. An anomaly detection method based on multi-path cascade feedback, characterized in that: include: Acquire an image of the object to be detected; The image to be detected is input into a preset image detection model to obtain a reconstructed image output by each network node in the image detection model; the image detection model is constructed with a multi-channel cascade feedback network, and each channel of the cascade feedback network includes a plurality of network nodes formed by cascade feedback of a plurality of shallow autoencoders; Evaluating the image reconstruction quality of corresponding network nodes in any two cascade feedback networks according to the reconstructed images output by each network node, so as to determine the reconstructed image with the surface abnormality area; The determined reconstructed image is compared with the image to be detected to obtain the surface abnormal area of the object to be detected.
2. The anomaly detection method according to claim 1, characterized in that: The construction process of the image detection model includes: Establishing at least two cascade feedback networks, and setting network nodes with the same serial number in each cascade feedback network to form a corresponding relationship; Configure the corresponding loss function according to the established network structure; The cascade feedback networks of each channel are trained using a plurality of normal sample images of the object to be detected, and the network parameters are updated by the loss function, so as to obtain the image detection model after the training is completed.
3. The anomaly detection method according to claim 2, characterized in that: Establishing each of the cascade feedback networks comprises: Each shallow autoencoder is composed of convolutional neural units; the shallow autoencoder includes an encoder composed of a convolutional layer and a downsampling layer, and a decoder composed of an upsampling layer and a convolutional layer; the encoder is used to receive the image input by the shallow autoencoder and convert it into semantic information, and the decoder is used to restore the semantic information and output a reconstructed image; The plurality of shallow autoencoders are sequentially sorted, the output of each shallow autoencoder is fed back to the input of the next shallow autoencoder, and each shallow autoencoder is used as a network node in the cascade feedback network; each cascade feedback network is established according to the cascade form of the obtained network nodes.
4. The anomaly detection method according to claim 2, characterized in that: The loss function corresponding to the established network structure configuration includes: For any of the cascade feedback networks, the image reconstruction quality represented by the Euclidean distance of the images corresponding to the first and last network nodes in the cascade feedback network is calculated and meets the requirement For any two of the cascade feedback networks, the image reconstruction quality represented by the Euclidean distance of the images corresponding to a number of network nodes with the same sequence number in the two cascade feedback networks is calculated and meets The calculated image reconstruction quality is used to configure the loss function corresponding to each cascade feedback network, which is expressed as: Wherein, x0 is the image input to the first network node in the cascade feedback network, is the reconstructed image output by the first network node in the jth cascade feedback network, is the reconstructed image output by the Nth network node in the jth cascade feedback network; j, m, k are all serial numbers of the cascade feedback network, i is the serial number of the network node, N is the number of each network node in the cascade feedback network, and n is the number of several network nodes with the same serial number.
5. The abnormality detection method according to claim 2, characterized in that: The method of training each of the cascade feedback networks using a plurality of normal sample images of the object to be detected, updating the network parameters by using the loss function, and obtaining the image detection model after the training is completed includes: Acquire a plurality of normal sample images of the object to be detected; wherein the normal sample images do not contain abnormal surface areas of the object to be detected; Using the normal sample image as the image input to the first network node in each cascade feedback network, and inputting each normal sample image into each cascade feedback network in turn for training; The training is terminated when the difference between the before and after calculations of the loss function corresponding to each of the cascade feedback networks is less than a preset threshold, or the corresponding loss function reaches a preset number of iterations; When the training is finished, the image detection model of the object to be detected is obtained by using the cascade feedback networks with updated network parameters.
6. The anomaly detection method according to any one of claims 1 to 5, characterized in that: The step of inputting the image to be detected into a preset image detection model to obtain a reconstructed image output by each network node in the image detection model includes: The image to be detected is input into each of the cascade feedback networks in the image detection model, and each network node in each of the cascade feedback networks outputs a reconstructed image.
7. The anomaly detection method according to any one of claims 1 to 5, characterized in that: The step of evaluating the image reconstruction quality of corresponding network nodes in any two paths of the cascade feedback network according to the reconstructed images output by each network node to determine the reconstructed image with the surface abnormality area includes: The evaluation function of the surface abnormal area is constructed by using the image reconstruction quality of the corresponding network nodes in any two cascade feedback networks in the image detection model. The evaluation function is expressed by any of the following formulas: in, The reconstructed image output by the ith network node when the image to be detected is input into the mth cascade feedback network, A reconstructed image output by the i-th network node when the image to be detected is input into the k-th cascade feedback network, where i is the serial number of the network node; When the value of the evaluation function is greater than or equal to a predetermined value, it is determined that the reconstructed image involved in the calculation contains the surface abnormality region of the object to be detected, thereby determining the reconstructed image with the surface abnormality region.
8. The anomaly detection method according to any one of claims 1 to 5, characterized in that: The step of comparing the determined reconstructed image with the image to be detected to obtain the abnormal surface area of the object to be detected includes: Obtaining the surface abnormal area of the object to be detected by comparing the determined difference between the reconstructed image and the image to be detected, and / or obtaining the confidence level corresponding to the surface abnormal area; Output the image to be detected of the object to be detected and the abnormal surface area of the object to be detected.
9. An image detection device, characterized in that: include: An image acquisition component, used for acquiring an image to be detected of an object to be detected; A processor connected to the image acquisition component, and configured to obtain a surface abnormal area of the object to be detected in the image to be detected by using the abnormality detection method according to any one of claims 1 to 8; A display is connected to the processor and is used to display the image to be detected and the surface abnormal area of the object to be detected.
10. The image detection device as claimed in claim 9, characterized in that: The processor comprises: A model construction module is used to construct the image detection model; the image detection model is constructed with a multi-channel cascade feedback network, and each channel of the cascade feedback network includes a plurality of network nodes formed by cascade feedback of a plurality of shallow autoencoders, and the network nodes with the same sequence number in each channel of the cascade feedback network form a corresponding relationship; An image processing module, used for evaluating the image reconstruction quality of corresponding network nodes in any two paths of the cascade feedback network according to the reconstructed images output by each network node in the image detection model, so as to select the reconstructed image with the surface abnormality area; The abnormality detection module is used to compare the determined reconstructed image with the image to be detected to obtain the surface abnormal area of the object to be detected.
11. A computer-readable storage medium, characterized in that: The method comprises a program which can be executed by a processor to implement the abnormality detection method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Large-compression-ratio satellite remote sensing image compression method based on deep self-encoding network
CN105163121A
A medical image processing method, system and apparatus, and computer-readable storage medium
CN109271992A
High-precision cascade target detection method and device based on dynamic structure optimization
CN110288017A
Visible light MIMO communication system color detection method based on auto-associative neural network
CN111458029A
Workpiece surface defect detection method based on cascaded neural network
CN112053317A
