A method for detecting abnormality of a condensing unit production line

By adopting larger span patch embedding, hollow convolution and adaptive attention modules in the image processing of condensation units, combined with the technical means of deep convolution, the problems of large computing consumption and memory usage in the existing technology are solved, and high efficiency is achieved The image abnormality detection of the condensation unit improves the production line detection efficiency and product quality.

CN118505676BActive Publication Date: 2024-11-05JINAN BINGSIYUAN REFRIGERATION EQUIP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410891213.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-04
Publication Date
2024-11-05
Estimated Expiration
2044-07-04

AI Technical Summary

Technical Problem

The prior art has a large calculation consumption and memory usage in the image processing of condensing units, making it difficult to efficiently detect defects and abnormalities on the production line, affecting production efficiency and product quality.

Method used

The customized initial feature encoding module is used to generate initial features using patch embedding with a larger span, replace the attention layer with a hollow convolution, and adaptively select representative features in the large-scale attention module for calculation, combined with deep convolution, reduce the calculation amount and memory access costs.

Benefits of technology

It significantly reduces the calculation consumption and memory usage of the image abnormality detection model of the condensing unit, improves detection efficiency and accuracy, and maintains recognition performance, making it suitable for resource-constrained environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118505676B_ABST
    Figure CN118505676B_ABST
Patent Text Reader

Abstract

The present invention proposes a method for detecting abnormalities in a condensing unit production line, and relates to the field of image processing. The present invention proposes a process for detecting abnormalities in a condensing unit production line, including collecting condensing unit image data, constructing a customized initial feature encoding module, constructing a type-one feature processing module, constructing a large-scale attention module, constructing a type-two feature processing module, constructing a type-three feature processing module, constructing a condensing unit image abnormality detection model, and training and detecting a condensing unit image abnormality detection model; at the same time, a condensing unit image abnormality detection model is proposed, wherein the customized initial feature encoding module reduces memory access costs and reduces spatial redundancy from an early stage, the type-one feature processing module reduces computational consumption, and the large-scale attention module adaptively selects a small portion of representative features for attention calculation, and combines the remaining majority of features to improve accuracy, while preventing computational redundancy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of image processing, and in particular relates to a method for detecting abnormality of a condensing unit production line. Background Art

[0002] The use of image processing technology for defect detection on condensing unit production lines is of great significance. First, through automated image processing technology, surface defects of various components of condensing units, such as scratches, dents, cracks, etc., can be detected and identified in real time to ensure product quality. This high-precision detection method is faster and more accurate than manual detection, which can greatly reduce the risk of human error and improve production efficiency.

[0003] Secondly, image processing technology can be used to detect assembly quality and ensure the correct installation and connection of each component. By detecting the position of components, the status of fasteners and the quality of welding, problems in the assembly process can be discovered and corrected to prevent equipment failures caused by assembly defects. This not only improves the reliability and safety of the product, but also reduces the cost of subsequent maintenance and rework.

[0004] Finally, image processing technology can also provide rich data support for continuous improvement of production processes. By analyzing the inspection data, common defect types and their occurrence frequencies can be identified, thereby optimizing the production process and improving the design and manufacturing process. This data-driven improvement method will help improve the overall quality and performance of the condensing units and enhance the company's competitiveness in the market. Summary of the invention

[0005] The present invention provides a condensing unit production line anomaly detection method, aiming to propose a condensing unit image anomaly detection model, wherein a customized initial feature encoding module uses a larger span patch embedding to generate initial features, reduces memory access costs, and reduces spatial redundancy from an early stage; a type-one feature processing module uses a hole convolution instead of an attention layer, while achieving similar recognition performance, reducing computational consumption; a large-scale attention module adaptively selects a small part of representative features for attention calculation, and combines the remaining majority of features to improve accuracy, while preventing computational redundancy; a type-two feature processing module and a type-three feature processing module use a hole convolution and a depth convolution respectively on the basis of applying the large-scale attention module, thereby reducing the overall computational complexity of the condensing unit image anomaly detection model without affecting the detection performance.

[0006] The present invention aims to propose a condensing unit image anomaly detection model and provide a condensing unit production line anomaly detection method, comprising the following steps:

[0007] S1. Condensing unit image data collection: collect condensing unit images in the condensing unit production line. The condensing unit images contain four types of defects, namely scratches, dents, cracks and surface oil stains. Defects are annotated on all condensing unit images to form a condensing unit image dataset.

[0008] S2, build a customized initial feature encoding module, including multiple convolutional layers;

