A multi-layer attention-based roller cage ear edge image extraction method and system
By combining multi-level feature extraction and attention mechanism modules, the problems of multi-scale feature fusion and insufficient attention to key areas in roller can ear edge detection are solved, achieving high-precision and robust edge detection, which is suitable for monitoring the wear status of roller can ears in complex industrial scenarios.
Patent Information
- Application Number
- CN202510220516.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-27
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2045-02-27
AI Technical Summary
Existing edge detection methods for monitoring the wear condition of roller can ears suffer from problems such as difficulty in fusing multi-scale features, insufficient extraction of detailed edges, and limited ability to focus on key areas, resulting in insufficient detection accuracy and robustness, and failing to meet the detection needs of complex industrial scenarios.
A multi-level feature detection method is adopted, combined with the specific requirements of roller can ear edge detection. Through a multi-level feature extraction method, a multi-level feature extraction module, a foreground fusion module, and an attention mechanism module, the efficient extraction and detection of roller can ear edge features are achieved.
It significantly improves the accuracy and robustness of edge detection for roller can ears, enabling efficient and clear edge information extraction in complex industrial scenarios. It is highly adaptable and can automatically extract edge images, thus improving the accuracy and efficiency of detection.
Smart Images

Figure CN120107295B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of computer image processing technology, and specifically relates to a method and system for extracting the edge image of a roller can ear based on multi-layer attention. Background Technology
[0002] In coal mining, vertical shaft hoisting systems are crucial for transporting coal, equipment, and personnel. Roller lugs, as an important component of this system, ensure its stability and safety by moving up and down along rigid guideways. However, due to complex operating conditions and prolonged operation, roller lugs frequently experience wear, potentially leading to decreased hoisting system efficiency and even safety hazards. In particular, accurate detection of the roller lug edges is critical in wear monitoring, as the results directly impact the accuracy and reliability of subsequent wear analysis.
[0003] Traditional edge detection methods, such as the Sobel operator, Prewitt operator, and Canny algorithm, extract edges by calculating the gray-level gradient of an image, and are widely used due to their high computational efficiency. However, these methods have many problems in real-world industrial scenarios, such as sensitivity to lighting and noise, and the extraction of coarse and incomplete edge lines, failing to meet the accuracy requirements of complex scenes. Furthermore, texture-based methods are not adaptable enough to the irregularities of industrial equipment edges, and edge information is easily lost.
[0004] In recent years, the rise of deep learning technology has provided new solutions for edge detection. Leveraging the feature learning capabilities of neural networks, large-scale data-driven methods have shown significant advantages in extracting edge features. However, these methods still face challenges when applied to the extraction of roller can ear edges, such as the difficulty in fully fusing multi-scale features, insufficient extraction of detailed edges, and limited ability to focus on key areas, making it difficult to provide effective support for monitoring the wear condition of roller can ears. Summary of the Invention
[0005] The purpose of this invention is to propose a method for extracting the edge features of a roller can ear based on multi-level attention. Through multi-level feature extraction, foreground fusion, edge feature fusion and attention operations, it is beneficial to achieve efficient extraction and detection of the edge features of the roller can ear.
[0006] To achieve the above objectives, the present invention adopts the following technical solution:
[0007] A method for extracting the edge image of a roller can ear based on multi-layer attention includes the following steps:
[0008] Step 1. Preprocess the edge detection dataset and the raw data of the roller can ear to construct the training dataset;
[0009] Step 2. Use the multi-level feature extraction module to extract and fuse multi-level features from the images in the training dataset to obtain fused features;
[0010] Step 3. Use the foreground feature fusion module to enhance the fused features and obtain the foreground feature map; use the edge feature fusion module to enhance the fused features and obtain the shallow edge feature map, the middle edge feature map, and the deep edge feature map;
[0011] Step 4. Use the attention mechanism module to enhance the foreground feature map, shallow edge feature map, middle edge feature map, and deep edge feature map respectively;
[0012] Step 5. Post-process and fuse the enhanced shallow edge feature map, enhanced middle edge feature map, and enhanced deep edge feature map to obtain a binary edge map;
[0013] Step 6. Using the binary edge map and the enhanced foreground feature map, combined with the labels in the training dataset, backpropagate to train the multi-level feature extraction module, the foreground feature fusion module, the edge feature fusion module, and the attention mechanism module;
[0014] Step 7. Extract the edge image of the roller can ear from the input image to obtain a visualized image of the roller can ear edge.
[0015] Furthermore, based on the multi-layer attention-based method for extracting the edge image of a roller can ear, this invention also proposes a multi-layer attention-based system for extracting the edge image of a roller can ear, the technical solution of which is as follows:
[0016] A system for extracting the edge image of a roller can ear based on multi-layer attention includes an image sensor, a memory, and one or more processors. The memory stores executable code, and when the processor executes the executable code, it implements the steps of the roller can ear edge image extraction method based on multi-layer attention described above.
[0017] The present invention has the following advantages:
[0018] As described above, this invention discloses a method for edge image extraction of roller can ears based on multi-layer attention. Through a multi-layer feature extraction module, it comprehensively captures multi-scale features of the image, fully utilizing both shallow details and deep semantic information. By introducing a foreground feature fusion module, an edge fusion module, and an attention mechanism, it achieves effective separation and enhancement of foreground and edge features, significantly improving the model's adaptability to complex industrial scenarios and its ability to focus on key areas. Furthermore, through post-processing dynamic thresholding and multi-scale fusion strategies, the edge detection results are further optimized, resulting in more complete, clearer, and noise-resistant edge information. Compared to traditional edge image extraction methods, this invention eliminates the need for manual parameter adjustment, enabling automated edge image extraction through data-driven methods. This significantly improves the accuracy, robustness, and adaptability of edge detection, particularly demonstrating higher accuracy and efficiency in detecting irregular edges of industrial equipment such as roller can ears. This provides crucial technical support for real-time monitoring and safety assessment of equipment wear conditions. Attached Figure Description
[0019] Figure 1 This is a flowchart of the roller can ear edge image extraction method based on multi-layer attention in an embodiment of the present invention.
[0020] Figure 2 This is a system block diagram of the roller can ear edge image extraction method based on multi-layer attention in an embodiment of the present invention.
[0021] Figure 3 This is a network structure diagram of the attention mechanism module in an embodiment of the present invention.
[0022] Figure 4 This is an image of the roller can ear used in the test in an embodiment of the present invention.
[0023] Figure 5 This is a visualization image of the edge of the roller can ear obtained using the edge image extraction method of the present invention. Detailed Implementation
[0024] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments:
[0025] Example 1
[0026] This embodiment proposes a multi-level attention-based edge image extraction method for roller can ears, which is used for edge feature extraction of roller can ears and is applicable to scenarios such as roller can ear wear detection in coal mining. This invention addresses the specific needs of roller can ear edge detection by combining a multi-level feature extraction strategy to support the capture of rich edge features from different scales; it utilizes an attention mechanism to adaptively focus on key edge regions and suppress background noise; it generates high-quality edge detection results by fusing shallow, medium, and deep edge information; and it is adaptable to various input data sources, possessing strong versatility and scalability, making it suitable for various industrial scenarios.
[0027] This invention aims to improve the accuracy and robustness of edge detection for roller can ears. It combines multi-level feature extraction, foreground and edge feature fusion, and an attention mechanism module, employing an adaptive feature enhancement strategy to achieve efficient extraction of edge features from roller can ears. The method generally includes the following steps: importing and preprocessing the edge detection dataset and the original roller can ear image to construct an enhanced dataset; designing a multi-level feature extraction module to progressively extract and fuse features from shallow to deep layers; generating feature maps at different levels using foreground and edge feature fusion modules; enhancing features at each level through channel and spatial attention mechanisms, and generating a high-precision binary edge map through post-processing. This method significantly improves the detection capability for detailed edges and global contours, enhancing detection accuracy and robustness, and providing effective support for monitoring the wear status of roller can ears.
[0028] like Figure 1 As shown, the method for extracting the edge image of a roller can ear based on multi-layer attention includes the following steps:
[0029] Step 1. Data import and preprocessing.
[0030] Import and preprocess the edge detection dataset and the original data of the custom roller can ear to construct the training dataset D.
[0031] Among them, the custom-defined raw data of the roller can ear refers to the raw image of the roller can ear obtained from the acquisition device.
[0032] The imported edge detection dataset is the HED-BSDS edge detection dataset, which is a dataset used for edge detection tasks. This dataset includes 500 original images with a resolution of 481*321 pixels.
[0033] Each original image has corresponding edge annotations, and the HED-BSDS edge detection dataset is widely used in edge detection algorithms.
[0034] The preprocessing process involves the input module taking all images imported from the HED-BSDS edge detection dataset and the original image of the roller can ear, uniformly adjusting the image size and pixel value range, and generating an enhanced training dataset D through random cropping, rotation, horizontal flipping, and adding noise.
[0035] Specifically, for all images imported from the edge detection dataset and the custom roller can ear raw data, the image size and pixel value range are uniformly adjusted using the input module, with the image size uniformly adjusted to [value missing]. ,in Image height, The image width is denoted as , and the pixel value range of the image is scaled to [0, 1]. All images are copied once and placed in their original positions. The copied images are then randomly cropped, rotated, horizontally flipped, and Gaussian noise is added to obtain the enhanced dataset D.
[0036] Step 2. Multi-level feature extraction.
[0037] Using the multi-level feature extraction module Net1, images in the training dataset D are processed. Multi-level feature extraction and fusion are performed to obtain fused features. .
[0038] The multi-level feature extraction module Net1 includes a shallow feature extraction module Net11, a sub-shallow feature extraction module Net12, a mid-level feature extraction module Net13, a sub-deep feature extraction module Net14, and a deep feature extraction module Net15.
[0039] The input module will take the images from the training dataset D. The input image is fed into the multi-level feature extraction module Net1, which performs feature extraction from shallow to deep layers. Specifically, the input image sequentially passes through five sub-networks: Net11, Net12, Net13, Net14, and Net15. Each of Net11 to Net15 consists of a convolutional layer, used to capture edge details and global semantic information layer by layer. Then, skip connections are used to fuse features from different levels to generate fused features. .
[0040] The shallow feature extraction module Net11 takes images from the training dataset D as input. It is used to extract shallow features through convolution operations and the ReLU activation function. The extraction process is as follows:
[0041] .
[0042] in For convolution kernel, convolution kernel The size is 3×3, the step size is 1, and the padding size is 1; This represents the convolution operation. Images in training dataset D , For bias, The activation function is ReLU.
[0043] The input to the Net12 sub-shallow feature extraction module is shallow features. This is used to extract sub-shallow features through convolution operations, max pooling operations, and the ReLU activation function. The extraction process is as follows:
[0044] .
[0045] in For convolution kernel, convolution kernel The size is 3×3, the step size is 1, and the padding size is 1; This is a max pooling operation used to reduce the spatial dimensionality of the feature map. For bias.
[0046] The input to the Net13 mid-level feature extraction module is the second-shallow level features. This is used to extract mid-level features through convolution operations, max pooling operations, and the ReLU activation function. The extraction process is as follows:
[0047] .
[0048] in For convolution kernel, convolution kernel The size is 3×3, the step size is 1, and the padding size is 1. For bias.
[0049] The input to the Net14 sub-deep feature extraction module is mid-level features. This is used to extract sub-deep features through convolution operations, max pooling operations, and the ReLU activation function. The extraction process is as follows:
[0050] .
[0051] in For convolution kernel, convolution kernel The size is 3×3, the step size is 1, and the padding size is 1. For bias.
[0052] The input to the deep feature extraction module Net15 is the second-deep feature. It is used to extract deep features through convolution operations, max pooling operations, and the ReLU activation function. The extraction process is as follows:
[0053] .
[0054] in For convolution kernel, convolution kernel The size is 3×3, the step size is 1, and the padding size is 1. For bias.
[0055] The fusion in step 2 specifically refers to integrating features from different levels through skip connections to obtain fused features. The specific process is as follows:
[0056] .
[0057] in, For feature concatenation function, , , , They are respectively , , , The feature map is obtained by bilinear interpolation upsampling.
[0058] Step 3. Feature fusion.
[0059] The foreground feature fusion module Net2 is used to enhance the fused features. To obtain the foreground feature map .
[0060] The Net3 edge feature fusion module is used to enhance the fused features. The shallow edge feature map is obtained. Middle layer edge feature map and deep edge feature map .
[0061] Step 3 employs the foreground feature fusion module Net2 and the edge feature fusion module Net3 to further divide the fused features into foreground feature maps and multi-layer edge feature maps. The purpose of dividing foreground and edge features is to improve the accuracy and efficiency of image processing tasks. By clearly distinguishing between foreground and edges, the algorithm can more accurately identify the shape and position of objects, reduce background interference, and thus enhance edge detection performance. Furthermore, the division allows for focused processing of the foreground region, thereby reducing computational complexity and improving the system's robustness in different environments.
[0062] In this embodiment, the foreground feature fusion module Net2 is a 1×1 convolutional layer.
[0063] The foreground feature fusion module Net2 is used to fuse the features. The model undergoes dimensionality reduction using a 1×1 convolutional layer, followed by ReLU activation to generate a preliminary foreground feature map. The specific process is as follows:
[0064] .
[0065] in, For convolution kernel, The size is 1×1. For bias, The activation function is ReLU.
[0066] In this embodiment, the edge feature fusion module Net3 consists of three 1×1 convolutional layers.
[0067] The edge feature fusion module Net3 is used to fuse the features. The features are divided into shallow, medium, and deep layers according to different depth levels. These layers are then processed using a 1×1 convolutional layer with a kernel size of [size missing] and a ReLU activation function to generate shallow edge feature maps. Middle layer edge feature map Deep edge feature map The specific process is as follows:
[0068] .
[0069] .
[0070] .
[0071] in, , , For convolution kernel, convolution kernel , , Size is 1×1, , , For bias.
[0072] Step 4. Feature enhancement.
[0073] The attention mechanism module Net4 is used to enhance the foreground feature maps respectively. Shallow edge feature map Middle layer edge feature map Deep edge feature map The enhanced foreground feature map is obtained. Enhance shallow edge feature map Enhanced mid-layer edge feature map Enhanced deep edge feature map .
[0074] The attention mechanism module Net4 is used to enhance features, highlighting key regions from channel and spatial dimensions, and generating enhanced foreground feature maps and enhanced shallow, middle and deep edge feature maps.
[0075] Step 4.1. Calculate the channel attention mechanism.
[0076] Foreground feature map Shallow edge feature map Middle layer edge feature map Deep edge feature map Calculate the channel weights separately:
[0077] .
[0078] .
[0079] .
[0080] .
[0081] in, This indicates a global average pooling operation. It is a multilayer perceptron. For activation functions; , , , These are foreground feature maps. Shallow edge feature map Middle layer edge feature map Deep edge feature map Channel attention.
[0082] Figure 3 Channel attention shown include , , , .
[0083] Step 4.2. Calculate the spatial attention mechanism.
[0084] Foreground feature map Shallow edge feature map Middle layer edge feature map Deep edge feature map Spatial weights are calculated separately:
[0085] .
[0086] .
[0087] .
[0088] .
[0089] in, This represents a 2D convolution operation; , , , These are foreground feature maps. Shallow edge feature map Middle layer edge feature map Deep edge feature map Spatial attention. Figure 3 Spatial attention shown include , , , .
[0090] Step 4.3. Process the feature map , , , Enhancement is performed to obtain an enhanced foreground feature map. Enhance shallow edge feature map Enhanced mid-layer edge feature map Enhanced deep edge feature map .
[0091] .
[0092] .
[0093] .
[0094] .
[0095] in, This indicates an element-wise product operation.
[0096] like Figure 3 As shown, the input to the attention mechanism module Net4 is the foreground feature map output by the foreground feature fusion module Net2. And the shallow edge feature map output by the edge feature fusion module Net3. Middle layer edge feature map Deep edge feature map The foreground information output by the attention mechanism module Net4 is an enhanced foreground feature map. The shallow edge information outputs, shallow edge information outputs, and shallow edge information outputs are respectively enhanced shallow edge feature maps. Enhanced mid-layer edge feature map Enhanced deep edge feature map .
[0097] Step 5. Post-processing and edge extraction.
[0098] Enhance shallow edge feature map Enhanced mid-layer edge feature map Enhanced deep edge feature map Post-processing and fusion are performed to obtain a binary edge map. .
[0099] The post-processing module binarizes and fuses the enhanced edge feature maps to generate the final binary edge map. The specific process is as follows:
[0100] Step 5.1. Enhance the shallow edge feature map Middle layer edge feature map Deep edge feature map Binarization is performed using a dynamic thresholding method. In this embodiment, the Otsu method, i.e., the maximum inter-class variance method, is preferred for dynamic thresholding.
[0101] Step 5.2. Perform element-wise fusion of the binarized enhanced shallow feature map, enhanced mid-layer feature map, and enhanced deep feature map. Specifically, perform an OR operation on the three enhanced shallow feature map, enhanced mid-layer feature map, and enhanced deep feature map.
[0102] Step 6. Network training and optimization.
[0103] Using binary edge maps and enhanced foreground feature map By combining the labels in the training dataset D, backpropagation is used to train the multi-level feature extraction module Net1, the foreground feature fusion module Net2, the edge feature fusion module Net3, and the attention mechanism module Net4.
[0104] Step 6 combines the binary edge map and the enhanced foreground feature map, and performs backpropagation training on the multi-level feature extraction module, feature fusion module and attention mechanism module through dataset labels.
[0105] Step 7. Edge feature detection.
[0106] The input image is processed using the pre-trained multi-level feature extraction module Net1, edge feature fusion module Net3, and attention mechanism module Net4. The edge image of the roller can is extracted to obtain a visual image of the edge of the roller can.
[0107] The real-time acquired images of the roller can ear are input into the trained network model, which outputs foreground segmentation results and high-precision edge feature maps, providing reliable edge feature extraction support for roller can ear wear state detection.
[0108] Specifically, firstly, the input image Preprocessing is performed to uniformly adjust the image size and pixel value range.
[0109] Then, the multi-level feature extraction module Net1 is used to extract and fuse multi-level features to obtain fused features.
[0110] The edge feature fusion module Net3 is then used to enhance the fused features, resulting in shallow edge feature maps, mid-level edge feature maps, and deep edge feature maps.
[0111] Then, the attention mechanism module Net4 is used to enhance the shallow edge feature map, the middle edge feature map, and the deep edge feature map respectively, resulting in enhanced shallow edge feature map, enhanced middle edge feature map, and enhanced deep edge feature map.
[0112] Finally, the enhanced shallow edge feature map, enhanced middle edge feature map, and enhanced deep edge feature map are post-processed and fused to obtain a binary edge map, i.e., a visual image of the roller can ear edge.
[0113] In addition, to verify the effectiveness of the multi-layer attention-based edge image extraction method for can ear proposed in this invention, the Canny edge detection algorithm, the HED edge detection algorithm, the Sparse Coding Gradient (SCG) edge detection algorithm, and the method of this invention were used to extract the edge images of can ear.
[0114] The metrics used to measure edge detection performance are global optimal threshold (ODS, Optimal Dataset Scale), single-image optimal threshold (OIS, Optimal Image Scale), and average precision (AP).
[0115] ODS (Optimal Scale Analysis) evaluates edge detection results at a series of different scales to find the optimal scale for achieving the best detection performance. OIS (Optimal Scale Analysis) finds the optimal scale for each image individually and calculates the average of the evaluation results at these optimal scales. Unlike ODS, OIS focuses on the optimal scale for each image itself. AP (Accuracy Scale) calculates the area under the precision-recall curve, i.e., the PR curve. Precision refers to the proportion of detected true edge pixels out of all detected edge pixels, while recall refers to the proportion of detected true edge pixels out of all true edge pixels.
[0116] Table 1. Comparison results between the method of the present invention and the comparative method.
[0117]
[0118] As can be seen from Table 1 above, the method for extracting the edge image of the can ear based on multi-layer attention of the present invention is superior to other traditional edge detection algorithms in all indicators that measure the edge detection effect.
[0119] Example 2
[0120] This embodiment 2 describes a roller can ear edge image extraction system based on multi-layer attention, which is based on the same inventive concept as the roller can ear edge image extraction method based on multi-layer attention in embodiment 1 above.
[0121] Specifically, the multi-layer attention-based roller can ear edge image extraction system includes an image sensor, a memory, and one or more processors. Executable code is stored in the memory. When the processor executes the executable code, it implements the steps of the multi-layer attention-based roller can ear edge image extraction method as described in Example 1.
[0122] In this embodiment, a CMOS image sensor is preferably used as the image sensor, and a data processor equipped with an RTX 4060 graphics card is preferably used as the processor. The multi-layer attention-based roller can ear edge image extraction system uses high-performance computing equipment and a CMOS image sensor, supports real-time edge detection, provides technical support for roller can ear wear condition monitoring, and has strong practicality and scalability.
[0123] The memory can be any internal storage unit of a device or apparatus with data processing capabilities, such as a hard disk or RAM, or it can be any external storage device of a device with data processing capabilities, such as a plug-in hard disk, smart media card (SMC), SD card, flash card, etc. The processor can also be any device or apparatus with data processing capabilities, which will not be elaborated here.
[0124] Of course, the above description is only a preferred embodiment of the present invention. The present invention is not limited to the above-described embodiments. It should be noted that any equivalent substitutions or obvious modifications made by those skilled in the art under the guidance of this specification fall within the scope of this specification and should be protected by the present invention.
Claims
1. A method for extracting the edge image of a roller can ear based on multi-layer attention, characterized in that, Includes the following steps: Step 1. Preprocess the edge detection dataset and the raw data of the roller can ear to construct the training dataset; Step 2. Use the multi-level feature extraction module to extract and fuse multi-level features from the images in the training dataset to obtain fused features; Step 3. Enhance the fused features using the foreground feature fusion module to obtain the foreground feature map; An edge feature fusion module is used to enhance the fused features, resulting in shallow edge feature maps, mid-layer edge feature maps, and deep edge feature maps. Step 4. Use the attention mechanism module to enhance the foreground feature map, shallow edge feature map, middle edge feature map, and deep edge feature map respectively; Step 5. Post-process and fuse the enhanced shallow edge feature map, enhanced middle edge feature map, and enhanced deep edge feature map to obtain a binary edge map; Step 6. Using the binary edge map and the enhanced foreground feature map, combined with the labels in the training dataset, backpropagate to train the multi-level feature extraction module, the foreground feature fusion module, the edge feature fusion module, and the attention mechanism module; Step 7. Extract the edge image of the roller can ear from the input image to obtain a visualized image of the roller can ear edge.
2. The method for extracting the edge image of a roller can based on multi-layer attention according to claim 1, characterized in that, In step 1, the imported edge detection dataset is the HED-BSDS edge detection dataset, and the imported raw data of the roller can ear is the raw image of the roller can ear obtained from the acquisition device; the preprocessing process is as follows: All images imported from the edge detection dataset and the original data of the rolling can ear were uniformly resized and their pixel value ranges were adjusted. Then, an enhanced training dataset was generated by randomly cropping, rotating, horizontally flipping, and adding noise.
3. The method for extracting the edge image of a roller can based on multi-layer attention according to claim 1, characterized in that, In step 2, the multi-level feature extraction module includes a shallow feature extraction module, a sub-shallow feature extraction module, a mid-level feature extraction module, a sub-deep feature extraction module, and a deep feature extraction module; The shallow feature extraction module takes images from the training dataset as input and extracts shallow features through convolution operations and the ReLU activation function. ; The input to the shallow feature extraction module is shallow features. This module is used to extract shallow features through convolution operations, max pooling operations, and the ReLU activation function. ; The input to the mid-level feature extraction module is the second-shallow level features. This module extracts mid-level features through convolution operations, max pooling operations, and the ReLU activation function. ; The input to the sub-deep feature extraction module is mid-level features. This module is used to extract sub-deep features through convolution operations, max pooling operations, and the ReLU activation function. ; The deep feature extraction module takes sub-deep features as input and extracts deep features through convolution, max pooling, and ReLU activation functions. .
4. The method for extracting the edge image of a roller can based on multi-layer attention according to claim 3, characterized in that, In step 2, the specific process of fusing the multi-level features extracted from the image is as follows: , , , Feature maps were obtained after bilinear interpolation upsampling. , , , ; Integrating features at different levels through skip connections , , , , The fusion characteristics are obtained.
5. The method for extracting the edge image of a roller can based on multi-layer attention according to claim 1, characterized in that, Step 3 specifically involves: The foreground feature fusion module reduces the dimensionality of the fused features through a convolutional layer, and then processes them through a ReLU activation function to generate a preliminary foreground feature map. The edge feature fusion module divides the fused features into shallow, medium and deep features according to different depth levels. After processing by convolutional layers and ReLU activation function, shallow edge feature maps, medium edge feature maps and deep edge feature maps are generated respectively.
6. The method for extracting the edge image of a roller can based on multi-layer attention according to claim 1, characterized in that, Step 4 specifically involves: Foreground feature maps, shallow edge feature maps, mid-level edge feature maps, and deep edge feature maps are processed using global average pooling, multilayer perceptron, and... The activation function calculates the channel weights to obtain the channel attention for the foreground feature map, shallow edge feature map, middle edge feature map, and deep edge feature map; Global average pooling, two-dimensional convolution, and other operations are applied to the foreground feature map, shallow edge feature map, middle edge feature map, and deep edge feature map. The activation function calculates spatial weights to obtain spatial attention to the foreground feature map, shallow edge feature map, middle edge feature map, and deep edge feature map; The foreground feature map, shallow edge feature map, middle edge feature map, and deep edge feature map are multiplied element-wise with the corresponding channel attention and spatial attention to obtain the enhanced foreground feature map, enhanced shallow edge feature map, enhanced middle edge feature map, and enhanced deep edge feature map.
7. The method for extracting the edge image of a roller can based on multi-layer attention according to claim 1, characterized in that, Step 5 specifically involves: The enhanced shallow edge feature map, enhanced middle edge feature map, and enhanced deep edge feature map are binarized using a dynamic thresholding method. The binarized enhanced shallow edge feature map, enhanced middle edge feature map, and enhanced deep edge feature map are then fused element by element to obtain a binary edge map.
8. The method for extracting the edge image of a roller can based on multi-layer attention according to claim 1, characterized in that, In step 7, the trained multi-level feature extraction module, edge feature fusion module and attention mechanism module are used to extract the edge image of the roller can ear from the input image to obtain the visual image of the roller can ear edge.
9. A roller can ear edge image extraction system based on multi-layer attention, comprising an image sensor, a memory, and one or more processors, wherein the memory stores executable code, characterized in that, When the processor executes the executable code, it implements the steps of the multi-layer attention-based image extraction method for the edge of a roller can ear as described in any one of claims 1 to 8.
10. The roller can ear edge image extraction system based on multi-layer attention according to claim 9, characterized in that, The image sensor is a CMOS image sensor; The processor is a data processor equipped with an RTX 4060 graphics card.
Citation Information
Patent Citations
Camouflage target detection algorithm based on multi-scale cross-layer feature fusion network
CN117475134A
Image classification method based on noise suppression and multi-scale feature fusion
CN119478568A