Chip positioning method and system based on multi-focus image fusion

Through the chip positioning method based on multi-focus image fusion, the image out-of-focus problem caused by different chip thicknesses is solved, and high-precision chip positioning is achieved, which is efficient and robust, and is suitable for complex industrial scenarios.

CN119722603AActive Publication Date: 2025-03-28SUZHOU UNIV OF SCI & TECH +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411774293.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-05
Publication Date
2025-03-28
Estimated Expiration
2044-12-05

AI Technical Summary

Technical Problem

Existing chip positioning technology faces the problem of image out-of-focus caused by different chip thicknesses, making it difficult to achieve high-precision chip positioning in complex industrial scenarios.

Method used

The chip positioning method based on multi-focus image fusion is adopted to monitor the incoming chip signals in real time, collect the chip images, and construct the chip image data set for pre-processing. Then, a network model based on multi-focus image fusion is constructed, preprocessed image data is trained, the multi-focus chip image fusion and the chip body and background segmentation, and finally the precise positioning of the chip is achieved.

Benefits of technology

It improves the clarity and positioning accuracy of chip images, is efficient and robust, and can meet the needs of high-precision chip positioning in complex industrial scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119722603A_ABST
    Figure CN119722603A_ABST
Patent Text Reader

Abstract

The invention discloses a chip positioning method and system based on multi-focus image fusion, which are applied to accurate positioning of integrated circuit chips. Comprising the following steps: monitoring a chip incoming material signal in real time, and collecting a chip image; a chip image data set is constructed and preprocessed, and training set data and test set data are generated; constructing a network model based on multi-focus image fusion, and training the model through the preprocessed data; and fusing the multi-focus chip images by using the trained model, extracting a chip main body in the fused image, and segmenting a background to realize accurate positioning. The method improves the definition and positioning precision of the chip image, has high efficiency and robustness, and can be widely applied to the field of semiconductor manufacturing and automatic detection. The invention further provides a corresponding system, and automation of the whole process from image acquisition to positioning is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of chip positioning, and in particular to a chip positioning method and system based on multi-focus image fusion. Background Art

[0002] In recent years, with the widespread application of chips in high-precision fields, such as precision manufacturing, navigation systems and automatic control, chip positioning, as a basic issue in chip detection, has become increasingly important. The goal of chip positioning is to extract basic information from the top view of the chip, such as chip size, type (SOP, QFP, MBF) and angle with the horizontal plane. However, the problem of pin damage that often occurs during manual operation will directly affect the use of the chip and weaken the system performance. There is an urgent need for an intelligent chip positioning and grasping solution.

[0003] Existing chip positioning technologies are mainly divided into traditional methods and deep learning-based methods. Traditional methods screen by the shape and grayscale features of the image, but in the face of complex and diverse chips, it is difficult to meet the accuracy and efficiency requirements. Deep learning-based methods have been widely used in the fields of image fusion, image segmentation, and significant target detection by constructing data sets and selecting appropriate network models. At present, the advantages of this type of method are gradually emerging. For example, the improved YOLOv8-seg model can realize real-time detection and segmentation of chips, reduce the computational load while maintaining high accuracy and speed, and meet the needs of industrial automation detection.

[0004] However, in practical applications, the existing technology still has shortcomings. Chips of different types and thicknesses are often mixed on the loading table, which causes the depth of field of the imaging device to be unable to focus on all chips at the same time. Some chip images are out of focus, making it difficult for existing algorithms to accurately segment the chip body. This defocus problem has become a key bottleneck restricting the further development of deep learning algorithms in the field of chip positioning. In addition, with the increase in the complexity of chip design, traditional layout methods are difficult to cope with performance, power consumption, and area (PPA) optimization requirements. For example, the layout optimization method based on deep reinforcement learning (DRL) can dynamically adjust the netlist layout through empirical learning, but it has failed to effectively solve the problem of chip positioning accuracy caused by defocus.

[0005] In summary, the existing chip positioning method faces the problem of image defocus due to different chip thicknesses, and a more robust and efficient technical solution is urgently needed to meet the needs of high-precision chip positioning in complex industrial scenarios. Summary of the invention