[0009] S3, construct a feature processing module, including feedforward neural network and dilated convolution;

[0010] S4, build a large-scale attention module, including self-attention operation;

[0011] S5, build a type II feature processing module, including a large-scale attention module and a dilated convolution;

[0012] S6, build three types of feature processing modules, including large-scale attention modules and deep convolution;

[0013] S7, constructing a condensing unit image anomaly detection model, including input, customized initial feature encoding module, type I feature processing module, type II feature processing module, type III feature processing module, target detection head and output;

[0014] S8. Training and testing of condensing unit image anomaly detection model. Use the condensing unit image data set to train the condensing unit image anomaly detection model. After the training is completed, obtain the condensing unit images on the condensing unit production line and input them into the condensing unit image anomaly detection model to obtain the detection results.

[0015] Preferably, in step S2, for the customized initial feature encoding module, a 64×64 overlapping block embedding strategy is adopted as a whole, and the condensing unit image is input , , , and 3 is the condensing unit image The height, width and channels of the condensing unit Input to four concatenated convolutional layers to obtain the initial features , where each convolutional layer uses a 4×4 stride and a 1×1 convolution kernel, , is the initial feature Channel, initial features is the output of the custom initial feature encoding module.

[0016] Preferably, in step S2, for the customized initial feature encoding module, a 64×64 overlapping block embedding strategy is adopted as a whole, that is, by using larger span patches to embed and generate initial features, the memory access cost can be significantly reduced, and spatial redundancy can be reduced from an early stage. Compared with the traditional ViT architecture, the traditional ViT architecture usually adopts a 16×16 fixed patch embedding strategy. This larger span embedding method reduces the number of patches that need to be processed, thereby reducing the computational burden and memory usage. In the traditional ViT architecture, each input image is divided into a large number of small patches, and each patch is embedded and processed independently. Although this method can capture the details of the image, it will bring large computational and memory overhead when processing condensing unit images. By expanding the patch size to 64×64 and adopting an overlapping embedding strategy, the number of patches can be effectively reduced while maintaining the continuity and integrity of spatial information. The overlapping embedding strategy ensures interaction between patches, reduces information loss, and improves the richness of feature expression.

[0017] Preferably, in step S3, for a type-one feature processing module, an initial feature output by a customized initial feature encoding module is obtained. , , , and is the initial feature The height, width and channel of It is the input of a feature processing module, and then obtains the processing feature , , processing features and initial features The dimensions are the same, ,in represents weight normalization, represents dilated convolution, represents a feed-forward neural network, Represents element-by-element addition, processing features It is the output of a feature processing module.

[0018] Preferably, in step S3, for a type-I feature processing module, a dilated convolution is used instead of an attention layer. Compared with a traditional attention layer, a dilated convolution does not need to calculate a large number of dot product operations, thereby greatly reducing computational complexity and memory usage. The attention layer captures global information by calculating the correlation between input features, which generates a large computational overhead when processing image data, while the dilated convolution can achieve similar effects at a lower computational cost through its characteristic of expanding the receptive field. In addition, the use of dilated convolution can also improve the parallel computing capability of the condensing unit image anomaly detection model, which is suitable for parallel processing on hardware accelerators such as GPUs, further improving the processing speed. This optimization makes the condensing unit image anomaly detection model more efficient in practical applications, especially in resource-constrained environments, such as edge computing devices or mobile devices, and can also achieve efficient target recognition.

[0019] Preferably, in step S4, for the large-scale attention module, given the input feature , , , and It is a feature The height, width and channel of Split into representative features in the channel dimension according to the ratio r and the remaining features , , , , ,here The calculation is , represents the Sigmod activation function, represents the trainable parameters, is an adaptive value ranging from 0.01 to 0.25, and then the optimized representative features are obtained through self-attention operation , , the self-attention operation is ,in , and is the weight of the linear layer, d is the scaling factor, and the value of d is 32. represents the matrix transpose, Represents matrix multiplication, and then obtains features , , , Representatives will and Connect in the channel dimension, Represents convolution, feature is the output of the large-scale attention module, feature and Features The dimensions remain consistent.

[0020] Preferably, in step S4, for the large-scale attention module, when processing the condensing unit image, by adaptively selecting a small number of representative features for attention calculation, the amount of data to be processed can be significantly reduced, thereby reducing the computational complexity and memory usage. At the same time, most of the remaining features are combined with the attention calculation results through a lighter processing method. This strategy not only maintains the integrity of the global information, but also can effectively highlight and refine the feature expression of key areas, thereby greatly improving the computational efficiency while ensuring the recognition accuracy.

