A curiosity-driven industrial defect segmentation system
Patent Information
- Application Number
- CN202411038690.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2026-10-20
- Estimated Expiration
- 2044-07-31
AI Technical Summary
[0006]本发明的目的基于深度学习的网络模型,描述了基于好奇心驱动的工业隐蔽缺陷检测系统,该系统利用双分支特征提取器、融合桥模块、好奇心驱动模块来捕获完整的缺陷目标信息并解决工业缺陷中相对隐蔽、不确定区域难以准确分割的问题
1.本发明通过双分支特征编码器、融合桥模块和好奇心驱动模块,双分支特性编码器从CNN特征编码器和Transformer编码器中提取多级特性,然后,融合桥模块从CNN特征编码器和Transformer编码器中提取局部和全局特征,再利用模型捕捉全面对象细节的好奇心巧妙的融合,此外,好奇心驱动模块通过发现和去除好奇心来区分复杂的细节,增强了信息获取,并逐步细化初始分割结果,通过这些关键模块的协同作用,达到更准确地检测和分割工业隐蔽缺陷效果,为工业生产提供了可靠的质量控制手段。
Smart Images

Figure CN118967717B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial defect segmentation using deep learning, and in particular to a curiosity-driven industrial defect segmentation system. Background Technology
[0002] Industrial defects refer to anomalies or flaws on the surface of products or equipment that do not conform to design or expectations, caused by factors such as material defects, misoperation during production, equipment malfunction, or environmental factors during industrial production. These defects include cracks, scratches, dents, rust, and stains. Industrial defects directly affect product performance and service life, reduce product quality, and may cause product malfunctions or failure to function properly during use. For some critical equipment and high-precision products, such as aerospace equipment, automobiles, and medical equipment, defects may lead to serious safety problems and even threaten the lives of users. Therefore, industrial defect segmentation is an indispensable task in industrial quality control. By accurately separating defective parts from the background, timely repair or removal can be carried out, thereby ensuring product quality, avoiding safety accidents, optimizing production processes, and improving production efficiency.
[0003] Defect segmentation is a challenging task due to the diverse types, irregular shapes and sizes, random occurrence times and locations, complex backgrounds, and data imbalances inherent in industrial defects. For example, in metal surface defect detection, the color and texture of defects (such as scratches and rust) may be very similar to the metal background, making it difficult to accurately segment defects using simple color or texture features. In semiconductor chip inspection, some tiny defects, such as scratches or particles, may be confused with the texture or pattern of the chip surface, further complicating defect segmentation. Furthermore, the proportion of defective products among a large number of normal products is usually very small; that is, defective samples are far fewer than normal samples, leading to data imbalance.
[0004] To address the challenges of industrial defect segmentation, researchers have proposed various methods and techniques. From a data perspective, various image transformations, such as rotation, scaling, and cropping, can create more training samples and enhance the model's generalization ability. For situations lacking labeled data, unsupervised learning or transfer learning methods are employed. For example, autoencoders can learn the inherent structure of the data and then be used to identify normal and abnormal (defect) regions. Transfer learning can benefit from knowledge gained from other tasks or domains. Pre-trained models (such as VGG and ResNet) can be used to initialize the defect segmentation model, thereby improving model performance and training speed. From a model design perspective, deep learning techniques, especially convolutional neural networks (CNNs) and Transformer architectures, have demonstrated superior performance in many industrial defect segmentation tasks. CNNs are among the earliest deep learning models used for image processing tasks. They can automatically learn and extract features from images through convolutional layers and then perform classification or regression tasks through fully connected layers. In particular, some CNN architectures specifically designed for image segmentation problems, such as U-Net, have been widely used in industrial defect segmentation tasks. Originally designed for natural language processing tasks, the Transformer model has been extended to image processing tasks in recent years. The Transformer's self-attention mechanism can capture complex patterns and contextual information in images, enabling more accurate defect segmentation. Given the Transformer's superior ability to model long-term dependencies, many Transformer-based methods have also yielded commendable performance results. However, in more complex scenarios such as small targets, multiple targets, and blurred boundaries, the performance of existing methods may significantly decrease.
[0005] While existing methods can detect most easily identifiable industrial defects, they struggle to accurately segment highly concealed defects with indistinct edges and contours, where the defect area resembles the background. This is because existing methods perform poorly in capturing defect integrity and complex details. Current models fail to effectively handle ambiguous and uncertain information during prediction, making them susceptible to being misled and confused by background regions similar to the target, thus hindering accurate differentiation of these uncertain areas in the image. Therefore, accurately capturing the complete information of the defect target and handling uncertain regions is crucial for complete defect identification and precise segmentation. Summary of the Invention
[0006] The purpose of this invention is to describe a curiosity-driven industrial hidden defect detection system based on a deep learning network model. This system uses a dual-branch feature extractor, a fusion bridge module, and a curiosity-driven module to capture complete defect target information and solve the problem of difficulty in accurately segmenting relatively hidden and uncertain areas in industrial defects.
[0007] To achieve the above objectives, the present invention provides the following technical solution: A curiosity-driven industrial defect segmentation system, comprising: Dual-branch feature encoder: The image is processed simultaneously using a CNN feature encoder and a Transformer feature encoder architecture. The CNN feature encoder extracts local features, while the Transformer feature encoder extracts global features. Fusion Bridge Module: Used to fuse local and global features extracted from the CNN feature encoder and the Transformer feature encoder, respectively; Curiosity Fusion Block (CFB): Used to fuse the local and global features of both the CNN feature encoder and the Transformer feature encoder to obtain the complete fused features; Curiosity-driven module: By calculating the curiosity of each pixel in the initial segmentation result, the initial segmentation is gradually refined by reducing the curiosity. Curiosity Refinement Module (CRB): Upsamples the predictions from the next higher level and normalizes them using the Sigmoid function. Then we use this normalized feature map to calculate the curiosity. Loss function: Weighted BCE loss and weighted IoU loss This guides the Curiosity-Driven Network (CDNet) to discover and explore curiosity regions.
[0008] Furthermore, the specific operation of the CNN feature encoder to extract global and local features is as follows: the CNN feature encoder uses a ResNet50 network structure as its backbone to extract multi-level local context of the object, given a size of Image The CNN feature encoder generates a set of feature maps. The size is Where W represents the width of the image and H represents the height of the image. The representative feature map is i, where i takes the values {1, 2, 3, 4}.
[0009] Furthermore, the specific operations of the Transformer feature encoder to extract global and local features are as follows: A PVT network structure is used as the backbone of the Transformer to extract the multi-level global context of the object, given a size of... Image The encoder first segments the image into a series of non-overlapping image patches, and then generates four feature maps. , , , , The sizes are respectively Where: W represents the width of the image, and H represents the height of the image. The representation feature map, where i represents the index, which can be {1, 2, 3, 4}.
[0010] Furthermore, the specific operation of the CNN feature encoder within the framework of the fusion bridge module is as follows: the features extracted by the CNN feature encoder... The data are directed to convolution, normalization, and pooling operations, and then their local and global features are extracted through local feature blocks (LFB) and global feature blocks (GFB).
[0011] Furthermore, the features extracted by the Transformer feature encoder are also operated in the same way as those of the CNN feature encoder within the fusion bridge module. Subsequently, the Curious Fusion Block (CFB) fuses the local and global features of these two components to obtain complete fused features.
[0012] Furthermore, the specific operation process of the Curiosity Refinement Module (CRB) is as follows: In image segmentation, target regions are labeled with pixel values of 1, and background regions are labeled with pixel values of 0. Based on this understanding, we assume that pixels closer to 0.5 exhibit higher curiosity. We denote the predicted input image as P, and its curiosity (Curiosity) is calculated as follows: (1) in, and Represent the upsampling layer and the sigmoid function, respectively, given an input characteristic. Where C, H, and W represent the number of channels, the width of the image, and the height of the image, respectively. First, in the feature map... Then, three 3×3 convolutional layers are applied, and the convolutional results are reshaped to generate a new feature map. ,in For the number of pixels, then the feature map Multiplying by the calculated Curiosity and passing through a 1×1 convolutional layer, the output is reshaped to obtain two new feature maps, which are... and Then, we take the transpose of Q and K ( Perform matrix multiplication between the matrixes and apply the Softmax function to normalize and generate attention graphs. : (2) in, Represents the i-th column of matrix Q. Quantize the influence of the j-th position on the i-th position. Simultaneously, we consider the transposes of V and X (…). Perform matrix multiplication between the matrixes and resize the result to the desired size. Next, we used a skip connection and applied a 3×3 convolutional layer to obtain the final output. : (3) in, and These represent a 3×3 convolutional layer and a connection operation, respectively. Represent the characteristic of the j-th column of the matrix; The input is a matrix-form feature. Representing the features of the i-th column of the matrix, finally, the features After passing through a 1x1 convolutional layer and being upsampled, it is added to a higher-level prediction map. This process produces an additional output, namely the improved prediction map.
[0013] Furthermore, the specific process of the Curious Fusion Block (CFB) is as follows: its input consists of local features. , and global features , For example, we can calculate the curiosity weight using the following method ( cw ) and fusion features , : (4) (5) in, and These represent a 1×1 convolutional layer and a Sigmoid function, respectively.
[0014] Furthermore, in the loss function: Greater weights were assigned to pixels representing higher levels of difficulty, while Prioritize processing challenging pixels rather than processing all pixels uniformly. The calculation formulas for both are as follows: (6) (7) in, It is an indicator function. It is an adjustable hyperparameter. This indicates two types of labels. G ij Let pij and pij represent the predicted and true values of the pixel at position (i, j) in the image, respectively. Indicates the predicted probability. It is a hyperparameter where each pixel is assigned a weight α, and ij represents the pixel in the i-th row and j-th column of the image. and In this process, each pixel will be assigned a weight α, with pixels that are difficult to distinguish corresponding to larger α and pixels that are easy to distinguish being assigned smaller α.
[0015] Furthermore, the weight α can be considered as an indicator of pixel importance, calculated based on the difference between the center pixel and its surrounding pixels. (8) in A ij Indicates surrounding pixels ( i , j The region, for all pixels, ,if If it is very large, then ( i , j The pixel at point ) is significantly different from its surrounding pixels, therefore it is an important pixel (e.g., an edge or a hole) and deserves more attention; conversely, if It's very small; we consider it a regular pixel and not worth paying attention to.
[0016] Compared with the prior art, the beneficial effects of the present invention are: 1. This invention utilizes a dual-branch feature encoder, a fusion bridge module, and a curiosity-driven module. The dual-branch feature encoder extracts multi-level features from the CNN feature encoder and the Transformer encoder. Then, the fusion bridge module extracts local and global features from the CNN feature encoder and the Transformer encoder. Finally, the model cleverly fuses these features by capturing the curiosity of the entire object's details. In addition, the curiosity-driven module distinguishes complex details by discovering and removing curiosity, enhancing information acquisition and gradually refining the initial segmentation results. Through the synergistic effect of these key modules, the invention achieves more accurate detection and segmentation of hidden defects in industrial production, providing a reliable quality control method for industrial production.
[0017] 2. This invention can accurately segment some industrial defects that are highly concealed, have unclear edge contours, and are similar to the background. It can accurately capture the integrity and complex details of defects, thereby accurately distinguishing these uncertain areas in the image and providing a good guarantee for high-quality industrial development. Attached Figure Description
[0018] Figure 1 This is a framework diagram of the industrial defect segmentation model of the present invention; Figure 2 This is a flowchart of the operation of the fusion bridge module in this invention; Figure 3 This is a flowchart illustrating the operation of the curiosity-driven module in this invention. Figure 4 This is the segmentation result of some test data in this invention.
[0019] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0020] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0021] like Figures 1-4 As shown, a curiosity-driven industrial defect segmentation system includes: Dual-branch feature encoder: This architecture processes images simultaneously using both a CNN feature encoder and a Transformer feature encoder. The CNN feature encoder extracts local features, while the Transformer feature encoder extracts global features.
[0022] Fusion Bridge Module: Used to fuse local and global features extracted from the CNN feature encoder and the Transformer feature encoder, respectively; Curiosity fusion block (CFB): Used to fuse the local and global features of both the CNN feature encoder and the Transformer feature encoder to obtain complete fused features; Curiosity-driven module: By calculating the curiosity of each pixel in the initial segmentation result, the initial segmentation is gradually refined by reducing the curiosity. The Curiosity Refinement Block (CRB) upsamples the predictions from the next higher level and normalizes them using the Sigmoid function. We then use this normalized feature map to calculate the curiosity. Global image calculation module: employs weighted BCE loss. and weighted IoU loss This guides the Curiosity-Driven Network (CDNet) to discover and explore curiosity regions.
[0023] Furthermore, the specific operation of the CNN feature encoder to extract global and local features is as follows: the CNN feature encoder uses a ResNet50 network structure as its backbone to extract multi-level local context of the object, given a size of Image The CNN feature encoder generates a set of feature maps. The size is ;
[0024] Where W represents the width of the image and H represents the height of the image. The representative feature map, where i takes the values {0, 1, 2, 3, 4}. Figure 1 In , , , , .
[0025] Furthermore, the specific operations of the Transformer feature encoder to extract global and local features are as follows: A PVT network structure is used as the backbone of the Transformer to extract the multi-level global context of the object, given a size of... Image The encoder first segments the image into a series of non-overlapping image patches, and then generates four feature maps. , , , , The sizes are respectively ; Where: W represents the width of the image, and H represents the height of the image. The representative feature map, where i represents the index, which can take the values {0, 1, 2, 3, 4}, i.e. Figure 4 , , , These four feature maps.
[0026] Furthermore, the specific operation of the CNN feature encoder within the framework of the fusion bridge module is as follows: the features extracted by the CNN feature encoder... The data are directed to convolution, normalization, and pooling operations, and then their local and global features are extracted through local feature blocks (LFB) and global feature blocks (GFB).
[0027] Furthermore, the features extracted by the Transformer feature encoder are also operated in the same way as those of the CNN feature encoder within the fusion bridge module. Subsequently, the Curious Fusion Block (CFB) fuses the local and global features of these two components to obtain complete fused features.
[0028] Furthermore, the specific operation process of the Curiosity Refinement Module (CRB) is as follows: The pixel values of an image range from 0 to 255. Directly using the pixel data of the original image as training data for a neural network model may cause some problems in the training process, such as slowing down the training speed. Therefore, it is necessary to preprocess the pixel values of the image to scale them to between 0 and 1. In image segmentation, the target region is usually marked as the region with a pixel value of 1, and the background region is marked as the region with a pixel value of 0. Based on this understanding, we assume that pixels closer to 0.5 show higher curiosity. We denote the input graph to be predicted as P, and the Curiosity calculation operation is as follows: (1) in, and Represent the upsampling layer and the sigmoid function, respectively, given an input characteristic. Where C, H, and W represent the number of channels, the width of the image, and the height of the image, respectively. First, in the feature map... Then, three 3×3 convolutional layers are applied, and the convolutional results are reshaped to generate a new feature map. ,in For the number of pixels, then the feature map Multiplying by the calculated Curiosity and passing through a 1×1 convolutional layer, the output is reshaped to obtain two new feature maps, namely... and Then, we take the transpose of Q and K ( Perform matrix multiplication between the matrixes and apply the Softmax function to normalize and generate attention graphs. : (2) in, Represents the i-th column of matrix Q. Quantize the influence of the j-th position on the i-th position. Simultaneously, we consider the transposes of V and X (…). Perform matrix multiplication between the matrixes and resize the result to the desired size. Next, we used a skip connection and applied a 3×3 convolutional layer to obtain the final output. : (3) in, and These represent a 3×3 convolutional layer and a connection operation, respectively. Represent the characteristic of the j-th column matrix; The input is a matrix-form feature. Representing the features of the i-th column of the matrix, finally, the features After passing through a 1x1 convolutional layer and being upsampled, it is added to a higher-level prediction map. This process produces an additional output, namely the improved prediction map.
[0029] Specifically, such as Figure 2 The detailed structure of local feature blocks is shown; orange represents the local feature flow, and blue represents the global feature flow. The local feature flow is initiated by performing a convolution operation on the input features, which are then fed into a convolution kernel. The number of groups is The four-branch pyramid convolutional block is used, and finally, local features are obtained through subsequent convolutional processing layers. , Set to 3, 5, 7, 9, and... , The values are set to 1, 2, 4, and 4 respectively. Each convolution is accompanied by a batch normalization layer and a ReLU nonlinear operation. The global feature flow first uses an adaptive average pooling layer to divide the input feature map into multiple small blocks. For each small block, its average value is calculated, and the calculated average value is used as the value at the corresponding position in the output feature map. Then, after performing operations similar to those in the local feature flow, the above sampling method is used to extract global features.
[0030] Due to the similarity between defective objects and their surrounding environment, segmentation results often exhibit ambiguous regions. We observe that humans are curious about these ambiguous regions when observing defective objects and further analyze them to make a final decision. Inspired by this, we propose a Curiosity-Driven Module (CDM) to simulate human cognitive processes, such as... Figure 1 As shown, the current level features ( ,), higher-level features ( The higher-level predictions are input into the Curiosity Refinement Block (CRB) to identify and eliminate curiosity regions from the foreground and background predictions, thereby obtaining refined features and more accurate predictions.
[0031] The Curiosity Fusion Block (CFB) utilizes the idea of curiosity to fuse two different types of features: local or global features from different encoders, and a holistic fusion of local and global features based on the aforementioned features. The specific process of the Curiosity Fusion Block (CFB) is as follows: its input consists of local features... , and global features , For example, we can calculate the curiosity weight using the following method ( cw ) and fusion features , : (4) (5) in, and These represent a 1×1 convolutional layer and a sigmoid function, respectively. Finally, we can do this by... The initial mapping of the object is obtained by applying a 1×1 convolution. The initial mapping will be gradually refined through the following Curiosity-Refinement blocks in the Curiosity-Driven Module.
[0032] Binary cross-entropy Although commonly used in segmentation tasks, this approach ignores the global image structure by calculating the loss for each pixel independently, thus neglecting crucial contextual information. The loss function uses a weighted BCE loss. and weighted IoU loss To guide the Curiosity-Driven Network (CDNet) in discovering and exploring curiosity regions: Greater weights were assigned to pixels representing higher levels of difficulty, while Prioritize processing challenging pixels rather than processing all pixels uniformly. The calculation formulas for both are as follows: (6) (7) in, It is an indicator function. It is an adjustable hyperparameter. This indicates two types of labels. G ij Let pij and pij represent the predicted and true values of the pixel at position (i, j) in the image, respectively. Indicates the predicted probability. It is a hyperparameter where each pixel is assigned a weight α, and ij represents the pixel in the i-th row and j-th column of the image. and In this process, each pixel will be assigned a weight α, with pixels that are difficult to distinguish corresponding to larger α and pixels that are easy to distinguish being assigned smaller α.
[0033] Furthermore, α can be considered an indicator of pixel importance, calculated based on the difference between the center pixel and its surrounding pixels. (8) in A ij Indicates surrounding pixels ( i , j The region, for all pixels, ,if If it is very large, then ( i , j The pixel at point ) is significantly different from its surrounding pixels, therefore it is an important pixel (e.g., an edge or a hole) and deserves more attention; conversely, if It's very small; we consider it a regular pixel and not worth paying attention to.
[0034] Based on the above theory, we utilize multiple forms of supervision to guide the prediction of five outputs. ) and ground-truth mask ( G The training process involves upsampling the output prediction map to the same size as the ground truth map G. Finally, the overall loss is defined as follows: (9) in, , The loss function mentioned above, and G, are the ground truth mask mentioned in the text. They are respectively Figure 1 Predicting the five outputs.
[0035] This paper implements our network using the publicly available PyTorch toolkit, employing an NVIDIA GeForce RTX 3090 GPU (24GB RAM) for both training and testing. During training, the input images were resized to 416×416 resolution and augmented with random horizontal flipping. The batch size was set to 8, and the AdamW optimizer was used to optimize the network. The initial learning rate was set to 1e-4. During testing, the images were first resized to 416×416 for network inference, and then the output mappings were resized back to the original input image size. Both resizing processes used bilinear interpolation.
[0036] This paper uses CDS2K as the training and testing dataset for the model. CDS2K was developed by Deng-PingFan et al. (Deng-PingFan, Ge-Peng Ji, Peng Xu, Ming-Ming Cheng, Christos Sakaridis, and Luc VanGool. 2023. Advances in Deep Concealed Scene Understanding. arXiv) Released in 2023 (preprint:2304.11234.2023), this dataset is the first application-oriented benchmark dataset for camouflaged industrial defect segmentation, compiled from various established industrial defect libraries. The dataset contains 2492 samples, including 1330 positive samples and 1162 negative samples. The training and test sets are divided in a 7:3 ratio. 931 positive samples were randomly selected as the training set, and 399 as the test set for algorithm performance verification. Figure 4 It can be seen that the proposed curiosity-driven network CDNet exhibits good segmentation performance when detecting various types of industrial defects, achieving accurate segmentation of hidden defects.
[0037] The experimental indicators used in this paper to evaluate the model's prediction performance mainly include mean absolute error (M) and F-measure (F). ), Enhanced matching indicators ( ), structural metric ( Among these, the smaller the MAE value and the larger the values of other indicators, the better the model performance.
[0038] In this section, we evaluate the detection capability of the proposed model on positive samples of CDS2K. In the comparative experiment, we compare the Curiosity-Driven Network CDNet with other state-of-the-art methods in the field of industrial camouflage defect segmentation (from the benchmark methods introduced in the related paper Advances in Deep Concealed Scene Understanding). The dataset partitioning and experimental hyperparameter settings of other methods are the same as those in our paper. The comparative experimental results are shown in Table 1.
[0039] Table 1 Comparative Experimental Results
[0040] As can be seen from Table 1, the proposed Curiosity-Driven Network CDNet achieves significant improvements in all metrics compared with existing cutting-edge covert detection methods, demonstrating its superiority and feasibility in practical industrial applications.
[0041] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, apparatus, article, or method. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, apparatus, article, or method that includes that element.
[0042] The above are merely preferred embodiments of the present invention and do not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A curiosity-driven industrial defect segmentation system, characterized in that, include: Dual-branch feature encoder: The image is processed simultaneously using a CNN feature encoder and a Transformer feature encoder architecture. The CNN feature encoder extracts local features, while the Transformer feature encoder extracts global features. Fusion Bridge Module: Used to fuse local and global features extracted from the CNN feature encoder and the Transformer feature encoder, respectively; Curiosity Fusion Block (CFB): Used to fuse the local and global features of both the CNN feature encoder and the Transformer feature encoder to obtain the complete fused features; Curiosity-driven module: By calculating the curiosity of each pixel in the initial segmentation result, the initial segmentation is gradually refined by reducing the curiosity. Curiosity Refinement Module (CRB): Upsamples the predictions from the next higher level and normalizes them using the Sigmoid function, then uses this normalized feature map to calculate curiosity; Loss function: Weighted BCE loss and weighted IoU loss To guide the Curiosity-Driven Network (CDNet) in discovering and exploring curiosity regions; The specific operation process of the Curiosity Refinement Module (CRB) is as follows: In image segmentation, target regions are labeled as regions with a pixel value of 1, and background regions are labeled as regions with a pixel value of 0. Based on this understanding, it is assumed that pixels closer to 0.5 exhibit higher curiosity. The input graph to be predicted is represented as P, and its curiosity (Curiosity) is calculated as follows: (1) in, and Represent the upsampling layer and the sigmoid function, respectively, given an input characteristic. Where C, H, and W represent the number of channels, the width of the image, and the height of the image, respectively. First, in the feature map... Then, three 3×3 convolutional layers are applied, and the convolutional results are reshaped to generate a new feature map. ,in For the number of pixels, then the feature map Multiplying by the calculated Curiosity and passing through a 1×1 convolutional layer, the output is reshaped to obtain two new feature maps, which are... and Then, in the transpose of Q and K Matrix multiplication is performed between the matrix components, and the attention graph is generated by normalizing the matrix using the Softmax function. : (2) in, Represents the i-th column of matrix Q. Quantize the influence of the j-th position on the i-th position, and simultaneously, in the transpose of V and X. Perform matrix multiplication between them and resize the result to... Next, a skip connection was used, and a 3×3 convolutional layer was applied to obtain the final output. : (3) in, and These represent a 3×3 convolutional layer and a connection operation, respectively. Represent the characteristic of the j-th column of the matrix; The input is a matrix-form feature. Representing the features of the i-th column of the matrix, finally, the features After passing through a 1x1 convolutional layer and being upsampled, it is added to a higher-level prediction map. This process produces an additional output, namely the improved prediction map.
2. The curiosity-driven industrial defect segmentation system according to claim 1, characterized in that, The specific operation of the CNN feature encoder to extract global and local features is as follows: The CNN feature encoder uses a ResNet50 network structure as its backbone to extract multi-level local context of the object, given a size of... Image The CNN feature encoder generates a set of feature maps. The size is ; Where W represents the width of the image and H represents the height of the image. The representation feature map, where i represents the index, which can be {1, 2, 3, 4}.
3. The curiosity-driven industrial defect segmentation system according to claim 1, characterized in that, The specific operations of the Transformer feature encoder to extract global and local features are as follows: A PVT network structure is used as the backbone of the Transformer to extract the multi-level global context of the object, given a size of... Image The encoder first segments the image into a series of non-overlapping image patches, and then generates four feature maps. , , , , The sizes are respectively ; Where: W represents the width of the image, and H represents the height of the image. The representative feature map, where i represents the index, which can be {1, 2, 3, 4}, i.e. , , , These four feature maps.
4. The curiosity-driven industrial defect segmentation system according to claim 2, characterized in that, The specific operation of the CNN feature encoder within the framework of the fusion bridge module is as follows: the features extracted by the CNN feature encoder... The data are directed to convolution, normalization, and pooling operations, and then their local and global features are extracted through local feature blocks (LFB) and global feature blocks (GFB).
5. The curiosity-driven industrial defect segmentation system according to claim 4, characterized in that, The features extracted by the Transformer feature encoder are also operated in the same way as those of the CNN feature encoder within the fusion bridge module. Subsequently, the Curious Fusion Block (CFB) fuses the local and global features of these two components to obtain the complete fused features.
6. The curiosity-driven industrial defect segmentation system according to claim 5, characterized in that, The specific process of the Curious Fusion Block (CFB) is as follows: its input consists of local features. , and global features , For example, the curiosity weight cw and fused features are calculated using the following method. , : (4) (5) in, and These represent a 1×1 convolutional layer and a Sigmoid function, respectively.
7. The curiosity-driven industrial defect segmentation system according to claim 1, characterized in that, In the loss function: weighted BCE loss is used. and weighted IoU loss To guide the Curiosity-Driven Network (CDNet) in discovering and exploring curiosity regions: Greater weights were assigned to pixels representing higher levels of difficulty, while Prioritize processing challenging pixels rather than processing all pixels uniformly. The calculation formulas for both are as follows: (6) (7) in, It is an indicator function. It is an adjustable hyperparameter. The labels Gij and pij represent the predicted and true values of the pixel at position (i, j) in the image, respectively. Indicates the predicted probability. It is a hyperparameter where each pixel is assigned a weight α, and ij represents the pixel in the i-th row and j-th column of the image. and In this process, each pixel will be assigned a weight α, with pixels that are difficult to distinguish corresponding to larger α and pixels that are easy to distinguish being assigned smaller α.
8. The curiosity-driven industrial defect segmentation system according to claim 6, characterized in that, The weight α is considered an indicator of pixel importance, calculated based on the difference between the center pixel and its surrounding pixels. (8) Where Aij represents the region surrounding pixel (i, j), for all pixels, ,if If the value is large, then the pixel at (i, j) is significantly different from its surrounding pixels, making it an important pixel worthy of more attention. Conversely, if... It's very small; we consider it an ordinary pixel, not worth paying attention to.
Citation Information
Patent Citations
Remote sensing image semantic segmentation method based on double-branch feature fusion
CN115797931A
Remote sensing image segmentation method based on dual-branch multi-scale feature fusion
CN118314353A