A high-precision positioning method for LDI targets based on deep learning
By adopting deep learning-based edge detection model and wavelet transformation technology in LDI target positioning, the problem of poor edge detection effect in the existing technology under complex conditions is solved, high-precision positioning of LDI targets is achieved, and the accuracy and efficiency of detection are improved.
Patent Information
- Application Number
- CN202411182160.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-27
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2044-08-27
AI Technical Summary
The existing LDI target positioning methods have significantly reduced edge detection effects in the case of high noise, obvious light changes and high image complexity, affecting the accuracy and accuracy of positioning.
The edge detection model based on deep learning is adopted, combined with wavelet transformation technology, a pooling module and parallel jump module are designed to improve the ability of edge detection models to extract and utilize multi-level features, and the target edge pixel points are screened through grayscale gradient analysis for circular fitting, achieving high-precision positioning.
Under complex background and variable image conditions, the accuracy and efficiency of edge detection of LDI targets are significantly improved, ensuring high-precision positioning of LDI targets, and improving the detection effect and practicality.
Smart Images

Figure CN119090906B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing, and in particular to a high-precision positioning method for LDI targets based on deep learning. Background Art
[0002] In recent years, with the popularity of smart devices, PCB (Printed circuit board) manufacturing is developing towards miniaturization and integration. Smaller size means higher integration, which can realize more functions in a limited space. High integration means high density of PCB board circuits. Increasing PCB board circuit density without affecting production efficiency and yield rate has higher resolution and precision requirements for PCB manufacturing process.
[0003] LDI (Laser Direct Imaging) technology is an advanced imaging technology that directly forms an image on a PCB board by laser scanning. LDI working under the ultraviolet spectrum can obtain ultra-fine lines. At the same time, compared with traditional imaging methods, LDI has the advantages of high precision, high resolution, high efficiency, and environmental protection, which can meet the high resolution and high precision requirements of PCB manufacturing. At present, LDI has become the mainstream technology of exposure process in PCB, and the exposure machine based on LDI is a very important component of PCB production line. When the LDI equipment is working, it is necessary to establish a spatial mapping relationship between the laser equipment and the substrate to be exposed. This is the key link for the LDI equipment to accurately expose the image to be exposed to the corresponding position of the substrate. The LDI equipment obtains the position of the substrate by positioning the LDI target. Therefore, the accuracy of the target positioning will directly affect the exposure accuracy of the LDI equipment, and further affect the production quality of PCB products. Improving the positioning accuracy of the LDI target is of great significance to improving the exposure process of the LDI equipment and improving the production quality of PCB products.
[0004] LDI targets refer to special shape marks used by LDI to locate the position of substrates. Currently, there are mainly circular, annular and composite targets. Most of the existing LDI target positioning methods are based on edge feature detection. This is because edge features correspond to obvious changes in images and are usually easier to extract and understand than other features such as texture or color. Secondly, edge features are invariant to changes in illumination and color to a certain extent, which makes them more robust and reliable in some cases. At the same time, edge features can serve as the basis for more advanced features. By detecting edges, the contour and structural information of objects in the image can be further obtained. The overall process of the existing LDI target positioning technology based on edge information is divided into: edge detection, LDI target edge information screening, and LDI target edge point fitting. The purpose of edge detection is to identify all potential edge points in the image and provide basic information for subsequent processing. It is the basis and key link for achieving accurate target positioning. The existing edge detection of LDI targets is mainly based on traditional digital image processing methods using edge detection algorithms such as Sobel, Prewitt and Canny. However, due to the influence of factors such as PCB manufacturing process, production line environment and imaging system, complex low-quality LDI target images with different presentation effects will appear. In the case of high noise, obvious illumination changes and high image complexity, the detection effect of these edge detection algorithms will be significantly reduced, which brings great challenges to the edge detection of LDI targets and affects the accuracy and precision of LDI target positioning. Summary of the invention
[0005] In response to the above problems and technical requirements, this application proposes a high-precision positioning method for LDI targets based on deep learning. The technical solution of this application is as follows:
[0006] A high-precision positioning method for an LDI target based on deep learning, the high-precision positioning method for an LDI target comprising:
[0007] The edge detection model is used to perform edge detection on the LDI target image to be located and obtain the detection result image, which indicates the candidate edge pixel points in the LDI target image to be located; the edge detection model is built and pre-trained based on the deep learning model, and the edge detection model includes a feature extraction layer, a parallel skip connection module and an edge prediction layer. The feature extraction layer includes a plurality of stacked convolution modules and pooling modules. The convolution module extracts features by performing convolution operations to generate feature maps, and the pooling module is used to perform pooling operations on the feature maps by using wavelet transform; the parallel skip connection module extracts high-frequency information in the shallow feature map generated by the feature extraction layer by wavelet transform and transmits it to the deep feature map for fusion; the edge prediction layer is used to map the extracted feature map to the edge position in the LDI target image to be located;
[0008] Perform grayscale gradient analysis based on the candidate edge pixels indicated by the detection result image and select the target edge pixels;
[0009] The target edge pixel points are fitted with a circle to obtain the target positioning result of the LDI target image to be positioned.
[0010] The beneficial technical effects of this application are:
[0011] The present application discloses a method for high-precision positioning of LDI targets based on deep learning. The method adopts an edge detection model based on deep learning to replace the traditional edge detection step to directly perform edge detection on the LDI target image to be positioned and obtain the detection result image, and uses wavelet transform to optimize the design of the pooling module and the parallel skip connection module in the edge detection model. The introduction of wavelet transform technology can avoid the problem of loss of high-frequency details in downsampling of the edge detection model, improve the ability of the edge detection model to extract and utilize multi-level features, thereby improving the detection accuracy of the obtained candidate edge pixel points, and further screen out the target edge pixel points for circle fitting based on the candidate edge pixel points in combination with grayscale gradient analysis, which can quickly and accurately realize high-precision positioning of the LDI target, and even for low-quality LDI target images to be positioned, it has a good detection effect, and can stably detect edges under complex backgrounds and changeable image conditions, greatly improving the detection effect and practicality.
[0012] This method uses the two-dimensional Haar wavelet transform to design pooling modules and parallel skip-connection modules. It uses the characteristics of the two-dimensional Haar wavelet transform to decompose the input into high-frequency information and low-frequency information, so that the edge detection model can more effectively capture the subtle features and structural information in the image. The characteristics of the Haar wavelet transform help to learn feature representations of different scales and levels at different levels of the edge detection model, and improve the edge detection model's ability to represent images at multiple scales. By introducing the wavelet transform theory, the edge detection model can better capture features such as local structures and texture details in the image, thereby improving the performance and generalization ability of the edge detection model in edge detection tasks.
[0013] This method uses an end-to-end processing method based on deep learning to detect edges, which simplifies the multi-step process of traditional edge detection and improves the efficiency and accuracy of detection. Through an integrated training process, the optimal feature representation and edge detection strategy can be adaptively learned, reducing the complexity of manual intervention and parameter adjustment. In addition, the design of coarse positioning followed by fine positioning in this application effectively reduces the amount of calculation and complexity of detecting edge points, while ensuring the high accuracy and robustness of edge positioning. By combining the fast feature extraction of deep learning models with the refined analysis of traditional image processing technology, this technology not only improves the efficiency of LDI target edge positioning, but also ensures robustness in complex scenes and under different lighting conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 It is a method flow chart of a method for high-precision positioning of an LDI target according to an embodiment of the present application.
[0015] Figure 2 It is a structural diagram of the edge detection model in this application.
[0016] Figure 3 It is a structural diagram of each pooling module in the edge detection model.
[0017] Figure 4 It is a structural diagram of each parallel skip connection module in the edge detection model.
[0018] Figure 5 It is a schematic diagram of an example of determining reference pixel points by obtaining a detection result image of a target LDI image to be positioned and obtaining a fitting circle center and a fitting circle radius based on fitting of candidate edge pixel points indicated by the detection result image.
[0019] Figure 6 yes Figure 5 A schematic diagram of one of the reference pixel points determined in the example shown and the local area where it is located. DETAILED DESCRIPTION
[0020] The specific implementation of the present application is further described below in conjunction with the accompanying drawings.
[0021] This application discloses a high-precision positioning method for LDI targets based on deep learning. The high-precision positioning method for LDI targets includes the following steps. Figure 1 The flowchart shown:
[0022] Step 1: Use the edge detection model to perform edge detection on the LDI target image to be located and obtain a detection result image, where the detection result image indicates candidate edge pixel points in the LDI target image to be located.
[0023] The edge detection model is built and pre-trained based on a deep learning model. After the LDI target image to be located is input into the edge detection model, the edge detection model performs pixel-level detection on the LDI target image to be located to predict the probability that each pixel in the LDI target image to be located belongs to an edge pixel, thereby preliminarily detecting the candidate edge pixels. Traditional edge detection methods usually need to rely on multiple independent steps, including image smoothing, gradient calculation, non-maximum suppression and edge connection, etc. The parameter selection and adjustment between these steps are often very complex and easily affected by noise and parameter changes. The deep learning-based edge detection model of the present application simplifies the multi-step process of traditional edge detection through an integrated training process, and can adaptively learn the best feature representation and edge detection strategy, reducing the complexity of manual intervention and parameter adjustment, and improving the efficiency and accuracy of detection.
[0024] Please refer to Figure 2 The network structure diagram of the edge detection model shown in the figure, the edge detection model constructed in this application includes a feature extraction layer, a parallel skip connection module and an edge prediction layer:
[0025] (1) The feature extraction layer can learn and capture edge-related abstract features from the LDI target image to generate a feature map. These features are crucial for accurately detecting edge positions and provide important input and basis for subsequent edge prediction and loss function parts.
[0026] The feature extraction layer uses convolutional neural network (CNN) as the basic architecture, and the feature extraction layer includes several stacked convolution modules and pooling modules. Figure 2 A schematic diagram of the stacking of convolution modules and pooling modules in the feature extraction layer is shown. Figure 2 The stacked structure and convolution parameters of each convolution module are just for reference.
[0027] The convolution module extracts features by performing convolution operations to generate feature maps. The convolution module can utilize the spatial correlation between adjacent pixels, effectively reduce the number of parameters through weight sharing and local connections, and retain the spatial information of the features. The convolution kernel slides on the image and extracts local features. By stacking multiple convolution layers, the model can gradually learn more abstract and complex features, thereby better representing the edge information in the image.
[0028] The pooling module is used to perform pooling operations on the feature maps generated by the convolution module. The pooling operation reduces the model's sensitivity to position and improves the model's translation invariance by retaining the main features and reducing the size of the feature map. The pooling module reduces the dimension of the feature map, reduces the number of parameters, and retains important information, helping the model to improve robustness and generalization. Traditional pooling operations mainly include maximum pooling and average pooling, which are widely used in convolutional neural networks. In maximum pooling, the maximum value in each pooling window is selected as the representative feature, while in average pooling, the average value of all values in the window is calculated. However, the traditional pooling operation has the disadvantage of information loss. This information loss may cause the network to lack an accurate grasp of details and local features in subsequent layers, affecting the model's ability to understand and represent the overall and local structures of the image, especially when processing complex images, which may limit the performance of the model.
[0029] Edge information is high-frequency detail information in an image, and the edge detection effect of a deep learning model depends on the model structure's ability to extract and retain high-frequency detail information in an image. However, traditional pooling operations lose high-frequency detail information during downsampling. In order to overcome the above problems, this application utilizes the characteristic of wavelet transform that can decompose the input into high-frequency information and low-frequency information, and introduces wavelet transform theory to design a pooling module, so that the module uses wavelet transform to perform pooling operations on feature maps, thereby better capturing local structures, texture details and other features in the image, thereby improving the performance and generalization ability of the model in edge detection tasks.
[0030] (2) The feature extraction layer can be used to extract feature maps of various levels. The shallow feature maps contain important detail information, while the deep feature maps contain high-level semantic information. The parallel skip connection module connects the shallow and deep layers of the model, thereby extracting high-frequency information from the shallow feature maps generated by the feature extraction layer and transmitting it to the deep feature maps for fusion. In one embodiment, Figure 2 As shown in Figure 1, the edge detection model includes two parallel skip-connection modules. By retaining and fusing feature information at different levels, it is possible to avoid deep features losing shallow detail information, thereby effectively improving the model's feature extraction and utilization capabilities.
[0031] Traditional parallel skip connection structures usually use simple convolution structures for dimensionality reduction, and then fuse them with deep features. The purpose of the convolution operation is to ensure that the shallow feature map has the same size as the deep feature after dimensionality reduction. However, the dimensionality reduction process may lose detail information, and this lost information may not be fully restored after feature fusion. In order to more effectively improve the model skip connection structure's ability to extract and retain shallow detail information, this application also uses the characteristics of wavelet transform that can decompose the input into high-frequency information and low-frequency information, and introduces wavelet transform theory to design a parallel skip connection module. The parallel skip connection module extracts the high-frequency information in the shallow feature map generated by the feature extraction layer through wavelet transform and transmits it to the deep feature map for fusion, thereby better capturing the multi-scale information in the image and improving the ability to understand complex scenes.
[0032] (3) The edge prediction layer is used to map the extracted feature map to the edge position in the LDI target image to be located. The edge prediction layer includes an upsampling module connected to each feature map generated by the feature extraction layer. The upsampling module expands the size of the feature map through interpolation and other technologies, retaining the spatial information in the original features, so that the model can accurately predict the edge position at the pixel level, which is crucial for edge prediction at the pixel level. The feature maps of each level generated by the feature extraction layer are restored to the image size of the LDI target image to be located through an upsampling module, and then the channels are spliced to obtain a fused feature map containing multiple layers of information. Then, the fused feature map is convolved and aggregated with 1*1 convolution to aggregate the multi-channel feature map information, thereby converting the multi-channel into a single-channel output. Finally, after the 1*1 convolution, the nonlinear transformation is performed through the activation function, and the normalization operation is performed through softmax to output the detection result image. The activation function used is, for example, the common ReLU function, which operates the output of the 1*1 convolution element by element, sets negative values to zero, and keeps positive values unchanged. This nonlinear transformation enables the network to learn more complex and nonlinear feature representations, improves the expressive power of the model, and by introducing the activation function, the model can better fit the edge features with complex distribution in the data set, thereby enhancing the model's ability to capture and represent edge features.
[0033] In addition, Figure 2 It can be seen that Figure 2 A 1*1 convolution module is connected between the outputs of different pooling modules, and between the output of the pooling module and the output of the convolution module. The 1*1 convolution module adjusts the size and number of channels of the shallow feature map through a skip connection structure, and transfers the feature information of the shallow layer to the deep layer.
[0034] From the above introduction, it can be seen that the edge detection model of this application introduces the wavelet transform theory, which enables the edge detection model to more effectively capture the subtle features and structural information in the image. Thanks to the characteristics of the wavelet transform, it is conducive to learning feature representations of different scales and levels at different levels of the network, thereby improving the model's multi-scale representation capabilities for images.
[0035] In one embodiment, Haar wavelet transform is introduced into the edge detection model. Haar wavelet transform is a basic wavelet transform method in wavelet analysis, which is used to decompose and reconstruct discrete signals. The decomposition process of Haar wavelet transform is to group the original signal sequence in order, and perform average and difference calculations on each group of data points to obtain an average value sequence and a difference sequence. Among them, the average value sequence represents the low-frequency component, reflecting the overall trend of the original signal; the difference sequence represents the high-frequency component, reflecting the detailed information of the original signal. The one-dimensional characteristics of Haar wavelet transform can be extended to two-dimensional space, and two-dimensional orthogonal multi-resolution analysis is constructed using one-dimensional orthogonal multi-resolution analysis. A two-dimensional wavelet function is constructed based on a one-dimensional wavelet function to realize a two-dimensional Haar wavelet transform. In this embodiment, a two-dimensional Haar wavelet transform is introduced into a pooling module and a parallel skip connection module. Each pooling module and each parallel skip connection module in the edge detection model are designed based on a two-dimensional Haar wavelet transform:
[0036] Please refer to Figure 3 Schematic diagram of the structure of the network, each pooling module includes a first channel attention mechanism module, a 1*1 convolution layer, a Haar wavelet transform layer and a second channel attention mechanism module connected in sequence from input to output. The first channel attention mechanism module is used to identify and strengthen the important channels in the input feature map, thereby highlighting the features with important contributions. The 1*1 convolution layer further compresses or adjusts the channel dimension of the feature map, and generates a more compact feature representation while keeping the spatial information unchanged, which helps to reduce feature redundancy and prepare for the subsequent Haar wavelet transform. The Haar wavelet transform layer performs a two-dimensional Haar wavelet transform on the input feature map to obtain diagonal high-frequency information HH, vertical high-frequency information HL, horizontal high-frequency information LH and low-frequency component information LL, and then transmits them to the second channel attention mechanism module. The low-frequency part represents a smoother background or overall information, and the high-frequency part retains detail information such as edges and textures, thereby enhancing the detail information in the feature map. The second channel attention mechanism module further emphasizes the retained high-frequency information, so that the model can more effectively utilize these detail features, thereby improving the detection ability of complex scenes or fine structures.
[0037] Please refer to Figure 4Schematic diagram of the structure of the network, each parallel skip connection module includes a channel attention mechanism module, a 1*1 convolution layer, a Haar wavelet transform layer and a batch normalization layer connected in sequence from input to output. The channel attention mechanism module selects and strengthens the important channels in the input feature map, so that the model can more effectively focus on the important features related to high-frequency information. The following 1*1 convolution layer further compresses or adjusts the channel dimension of the feature map and generates a more compact feature representation while keeping the spatial information unchanged. This step helps to reduce feature redundancy and prepare for the subsequent Haar wavelet transform. The Haar wavelet transform layer performs a two-dimensional Haar wavelet transform on the input feature map to obtain diagonal high-frequency information HH, vertical high-frequency information HL, horizontal high-frequency information LH and low-frequency component information LL, and then transmits them to the batch normalization layer. The batch normalization layer is used to normalize the feature map output by the Haar wavelet transform layer to ensure that these features remain stable when passed to the deeper feature map. This step can reduce the problem of gradient disappearance or gradient explosion in training, and help the model converge faster.
[0038] Step 2: Perform grayscale gradient analysis based on the candidate edge pixel points indicated by the detection result image and filter out the target edge pixel points. Even though the present application optimizes the edge detection model's ability to capture details, due to the influence of noise, the candidate edge pixel points detected by the edge detection model in step 1 usually still include several pixels near the real edge pixel points in addition to the real edge pixel points at the target edge position. Therefore, in order to achieve high-precision positioning, pixel value analysis is further performed on the basis of the candidate edge pixel points to accurately detect the position of the real edge pixel points. Including:
[0039] (1) Perform circle fitting on all candidate edge pixels to obtain the fitting circle center O and fitting circle radius R.
[0040] (2) Determine the positions of the pixels whose straight-line distance from the fitting circle center O in several different directions around the fitting circle center O is the fitting circle radius R as the reference pixel points. In order to ensure accuracy, the center angle between the fitting circle center O and the directions where the two adjacent reference pixel points are located does not exceed the angle threshold.
[0041] For example, in one example, using an edge detection model Figure 5 The detection result image output by edge detection of the LDI target image to be located shown in (a) is as follows Figure 5 As shown in (b) in the figure, the detection result image is in the form of a binary image. Figure 5 The white pixels in (b) indicate the candidate edge pixels. Perform circle fitting on all candidate edge pixels to obtain the fitting circle center O and fitting circle radius R as shown in Figure 5As shown in (c) in the figure, the 360° circumferential direction of the fitting circle center O is divided into 36 different directions as shown in the schematic diagram Figure 5 As shown in (d) in the figure, 36 different reference pixel points can be determined, and the angle between the center of the fitting circle O and the directions of the two adjacent reference pixel points is 10°. Figure 6 A schematic diagram of one of the reference pixel points Q is shown.
[0042] (3) Analyze the grayscale gradient of the pixels of the LDI target image to be located in the local area where each reference pixel is located to screen out the target edge pixel in the direction. This includes: calculating the grayscale gradient of each pixel of the LDI target image to be located in the local area where the reference pixel is located, and selecting the candidate edge pixel with the largest grayscale gradient as the target edge pixel in the current direction. The range of the local area where the reference pixel is located can be customized, such as Figure 6 Take a local area with the reference pixel point Q as the center point and including 11 pixels along the radial direction and 5 pixels perpendicular to the radial direction as an example.
[0043] Step 3, perform circle fitting on the target edge pixel points to obtain the target positioning result of the LDI target image to be positioned. By combining the model detection in step 1 and the gray gradient analysis in step 2, accurate target edge pixel points can be detected in different directions around the fitting circle center O, and then the position information of the target in the LDI target image to be positioned can be obtained by circle fitting, thereby achieving high-precision positioning of the LDI target edge. Common circle fitting methods, such as the least squares method, will not be described in detail in this embodiment.
[0044] Step 1 of the present application requires the use of an edge detection model to perform edge detection on the LDI target image to be located and obtain a detection result image. Before applying the edge detection model, the step of training the edge detection model is also included, including:
[0045] (1) Construct a training sample set and build Figure 2 The model structure of the edge detection model shown.
[0046] The training sample set includes several target sample images with annotated information. The annotation information of each target sample image indicates the real edge pixels and real non-edge pixels in the target sample image. The real edge pixel is a single pixel at the edge position of the LDI target in the target sample image, and the remaining pixels are all real non-edge pixels.
[0047] When constructing the training sample set, firstly, images of LDI targets with different shapes, types and edge features generated in the PCB production process are obtained as target sample images to ensure the diversity and representativeness of the training sample set. Then, a method combining digital image processing and manual annotation technology is used to add annotation information to the target sample images, and the single pixel point at the edge position of the LDI target in the target sample image is annotated as a true edge pixel point, and the remaining pixels are annotated as true non-edge pixels. The application of digital image processing technology can help to automatically generate annotation information, thereby improving the efficiency and accuracy of annotation. Combined with manual annotation, it can ensure the accurate understanding and positioning of the edge features of the LDI target, so that the generated annotation information can accurately reflect the actual edge position and provide high-quality training data for the deep learning model. The careful design of this operation process is aimed at providing the model with representative and accurate training data, so that it can learn and generalize to various types of LDI edge detection tasks, and achieve more accurate and reliable edge detection performance.
[0048] Then, the target sample images with added annotation information are expanded to construct a training sample set to form new target sample images with certain differences, thereby increasing the diversity and quantity of the training sample set, fully meeting the needs of deep learning models for a large amount of annotated data, further improving the generalization ability of deep learning models and improving their robustness, and reducing the risk of model overfitting. The dataset expansion operations used include rotation, translation, and noise addition. The rotation operation can change the direction of the image without changing its content, which helps the model learn features at different angles. The translation operation can simulate the situation of the image at different positions and help the model learn robustness to position changes. The noise addition operation introduces a certain degree of randomness and uncertainty, allowing the model to better adapt to noisy environments in the real world. The principle of these operation designs is to introduce changes that do not exist in the dataset so that the model is exposed to more different situations during training, thereby improving its generalization ability and adaptability to unknown data. Through data expansion, the model can better capture the distribution characteristics of the data, reduce dependence on specific samples, and thus perform more stably and reliably when facing new data.
[0049] (2) Input the target sample image into the model structure of the edge detection model that has been built, and output the prediction results based on the edge detection model. Combine the annotation information Y of the target sample image to calculate the loss function Loss = L t +α bt ×L bt +α txs ×L txs , and use the training sample set to train the model according to the loss function Loss.
[0050] In the training process of the edge detection model, the loss function plays a vital role. It defines the goals that need to be optimized during the training process of the edge detection model and guides the edge detection model to gradually adjust the parameters to improve the accuracy and robustness of edge detection. The design of the loss function directly affects the performance of the edge detection model. Different loss functions can help the model to improve in different aspects, such as accurately locating edges, reducing false detections, and suppressing noise. In edge detection tasks, traditional pixel-level losses (such as cross entropy losses) can no longer meet the needs of complex scenarios. Therefore, this embodiment designs a new loss function calculation method to comprehensively improve the detection capability of the model:
[0051] (1) Tracking loss term L t It is used to measure the difference between the prediction results output by the edge detection model and the annotation information of the target sample image. Tracking loss term L t The calculation formula is:
[0052]
[0053] Among them, ω j is the sample weight corresponding to any pixel point j in the target sample image. When pixel point j is a real edge pixel point in the target sample image, Y j =1 and When pixel j is a real non-edge pixel in the target sample image, Y j =0 and When the prediction result indicates that pixel j is a predicted edge pixel When the prediction result indicates that pixel j is a predicted non-edge pixel Among them, Y + Indicates the number of real edge pixels in the target sample image, Y - Represents the number of real non-edge pixels in the target sample image.
[0054] (2) Boundary tracking loss term L bt It is used to measure the difference between the predicted edge pixels in the prediction results output by the edge detection model and the actual edge pixels in the target sample image. bt is the boundary tracking loss term L bt The weight parameter of the boundary tracking loss term L bt The calculation formula is:
[0055]
[0056] Among them, E is the set of real edge pixels in the target sample image, D is a local area centered on any real edge pixel point p in the target sample image and covering a predetermined range. pIt is a local area The set of predicted edge pixels within is composed of, It is a local area The predicted non-edge pixel points in the set; when the prediction result indicates that the pixel point j is a predicted edge pixel point When the prediction result indicates that pixel j is a predicted non-edge pixel
[0057] (3) Texture suppression loss term L txs It is used to measure the difference between the predicted non-edge pixels in the prediction results output by the edge detection model and the actual non-edge pixels in the target sample image. txs is the texture suppression loss term L txs The weight parameter of the texture suppression loss term L txs The calculation formula is:
[0058]
[0059] Among them, Ω1 is the set of real non-edge pixels in the target sample image, It is a local area centered on any real non-edge pixel point q in the target sample image and covering a predetermined range. It is a local area The number of pixels within; when the prediction result indicates that pixel j is a predicted edge pixel When the prediction result indicates that pixel j is a predicted non-edge pixel
[0060] The above is only a preferred embodiment of the present application, and the present application is not limited to the above embodiments. It is understood that other improvements and changes directly derived or associated by those skilled in the art without departing from the spirit and concept of the present application should be considered to be included in the protection scope of the present application.
Claims
1. A high-precision positioning method for LDI targets based on deep learning, characterized in that: The LDI target high-precision positioning method comprises: An edge detection model is used to perform edge detection on the LDI target image to be located and obtain a detection result image, wherein the detection result image indicates candidate edge pixel points in the LDI target image to be located; the edge detection model is built and pre-trained based on a deep learning model, and the edge detection model includes a feature extraction layer, a parallel skip connection module and an edge prediction layer, wherein the feature extraction layer includes a plurality of stacked convolution modules and pooling modules, wherein the convolution module performs feature extraction by performing convolution operations to generate a feature map, and the pooling module is used to perform a pooling operation on the feature map by using wavelet transform; the parallel skip connection module extracts high-frequency information from the shallow feature map generated by the feature extraction layer by using wavelet transform and transmits it to the deep feature map for fusion; the edge prediction layer is used to map the feature map extracted by the feature extraction layer to the edge position in the LDI target image to be located; each pooling module in the edge detection model is designed based on a two-dimensional Haar wavelet transform, and each pooling module includes a first channel attention mechanism module, a 1*1 convolution layer, a Haar layer, a 1*1 convolution ... ar wavelet transform layer and second channel attention mechanism module, the Haar wavelet transform layer in the pooling module performs a two-dimensional Haar wavelet transform on the input feature map to obtain diagonal high-frequency information HH, vertical high-frequency information HL, horizontal high-frequency information LH and low-frequency component information LL, and then transmits them to the second channel attention mechanism module; each parallel skip connection module in the edge detection model is designed based on the two-dimensional Haar wavelet transform, and the output feature map of the parallel skip connection module is merged with the output feature map of the pooling module, so that the parallel skip connection module extracts the high-frequency information in the shallow feature map generated by the feature extraction layer and transmits it to the deep feature map for fusion, each parallel skip connection module includes a channel attention mechanism module, a 1*1 convolution layer, a Haar wavelet transform layer and a batch normalization layer connected in sequence from input to output, and the Haar wavelet transform layer in the parallel skip connection module performs a two-dimensional Haar wavelet transform on the input feature map to obtain diagonal high-frequency information HH, vertical high-frequency information HL, horizontal high-frequency information LH and low-frequency component information LL, and then transmits them to the batch normalization layer; Performing grayscale gradient analysis based on the candidate edge pixel points indicated by the detection result image and screening out target edge pixel points; A circle fitting is performed on the target edge pixel points to obtain a target positioning result for the LDI target image to be positioned.
2. The LDI target high-precision positioning method according to claim 1, characterized in that: The grayscale gradient analysis of the candidate edge pixels indicated by the detection result image includes: Perform circle fitting on all candidate edge pixels to obtain the fitting circle center and fitting circle radius; Determine the positions of the pixels whose straight-line distances from the center of the fitting circle in several different directions around the center of the fitting circle are the radius of the fitting circle as reference pixels, and the angle between the center of the fitting circle and the directions where two adjacent reference pixels are located does not exceed the angle threshold; The grayscale gradient of the pixel points of the LDI target image to be located in the local area where each reference pixel point is located is analyzed to screen out the target edge pixel points in the direction.
3. The LDI target high-precision positioning method according to claim 2, characterized in that: The step of filtering out the target edge pixel points in the direction includes for each reference pixel point: The grayscale gradients of the pixels in the local area where the reference pixel is located are calculated respectively, and the pixel with the largest grayscale gradient amplitude is selected as the target edge pixel in the current direction.
4. The LDI target high-precision positioning method according to claim 1, characterized in that: The LDI target high-precision positioning method also includes: Constructing a training sample set and building a model structure of the edge detection model, wherein the training sample set includes a plurality of target sample images with annotated information, and the annotated information of each target sample image indicates a real edge pixel point and a real non-edge pixel point in the target sample image; Input the target sample image into the model structure of the edge detection model that has been built, and output the prediction result according to the edge detection model. Combined with the annotation information of the target sample image Calculating the loss function , and according to the loss function Using the training sample set to perform model training; Among them, the tracking loss Used to measure the difference between the prediction result output by the edge detection model and the annotation information of the target sample image; Boundary tracking loss term Used to measure the difference between the predicted edge pixels in the prediction results output by the edge detection model and the real edge pixels in the target sample image; Texture suppression loss term Used to measure the difference between the predicted non-edge pixel points in the prediction result output by the edge detection model and the actual non-edge pixel points in the target sample image; is the boundary tracking loss term The weight parameter, is the texture suppression loss term The weight parameter of .
5. The LDI target high-precision positioning method according to claim 4, characterized in that: Tracking loss items The calculation formula is: in, is the image height of the target sample image, is the image width of the target sample image; is any pixel in the target sample image The corresponding sample weight, when the pixel When is the real edge pixel in the target sample image, and ; When the pixel When is the real non-edge pixel in the target sample image, and ; When the prediction result indicates the pixel To predict edge pixels , when the prediction result indicates the pixel To predict non-edge pixels ; Represents the number of real edge pixels in the target sample image, Represents the number of real non-edge pixels in the target sample image.
6. The LDI target high-precision positioning method according to claim 4, characterized in that: Boundary tracking loss The calculation formula is: in, is the image height of the target sample image, is the image width of the target sample image; is a set of real edge pixels in the target sample image. Any real edge pixel point in the target sample image A local area with a center and covering a predetermined range, It is a local area The set of predicted edge pixels within is composed of, It is a local area The predicted non-edge pixel points within the set; when the prediction result indicates that the pixel point To predict edge pixels , when the prediction result indicates the pixel To predict non-edge pixels .
7. The LDI target high-precision positioning method according to claim 4, characterized in that: Texture suppression loss The calculation formula is: in, is the image height of the target sample image, is the image width of the target sample image; is a set of real non-edge pixels in the target sample image. Any real non-edge pixel point in the target sample image A local area with a center and covering a predetermined range, It is a local area The number of pixels within; when the prediction result indicates the number of pixels To predict edge pixels , when the prediction result indicates the pixel To predict non-edge pixels .
8. The LDI target high-precision positioning method according to claim 4, characterized in that: Constructing a training sample set includes: Acquire images of LDI targets with different shapes, types and edge features generated in the PCB production process as target sample images, add annotation information to the target sample images by using a method combining digital image processing and manual annotation technology, and annotate a single pixel point at the edge position of the LDI target in the target sample image as a true edge pixel point, and annotate the remaining pixel points as true non-edge pixel points; The training sample set is constructed by performing a data set expansion operation on the target sample image with added annotation information, and the data set expansion operation includes rotation, translation, and adding noise.
Citation Information
Patent Citations
Multi-scene crack refined extraction method and system
CN117671415A
Spatial positioning method for multiple circular targets based on binocular vision
CN118052883A