[0021] Preferably, in step S5, for the second-type feature processing module, first obtain the processing feature output by the first-type feature processing module , , , and Is the processing feature The height, width and channels of It is the input of the second-type feature processing module, which processes the features Downsample to obtain features , , Representative features Channels, and then obtain the processing features , , , stands for root mean square normalization, represents dilated convolution, Represents element-by-element addition, and then obtains the processing features , , , stands for root mean square normalization, represents a large-scale attention module, represents a feed-forward neural network, Represents element-by-element addition, processing features is the output of the type-two feature processing module.

[0022] Preferably, in step S6, for the type-three feature processing module, firstly obtain the processing feature output by the type-two feature processing module , , , and Is the processing feature The height, width and channels of It is the input of the three-type feature processing module, which processes the features Downsample to obtain features , , Representative features Channels, and then obtain the processing features , , , stands for batch normalization, represents the depthwise convolution, Represents element-by-element addition, and then obtains the processing features , , , The representative layer is normalized. represents a large-scale attention module, represents a feed-forward neural network, Represents element-by-element addition, processing features is the output of the three-type feature processing module.

[0023] Preferably, in step S7, for the condensing unit image anomaly detection model, the condensing unit image is input To customize the initial feature encoding module, , , and 3 is the condensing unit image The height, width and channel of , , Represents the initial features Channel, input initial features Go to a feature processing module to get the processing features , , Representative processing characteristics Channel, input processing features Go to the second-type feature processing module to obtain the processing features , , Representative processing characteristics Channel, input processing features Go to the three-type feature processing module to obtain the processing features , , Representative processing characteristics Channel, input processing features Go to the target detection head and get the detection result.

[0024] Compared with the prior art, the present invention has the following technical effects:

[0025] The technical solution provided by the present invention proposes a condensing unit image anomaly detection model, wherein a customized initial feature encoding module uses a larger span patch embedding to generate initial features, reduces memory access costs, and reduces spatial redundancy from an early stage; a type-one feature processing module uses a hole convolution instead of an attention layer, while achieving similar recognition performance, while reducing computational consumption; a large-scale attention module adaptively selects a small part of representative features for attention calculation, and combines the remaining majority of features to improve accuracy while preventing computational redundancy; a type-two feature processing module and a type-three feature processing module use hole convolution and depth convolution, respectively, based on the application of a large-scale attention module, thereby reducing the overall computational complexity of the condensing unit image anomaly detection model without affecting the detection performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 The present invention provides a flow chart for detecting abnormality in an image of a condensing unit.

[0027] Figure 2 This is a structural diagram of the large-scale attention module provided by the present invention.

[0028] Figure 3 It is a structural diagram of the condensing unit image anomaly detection model provided by the present invention.

[0029] Figure 4 This is a diagram showing the effect of detecting anomaly in an image of a condensing unit provided by the present invention. DETAILED DESCRIPTION

[0030] The present invention aims to propose a method for detecting anomalies in a condensing unit production line, and proposes a condensing unit image anomaly detection model, wherein a customized initial feature encoding module uses a larger span patch embedding to generate initial features, reduces memory access costs, and reduces spatial redundancy from an early stage; a type-one feature processing module uses a hole convolution instead of an attention layer, which reduces computational consumption while achieving similar recognition performance; a large-scale attention module adaptively selects a small part of representative features for attention calculation, and combines the remaining majority of features to improve accuracy while preventing computational redundancy; a type-two feature processing module and a type-three feature processing module use a hole convolution and a depth convolution, respectively, based on the application of a large-scale attention module, thereby reducing the overall computational complexity of the condensing unit image anomaly detection model without affecting the detection performance.

[0031] See also Figure 1 As shown, a method for detecting abnormality of a condensing unit production line in an embodiment of the present application is as follows:

[0032] S1. Condensing unit image data collection: collect condensing unit images in the condensing unit production line. The condensing unit images contain four types of defects, namely scratches, dents, cracks and surface oil stains. A total of 300 condensing unit images are included. Defects are annotated for all condensing unit images to form a condensing unit image dataset.

[0033] S2, build a custom initial feature encoding module, which includes 4 convolutional layers with 4×4 stride and 1×1 convolution kernel;

[0034] S3, construct a feature processing module, including a feedforward neural network and a dilated convolution;

[0035] S4, build a large-scale attention module, including self-attention operation;

[0036] S5, construct a type II feature processing module, including a large-scale attention module and a dilated convolution;

[0037] S6, construct three types of feature processing modules, including a large-scale attention module and a deep convolution;