[0006] In order to solve at least one of the above technical problems, the present invention proposes a chip positioning method and system based on multi-focus image fusion.

[0007] A first aspect of the present invention provides a chip positioning method based on multi-focus image fusion, comprising:

[0008] Real-time monitoring of the incoming signal of the chip, and acquisition of the chip image according to the incoming information of the chip;

[0009] Constructing a chip image data set according to the chip image, preprocessing the chip image data set, and constructing training set image data and test set image data to obtain preprocessed image data;

[0010] Constructing a network model based on multi-focus image fusion, and training the network model based on the pre-processed image data;

[0011] After the training is completed, multi-focus chip images are fused, the chip body and background are segmented in the fused image, and the chip is positioned according to the segmented body and background.

[0012] In this solution, the real-time monitoring of the incoming signal of the chip and the acquisition of the chip image according to the incoming information of the chip are specifically as follows:

[0013] Acquire the adjustable depth of field range data of the imaging device, adjust the depth of field of the imaging device to a maximum value according to the adjustable depth of field range data, and adjust the focal length of the imaging device to acquire the focus area of ​​the imaging device;

[0014] Two groups of chips with preset thickness are obtained for image acquisition, the incoming signals of the chips are monitored in real time, the chip position information is identified according to the incoming signals of the chips, and when the chips reach the focusing area, the chip images are acquired according to the imaging device.

[0015] In this solution, the chip image data set is constructed according to the chip image, the chip image data set is preprocessed, and training set image data and test set image data are constructed to obtain preprocessed image data, specifically:

[0016] Constructing a chip image data set from the collected chip images, and dividing the chip image data set into training set image data and test set image data according to preset ratios, wherein the preset ratios are 80% and 20% respectively;

[0017] Each image in the training set image data is cut into a plurality of non-overlapping image blocks of a preset pixel size to obtain pre-processed image data.

[0018] In this solution, the network model based on multi-focus image fusion is constructed, and the network model is trained based on the pre-processed image data, specifically:

[0019] Constructing a network model based on multi-focus image fusion, and importing the preprocessed image data into the enhanced dense connection module of the network model to extract enhanced high-frequency and low-frequency features;

[0020] The enhanced high-frequency and low-frequency features are mixed and input into the enhancement network to extract enhanced high-frequency features and enhanced low-frequency features;

[0021] The enhanced high-frequency features and enhanced low-frequency features are fused based on the cross-attention module of DeepLabv3 prior;

[0022] The loss function of the network model in the training process is calculated in real time, and the weight parameters of the network model are optimized.

[0023] In this solution, the pre-processed image data is imported into the enhanced dense connection module of the network model to extract enhanced high-frequency and low-frequency features, specifically:

[0024] Importing the preprocessed image data into an enhanced dense connection module, wherein the enhanced dense connection module includes a dense convolution layer, a transformation layer, and an enhancement module layer, wherein the dense convolution layer is connected in parallel with the transformation layer;

[0025] The dense convolution layer and the variation layer perform weighted splicing by receiving the imported pre-processed image data, and input the weighted spliced ​​pre-processed image data into the enhancement module layer;

[0026] The enhancement module layer performs enhancement operations on the low-frequency and high-frequency features of the preprocessed image data according to the spatial attention mechanism to obtain high-frequency and low-frequency features enhanced in preset dimensions.

[0027] In this solution, the enhanced high-frequency and low-frequency features are mixed and input into the enhanced network to extract enhanced high-frequency features and enhanced low-frequency features, specifically:

[0028] The enhanced high-frequency and low-frequency feature maps are mixed and input into the enhanced network to extract enhanced high-frequency features and enhanced low-frequency features. The enhanced network calculation formula is as follows:

[0029] F EH =E(F H +F L )×F H ,

[0030] F EL =E(F H +F L )×F L ,

[0031] Among them, F EH represents the enhanced high-frequency features, F ELrepresents the enhanced low-frequency feature, F H represents the high-frequency features before enhancement, F L represents the low-frequency features before enhancement, and E represents the spatial attention enhancement operation.

