Unsupervised belt surface intelligent detection method based on deep learning
Through the combination of PatchCore-BELT visual detection model and DINOv2 model, the problems of insufficient defect samples and unbalanced data in the detection of conveyor belt defects are solved, and high-precision belt defect detection and positioning are realized, which reduces detection costs and ensures the safety of conveyor belts. run.
Patent Information
- Application Number
- CN202411170881.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-26
- Publication Date
- 2024-12-03
AI Technical Summary
The prior art is difficult to effectively detect conveyor belt defects in industrial scenarios, especially due to insufficient defect samples and data imbalance, which leads to low detection accuracy and high cost.
Adopting an unsupervised belt surface intelligent detection method based on deep learning, using the PatchCore-BELT visual detection model, only normal samples are required to train the model, and features are extracted through the pre-trained DINOv2 model and core central sampling are performed, combining the nearest neighbor search algorithm for detection and Positioning solves the problems of insufficient defect samples and data imbalance.
High-precision belt defect detection and positioning is achieved, reducing manual inspection costs, ensuring safe operation and maintenance of the conveyor belt, and being able to quickly identify serious defects and issue warnings to stop the conveyor belt operation.
Smart Images

Figure CN119067946A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical fields of industrial vision, intelligent detection, conveyor belt detection, etc., and in particular to an unsupervised belt surface intelligent detection method based on deep learning. Background Art
[0002] Conveyor belts are key equipment for mineral transportation. They play an important role in long-distance, large-volume cargo transportation and have been widely used in industrial fields such as docks and mines. During long-term operation, conveyor belts are constantly rubbing and colliding with cargo, which can easily cause scratches, wear, holes and other defects on the belt surface. In addition, if the transported minerals are mixed with sharp foreign objects or large heavy objects, they will directly pierce or penetrate the belt surface when the minerals fall, causing destructive tearing of the belt. Once the belt is torn, it will not only cause the company to stop production and affect production efficiency, but it will also pose a serious threat to property and the personal safety of workers. Therefore, it is very necessary to design an effective and stable belt defect detection solution.
[0003] With the development of artificial intelligence and deep learning technology, the existing belt defect detection algorithms based on deep learning can be roughly divided into two categories: supervised learning anomaly detection and unsupervised learning anomaly detection. When there are sufficient defect samples, the supervised learning detection method can achieve better detection results. However, in actual industrial scenarios, it is difficult to obtain large-scale high-quality belt defect samples, and a small number of defect samples are not enough to support the training of supervised learning models. Some researchers have tried to use generative adversarial networks (GANs) to generate defect samples similar to training samples, which can alleviate the problem of insufficient conveyor belt defect data to a certain extent. However, in real industrial scenarios, due to the scarcity of belt defect samples, generative adversarial networks are prone to model collapse, overfitting, and low quality of generated samples. In addition, during the training process of the GAN network, the demand for training time and computing resources is large, and the cost is high. Summary of the invention
[0004] In view of the above difficulties and challenges, the present invention proposes an unsupervised belt surface intelligent detection method based on deep learning, which is based on the PatchCore-BELT visual detection model and aims to solve the problems of insufficient belt defect samples and imbalance in the number of normal and defective samples. This detection algorithm only needs to use normal sample training models and does not require labels to detect and locate defects, effectively solving the problems of insufficient belt defect data and data imbalance. At the same time, the algorithm uses the pre-trained DINOv2 model to extract and fuse features at different levels, effectively improving the detection accuracy of complex samples.
[0005] The specific technical solutions are as follows:
[0006] An unsupervised belt surface intelligent detection method based on deep learning:
[0007] The PatchCore-BELT visual inspection model is used to inspect belt images. The construction of the model includes two parts: training phase and inference phase.
[0008] In the training phase, the pre-trained DINOv2 model is first used to extract patch features of normal belt images and store them in a feature library; then the core set sampling algorithm is used to further filter the features;
[0009] The inference stage first uses the same feature extraction method as the training stage to extract features of the test image, and then uses the nearest neighbor search algorithm to calculate the similarity between the extracted features and the normal image features in the feature library obtained in the training stage; finally, anomaly estimation is performed based on the similarity to obtain the detection result.
[0010] Further, the belt dataset is divided into a training set and test set The training set only contains normal belt images, and the test set contains normal images and various types of defect images.
[0011] Furthermore, the feature extraction process includes:
[0012] For any image x in the training set and the test set i , extract x using the pre-trained DINOv2 model φ i The features of the input image x extracted by the pre-trained model φ are used. i The feature representation of the kth encoding block is Where (N+1) represents the total number of tokens in the coding block, N represents the number of image patch tokens, and D represents the dimension of each token.
[0013] For the extracted feature φ k,i , extract the image patch tokens, remove the class token, and get the features Then Rearrange the image according to its block position to get the feature map As shown below:
[0014]
[0015] Among them, f rea represents the transformation function for adjusting the feature shape;
[0016] Then the features extracted from different layers are aggregated: the feature maps are concatenated according to the dimension D of the token to obtain the aggregated feature map
[0017] F i =f cat (F k,i ,F k′,i )
[0018] Among them, f cat represents the concatenation operation, k′ represents the k′th encoding block of the Transformer Encoder part of the pre-trained DINOv2 model;
[0019] use Indicates F i The image patch token at the (m,n) position in the input image x i The patch-level feature representation of the (m,n)th block in
[0020] Perform neighborhood feature aggregation on the extracted patch-level features; for the feature at position (m, n) Its neighborhood with patchsize p is defined as:
[0021]
[0022] Use the aggregate function f agg To aggregate neighbors The characteristics are as follows:
[0023]
[0024] Among them, the aggregation function f agg Use adaptive average pooling; then, traverse F with a step size of s = 1 i Perform feature aggregation on each imagepatch token in to obtain a feature set:
[0025]
[0026] To get the input image x i The patch feature set
[0027] Furthermore, in the training phase, patch features are extracted from all normal belt images in the training set, and the feature library finally constructed is as follows:
[0028]
[0029] Furthermore, the core set sampling is as follows: representative features are selected from the original feature library S to form a subset S of the feature library. c , the constructed feature library S c Used for inference of subsequent models; uses the minimax facilitylocation core set selection algorithm.
[0030] Furthermore, the specific steps of the core set sampling are as follows:
[0031] 1) Let S be the original feature set, ks be the number of sampled feature points, ||p s -p c || 2 Represents the feature point p s and p c The distance between them is calculated and the core set S is initialized. c ={}, used to save the sampled feature points;
[0032] 2) Randomly select a feature point from S and add it to S c middle;
[0033] 3) Define a point p in S s To the core set S c The distance is Calculate the remaining points in S to the core set S c The distance of the core set is added to the core set; the added sampling points are
[0034]
[0035] 4) Repeat step 3) until S c The number of features in is ks.
[0036] Furthermore, in the inference phase, the patch features of the test image are calculated and compared with the core set S obtained in the training phase. c The distance between the features in the image is used to detect and locate image anomalies; the smaller the calculated distance, the closer the patch feature of the test image is to the normal image feature, that is, the smaller the probability of anomaly; conversely, it means that the feature is very different from the normal image feature, that is, the probability of anomaly is large.
[0037] Furthermore, in the inference phase, for a given test image First extract x test The patch feature set is obtained For each local patch feature Use the nearest neighbor search algorithm to find the closest feature from the core set:
[0038]
[0039] The Euclidean distance between the patch features of the test image and the normal features is used to estimate the degree of abnormality in the local area of the image. The abnormal score of each patch is defined as:
[0040] s(p test )=||p test -p * || 2
[0041] Then Calculate the anomaly score for each patch feature in x test The anomaly score set A(x test ):
[0042]
[0043] In order to obtain the location result of the abnormal area, the calculated abnormal score set A(x test ) are rearranged according to the spatial position and mapped to the resolution size of the original image using an interpolation algorithm; then, the interpolation result is smoothed using a Gaussian blur with a kernel size of σ = 4 to obtain x test The corresponding abnormal location map; finally, the maximum abnormal score value of the abnormal location map is taken as the abnormal score I(x test ).
[0044] Furthermore, the calculated image-level anomaly score is normalized and scaled to [0,1]; let is the set of image-level anomaly scores calculated on the test set. The final anomaly score of each test sample is:
[0045]
[0046] The maximum and minimum anomaly score values of all anomaly localization maps of the test set are calculated, and then the anomaly score of each pixel position of the anomaly localization map is normalized.
[0047] And, a corresponding unsupervised belt surface intelligent detection system based on deep learning, including a memory, a processor and a computer program stored in the memory and run on the processor, characterized in that: the PatchCore-BELT visual detection model described in the above method is stored in the memory, which is used to detect and identify abnormalities in belt images.
[0048] Compared with the prior art, the present invention and its preferred embodiments have at least the following beneficial effects:
[0049] 1. It solves the problem of insufficient defect samples and imbalance of positive and negative samples in the current conveyor belt defect detection. Only using normal images for training can achieve excellent defect detection and positioning performance.
[0050] 2. The proposed PatchCore-BELT algorithm can effectively detect and locate belt surface defects. When serious defects appear on the belt surface, it can accurately and quickly identify them, so as to further issue a warning and immediately stop the operation of the conveyor belt.
[0051] 3. Its application can not only significantly reduce the cost of manual inspection, but also effectively monitor the health of the conveyor belt surface, which is crucial for the safe operation and maintenance of the conveyor belt. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments:
[0053] Figure 1 This is the overall framework diagram of the PatchCore-BELT algorithm according to an embodiment of the present invention;
[0054] Figure 2 Schematic diagram of a feature extraction module according to an embodiment of the present invention. DETAILED DESCRIPTION
[0055] In order to make the features and advantages of this patent more obvious and easy to understand, the following embodiments are specifically described in detail with the accompanying drawings as follows:
[0056] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0057] This example will introduce the proposed PatchCore-BELT algorithm in detail. Figure 1 As shown in the figure, the PatchCore-BELT framework consists of two parts: the training phase and the inference phase.
[0058] The training phase includes two parts: feature extraction and core set sampling. First, the patch features of the normal belt image are extracted using the pre-trained model and stored in the feature library. Since the number of features in the feature library is very large, the present invention uses the core set sampling algorithm to select representative features and compress the size of the feature library to facilitate subsequent reasoning.
[0059] The inference phase includes three parts: feature extraction, nearest neighbor search, and anomaly estimation. First, the features of the test image are extracted using the same process as the training phase. Then, the nearest neighbor search algorithm is used to calculate the similarity between the extracted features and the normal image features in the feature library obtained in the training phase. Finally, anomaly estimation is performed based on the similarity to obtain the detection result.
[0060] The PatchCore-BELT algorithm provided by the present invention is described in detail below.
[0061] 1 Feature Extraction Module
[0062] The structure of the feature extraction module is as follows: Figure 2 The specific process is described as follows:
[0063] First, the belt dataset is divided into a training set and test set The training set contains only normal belt images, and the test set contains normal images and multiple different types of defect images. For any image x in the training set and the test set i , that is, for The present invention uses the pre-trained DINOv2 model φ to extract x i In order to avoid the extracted features being too biased towards the pre-training task of the LVD-142M dataset, the output features of the two middle encoding blocks of the Transformer Encoder part of the pre-training model are selected. Formally, the present invention uses the input image x extracted by the pre-training model φ i The feature representation of the kth encoding block is Among them, (N+1) represents the total number of tokens in the encoding block, N represents the number of image patch tokens, and D represents the dimension of each token.
[0064] Similar to other ViT models, the feature φ extracted by the proposed model k,i Contains class tokens and imagepatch tokens. Among them, the class token is randomly initialized. It is not based on the image content and gathers the information of other tokens. It is usually used for subsequent classification tasks in most ViT models; while the image patch token is the feature representation of each encoded image block, which contains rich local image information and details. In the anomaly detection task, the encoded features for the specific content of the image are usually used for anomaly detection and positioning, without paying attention to the features containing image classification information. Therefore, for the extracted feature φ k,i , the present invention extracts the image patch tokens, that is, removes the class token, and obtains the feature In order to facilitate the fusion of neighborhood feature information, the present invention will Rearrange the image according to its block position to get the feature map As shown below:
[0065]
[0066] Among them, f rea Represents a transformation function that reshapes the feature.
[0067] In order to make full use of the feature information extracted by the pre-trained DINOv2 model, the present invention aggregates the features extracted from different layers. The features of different coding blocks extracted by the pre-trained DINOv2 model have the same size, so when aggregating features of different layers, there is no need to upsample, which reduces the computational cost to a certain extent. The present invention adopts a simple aggregation method, that is, the feature map is spliced according to the dimension D of the token to obtain the aggregated feature map. The process is defined as:
[0068] F i =f cat (F k,i ,F k′,i )
[0069] Among them, f cat represents the concatenation operation, and k′ represents the k′th encoding block of the Transformer Encoder part of the pre-trained DINOv2 model. Indicates F i The image patch token at the (m,n) position in the input image x i The patch-level feature representation of the (m,n)th block in
[0070] In order to increase the receptive field size and robustness to small spatial deviations without losing spatial resolution or feature map availability, the present invention performs neighborhood feature aggregation on the extracted patch-level features. For the feature at position (m, n) Its neighborhood with patchsize p is defined as:
[0071]
[0072] Use the aggregate function f agg To aggregate neighbors The characteristics are as follows:
[0073]
[0074] Among them, the aggregation function fagg Adaptive average pooling is used. Then, the present invention traverses F with a step size of s=1 i Perform feature aggregation on each image patch token in to obtain a feature set:
[0075]
[0076] So far, we have obtained the input image x i The patch feature set
[0077] In the training stage, the present invention also needs to extract patch features from all normal belt images in the training set, and finally construct a feature library containing a large number of normal image patch features, as follows:
[0078]
[0079] 2 Core Set Sampling
[0080] When there are many training samples, the feature library S constructed by the feature extraction part will become very large, which directly affects the inference speed of the model and takes up more storage space during the training phase. Therefore, it is necessary to perform core set sampling on the feature library S to reduce the number of features in the feature library.
[0081] By definition, core set sampling is to find a subset B of the original set A, so that the problem can be solved more efficiently and quickly on the subset B, and the solution obtained is very close to the exact solution calculated on A. For the core set sampling used in the present invention, in simple terms, it is to select representative features from the original feature library S to form a subset S of the feature library. c , the constructed feature library S c Used for subsequent model reasoning. By using core set sampling, a large number of similar features in S are removed, which greatly compresses the size of S and thus improves the reasoning speed.
[0082] In order to preserve the performance of the model as much as possible while sampling the core set, the present invention uses the minimaxfacility location core set selection algorithm. The specific steps of core set sampling are as follows:
[0083] 1) First, determine the initial situation. The present invention assumes that S is the original feature set, k is the number of sampled feature points, ||p s -p c || 2 Represents the feature point p s and p c The distance between them, and initialize the core set S c={}, used to save the sampled feature points.
[0084] 2) Randomly select a feature point from S and add it to S c middle.
[0085] 3) Define a point p in S s To the core set S c The distance is Calculate the remaining points in S to the core set S c The distance of the core set is , and the point farthest from the core set is added to the core set. The added sampling points are
[0086]
[0087] 4) Repeat step 3) until S c The number of features in is k.
[0088] like Figure 1 As shown, the core set S obtained by the above core set sampling algorithm is c This is the final training result of the model, which saves the patch features of normal images and will be used for reasoning of the anomaly detection model.
[0089] 3 Model Reasoning Phase
[0090] In the inference stage, the present invention calculates the patch features of the test image and the core set S obtained in the training stage. c The distance between the features in the image is used to detect and locate image anomalies. The smaller the calculated distance, the closer the patch feature of the test image is to the normal image feature, that is, the smaller the probability of anomaly; conversely, it means that the feature is very different from the normal image feature, that is, the probability of anomaly is high.
[0091] like Figure 1 As shown, given a test image The present invention first extracts x test The patch feature set is obtained by using the same feature extraction module as the training phase. For each local patch feature Use the nearest neighbor search algorithm to find the closest feature from the core set:
[0092]
[0093] In the present invention, the Euclidean distance between the patch features of the test image and the normal features is used to estimate the abnormality of the local area of the image. Therefore, the abnormality score of each patch is defined as:
[0094] s(p test )=||p test-p * || 2 (10)
[0095] According to formula (9) and formula (10), the present invention Calculate the anomaly score for each patch feature in x test The anomaly score set A(x test ):
[0096]
[0097] In order to obtain the location result of the abnormal area, the calculated abnormal score set A(x test ) are rearranged according to the spatial position and mapped to the resolution size of the original image using an interpolation algorithm. Then, the interpolation result is smoothed using a Gaussian blur with a kernel size of σ = 4 to obtain x test Finally, the present invention uses the maximum anomaly score value of the anomaly location map as the anomaly score I(x test ).
[0098] In order to facilitate the determination of the degree of abnormality of the image and the evaluation of the detection performance of the model, the present invention normalizes the calculated image-level abnormality score and scales it to [0,1]. Specifically, let is the set of image-level anomaly scores calculated on the test set. The final anomaly score of each test sample is:
[0099]
[0100] In addition, for the normalization of pixel-level anomaly scores, the present invention calculates the maximum and minimum anomaly score values of all anomaly location maps of the test set, and then uses a method similar to formula (12) to normalize the anomaly score of each pixel position of the anomaly location map.
[0101] The algorithm model provided in this embodiment can be stored in a computer-readable storage medium in a coded form and implemented in the form of a computer program. The basic parameter information required for calculation is input through computer hardware, and the calculation results are output.
[0102] The algorithm model provided in this embodiment can be stored in a computer-readable storage medium in a coded form and implemented in the form of a computer program. The basic parameter information required for calculation is input through computer hardware, and the calculation results are output.
[0103] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0104] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0105] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0106] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0107] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
[0108] This patent is not limited to the above-mentioned optimal implementation mode. Anyone can derive other forms of an unsupervised belt surface intelligent detection method based on deep learning under the inspiration of this patent. All equal changes and modifications made according to the scope of the patent application of the present invention should be covered by this patent.
Claims
1. An unsupervised belt surface intelligent detection method based on deep learning, characterized in that: The PatchCore-BELT visual inspection model is used to inspect belt images. The construction of the model includes two parts: training phase and inference phase. In the training phase, the pre-trained DINOv2 model is first used to extract patch features of normal belt images and store them in a feature library; then the core set sampling algorithm is used to further filter the features; The inference stage first uses the same feature extraction method as the training stage to extract features of the test image, and then uses the nearest neighbor search algorithm to calculate the similarity between the extracted features and the normal image features in the feature library obtained in the training stage; finally, anomaly estimation is performed based on the similarity to obtain the detection result.
2. The unsupervised belt surface intelligent detection method based on deep learning according to claim 1 is characterized in that: Split the belt dataset into a training set and test set The training set only contains normal belt images, and the test set contains normal images and various types of defect images.
3. The unsupervised belt surface intelligent detection method based on deep learning according to claim 1 is characterized in that: The feature extraction process includes: For any image x in the training set and the test set i , extract x using the pre-trained DINOv2 model φ i The features of the input image x extracted by the pre-trained model φ are used. i The feature representation of the kth encoding block is Where (N+1) represents the total number of tokens in the coding block, N represents the number of image patch tokens, and D represents the dimension of each token; For the extracted feature φ k,i , extract the imagepatchtokens, remove the classtoken, and get the features Then Rearrange the image according to its block position to get the feature map As shown below: Among them, f rea represents the transformation function for adjusting the feature shape; Then the features extracted from different layers are aggregated: the feature maps are concatenated according to the dimension D of the token to obtain the aggregated feature map F i =f cat (F k,i ,F k′,i ) Among them, f cat represents the concatenation operation, k′ represents the k′th encoding block of the TransformerEncoder part of the pre-trained DINOv2 model; use Indicates F i The imagepatchtoken at position (m,n) in the input image x i The patch-level feature representation of the (m,n)th block in Perform neighborhood feature aggregation on the extracted patch-level features; for the features at position (m, n) Its neighborhood with patchsize p is defined as: Use the aggregate function f agg To aggregate neighbors The characteristics are as follows: Among them, the aggregation function f agg Use adaptive average pooling; then, traverse F with a step size of s = 1 i Perform feature aggregation on each imagepatchtoken in to obtain a feature set: To get the input image x i The patch feature set 4. The unsupervised belt surface intelligent detection method based on deep learning according to claim 3 is characterized in that: In the training phase, patch features are extracted from all normal belt images in the training set, and the final feature library is as follows:
5. According to claim 1, an unsupervised belt surface intelligent detection method based on deep learning is characterized in that: The core set sampling is: to select representative features from the original feature library S to form a subset S of the feature library c , the constructed feature library S c Used for inference of subsequent models; using the minimaxfacility location core set selection algorithm.
6. The unsupervised belt surface intelligent detection method based on deep learning according to claim 5 is characterized in that: The specific steps of the core set sampling are as follows: 1) Let S be the original feature set, ks be the number of sampled feature points, ||p s -p c ||2 represents the feature point p s and p c The distance between them is calculated and the core set S is initialized. c ={}, used to save the sampled feature points; 2) Randomly select a feature point from S and add it to S c middle; 3) Define a point p in S s To the core set S c The distance is Calculate the remaining points in S to the core set S c The distance of the core set is added to the core set; the added sampling points are 4) Repeat step 3) until S c The number of features in is ks.
7. The unsupervised belt surface intelligent detection method based on deep learning according to claim 1 is characterized in that: In the inference phase, the patch features of the test image are calculated and compared with the core set S obtained in the training phase. c The distance between the features in the image is used to detect and locate image anomalies; the smaller the calculated distance, the closer the patch feature of the test image is to the normal image feature, that is, the smaller the probability of anomaly; conversely, it means that the feature is very different from the normal image feature, that is, the probability of anomaly is large.
8. The unsupervised belt surface intelligent detection method based on deep learning according to claim 1, characterized in that: In the inference phase, for a given test image First extract x test The patch feature set is obtained For each local patch feature Use the nearest neighbor search algorithm to find the closest feature from the core set: The Euclidean distance between the patch features of the test image and the normal features is used to estimate the degree of abnormality in the local area of the image. The abnormal score of each patch is defined as: s(p test )=||p test -p * ||2 Then Calculate the anomaly score for each patch feature in x test The anomaly score set A(x test ): In order to obtain the location result of the abnormal area, the calculated abnormal score set A(x test ) are rearranged according to the spatial position and mapped to the resolution size of the original image using an interpolation algorithm; then, the interpolation result is smoothed using a Gaussian blur with a kernel size of σ = 4 to obtain x test The corresponding abnormal location map; finally, the maximum abnormal score value of the abnormal location map is taken as the abnormal score I(x test ).
9. The unsupervised belt surface intelligent detection method based on deep learning according to claim 8, characterized in that: Normalize the calculated image-level anomaly score and scale it to [0,1]; is the set of image-level anomaly scores calculated on the test set. The final anomaly score of each test sample is: The maximum and minimum anomaly score values of all anomaly localization maps of the test set are calculated, and then the anomaly score of each pixel position of the anomaly localization map is normalized.
10. An unsupervised belt surface intelligent detection system based on deep learning, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: The memory stores the PatchCore-BELT visual detection model described in any of the methods of claims 1-9, which is used to detect and identify abnormalities in belt images.