[0038] S7, constructing a condensing unit image anomaly detection model, including input, customized initial feature encoding module, type I feature processing module, type II feature processing module, type III feature processing module, target detection head and output;

[0039] S8. Training and testing of condensing unit image anomaly detection model. Use the condensing unit image data set to train the condensing unit image anomaly detection model. After the training is completed, obtain the condensing unit images on the condensing unit production line and input them into the condensing unit image anomaly detection model to obtain the detection results.

[0040] Furthermore, in step S2, for the customized initial feature encoding module, a 64×64 overlapping block embedding strategy is adopted as the input condensing unit image , , , and 3 is the condensing unit image The height, width and channels of the condensing unit Input to four concatenated convolutional layers to obtain the initial features , where each convolutional layer uses a 4×4 stride and a 1×1 convolution kernel, , is the initial feature Channel, initial features is the output of the custom initial feature encoding module.

[0041] Further, in step S3, for a type-one feature processing module, the initial feature output by the customized initial feature encoding module is obtained. , , , and is the initial feature The height, width and channel of It is the input of a feature processing module, and then obtains the processing feature , , processing features and initial features The dimensions are the same, ,in represents weight normalization, represents dilated convolution, represents a feed-forward neural network, Represents element-by-element addition, processing features It is the output of a feature processing module.

[0042] Furthermore, in step S4, for the large-scale attention module, its structure is as follows Figure 2 As shown, given the input features , , , and It is a feature The height, width and channel of Split into representative features in the channel dimension according to the ratio r and the remaining features , , , , ,here The calculation is , represents the Sigmod activation function, represents the trainable parameters, is an adaptive value ranging from 0.01 to 0.25, and then the optimized representative features are obtained through self-attention operation , , the self-attention operation is ,in , and is the weight of the linear layer, d is the scaling factor, and the value of d is 32. represents the matrix transpose, Represents matrix multiplication, and then obtains features , , , Representatives will and Connect in the channel dimension, Represents convolution, feature is the output of the large-scale attention module, feature and Features The dimensions remain consistent.

[0043] Further, in step S5, for the second-type feature processing module, the processing feature output by the first-type feature processing module is first obtained. , , , and Is the processing feature The height, width and channels of It is the input of the second-type feature processing module, which processes the features Downsample to obtain features , , Representative features Channels, and then obtain the processing features , , , stands for root mean square normalization, represents dilated convolution, Represents element-by-element addition, and then obtains the processing features , , , stands for root mean square normalization, represents a large-scale attention module, represents a feed-forward neural network, Represents element-by-element addition, processing features is the output of the type-two feature processing module.

[0044] Further, in step S6, for the type three feature processing module, firstly obtain the processing feature output by the type two feature processing module , , , and Is the processing feature The height, width and channels of It is the input of the three-type feature processing module, which processes the features Downsample to obtain features , , Representative features Channels, and then obtain the processing features , , , stands for batch normalization, represents the depthwise convolution, Represents element-by-element addition, and then obtains the processing features , , , The representative layer is normalized. represents a large-scale attention module, represents a feed-forward neural network, Represents element-by-element addition, processing features is the output of the three-type feature processing module.

[0045] Further, in step S7, for the condensing unit image anomaly detection model, its structure is as follows: Figure 3 As shown, input the condensing unit image To customize the initial feature encoding module, , 2560, 2560 and 3 are condensing unit images The height, width and channel of , , 256 represents the initial feature Channel, input initial features Go to a feature processing module to get the processing features , , 256 represents the processing feature Channel, input processing features Go to the second-type feature processing module to obtain the processing features , , 512 represents the processing feature Channel, input processing features Go to the three-type feature processing module to obtain the processing features , , 1024 represents the processing feature Channel, input processing features Go to the target detection head and get the detection result.

[0046] Furthermore, in step S7, for the condensing unit image anomaly detection model, it was written in Python language, improved based on the ViT algorithm framework, using the Pytorch framework, using the AdamW optimizer, with a total of 300 training rounds and a learning rate of 0.0001.

[0047] Further, in step S8, the detection effect of the condensing unit image anomaly detection model is as follows: Figure 4 As shown, in Figure 4The arrow on the left side indicates the area where the surface oil detection area on the condensing unit is located, and the detection confidence level is 0.89.

[0048] The above are only preferred embodiments of the present invention. It should be pointed out that a person skilled in the art can make several modifications and improvements without departing from the inventive concept of the present invention, and these all fall within the protection scope of the present invention.

Claims