[0032] In this solution, the cross attention module based on DeepLabv3 prior integrates the enhanced high-frequency features and enhanced low-frequency features, specifically:

[0033] The enhanced high-frequency features and enhanced low-frequency features are imported into the cross-attention module based on DeepLabv3 prior. The attention calculation formula of the cross-attention module is as follows:

[0034]

[0035] Among them, Q, K, and V represent query, key, and value, respectively, and the query, key, and value are calculated by multiplying the input enhanced high-frequency features and enhanced low-frequency features by the trainable matrix, respectively. k is the dimension of K, B is the relatively learnable positional encoding, and softmax is the normalization function;

[0036] By performing the attention function h times and connecting the result to the multi-head attention, the feature tokens generated by the multi-head attention layer are refined by two multi-layer perceptron layers with GELU activation layers;

[0037] After executing multi-head attention and before multi-layer perceptron, the enhanced high-frequency features and enhanced low-frequency features are imported into the normalization layer for normalization operation. The normalization operation is expressed as:

[0038]

[0039] Given two local window features X from different domains 1 and X 2 , the weight matrix W shared across different windows Q , W V According to the normalization operation, the enhanced high-frequency features and enhanced low-frequency features after normalization are projected into Q, K, and V, and the fusion process is as follows:

[0040]

[0041] For Q1 from focal length 1, it merges cross-domain information by performing weighted attention on K2 and V2 from focal length 2, while retaining the information in focal length 1 through residual connection, where MHA is a multi-head attention layer;

[0042] After the complementary information of different focal lengths is fused, the CNN-based image reconstruction unit maps the fused enhanced high-frequency features and enhanced low-frequency features back to the image space to generate a fused image I f .

[0043] In this solution, the loss function of the network model in the training process is calculated in real time, and the weight parameters of the network model are optimized, specifically:

[0044] During the network model training process, by continuously reducing the error between the predicted quality score and the target quality score output by the network model, the ReLU activation function and the Adam optimizer are used as the optimization algorithm for automatically updating the learning rate of the network model. The loss function is calculated as follows:

[0045] L=γL aux +μL texture ,

[0046] Among them, L aux Indicates auxiliary strength loss, L texture Represents the gradient loss, γ and μ are weight factors used to control the contribution of each term. The gradient loss is designed to suppress the fusion result to keep important details from the input image. The formula is as follows:

[0047]

[0048] Where H and W represent the height and width of the source image, respectively, and ‖·‖ represents l 1 norm, max(·) refers to the element-by-element maximum selection, I f is the fusion result graph, I 1 and I 2 These are the source images in two focusing states.

[0049] In this solution, the multi-focus chip image fusion is performed according to the trained network model, the chip body and background are segmented for the fused image, and the chip is positioned according to the segmented body and background, specifically:

[0050] Obtain the top view of the chip at different focal lengths, import the top view of the chip into the trained multi-focus image fusion network model, and use the YOLOv8-seg segmentation algorithm to segment the chip body and chip pins from the background according to the grayscale values;

[0051] Based on the feature extraction algorithm, the chip pixel coordinates, area, angle and chip type information of the segmented chip body, chip pins and background are extracted, and the chip is positioned according to the chip pixel coordinates, area, angle and chip type information.

[0052] The second aspect of the present invention also provides a chip positioning system based on multi-focus image fusion, the system comprising: a memory and a processor, the memory comprising a chip positioning method program based on multi-focus image fusion, and when the chip positioning method based on multi-focus image fusion is executed by the processor, the steps of the chip positioning method based on multi-focus image fusion as described in any one of the above items are implemented.

