Multi-field-oriented edge perception feature intelligent visual detection method
By building a multi-domain visual perception system and designing a multi-level spatial domain boundary perception method, combining attention-induced feature aggregation and global context differentiation enhancement, the object detection problem under complex backgrounds and unstable lighting conditions is solved, and the high-precision and robust object detection effect is achieved.
Patent Information
- Application Number
- CN202510376748.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-28
- Publication Date
- 2025-04-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing object detection methods are difficult to accurately detect small and hidden defects or abnormalities under complex backgrounds and unstable lighting conditions.
Using multi-domain-oriented edge-aware feature intelligent visual detection method, a multi-dimensional visual perception system is built, a multi-level spatial domain boundary perception method is designed, and an attention-induced feature aggregation method and global context differentiation enhancement are used to build an edge-aware target significance detection network.
It improves the accuracy and robustness of object detection in complex contexts, and can more accurately detect small and hidden defects or exceptions, and is suitable for multi-field applications.
Smart Images

Figure CN119888208A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of target detection, and in particular relates to an intelligent visual detection method for edge perception features in multiple fields. Background Art
[0002] In modern industrial production and daily life, accurate detection of surface defects or anomalies is an important part of ensuring product quality, safety and reliability. Whether it is fabric defect detection in the textile industry, circuit board defect identification in the electronics manufacturing industry, imaging diagnosis in the medical field, or vehicle detection in urban traffic monitoring, these application scenarios face a common challenge: how to quickly and accurately identify tiny and hidden defects or anomalies in a complex and changing environment.
[0003] Textile industry: In the manufacturing process of unrefined silk, minor defects such as double warp, broken ends and missing weft may occur. Although these defects are small in size, they have a huge impact on the quality of the finished product. When dealing with such gloss-sensitive fabrics, traditional detection methods are difficult to accurately detect due to the low contrast between the defect-free area and the defective area caused by the gloss changes caused by lighting conditions. Electronic manufacturing industry: Problems such as poor welding and missing components on circuit boards may cause the entire product to fail if not discovered in time. These defects are often very small, and the surface of the circuit board is complex, so traditional detection methods are difficult to cover all possible types of defects. Medical imaging diagnosis: Lesion detection in medical images, such as nodules in lung CT images and tumors in brain MRI images, requires accurate identification of abnormal areas in complex backgrounds. These lesions are usually small and have low contrast with normal tissues, which requires extremely high sensitivity and accuracy of the detection method. Urban traffic monitoring: In traffic monitoring, it is necessary to detect vehicles, pedestrians and other targets on the road in real time, especially at night or in bad weather conditions, when the difficulty of identifying targets increases. In addition, it is also necessary to identify abnormal vehicle conditions, such as speeding, illegal parking, etc., which puts higher requirements on the robustness and real-time performance of the detection method.
[0004] In summary, whether in the fields of textiles, electronic manufacturing, medical imaging or urban traffic monitoring, a method is needed to accurately detect small and hidden defects or anomalies under complex backgrounds or unstable lighting conditions. This can not only improve production efficiency and product quality, but also protect public safety and health. Therefore, the development of a universal detection method based on edge-sensing feature optimization has broad application prospects and important practical significance. Summary of the invention
[0005] In order to solve the problem that the existing target detection methods are easily affected by complex backgrounds and unstable lighting when facing tiny targets, the present invention provides an edge perception feature intelligent visual detection method for multiple fields, which is characterized by comprising the following steps: Step 1: Build a multi-domain visual perception system. Use an integrated machine vision acquisition device to capture and process in real time the visual information of the target area from different fields (such as industry, medical care, autonomous driving, etc.). The device includes: an imaging module (including a high-resolution industrial camera and an adaptive lens), a support module (camera bracket), a lighting module (a combination of ambient light and directional light), and a processing module (an image processing unit based on an efficient industrial computer).
[0006] Step 2: Dynamic visual information acquisition and preprocessing. According to the domain-specific acquisition cycle, the visual information of the target area is acquired. The industrial camera acquires images in real time and saves them as the original data set based on the received action instructions. The data set is further divided into a training set and a test set, and the division ratio of the data set can be adaptively adjusted according to actual needs.
[0007] Step 3: Design a multi-level spatial domain boundary perception method. The boundary perception module of spatial attention is used to dynamically weigh different positions in the feature map, divide the extracted features into foreground target features and background features, and analyze the features and their correlation coefficients to obtain the edge contour information of the detected target in a complex background.
[0008] The spatial attention used dynamically weighs different positions in the feature map and represents the low-level features as , the set of spatial locations is represented as ,in is the spatial coordinate of the low-level features. In order to increase the receptive field and obtain global information without increasing parameters, two convolutional layers are used to capture the spatial focus points, and then the encoded spatial map is normalized by the sigmoid operation, which is expressed as:
[0009]
[0010]
[0011]
[0012] In the formula, are the parameters in the spatial attention block, is the sigmoid operation, and They are and Troposphere, Represents high-level features, Represents the features of low-level features weighted by spatial attention.
[0013] The multi-level spatial domain boundary perception method is adopted to refine the extraction of target edges by combining multiple input forms of low-dimensional and high-dimensional features. This method optimizes edge information through the binary cross entropy loss function to improve the detection accuracy of targets under complex backgrounds, which is expressed as:
[0014] In the formula, Indicates The boundary map generated by the image, and Indicates The boundary map of the truth map is extracted using the Canny edge detection method. .
[0015] Step 4: Optimization of feature aggregation and fusion mechanism. The attention-induced feature aggregation method is used to enhance the expressiveness of the target in the image by fusing feature maps from different scales. This step can selectively aggregate features of different levels of the input image to improve the fusion effect of multi-level target information.
[0016] The receptive field unit with rich multi-scale features adopts a multi-branch structure composed of convolution layers with convolution kernels of different sizes to promote the fusion of features of different scales to simulate the receptive field of human vision. The receptive field unit consists of five branches, four of which adopt Convolutional layers and dilation rates of Convolutional layer ( ), the output of the fifth branch is added to the features of the first four branches and further fed into the ReLU activation to obtain the final features.
[0017] The two input features a and b are upsampled to the same size as a. Initial feature fusion is performed first, and the channel information weight of the fused feature is output after passing through the multi-scale channel attention module. Then, a and b are weighted averaged, and then the weighted a and b features are fused. Finally, a 3x3 convolution is performed to obtain the final output feature. , realize cross-layer fusion of multi-scale features. The specific cross-layer fusion process is as follows:
[0018] In the formula, represents multi-scale channel attention, and represents two input features, express and The initial fusion of is upsampled twice and then Add element by element, Represents element-wise multiplication.
[0019] Step 5: Global context differentiation enhancement. The global context differentiation module is introduced to optimize the separation of target features and background features. The background noise is suppressed by differentiating the context information, and the saliency of the target area is highlighted, thereby improving the accuracy of the detection model.
[0020] Multi-scale fusion features of input , after two branches, the first branch is Perform a 3x3 convolution operation to obtain , and then and Multiply the input after the multi-scale channel attention module to get The second branch pair Perform pooling and 3x3 convolution operations to obtain ,and After performing the same operation, we get . Then Upsample and Difference weighting, after 3x3 convolution, plus features After another 3x3 convolution, the output feature is finally obtained , enhance the expression of fusion features, and the calculation process is as follows:
[0021] In the formula, , , and Represents convolution, average pooling, multi-scale channel attention, and upsampling operations.
[0022] Step 6: Construction of edge-aware target saliency detection network. Combining the features extracted in steps 3, 4, and 5, an end-to-end edge-aware target detection network is constructed to automatically segment the foreground target and background area in the image. This network can significantly improve the detection accuracy and robustness of targets in complex backgrounds.
[0023] The network consists of four main components, including feature extraction module, multi-layer feature processing module, feature fusion and refinement module and prediction module. The multi-layer feature processing module is mainly composed of boundary perception unit and receptive field unit. The structure of boundary perception unit is as follows: Figure 3 As shown, the structure of the receptive field unit is as follows Figure 4 As shown; the feature fusion refinement module mainly consists of two pairs of attention-induced feature aggregation units and global context difference units.
[0024] Step 7: Model training and optimization. Use training data from multiple fields to perform deep learning training based on target features in different scenarios. Use adaptive optimization strategies to adjust network parameters to obtain optimal target detection performance in different fields.
[0025] The objective loss function of the model is defined as: ,in and denote the weights of global and local constraints respectively Loss and Loss, the total loss function can be expressed as follows: .
[0026] Step 8: Model application and target detection.
[0027] The detection model trained in step 7 is actually applied to perform target detection on the image data of the test set in step 2, and the location and category of the target are output in real time.
[0028] The beneficial effects of the present invention are: The present invention adopts a multi-domain edge-aware feature intelligent visual detection method to detect image targets. Combined with machine vision information data, an edge-aware target saliency detection network, a multi-level spatial domain boundary perception method, an attention-induced feature aggregation method and a global context difference method are constructed to solve the problem of difficulty in detecting tiny and hidden defects or anomalies under existing complex backgrounds or unstable lighting conditions, so as to improve the target detection accuracy in complex environments in multiple fields. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 This is the overall structure diagram of the edge perception feature intelligent visual detection network for multiple fields of the present invention.
[0030] Figure 2 This is a structural diagram of the multi-scale channel attention of the present invention.
[0031] Figure 3 It is a structural diagram of the boundary perception unit of the present invention.
[0032] Figure 4 Schematic diagram of the receptive field unit of the present invention. DETAILED DESCRIPTION
[0033] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. This embodiment is implemented based on the technical solution of the present invention, and provides a detailed implementation method and specific operation process, but the protection scope of the present invention is not limited to the following embodiments.
[0034] Figure 1This is a schematic diagram of the multi-field edge perception feature intelligent visual detection method of the present invention, and the specific steps are as follows: Step 1: Build a multi-domain visual perception system to collect visual information from different fields.
[0035] The multi-domain visual perception system uses an integrated machine vision acquisition device to capture and process in real time the visual information of the target area from different fields (such as industry, medical treatment, autonomous driving, etc.). The device includes: an imaging module (including a high-resolution industrial camera and an adaptive lens), a support module (camera bracket), a lighting module (a combination of ambient light and directional light), and a processing module (an image processing unit based on an efficient industrial computer).
[0036] Step 2: Dynamic visual information acquisition and preprocessing.
[0037] According to the field-specific acquisition cycle, the visual information of the target area is collected. The industrial camera collects images in real time and saves them as the original data set based on the received action instructions. The data set is further divided into a training set and a test set, and the division ratio of the data set can be adaptively adjusted according to actual needs.
[0038] Step 3: Design a multi-level spatial domain boundary perception method. Use the boundary perception module of spatial attention to dynamically weigh different positions in the feature map, divide the extracted features into foreground target features and background features, and analyze the features and their correlation coefficients to obtain the edge contour information of the detected target in a complex background. The specific implementation process is as follows: Spatial attention is used to dynamically weigh different positions in the feature map, and the low-level features are represented as , the set of spatial locations is represented as ,in is the spatial coordinate of the low-level features. In order to increase the receptive field and obtain global information without increasing parameters, two convolutional layers are used to capture the spatial focus points, and then the encoded spatial map is normalized by the sigmoid operation, which is expressed as:
[0039]
[0040]
[0041]
[0042] In the formula, are the parameters in the spatial attention block, is the sigmoid operation, and They are and Troposphere, Represents high-level features, Represents the features of low-level features weighted by spatial attention.
[0043] A multi-level spatial domain boundary perception method is adopted to refine the extraction of target edges by combining multiple input forms of low-dimensional and high-dimensional features. This embodiment optimizes edge information through a binary cross entropy loss function to improve the detection accuracy of targets under complex backgrounds, which is expressed as:
[0044] In the formula, Indicates The boundary map generated by the image, and Indicates The boundary map of the truth map is extracted using the Canny edge detection method. .
[0045] Step 4: Optimization of feature aggregation and fusion mechanism. The attention-induced feature aggregation method is used to enhance the expressiveness of the target in the image by fusing feature maps from different scales. This step can selectively aggregate features of different levels of the input image to improve the fusion effect of multi-level target information. The specific implementation process is as follows: The receptive field unit with rich multi-scale features adopts a multi-branch structure composed of convolution layers with convolution kernels of different sizes to promote the fusion of features of different scales to simulate the receptive field of human vision. Figure 4 As shown, the receptive field unit consists of five branches, four of which adopt Convolutional layers and dilation rates of Convolutional layer ( ), the output of the fifth branch is added to the features of the first four branches and further fed into the ReLU activation to obtain the final features.
[0046] For the two input features a and b, upsample b to the same size as a, perform initial feature fusion, and then pass through the multi-scale channel attention module. The structure of the multi-scale channel attention module is as follows: Figure 2 As shown in the figure, the channel information weight of the fusion feature is output, and then a and b are weighted averaged, and then the weighted a and b features are fused, and finally a 3x3 convolution is performed to obtain the final output feature , realize cross-layer fusion of multi-scale features. The specific cross-layer fusion process is as follows:
[0047] In the formula, represents multi-scale channel attention, and represents two input features, express and The initial fusion of is upsampled twice and then Add element by element, Represents element-wise multiplication.
[0048] Step 5: Global context differentiation enhancement. The global context differentiation module is introduced to optimize the separation of target features and background features. The background noise is suppressed by differentiating the context information, and the saliency of the target area is highlighted, thereby improving the accuracy of the detection model. The specific implementation process is as follows: Multi-scale fusion features of input , after two branches, the first branch is Perform a 3x3 convolution operation to obtain , and then and Multiply the input after the multi-scale channel attention module to get The second branch pair Perform pooling and 3x3 convolution operations to obtain ,and After performing the same operation, we get . Then Upsample and Difference weighting, after 3x3 convolution, plus features After another 3x3 convolution, the output feature is finally obtained , enhance the expression of fusion features, and the calculation process is as follows:
[0049] In the formula, , , and Represents convolution, average pooling, multi-scale channel attention, and upsampling operations.
[0050] Step 6: Construction of edge-aware target saliency detection network. Combining the features extracted in steps 3, 4, and 5, an end-to-end edge-aware target detection network is constructed to automatically segment the foreground target and background area in the image. This network can significantly improve the detection accuracy and robustness of targets in complex backgrounds.
[0051] The network consists of four main components, including feature extraction module, multi-layer feature processing module, feature fusion refinement module and prediction module. The multi-layer feature processing module is mainly composed of boundary perception unit and receptive field unit, and the feature fusion refinement module is mainly composed of two pairs of attention-induced feature aggregation units and global context difference units.
[0052] Step 7: Model training and optimization. Use training data from multiple fields to perform deep learning training based on target features in different scenarios. Use adaptive optimization strategies to adjust network parameters to obtain optimal target detection performance in different fields.
[0053] The objective loss function of the model is defined as: ,in and denote the weights of global and local constraints respectively Loss and Loss, the total loss function is expressed as follows:
[0054] Step 8: Model application and target detection. The detection model trained in step 7 is actually applied to detect targets on the image data of the test set in step 2, and the location and category of the target are output in real time.
[0055] This embodiment adopts a multi-domain edge-aware feature intelligent visual detection method to detect image targets. Combined with machine vision information data, it constructs an edge-aware target saliency detection network, a multi-level spatial domain boundary perception method, an attention-induced feature aggregation method, and a global context difference method to solve the problem of difficulty in detecting tiny and hidden defects or anomalies under existing complex backgrounds or unstable lighting conditions, so as to improve the target detection accuracy in complex environments in multiple fields.
[0056] Some steps in the embodiments of the present invention may be implemented using software, and the corresponding software program may be stored in a readable storage medium, such as a CD or a hard disk.
[0057] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A multi-domain edge perception feature intelligent visual detection method, characterized in that: The following steps are involved: Step 1: Collect target area images from different fields according to the preset cycle; Step 2: Save the collected images as the original data set and divide them into training set and test set; Step 3: Extract features from the image, use the boundary perception module of spatial attention to dynamically weigh different positions in the feature map, divide the extracted features into foreground target features and background features, and obtain the edge contour information of the detected target; A multi-level spatial domain boundary perception method is adopted to refine the extraction of target edges by combining multiple input forms of low-dimensional and high-dimensional features. The edge information is optimized through the binary cross entropy loss function to improve the detection accuracy of targets under complex backgrounds. It is expressed as: In the formula, Indicates The boundary map generated by the image, and Indicates The boundary map of the truth map is extracted using the Canny edge detection method; Step 4: For the feature map obtained in step 3, an attention-induced feature aggregation method is used to fuse feature maps from different scales; Step 5: For the feature map obtained in step 4, introduce the global context difference module to optimize the separation of target features and background features; Step 6: Combine the features extracted in steps 3, 4, and 5 to build an end-to-end edge-aware object detection network to automatically segment the foreground object and background area in the image; Step 7: Training the edge-aware object detection network using the training set; Step 8: Use the trained edge-aware object detection network to detect the target and output the location and category of the target in real time.
2. The multi-domain edge perception feature intelligent visual detection method according to claim 1, characterized in that: In step 1, an industrial camera is used to collect real-time visual information of the working conditions, and the collected visual data is processed in combination with a deep learning model.
3. The multi-domain edge perception feature intelligent visual detection method according to claim 1, characterized in that: In step 3, the spatial attention used dynamically weighs different positions in the feature map and represents the low-level features as , the set of spatial locations is represented as ,in is the spatial coordinate of the low-level features. In order to increase the receptive field and obtain global information without increasing parameters, two convolutional layers are used to capture the spatial focus points, and then the encoded spatial map is normalized by the sigmoid operation, which is expressed as: In the formula, , , , and are the parameters in the spatial attention block, is the sigmoid operation, and They are and Troposphere, Represents high-level features, Represents the features of low-level features weighted by spatial attention.
4. The multi-domain edge perception feature intelligent visual detection method according to claim 1, characterized in that: In step 4, the receptive field unit that enriches the multi-scale features adopts a multi-branch structure composed of convolution layers with convolution kernels of different sizes, thereby promoting the fusion of features of different scales to simulate the receptive field of human vision; The receptive field unit consists of five branches, four of which adopt Convolutional layers and dilation rates of Convolutional layer, where , the output of the fifth branch is added to the features of the first four branches and further fed into the ReLU activation to obtain the final features.
5. The multi-domain edge perception feature intelligent visual detection method according to claim 1, characterized in that: In step 4, a cross-layer multi-scale feature fusion strategy is adopted to solve the multi-scale feature fusion problem; After initial fusion is achieved by upsampling the input features a and b, the weights of the fused features are adaptively adjusted in combination with the multi-scale channel attention mechanism. Finally, the feature expression capability is further enhanced through weighted averaging and 3x3 convolution to achieve cross-layer fusion of multi-scale features. The specific cross-layer fusion process is as follows: In the formula, represents multi-scale channel attention, and represents two input features, express and The initial fusion of is upsampled twice and then Add element by element, Represents element-wise multiplication.
6. The multi-domain edge perception feature intelligent visual detection method according to claim 1, characterized in that: In step 5, the global context difference information is combined to extract the saliency of the multi-scale fusion feature through the processing of two branches; The first branch uses 3x3 convolution to process the features and then combines them with the context information. The second branch extracts the difference features through pooling and convolution operations. Finally, the expression effect of the target features is enhanced through weighted operations and convolution optimization. The calculation process is as follows: In the formula, , , and Represents convolution, average pooling, multi-scale channel attention, and upsampling operations.
7. The multi-domain edge perception feature intelligent visual detection method according to claim 1, characterized in that: In step 7, the loss function of the target detection model combines global and local information and optimizes the training process of the model through a weighted loss function; This loss function effectively improves the accuracy and generalization ability of multi-domain target detection by dynamically adjusting the proportion of global loss and local loss. The target loss function of the model is defined as: ,in and denote the weights of global and local constraints respectively Loss and Loss, the total loss function is expressed as follows: 。
Citation Information
Patent Citations
A boundary-aware double-attention-guided liver segment segmentation method
CN113344951A
Optical remote sensing image salient target detection method of double-flow decoding cross-task interaction network
CN113505634A
Underwater target detection method based on edge prior
CN118864270A