1. A method for detecting abnormality in a condensing unit production line, characterized in that: The following steps are involved: S1. Condensing unit image data collection: collect condensing unit images in the condensing unit production line. The condensing unit images contain four types of defects, namely scratches, dents, cracks and surface oil stains. Defects are annotated on all condensing unit images to form a condensing unit image dataset. S2. Construct a customized initial feature encoding module, including multiple convolutional layers; the customized initial feature encoding module adopts a 64×64 overlapping block embedding strategy as a whole, and inputs the condensing unit image , , , and 3 is the condensing unit image The height, width and channels of the condensing unit Input to four concatenated convolutional layers to obtain the initial features , where each convolutional layer uses a 4×4 stride and a 1×1 convolution kernel, , is the initial feature Channel, initial features is the output of the custom initial feature encoding module; S3, construct a type of feature processing module, including a feedforward neural network and a dilated convolution; the type of feature processing module obtains the initial feature output of the customized initial feature encoding module , , , and is the initial feature The height, width and channel of It is the input of a feature processing module, and then obtains the processing feature , , processing features and initial features The dimensions are the same, ,in represents weight normalization, represents dilated convolution, represents a feed-forward neural network, Represents element-by-element addition, processing features is the output of a type of feature processing module; S4. Construct a large-scale attention module, including a self-attention operation; the large-scale attention module, given the input feature , , , and It is a feature The height, width and channel of Split into representative features in the channel dimension according to the ratio r and the remaining features , , , , ,here The calculation is , represents the Sigmod activation function, represents the trainable parameters, is an adaptive value ranging from 0.01 to 0.25, and then the optimized representative features are obtained through self-attention operation , , the self-attention operation is ,in , and is the weight of the linear layer, d is the scaling factor, and the value of d is 32. represents the matrix transpose, Represents matrix multiplication, and then obtains features , , , Representatives will and Connect in the channel dimension, Represents convolution, feature is the output of the large-scale attention module, feature and Features The dimensions remain consistent; S5. Construct a second-type feature processing module, including a large-scale attention module and a dilated convolution; the second-type feature processing module first obtains the processing features output by the first-type feature processing module , , , and Is the processing feature The height, width and channels of It is the input of the second-type feature processing module, which processes the features Downsample to obtain features , , Representative features Channels, and then obtain the processing features , , , stands for root mean square normalization, represents dilated convolution, Represents element-by-element addition, and then obtains the processing features , , , stands for root mean square normalization, represents a large-scale attention module, represents a feed-forward neural network, Represents element-by-element addition, processing features is the output of the type II feature processing module; S6. Construct a three-type feature processing module, including a large-scale attention module and a deep convolution; the three-type feature processing module first obtains the processing features output by the two-type feature processing module , , , and Is the processing feature The height, width and channels of It is the input of the three-type feature processing module, which processes the features Downsample to obtain features , , Representative features Channels, and then obtain the processing features , , , stands for batch normalization, represents depthwise convolution, Represents element-by-element addition, and then obtains the processing features , , , The representative layer is normalized. represents a large-scale attention module, represents a feed-forward neural network, Represents element-by-element addition, processing features is the output of the three-type feature processing module; the condensing unit image anomaly detection model, the input condensing unit image To customize the initial feature encoding module, , , and 3 is the condensing unit image The height, width and channel of , , Represents the initial features Channel, input initial features Go to a feature processing module to get the processing features , , Representative processing characteristics Channel, input processing features Go to the second-type feature processing module to obtain the processing features , , Representative processing characteristics Channel, input processing features Go to the three-type feature processing module to obtain the processing features , , Representative processing characteristics Channel, input processing features Go to the target detection head and get the detection result; S7, construct a condensing unit image anomaly detection model, including input, customized initial feature encoding module, type one feature processing module, type two feature processing module, type three feature processing module, target detection head and output; the condensing unit image anomaly detection model, input condensing unit image To customize the initial feature encoding module, , , and 3 is the condensing unit image The height, width and channel of , , Represents the initial features Channel, input initial features Go to a feature processing module to get the processing features , , Representative processing characteristics Channel, input processing features Go to the second-type feature processing module to obtain the processing features , , Representative processing characteristics Channel, input processing features Go to the three-type feature processing module to obtain the processing features , , Representative processing characteristics Channel, input processing features Go to the target detection head and get the detection result; S8. Training and testing of condensing unit image anomaly detection model. Use the condensing unit image data set to train the condensing unit image anomaly detection model. After the training is completed, obtain the condensing unit images on the condensing unit production line and input them into the condensing unit image anomaly detection model to obtain the detection results.