[0053] The present invention discloses a chip positioning method and system based on multi-focus image fusion, which is applied to the precise positioning of integrated circuit chips. It includes: real-time monitoring of chip incoming signals and collecting chip images; constructing a chip image data set and preprocessing it to generate training set and test set data; constructing a network model based on multi-focus image fusion, and training the model through preprocessing data; using the trained model to fuse the multi-focus chip images, extract the chip body in the fused image and segment the background to achieve precise positioning. The present invention improves the clarity and positioning accuracy of the chip image, has high efficiency and robustness, and can be widely used in the fields of semiconductor manufacturing and automated detection. A corresponding system is also provided to achieve full process automation from image acquisition to positioning. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 A flow chart of a chip positioning method based on multi-focus image fusion according to the present invention is shown;

[0055] Figure 2 A schematic diagram of an imaging system of the present invention is shown;

[0056] in, Figure 2 middle:

[0057] 1. Optical camera, 2. Middle hole light source, 3. Lens, 4. IC chip, 5. Loading platform.

[0058] Figure 3 A schematic diagram of the network structure of the multi-focus image fusion model of the present invention is shown. DETAILED DESCRIPTION

[0059] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.

[0060] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.

[0061] Figure 1A flow chart of a chip positioning method based on multi-focus image fusion of the present invention is shown.

[0062] like Figure 1 As shown, the first aspect of the present invention provides a chip positioning method based on multi-focus image fusion, comprising:

[0063] S102, monitoring the incoming signal of the chip in real time, and collecting the chip image according to the incoming information of the chip;

[0064] S104, constructing a chip image data set according to the chip image, preprocessing the chip image data set, and constructing training set image data and test set image data to obtain preprocessed image data;

[0065] S106, constructing a network model based on multi-focus image fusion, and training the network model based on the pre-processed image data;

[0066] S108, performing multi-focus chip image fusion according to the trained network model, segmenting the chip body and background of the fused image, and locating the chip according to the segmented body and background.

[0067] According to an embodiment of the present invention, the S102 is specifically:

[0068] Acquire the adjustable depth of field range data of the imaging device, adjust the depth of field of the imaging device to a maximum value according to the adjustable depth of field range data, and adjust the focal length of the imaging device to acquire the focus area of ​​the imaging device;

[0069] Two groups of chips with preset thickness are obtained for image acquisition, the incoming signals of the chips are monitored in real time, the chip position information is identified according to the incoming signals of the chips, and when the chips reach the focusing area, the chip images are acquired according to the imaging device.

[0070] According to an embodiment of the present invention, the S104 is specifically:

[0071] A training data set is obtained and preprocessed; wherein the training data set includes two groups, the imaging device is adjusted to maximize the depth of field, and then the focal length is adjusted to make the thickest chip and the thinnest chip respectively in the best focus position, and the images collected twice are used as the multi-focus input of the data set. The imaging system is as follows Figure 2 As shown;

[0072] For the images in the above dataset, they are randomly divided into two parts, where 80% of the image samples are used for training and the remaining 20% ​​are used for testing. This ensures that the model can be effectively verified on both training and test data.

[0073] For the images used for training, the images are cropped into multiple non-overlapping 64×64 pixel blocks. This helps the network learn more detailed features and improves the accuracy of image fusion.

[0074] According to the embodiment of the present invention, the S106 is specifically:

[0075] The cropped image blocks are input into the Enhanced Dense Block (EDB) in the multi-focus image fusion model. Each EDB contains a dense convolutional neural network (DC), a transform layer (TR), and an enhancement module (EM). In order to prevent the extraction of high-frequency features and low-frequency features from interfering with each other, the DC layer and the TR layer are connected in parallel. The inputs of the DC layer and the TR layer are input into the EM layer by weighted splicing. The low-frequency and high-frequency features are enhanced respectively through the spatial attention mechanism of the EM layer. After four EDB layers, a 48×16-dimensional feature map is obtained.

[0076] The enhanced low-frequency and high-frequency feature maps are mixed and input into the enhanced network respectively, and the calculation is as follows:

[0077] F EH =E(F H +F L )×F H ,

[0078] F EL =E(F H +F L )×F L ,

[0079] Among them, F EH represents the enhanced high-frequency features, F EL represents the enhanced low-frequency feature, F H represents the high-frequency features before enhancement, F L represents the low-frequency features before enhancement, and E represents the spatial attention enhancement operation.

[0080] The enhanced high-frequency features F of the fusion input EH and strengthen the low frequency characteristics F EL , and input it into the Cross Attention module (CA) based on DeepLabv3 prior. The attention calculation formula is as follows:

[0081]

[0082] Where Q, K, and V represent query, key, and value, respectively, and are calculated by multiplying the input by the trainable matrix. k is the dimension of K, B is the relatively learnable positional encoding, and softmax is the normalization function.

[0083] By performing the attention function h times and connecting the result to the multi-head self-attention, where h is set to 4 in the work. Next, the feature tokens generated by the Multi Head Attention (MHA) layer are refined by two Multilayer Perceptron (MLP) layers with GELU activation layers. The normalization layer (LaylerNormalization, LN) is performed after MHA and before MLP. The complete process can be expressed as:

[0084]

[0085] Given two local window features X from different domains 1 and X 2 , the weight matrix W shared across different windows Q , W V They are projected into Q, K, and V in the above way. The whole process of cross-attention based fusion is formalized as:

[0086]

[0087] For Q1 from focal length 1, it merges cross-domain information by performing weighted attention on K2 and V2 from focal length 2, while preserving the information in focal length 1 through residual connections, and vice versa.

[0088] After fully fusing the complementary information of different focal lengths, we designed a CNN-based image reconstruction unit to map the fused deep features back to the image space. Deployment of the CNN-based image reconstruction unit H CR To reduce the number of channels and generate a fused image I f , which is expressed as:

[0089] I f =H CR (F D ),

[0090] Calculate the loss function and optimize the weight parameters. When training the network model, continuously reduce the error between the predicted quality score and the target quality score output by the network model, and continuously optimize the weight parameters of the network model. The activation function uses the ReLU activation function, and the Adam (Adaptive moment estimation) optimization algorithm automatically updates the learning rate. The batch-size is set to 64, the learning rate is fixed to 0.001, and the loss function calculation formula is shown below:

[0091] L=γL aux +μL texture ,

[0092] Among them, L aux Indicates auxiliary strength loss, L texture Denotes the gradient loss. γ and μ are weight factors used to control the contribution of each term. The gradient loss is designed to suppress the fusion result to keep important details from the input image, and its formula is as follows:

[0093]

[0094] Where H and W represent the height and width of the source image respectively. ‖·‖ represents l 1 norm, max(·) refers to the element-by-element maximum selection, I f is the fusion result graph, I 1 and I 2 These are the source images in two focusing states.

[0095] For auxiliary intensity loss, an excellent image fusion algorithm expects to generate a fused image with appropriate intensity based on the global apparent intensity information of the source images. To this end, we design the following auxiliary intensity loss to guide our fusion model to capture appropriate intensity information:

[0096]

[0097] According to the embodiment of the present invention, the S108 is specifically:

[0098] The trained model is used to fuse the top views of the chip at different focal lengths. The YOLOv8-seg segmentation algorithm is used to segment the chip body, chip pins and background according to the grayscale values. The feature extraction algorithm is then used to extract basic information such as the chip’s pixel coordinates, area, angle and chip type.

[0099] The second aspect of the present invention also provides a chip positioning system based on multi-focus image fusion, the system comprising: a memory and a processor, the memory comprising a chip positioning method program based on multi-focus image fusion, and when the chip positioning method based on multi-focus image fusion is executed by the processor, the steps of the chip positioning method based on multi-focus image fusion as described in any one of the above items are implemented.

[0100] The present invention discloses a chip positioning method and system based on multi-focus image fusion, which is applied to the precise positioning of integrated circuit chips. It includes: real-time monitoring of chip incoming signals and collecting chip images; constructing a chip image data set and preprocessing it to generate training set and test set data; constructing a network model based on multi-focus image fusion, and training the model through preprocessing data; using the trained model to fuse the multi-focus chip images, extract the chip body in the fused image and segment the background to achieve precise positioning. The present invention improves the clarity and positioning accuracy of the chip image, has high efficiency and robustness, and can be widely used in the fields of semiconductor manufacturing and automated detection. A corresponding system is also provided to achieve full process automation from image acquisition to positioning.

[0101] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0102] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0103] In addition, all functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0104] Those skilled in the art can understand that: all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiments; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), disks or optical disks, and other media that can store program codes.

[0105] Alternatively, if the above-mentioned integrated unit of the present invention is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention can be essentially or partly reflected in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, RAM, magnetic disks or optical disks.

[0106] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A chip positioning method based on multi-focus image fusion, characterized in that: The following steps are involved: Real-time monitoring of the incoming signal of the chip, and acquisition of the chip image according to the incoming information of the chip; Constructing a chip image data set according to the chip image, preprocessing the chip image data set, and constructing training set image data and test set image data to obtain preprocessed image data; Constructing a network model based on multi-focus image fusion, and training the network model based on the pre-processed image data; After the training is completed, multi-focus chip images are fused, the chip body and background are segmented in the fused image, and the chip is positioned according to the segmented body and background.

2. A chip positioning method based on multi-focus image fusion according to claim 1, characterized in that: The real-time monitoring of the incoming signal of the chip and the acquisition of the chip image according to the incoming information of the chip are specifically as follows: Acquire the adjustable depth of field range data of the imaging device, adjust the depth of field of the imaging device to a maximum value according to the adjustable depth of field range data, and adjust the focal length of the imaging device to acquire the focus area of ​​the imaging device; Two groups of chips with preset thickness are obtained for image acquisition, the incoming signals of the chips are monitored in real time, the chip position information is identified according to the incoming signals of the chips, and when the chips reach the focusing area, the chip images are acquired according to the imaging device.

3. The chip positioning method based on multi-focus image fusion according to claim 1, characterized in that: The chip image data set is constructed according to the chip image, the chip image data set is preprocessed, and training set image data and test set image data are constructed to obtain preprocessed image data, specifically: Constructing a chip image data set from the collected chip images, and dividing the chip image data set into training set image data and test set image data according to preset ratios, wherein the preset ratios are 80% and 20% respectively; Each image in the training set image data is cut into a plurality of non-overlapping image blocks of a preset pixel size to obtain pre-processed image data.

4. The chip positioning method based on multi-focus image fusion according to claim 1, characterized in that: The constructing of a network model based on multi-focus image fusion and training of the network model based on the pre-processed image data are specifically as follows: Constructing a network model based on multi-focus image fusion, and importing the preprocessed image data into the enhanced dense connection module of the network model to extract enhanced high-frequency and low-frequency features; The enhanced high-frequency and low-frequency features are mixed and input into the enhancement network to extract enhanced high-frequency features and enhanced low-frequency features; The enhanced high-frequency features and enhanced low-frequency features are fused based on the cross-attention module of DeepLabv3 prior; The loss function of the network model in the training process is calculated in real time, and the weight parameters of the network model are optimized.

5. The chip positioning method based on multi-focus image fusion according to claim 4, characterized in that: The step of importing the pre-processed image data into the enhanced dense connection module of the network model to extract enhanced high-frequency and low-frequency features is specifically as follows: Importing the preprocessed image data into an enhanced dense connection module, wherein the enhanced dense connection module includes a dense convolution layer, a transformation layer, and an enhancement module layer, wherein the dense convolution layer is connected in parallel with the transformation layer; The dense convolution layer and the variation layer perform weighted splicing by receiving the imported pre-processed image data, and input the weighted spliced ​​pre-processed image data into the enhancement module layer; The enhancement module layer performs enhancement operations on the low-frequency and high-frequency features of the preprocessed image data according to the spatial attention mechanism to obtain high-frequency and low-frequency features enhanced in preset dimensions.

6. The chip positioning method based on multi-focus image fusion according to claim 4, characterized in that: The enhanced high-frequency and low-frequency features are mixed and input into the enhanced network to extract enhanced high-frequency features and enhanced low-frequency features, specifically: The enhanced high-frequency and low-frequency feature maps are mixed and input into the enhanced network to extract enhanced high-frequency features and enhanced low-frequency features. The enhanced network calculation formula is as follows: F EH =E(F H +F L )×F H , F EL =E(F H +F L )×F L , Among them, F EH represents the enhanced high-frequency features, F EL represents the enhanced low-frequency feature, F H represents the high-frequency features before enhancement, F L represents the low-frequency features before enhancement, and E represents the spatial attention enhancement operation.

7. The chip positioning method based on multi-focus image fusion according to claim 4, characterized in that: The cross attention module based on DeepLabv3 prior fuses the enhanced high-frequency features and enhanced low-frequency features, specifically: The enhanced high-frequency features and enhanced low-frequency features are imported into the cross-attention module based on DeepLabv3 prior. The attention calculation formula of the cross-attention module is as follows: Among them, Q, K, and V represent query, key, and value, respectively, and the query, key, and value are calculated by multiplying the input enhanced high-frequency features and enhanced low-frequency features by the trainable matrix, respectively. k is the dimension of K, B is the relatively learnable positional encoding, and softmax is the normalization function; By executing the attention function h times and connecting the result to the multi-head attention, h is set to 4 here. The feature labels generated by the multi-head attention layer are refined by two multi-layer perceptron layers with GELU activation layers; After executing multi-head attention and before multi-layer perceptron, the enhanced high-frequency features and enhanced low-frequency features are imported into the normalization layer for normalization operation. The normalization operation is expressed as: Given two local window features X1 and X2 from different domains, the weight matrix W shared across different windows is Q , W V According to the normalization operation, the enhanced high-frequency features and enhanced low-frequency features after normalization are projected into Q, K, and V, and the fusion process is as follows: For Q1 from focal length 1, it merges cross-domain information by performing weighted attention on K2 and V2 from focal length 2, while retaining the information in focal length 1 through residual connection, where MHA is a multi-head attention layer; After the complementary information of different focal lengths is fused, the CNN-based image reconstruction unit maps the fused enhanced high-frequency features and enhanced low-frequency features back to the image space to generate a fused image I f .

8. The chip positioning method based on multi-focus image fusion according to claim 4, characterized in that: The real-time calculation of the loss function of the network model in the training process and the optimization of the weight parameters of the network model are specifically as follows: During the network model training process, by continuously reducing the error between the predicted quality score and the target quality score output by the network model, the ReLU activation function and the Adam optimizer are used as the optimization algorithm for automatically updating the learning rate of the network model. The loss function is calculated as follows: L=γL aux +μL texture , Among them, L aux Indicates auxiliary strength loss, L texture Represents the gradient loss, γ and μ are weight factors used to control the contribution of each term. The gradient loss is designed to suppress the fusion result to keep important details from the input image. The formula is as follows: where H and W represent the height and width of the source image, respectively, ‖·‖ represents the l1 norm, max(·) refers to the element-wise maximum value selection, and I f is the fusion result image, I1 and I2 are the source images in two focusing states respectively.

9. The chip positioning method based on multi-focus image fusion according to claim 1, characterized in that: The multi-focus chip image fusion is performed according to the trained network model, the chip body and background are segmented on the fused image, and the chip is positioned according to the segmented body and background, specifically: Obtain the top view of the chip at different focal lengths, import the top view of the chip into the trained multi-focus image fusion network model, and use the YOLOv8-seg segmentation algorithm to segment the chip body and chip pins from the background according to the grayscale values; Based on the feature extraction algorithm, the chip pixel coordinates, area, angle and chip type information of the segmented chip body, chip pins and background are extracted, and the chip is positioned according to the chip pixel coordinates, area, angle and chip type information.

10. A chip positioning system based on multi-focus image fusion, characterized in that: The system includes a memory and a processor, wherein the memory includes a chip positioning method program based on multi-focus image fusion, and when the chip positioning method based on multi-focus image fusion is executed by the processor, the steps of the chip positioning method based on multi-focus image fusion as described in any one of claims 1 to 9 are implemented.

Citation Information

Patent Citations

  • Method and device for integrating multi-source image fusion

    CN118711032A

  • Multifunctional high-precision shooting locator

    CN212231554U