CN115439720A - CAM image reconstruction method, CAM image training method, CAM image reconstruction device, CAM image training device and CAM image training medium - Google Patents

CAM image reconstruction method, CAM image training method, CAM image reconstruction device, CAM image training device and CAM image training medium Download PDF

Info

Publication number
CN115439720A
CN115439720A CN202211388848.7A CN202211388848A CN115439720A CN 115439720 A CN115439720 A CN 115439720A CN 202211388848 A CN202211388848 A CN 202211388848A CN 115439720 A CN115439720 A CN 115439720A
Authority
CN
China
Prior art keywords
image
cam
vrs
sample set
generation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202211388848.7A
Other languages
Chinese (zh)
Other versions
CN115439720B (en
Inventor
不公告发明人
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Shulian Cloud Computing Technology Co ltd
Original Assignee
Chengdu Shulian Cloud Computing Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengdu Shulian Cloud Computing Technology Co ltd filed Critical Chengdu Shulian Cloud Computing Technology Co ltd
Priority to CN202211388848.7A priority Critical patent/CN115439720B/en
Publication of CN115439720A publication Critical patent/CN115439720A/en
Application granted granted Critical
Publication of CN115439720B publication Critical patent/CN115439720B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/774Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/30Circuit design
    • G06F30/39Circuit design at the physical level
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/761Proximity, similarity or dissimilarity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30141Printed circuit board [PCB]

Abstract

The application discloses a CAM image reconstruction method, a training device, equipment and a medium, aims to solve the technical problem that the difference between the CAM image of the existing printed circuit board and the VRS image of the actual printed circuit board is large, and relates to the field of circuit board image processing. The method for reconstructing the CAM image comprises the following steps: acquiring a CAM initial image of a target circuit board; inputting the CAM initial image into a CAM image reconstruction model obtained by training so as to output a CAM image; the CAM image reconstruction model is obtained by training an initial generative confrontation network model constructed by utilizing an input sample set and a generation sample set; the input sample set is obtained based on a number of CAM sample images; the generation sample set is obtained based on a plurality of VRS target generation images; the CAM sample image and the VRS target generation image are obtained by performing template matching processing using a CAM image and a VRS image of the same circuit board.

Description

CAM image reconstruction method, CAM image training method, CAM image reconstruction device, CAM image training device and CAM image training medium
Technical Field
The present application relates to the field of circuit board image processing, and in particular, to a method, an apparatus, a device, and a medium for reconstructing a CAM image.
Background
A Printed Circuit Board (PCB) is usually processed according to a CAM (computer Aided Manufacturing) diagram designed in advance during production and Manufacturing, but is limited by a process level and a process design of a factory, and a CAM diagram of a PCB based on actual production often has a larger difference from a VRS (virtual rescan) diagram of the actual PCB, thereby causing a lower defect recognition rate of subsequent PCBs.
Disclosure of Invention
The application mainly aims to provide a method, a training method, a device, equipment and a medium for reconstructing a CAM image, and aims to solve the technical problem that the existing printed circuit board CAM image is greatly different from an actual printed circuit board VRS image.
In order to solve the above technical problem, an embodiment of the present application provides: a method of reconstructing a CAM image, comprising the steps of:
acquiring a CAM initial image of a target circuit board;
inputting the CAM initial image into a CAM image reconstruction model obtained through training so as to output a CAM image;
the CAM image reconstruction model is obtained by training an initial generative confrontation network model constructed by utilizing an input sample set and a generation sample set; the input sample set is obtained based on a number of CAM sample images; the generation sample set is obtained based on a plurality of VRS target generation images; the CAM sample image and the VRS target generation image are obtained by performing template matching processing using a CAM image and a VRS image of the same circuit board.
As some optional embodiments of the present application, the matching score of the CAM image and the VRS image is consistent with a preset matching score.
In specific application, the difference between the CAM image output by the CAM image reconstruction model and the VRS image can be further reduced by setting a preset matching score according to actual requirements.
As some optional embodiments of the present application, before inputting the CAM initial image into the CAM image reconstruction model to output a CAM image, the method further includes:
acquiring CAM images and VRS images of a plurality of circuit boards;
performing template matching processing by using the CAM image and the VRS image to respectively obtain a CAM sample image and a VRS target generation image;
obtaining an input sample set based on a number of the CAM sample images; generating an image based on a plurality of VRS targets, and obtaining a generation sample set;
and training the constructed initial generation type confrontation network model by using the input sample set and the generation sample set to obtain a CAM image reconstruction model.
In a specific application, before the CAM image reconstruction model is put into practical application, the CAM image reconstruction model needs to be specially trained, namely, a CAM sample image and a VRS target generation image obtained after the CAM image and the VRS image are subjected to template matching processing are respectively used as an input sample set and a generation sample set to train the constructed initial generation type confrontation network model, and the obtained CAM image reconstruction model can perform model reconstruction on the CAM sample image and is a CAM image which is almost not different from the VRS target generation image.
As some optional embodiments of the present application, the performing a template matching process using the CAM image and the VRS image to obtain a CAM sample image and a VRS target generation image respectively includes:
performing template matching processing by using the CAM image and the VRS image to obtain a target area matched with the CAM image and the VRS image;
based on the target area, a CAM sample image and a VRS target generation image are obtained, respectively.
In specific application, template matching processing is carried out on the CAM image and the VRS image to obtain target areas matched with the CAM image and the VRS image, and a CAM sample image and a VRS target generation image are respectively obtained on the basis of the target areas; the CAM sample image and the VRS target generation image can form a one-to-one picture pair, so that the reconstruction efficiency of the CAM image reconstruction model on the CAM initial image is improved.
As some optional embodiments of the present application, the performing a template matching process using the CAM image and the VRS image to obtain a target area where the CAM image and the VRS image match includes:
overlapping and placing the CAM image above the VRS image, and obtaining similar target areas of the CAM image and the VRS image by sliding the CAM image;
and carrying out similarity comparison on the plurality of similar target areas, and selecting the similar target area with the highest similarity as a final target area.
In a specific application, when the CAM image and the VRS image are subjected to template matching, a plurality of similar target regions may be encountered, and after the matching score calculation is performed on the plurality of similar target regions, the similar target region with the highest similarity is selected as a final target region; in practical application, the reconstruction efficiency of the CAM image reconstruction model on the CAM initial image is improved.
As some optional embodiments of the present application, the obtaining the CAM sample image and the VRS target generation image based on the target area respectively includes:
based on the target area, cutting an image area corresponding to the target area in the CAM image to obtain a CAM sample image;
and based on the target area, cutting an image area corresponding to the target area in the VRS image to obtain a VRS target generation image.
In specific application, the same target area is cut for the CAM image and the VRS image based on the target area to obtain the CAM image and the VRS image corresponding to the same target area, and the CAM image and the VRS image are respectively used as a CAM sample image and a VRS target generation image, so that in practical application, one-to-one corresponding image pairs can be formed between the CAM sample image and the VRS target generation image, and the reconstruction efficiency of the CAM image reconstruction model on the CAM initial image is improved.
As some optional embodiments of the present application, the area of the VRS target generation image and the CAM sample image are the same and equal to the area of the target region.
In specific application, based on the target area, after the same target area is cut between the CAM image and the VRS image, the areas of the obtained CAM sample image and the VRS target generation image are the same and equal to the area of the target area; therefore, a one-to-one corresponding picture pair can be formed between the CAM sample image and the VRS target generation image, and the reconstruction efficiency of the CAM image reconstruction model on the CAM initial image is improved.
As some optional embodiments of the present application, the training the constructed initial generative confrontation network model by using the input sample set and the generation sample set to obtain the CAM image reconstruction model includes:
constructing an initial generation type confrontation network model;
training the initial generative confrontation network model by using the input sample set and the generation sample set; during training, the CAM in the input sample set is used a1 After the sample image is input into the initially generated confrontation network model, the initially generated confrontation network model generates an output CAM b1 An image;
computing the CAM b1 VRS in image and the generated sample set 1 And (3) matching scores of the images, and stopping training until the matching scores reach preset matching scores to obtain a CAM image reconstruction model.
In specific application, when the CAM image reconstruction model is trained, the CAM is preset b1 VRS in image and the generated sample set 1 Target matching score of image, CAM output by the CAM image reconstruction model b1 Image and VRS 1 Stopping training after the image difference degree is reduced to a preset value, so that the CAM output by the CAM image reconstruction model is reduced when the CAM image reconstruction model is actually applied b1 VRS in image and the generated sample set 1 The difference between the images.
As some optional embodiments of the present application, the CAM b1 VRS in image and the generated sample set 1 The matching score of the image is obtained by the following relation:
Figure 732066DEST_PATH_IMAGE001
wherein: the R (x, y) represents the CAM b1 VRS in image and the generated sample set 1 Matching scores of the images; the T (x ', y') is VRS 1 Coordinate information of the image; the I (x + x ', y + y') is CAM a1 Coordinate information of the sample image; the (x, y) is coordinate information of the target area point in the CAM image, and the (x ', y') is coordinate information of the target area point in the VRS image.
In a specific application, the CAM is calibrated by the formula b1 VRS in image and the generated sample set 1 Calculating a matching score for the image to further reduce CAM output by the CAM image reconstruction model b1 VRS in image and the generated sample set 1 The difference between the images.
In order to solve the above technical problem, the embodiment of the present application further provides: a training method of a CAM image reconstruction model comprises the following steps:
acquiring CAM images and VRS images of a plurality of circuit boards;
performing template matching processing by using the CAM image and the VRS image to respectively obtain a CAM sample image and a VRS target generation image;
obtaining an input sample set based on a number of the CAM sample images; generating an image based on a plurality of VRS targets, and obtaining a generation sample set;
and training the constructed initial generation type confrontation network model by using the input sample set and the generation sample set to obtain a CAM image reconstruction model.
In specific application, the CAM image reconstruction model is trained through the method, namely the CAM sample image and the VRS target generation image obtained after the CAM image and the VRS image are subjected to template matching processing are respectively used as an input sample set and a generation sample set to train the constructed initial generation type countermeasure network model, and the obtained CAM image reconstruction model can reconstruct the CAM sample image and is a CAM image which is almost not different from the VRS target generation image.
As some optional embodiments of the present application, the performing a template matching process using the CAM image and the VRS image to obtain a CAM sample image and a VRS target generation image respectively includes:
performing template matching processing by using the CAM image and the VRS image to obtain a target area matched with the CAM image and the VRS image;
based on the target area, a CAM sample image and a VRS target generation image are obtained, respectively.
In specific application, template matching processing is carried out on the CAM image and the VRS image to obtain target areas matched with the CAM image and the VRS image, and a CAM sample image and a VRS target generation image are respectively obtained on the basis of the target areas; the CAM sample image and the VRS target generation image can form a one-to-one picture pair, so that the reconstruction efficiency of the CAM image reconstruction model on the CAM initial image is improved.
As some optional embodiments of the present application, the performing a template matching process by using the CAM image and the VRS image to obtain a target area where the CAM image and the VRS image match includes:
overlapping the CAM image on the VRS image, and obtaining a similar target area of the CAM image and the VRS image by sliding the CAM image;
and carrying out similarity comparison on a plurality of similar target areas, and selecting the similar target area with the highest similarity as a final target area.
In a specific application, when the CAM image and the VRS image are subjected to template matching, a plurality of similar target regions may be encountered, and after the matching score calculation is performed on the plurality of similar target regions, the similar target region with the highest similarity is selected as a final target region; in practical application, the reconstruction efficiency of the CAM image reconstruction model on the CAM initial image is improved.
As some optional embodiments of the present application, the obtaining the CAM sample image and the VRS target generation image based on the target area respectively includes:
based on the target area, cutting an image area corresponding to the target area in the CAM image to obtain a CAM sample image;
and based on the target area, cutting an image area corresponding to the target area in the VRS image to obtain a VRS target generation image.
In specific application, the same target area is cut for the CAM image and the VRS image based on the target area to obtain the CAM image and the VRS image corresponding to the same target area, and the CAM image and the VRS image are respectively used as a CAM sample image and a VRS target generation image, so that in practical application, one-to-one corresponding image pairs can be formed between the CAM sample image and the VRS target generation image, and the reconstruction efficiency of the CAM image reconstruction model on the CAM initial image is improved.
As some optional embodiments of the present application, the area of the VRS target generation image and the CAM sample image are the same and equal to the area of the target region.
In specific application, based on the target area, after the same target area is cut between the CAM image and the VRS image, the areas of the obtained CAM sample image and the VRS target generation image are the same and equal to the area of the target area; therefore, a one-to-one corresponding picture pair can be formed between the CAM sample image and the VRS target generation image, and the reconstruction efficiency of the CAM image reconstruction model on the CAM initial image is improved.
As some optional embodiments of the present application, the training the constructed initial generative confrontation network model by using the input sample set and the generation sample set to obtain the CAM image reconstruction model includes:
constructing an initial generation type confrontation network model;
training the initial generative confrontation network model by using the input sample set and the generation sample set; during training, the CAM in the input sample set is used a1 After the sample image is input into the initially generated confrontation network model, the initially generated confrontation network model generates an output CAM b1 An image;
computing the CAM b1 VRS in image and the generated sample set 1 And (3) matching scores of the images, and stopping training until the matching scores reach preset matching scores to obtain a CAM image reconstruction model.
In specific application, when the CAM image reconstruction model is trained, the CAM is preset b1 VRS in image and the generated sample set 1 Target matching score of image, so that the CAM image reconstructs the CAM output by the model b1 Image and VRS 1 Stopping training after the image difference degree is reduced to a preset value, so that the CAM output by the CAM image reconstruction model is reduced when the CAM image reconstruction model is actually applied b1 VRS in image and the generated sample set 1 The difference between the images.
As some optional embodiments of the present application, the CAM b1 VRS in image and the generated sample set 1 The matching score of the image is obtained by the following relation:
Figure 930966DEST_PATH_IMAGE002
wherein: the R (x, y) represents the CAM b1 VRS in image and the generated sample set 1 Matching scores of the images; t (x ', y') is VRS 1 Coordinate information of the image; the I (x + x ', y + y') is CAM a1 Coordinate information of the sample image; the (x, y) is coordinate information of the target area point in the CAM image, and the (x ', y') is coordinate information of the target area point in the VRS image.
In a specific application, the CAM is calibrated by the formula b1 VRS in image and the generated sample set 1 Calculating a matching score for the image to further reduce CAM output by the CAM image reconstruction model b1 VRS in image and the generated sample set 1 The difference between the images.
In order to solve the above technical problem, the embodiment of the present application further provides: a CAM image reconstruction apparatus comprising:
the drawing module is used for drawing a CAM initial image of the target circuit board;
the output module is used for inputting the CAM initial image into a CAM image reconstruction model obtained through training so as to output a CAM image; the CAM image reconstruction model is obtained by training an initial generative confrontation network model constructed by utilizing an input sample set and a generation sample set; the input sample set is obtained based on a number of CAM sample images; the generation sample set is obtained based on a plurality of VRS target generation images; the CAM sample image and the VRS target generation image are obtained by performing template matching processing using a CAM image and a VRS image of the same circuit board.
In order to solve the above technical problem, the embodiment of the present application further provides: a training device of a CAM image reconstruction model comprises:
the acquisition module is used for acquiring CAM images and VRS images of a plurality of circuit boards;
the template matching module is used for performing template matching processing by utilizing the CAM image and the VRS image to respectively obtain a CAM sample image and a VRS target generation image;
the collection module is used for obtaining an input sample set based on a plurality of CAM sample images; generating an image based on a plurality of VRS targets, and obtaining a generation sample set;
and the training module is used for training the constructed initial generation type confrontation network model by utilizing the input sample set and the generation sample set to obtain a CAM image reconstruction model.
In order to solve the above technical problem, the embodiment of the present application further provides: an electronic device comprising a memory in which a computer program is stored and a processor executing the computer program, implementing the method as described above.
In order to solve the above technical problem, the embodiment of the present application further provides: a computer-readable storage medium having stored thereon a computer program, which computer program is executed by a processor to implement a method as described above.
Compared with the prior art, the CAM image reconstruction method has the advantages that after the CAM initial image of the target circuit board is obtained, the CAM initial image is input into a CAM image reconstruction model obtained through training so as to output the CAM image; wherein the CAM image reconstruction model is obtained by training an initial generative confrontation network model constructed by utilizing an input sample set and a generation sample set; the input sample set is obtained based on a number of CAM sample images; the generation sample set is obtained based on a plurality of VRS target generation images; the CAM sample image and the VRS target generation image are obtained by performing template matching processing using a CAM image and a VRS image of the same circuit board. According to the embodiment of the application, the constructed initial generation type countermeasure network model is trained through the input sample set and the generation sample set to obtain the CAM image reconstruction model, so that when the CAM image reconstruction model is put into practical application, the CAM initial image can be reconstructed and then output to obtain the CAM image, the CAM image can infinitely approach the VRS target generation image of the PCB corresponding to the CAM initial image through model reconstruction, the difference between the CAM image and the VRS target generation image of the PCB is reduced, and the defect recognition rate of the PCB in the subsequent process is improved.
Drawings
FIG. 1 is a schematic diagram of an electronic device architecture of a hardware operating environment according to an embodiment of the present application;
FIG. 2 is a schematic flowchart of a method for reconstructing a CAM image according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a CAM initial image according to an embodiment of the application;
FIG. 4 is a schematic diagram of a CAM image according to an embodiment of the application;
FIG. 5 is a VRS target generation image according to an embodiment of the present application;
FIG. 6 is a flowchart illustrating a method for training a CAM image reconstruction model according to an embodiment of the present application;
FIG. 7 is a distribution diagram of the number of match scores 1 and the number of match scores 2 according to an embodiment of the present application;
fig. 8 is a functional block diagram of a CAM image reconstruction apparatus according to an embodiment of the present application;
fig. 9 is a functional block diagram of a training apparatus for a CAM image reconstruction model according to an embodiment of the present application.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The main solution of the embodiment of the application is as follows: a method, a device, equipment and a medium for reconstructing a CAM image are provided, wherein a CAM initial image of a target circuit board is obtained; inputting the CAM initial image into a CAM image reconstruction model obtained by training so as to output a CAM image; the CAM image reconstruction model is obtained by training an initial generative confrontation network model constructed by utilizing an input sample set and a generation sample set; the input sample set is obtained based on a number of CAM sample images; the generation sample set is obtained based on a plurality of VRS target generation images; the CAM sample image and the VRS target generation image are obtained by performing template matching processing using a CAM image and a VRS image of the same circuit board.
In the prior art, a PCB is usually processed according to a CAM diagram designed in advance during production and manufacturing, but is limited by the process level and the process design of a factory, and the CAM diagram of the printed circuit board during actual production often has a large difference from the VRS diagram of the actual printed circuit board, for example, although the PCB obtained by actual production meets various functional requirements designed by the CAM image, the PCB obtained by actual production has a significant difference from the CAM image in terms of circuit routing, line width, pad size and other elements, and these differences cause technical problems of low recognition efficiency and the like when an intelligent defect detection system such as a subsequent AOI (automatic Optical Inspection), an ADC (Analog-to-Digital Converter, or Analog-to-Digital Converter) and the like performs automatic defect recognition on a PCB product. If the defects on the PCB product can not be identified, the circuit connection and short circuit can be easily caused when the PCB product is put into practical application, and the whole PCB is scrapped. Therefore, if the difference between the CAM diagram and the VRS diagram can be reduced before the PCB product is produced and manufactured, the automatic identification efficiency of the intelligent defect detection system such as the follow-up AOI, the ADC and the like on the defect part of the PCB product can be greatly improved.
Referring to fig. 1, fig. 1 is a schematic structural diagram of an electronic device in a hardware operating environment according to an embodiment of the present application.
As shown in fig. 1, the electronic device may include: a processor 1001, such as a Central Processing Unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a WIreless interface (e.g., a WIreless-FIdelity (WI-FI) interface). The Memory 1005 may be a Random Access Memory (RAM) Memory, or may be a Non-Volatile Memory (NVM), such as a disk Memory. The memory 1005 may alternatively be a storage device separate from the processor 1001 described previously.
Those skilled in the art will appreciate that the configuration shown in fig. 1 does not constitute a limitation of the electronic device, and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, the memory 1005, which is a storage medium, may include therein an operating system, a data storage module, a network communication module, a user interface module, and an electronic program.
In the electronic apparatus shown in fig. 1, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 of the electronic device according to the present invention may be disposed in the electronic device, and the electronic device invokes, through the processor 1001, a CAM image reconstruction apparatus and a CAM image reconstruction model training apparatus stored in the memory 1005, and executes the CAM image reconstruction method and the CAM image reconstruction model training method provided in the embodiments of the present application.
Referring to fig. 2, an embodiment of the present application provides a method for reconstructing a CAM image, including the steps of:
and S10, acquiring a CAM initial image of the target circuit board.
In a specific application, the target circuit board is a circuit board which needs to be detected whether to have defects, and the CAM initial image is an image which is manufactured by computer assistance according to various functional requirements of the target circuit board.
And S20, inputting the CAM initial image into a CAM image reconstruction model obtained through training so as to output a CAM image.
In a specific application, the CAM initial image is input into a CAM image reconstruction model obtained by training so as to output a CAM image. Taking a specific printed circuit board as an example, for example, the CAM initial image shown in fig. 3 is input into a CAM image reconstruction model obtained by training to output a CAM image shown in fig. 4, and a VRS target generation image of the circuit board is shown in fig. 5; it can be seen that the CAM image obtained by the model reconstruction process has extremely high similarity to the VRS image, and almost no difference exists.
In a specific application, the CAM image reconstruction model is obtained by training an initial generation type confrontation network model constructed by utilizing an input sample set and a generation sample set; the input sample set is obtained based on a number of CAM sample images; the generation sample set is obtained based on a plurality of VRS target generation images; the CAM sample image and the VRS target generation image are obtained by performing template matching processing using a CAM image and a VRS image of the same circuit board.
As some optional embodiments of the present application, the matching score of the CAM image and the VRS image is consistent with a preset matching score.
In specific application, before the CAM image reconstruction model is trained, the input sample set and the generated sample set are subjected to screening processing, namely, a CAM sample image and a VRS target generated image which correspond to each other one by one are obtained after the CAM image and the VRS image of the same circuit board are subjected to template matching processing, so that the difference between the CAM image and the VRS image output by the CAM image reconstruction model is continuously reduced in the training process.
As some optional embodiments of the present application, before inputting the CAM initial image into the CAM image reconstruction model to output a CAM image, the method further includes:
and S01, acquiring CAM images and VRS images of a plurality of circuit boards.
In a specific application, the CAM image refers to an image which is manufactured by computer assistance according to various functional requirements on a target circuit board; the VRS image is a VRS image obtained by electronically detecting a scanned image through a Virtual Rescan (VRS) of Kofax, and the VRS image can be a black-and-white image or an original VRS image which is a color image, but the color original VRS image can be converted into the black-and-white image for the convenience of subsequently calculating the matching degree with the CAM image output by the CAM image reconstruction model; if the image is subjected to binarization processing by using OPENCV, the image is converted into a black-and-white image taking only two pixel values of 0 and 255.
And S02, performing template matching processing by using the CAM image and the VRS image to respectively obtain a CAM sample image and a VRS target generation image.
In a specific application, the steps comprise: performing template matching processing by using the CAM image and the VRS image to obtain a target area matched with the CAM image and the VRS image; based on the target area, a CAM sample image and a VRS target generation image are obtained, respectively. Through the steps, a one-to-one corresponding picture pair can be formed between the CAM sample image and the VRS target generation image, so that the reconstruction efficiency of the CAM image reconstruction model on the CAM initial image is improved.
In a specific application, the obtaining a target area where the CAM image is matched with the VRS image by performing template matching processing on the CAM image and the VRS image includes: overlapping and placing the CAM image above the VRS image, and obtaining similar target areas of the CAM image and the VRS image by sliding the CAM image; and carrying out similarity comparison on the plurality of similar target areas, and selecting the similar target area with the highest similarity as a final target area. In actual operation, when the CAM image and the VRS image are subjected to template matching, a plurality of similar target regions may be encountered, and after the matching score calculation is performed on the plurality of similar target regions, the similar target region with the highest similarity is selected as a final target region; in practical application, the reconstruction efficiency of the CAM image reconstruction model on the CAM initial image is improved.
In a specific application, the obtaining a CAM sample image and a VRS target generation image based on the target area respectively includes: based on the target area, cutting an image area corresponding to the target area in the CAM image to obtain a CAM sample image; and based on the target area, cutting an image area corresponding to the target area in the VRS image to obtain a VRS target generation image. In actual operation, the same target area is cut into the CAM image and the VRS image based on the target area to obtain the CAM image and the VRS image corresponding to the same target area, and the CAM image and the VRS image are respectively used as a CAM sample image and a VRS target generation image, so that in practical application, one-to-one corresponding image pairs can be formed between the CAM sample image and the VRS target generation image, and the reconstruction efficiency of the CAM image reconstruction model on the CAM initial image is improved.
In specific application, after the CAM image and the VRS image are processed through a template to obtain a similar target area with the highest similarity, the corresponding area is used as a target area, the target area can be subjected to coordinate marking, and pixels corresponding to the coordinates are cut to obtain the CAM sample image and a VRS target generation image.
It should be noted that the areas of the VRS target generation image and the CAM sample image are the same and equal to the area of the target region. In specific application, based on the target area, after the same target area is cut between the CAM image and the VRS image, the areas of the obtained CAM sample image and the VRS target generation image are the same and equal to the area of the target area; therefore, a one-to-one corresponding picture pair can be formed between the CAM sample image and the VRS target generation image, and the reconstruction efficiency of the CAM image reconstruction model on the CAM initial image is improved.
S03, obtaining an input sample set based on a plurality of CAM sample images; generating an image based on a number of the VRS targets, obtaining a generation sample set.
In a specific application, the CAM sample images in the input sample set and the VRS target generation images in the generation sample set are in a one-to-one correspondence relationship; and performing matching score calculation on the CAM image output by the CAM image reconstruction model and the corresponding VRS target generation image after each round of training is finished so as to judge whether the training is finished.
And S04, training the constructed initial generation type confrontation network model by using the input sample set and the generation sample set to obtain a CAM image reconstruction model.
In a specific application, the training of the constructed initial generation type confrontation network model by using the input sample set and the generation sample set to obtain a CAM image reconstruction model includes: constructing an initial generation type confrontation network model; training the initial generative confrontation network model by using the input sample set and the generation sample set; during training, the CAM in the input sample set is used a1 After the sample image is input into the initially generated confrontation network model, the initially generated confrontation network model generates an output CAM b1 An image; computing the CAM b1 VRS in image and the generated sample set 1 And (3) matching scores of the images, and stopping training until the matching scores reach preset matching scores to obtain a CAM image reconstruction model. When the CAM image reconstruction model is trained, the CAM is preset b1 VRS in image and the generated sample set 1 Target matching score of image, so that the CAM image reconstructs the CAM output by the model b1 Image and VRS 1 Stopping training after the image difference degree is reduced to a preset value, so that the CAM image reconstruction model is reduced in practical applicationCAM with low CAM image reconstruction model output b1 VRS in image and the generated sample set 1 The difference between the images.
Wherein the CAM b1 VRS in image and the generated sample set 1 The matching score of the image is obtained by the following relation:
Figure 537528DEST_PATH_IMAGE003
wherein: the R (x, y) represents the CAM b1 VRS in image and the generated sample set 1 Matching scores of the images; the T (x ', y') is VRS 1 Coordinate information of the image; the I (x + x ', y + y') is CAM a1 Coordinate information of the sample image; the (x, y) is coordinate information of the target area point in the CAM image, and the (x ', y') is coordinate information of the target area point in the VRS image.
In a specific application, the CAM is calibrated by the formula b1 VRS in image and the generated sample set 1 Calculating the matching score of the image to further reduce the CAM output by the CAM image reconstruction model b1 VRS in image and the generated sample set 1 The difference between the images. The predetermined match score represents the CAM b1 Image and the VRS 1 In this embodiment, the preset matching score may be set as needed, or may be obtained through historical data; for example, according to the historical data, the matching score can be automatically identified by the follow-up intelligent defect detection systems such as the AOI and the ADC, so as to set the preset matching score. It should be understood that the above is only an example, and the technical solution of the present application is not limited in any way, and those skilled in the art can set the solution based on the needs in practical application, and the solution is not limited herein.
In a specific application, before the CAM image reconstruction model is put into practical application, the CAM image reconstruction model needs to be specially trained, namely, a CAM sample image and a VRS target generation image obtained after the CAM image and the VRS image are subjected to template matching processing are respectively used as an input sample set and a generation sample set to train the constructed initial generation type confrontation network model, and the obtained CAM image reconstruction model can perform model reconstruction on the CAM sample image and is a CAM image which is almost not different from the VRS target generation image.
Compared with the prior art, the CAM image reconstruction method has the advantages that after the CAM initial image of the target circuit board is obtained, the CAM initial image is input into a CAM image reconstruction model obtained through training so as to output the CAM image; wherein the CAM image reconstruction model is obtained by training an initial generative confrontation network model constructed by utilizing an input sample set and a generation sample set; the input sample set is obtained based on a number of CAM sample images; the generation sample set is obtained based on a plurality of VRS target generation images; the CAM sample image and the VRS target generation image are obtained by performing template matching processing using a CAM image and a VRS image of the same circuit board. The CAM image reconstruction model can be obtained by training the constructed initial generation type countermeasure network model through inputting a sample set and generating the sample set, so that when the CAM image reconstruction model is put into practical application, an input CAM initial image can be reconstructed and then output to obtain a CAM image, the CAM image can be infinitely close to a VRS target generation image of a PCB corresponding to the CAM initial image through model reconstruction, the difference between the CAM image and the VRS target generation image of the PCB is reduced, and the defect recognition rate of the PCB in a subsequent process is improved.
Based on the same inventive concept, as shown in fig. 6, the embodiment of the present application further proposes: a training method of a CAM image reconstruction model comprises the following steps:
s21, acquiring CAM images and VRS images of a plurality of circuit boards.
In a specific application, the CAM image refers to an image which is manufactured by computer assistance according to various functional requirements on a target circuit board; the VRS image is a VRS image obtained by electronically detecting a scanned image through a Virtual Rescan (VRS) of Kofax, and the VRS image can be a black-and-white image or an original VRS image which is a color image, but the color original VRS image can be converted into the black-and-white image for the convenience of carrying out the matching degree calculation with the CAM image output by the CAM image reconstruction model in the follow-up process; if the image is subjected to binarization processing by using OPENCV, the image is converted into a black-and-white image taking only two pixel values of 0 and 255.
And S22, performing template matching processing by using the CAM image and the VRS image to respectively obtain a CAM sample image and a VRS target generation image.
In a specific application, the steps comprise: performing template matching processing by using the CAM image and the VRS image to obtain a target area matched with the CAM image and the VRS image; based on the target area, a CAM sample image and a VRS target generation image are obtained, respectively. Through the steps, a one-to-one corresponding picture pair can be formed between the CAM sample image and the VRS target generation image, so that the reconstruction efficiency of the CAM image reconstruction model on the CAM initial image is improved.
In a specific application, the performing a template matching process by using the CAM image and the VRS image to obtain a target area matching the CAM image and the VRS image includes: overlapping the CAM image on the VRS image, and obtaining a similar target area of the CAM image and the VRS image by sliding the CAM image; and carrying out similarity comparison on a plurality of similar target areas, and selecting the similar target area with the highest similarity as a final target area. In actual operation, when the CAM image and the VRS image are subjected to template matching, a plurality of similar target regions may be encountered, and after the matching score calculation is performed on the plurality of similar target regions, the similar target region with the highest similarity is selected as a final target region; in practical application, the reconstruction efficiency of the CAM image reconstruction model on the CAM initial image is improved.
In a specific application, the obtaining a CAM sample image and a VRS target generation image based on the target area respectively includes: based on the target area, cutting an image area corresponding to the target area in the CAM image to obtain a CAM sample image; and based on the target area, cutting an image area corresponding to the target area in the VRS image to obtain a VRS target generation image. In actual operation, the same target area is cut into the CAM image and the VRS image based on the target area to obtain the CAM image and the VRS image corresponding to the same target area, and the CAM image and the VRS image are respectively used as a CAM sample image and a VRS target generation image, so that in practical application, one-to-one corresponding image pairs can be formed between the CAM sample image and the VRS target generation image, and the reconstruction efficiency of the CAM image reconstruction model on the CAM initial image is improved.
In specific application, after the CAM image and the VRS image are processed through a template to obtain a similar target area with the highest similarity, the corresponding area is used as a target area, the target area can be subjected to coordinate marking, and pixels corresponding to the coordinates are cut to obtain the CAM sample image and a VRS target generation image.
It should be noted that the areas of the VRS target generation image and the CAM sample image are the same and equal to the area of the target region. In specific application, based on the target area, after the same target area is cut between the CAM image and the VRS image, the areas of the obtained CAM sample image and the VRS target generation image are the same and equal to the area of the target area; therefore, a one-to-one corresponding picture pair can be formed between the CAM sample image and the VRS target generation image, and the reconstruction efficiency of the CAM image reconstruction model on the CAM initial image is improved.
S23, obtaining an input sample set based on the CAM sample images; generating an image based on a number of the VRS targets, obtaining a generation sample set.
In specific application, the CAM sample image in the input sample set and the VRS target generation image in the generation sample set are in one-to-one correspondence; and performing matching score calculation on the CAM image output by the CAM image reconstruction model and the corresponding VRS target generation image after each round of training is finished so as to judge whether the training is finished.
And S24, training the constructed initial generation type confrontation network model by using the input sample set and the generation sample set to obtain a CAM image reconstruction model.
In a specific application, the training of the constructed initial generation type confrontation network model by using the input sample set and the generation sample set to obtain a CAM image reconstruction model includes: constructing an initial generation type confrontation network model; training the initial generative confrontation network model by using the input sample set and the generation sample set; during training, the CAM in the input sample set is used a1 After the sample image is input into the initially generated confrontation network model, the initially generated confrontation network model generates an output CAM b1 An image; computing the CAM b1 VRS in image and the generated sample set 1 And (3) matching scores of the images, and stopping training until the matching scores reach preset matching scores to obtain a CAM image reconstruction model. When the CAM image reconstruction model is trained, the CAM is preset b1 VRS in image and the generated sample set 1 Target matching score of image, CAM output by the CAM image reconstruction model b1 Image and VRS 1 Stopping training after the image difference degree is reduced to a preset value, so that the CAM output by the CAM image reconstruction model is reduced when the CAM image reconstruction model is actually applied b1 VRS in image and the generated sample set 1 The difference between the images.
Wherein the CAM b1 VRS in image and the generated sample set 1 The matching score of the image is obtained by the following relation:
Figure 530892DEST_PATH_IMAGE004
wherein: the R (x, y) represents the CAM b1 VRS in image and the generated sample set 1 Matching scores of the images; t (x ', y') is VRS 1 Coordinate information of the image; the I (x + x ', y + y') is CAM a1 Coordinate information of the sample image; the (x, y) is coordinate information of the target area point in the CAM image, and the (x ', y') is coordinate information of the target area point in the VRS image.
In a specific application, the CAM is calibrated by the formula b1 VRS in image and the generated sample set 1 Calculating a matching score for the image to further reduce CAM output by the CAM image reconstruction model b1 VRS in image and the generated sample set 1 The difference between the images. The predetermined match score represents the CAM b1 Image and the VRS 1 In this embodiment, the preset matching score may be set as needed, or may be obtained through historical data; for example, according to the historical data, the matching score can be automatically identified by the follow-up intelligent defect detection systems such as the AOI and the ADC, so as to set the preset matching score. It should be understood that the above is only an example, and the technical solution of the present application is not limited in any way, and those skilled in the art can make the setting based on the actual application, and the setting is not limited herein.
In a specific application, before the CAM image reconstruction model is put into practical application, the CAM image reconstruction model needs to be specially trained, namely, a CAM sample image and a VRS target generation image obtained after the CAM image and the VRS image are subjected to template matching processing are respectively used as an input sample set and a generation sample set to train the constructed initial generation type confrontation network model, and the obtained CAM image reconstruction model can perform model reconstruction on the CAM sample image and is a CAM image which is almost not different from the VRS target generation image.
In order to verify whether the difference between the CAM image output by the CAM image reconstruction model obtained by training through the method and the VRS target generation image is obviously reduced or not, namely to verify the effectiveness of the CAM image reconstruction model, the method carries out template matching score calculation on the CAM initial image and the VRS target generation image respectively to obtain a matching score 1; and performing template matching score calculation on the CAM image output after model reconstruction and the VRS target generation image to obtain a matching score 2. Based on a plurality of circuit boards, obtaining a plurality of pairs of CAM initial images-CAM images-VRS target generation images, and based on the pairs of CAM initial images-CAM images-VRS target generation images, obtaining a plurality of matching scores 1 and a plurality of matching scores 2; a matching score distribution graph is obtained based on the matching scores 1 and the matching scores 2, as shown in fig. 7, in the graph, the X axis represents the size of the matching score, the y axis represents the distribution number under the current matching score, and it is obvious that the median of the right distribution graph is about 0.97 and is obviously larger than the left distribution. Therefore, as can be seen from fig. 7, the matching degree between the CAM image output by the CAM image reconstruction model and the VRS target generation image is greatly improved, that is, the CAM image reconstruction model is effective to reduce the difference between the CAM image and the VRS target generation image.
Based on the same inventive concept, as shown in fig. 8, the embodiment of the present application further proposes: a reconstruction apparatus of a CAM image, comprising:
the drawing module is used for drawing a CAM initial image of the target circuit board;
the output module is used for inputting the CAM initial image into a CAM image reconstruction model obtained through training so as to output a CAM image; the CAM image reconstruction model is obtained by training an initial generative confrontation network model constructed by utilizing an input sample set and a generation sample set; the input sample set is obtained based on a number of CAM sample images; the generation sample set is obtained based on a plurality of VRS target generation images; the CAM sample image and the VRS target generation image are obtained by performing template matching processing using a CAM image and a VRS image of the same circuit board.
It should be noted that, in the present embodiment, each block in the apparatus for reconstructing a CAM image corresponds to each step in the method for reconstructing a CAM image in the foregoing embodiment one to one, and therefore, for a specific implementation of the present embodiment, reference may be made to the implementation of the method for reconstructing a CAM image, and details are not repeated here.
Based on the same inventive concept, as shown in fig. 9, the embodiment of the present application further provides: a training device for a CAM image reconstruction model comprises:
the acquisition module is used for acquiring CAM images and VRS images of a plurality of circuit boards;
the template matching module is used for performing template matching processing by utilizing the CAM image and the VRS image to respectively obtain a CAM sample image and a VRS target generation image;
the collection module is used for obtaining an input sample set based on a plurality of CAM sample images; generating an image based on a plurality of VRS targets, and obtaining a generation sample set;
and the training module is used for training the constructed initial generation type confrontation network model by utilizing the input sample set and the generation sample set to obtain a CAM image reconstruction model.
It should be noted that, in this embodiment, each module in the training apparatus for the CAM image reconstruction model corresponds to each step in the training method for the CAM image reconstruction model in the foregoing embodiment, and therefore, the specific implementation of this embodiment may refer to the implementation of the training method for the CAM image reconstruction model, and is not described here again.
Furthermore, in one embodiment, the present application further provides a computer program product, which when executed by a processor, implements the foregoing method.
Furthermore, in an embodiment, an embodiment of the present application further provides a computer storage medium having a computer program stored thereon, where the computer program is executed by a processor to implement the steps of the method in the foregoing embodiments.
In some embodiments, the computer-readable storage medium may be memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash, magnetic surface memory, optical disk, or CD-ROM; or may be various devices including one or any combination of the above memories. The computer may be a variety of computing devices including intelligent terminals and servers.
In some embodiments, the executable instructions may be in the form of a program, software module, script, or code written in any form of programming language, including compiled or interpreted languages, or declarative or procedural languages, and it may be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.
By way of example, executable instructions may correspond, but do not necessarily have to correspond, to files in a file system, and may be stored in a portion of a file that holds other programs or data, such as in one or more scripts in a hypertext Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files that store one or more modules, sub-programs, or portions of code).
As an example, executable instructions may be deployed to be executed on one computing device or on multiple computing devices located at one site or distributed across multiple sites and interconnected by a communication network.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of other like elements in a process, method, article, or system comprising the element.
The above-mentioned serial numbers of the embodiments of the present application are merely for description, and do not represent the advantages and disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (e.g., a rom/ram, a magnetic disk, an optical disk) and includes instructions for enabling a multimedia terminal (e.g., a mobile phone, a computer, a television receiver, or a network device) to perform the method according to the embodiments of the present application.
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings of the present application, or which are directly or indirectly applied to other related technical fields, are included in the scope of the present application.

Claims (20)

1. A method for reconstructing a CAM image, comprising the steps of:
acquiring a CAM initial image of a target circuit board;
inputting the CAM initial image into a CAM image reconstruction model obtained through training so as to output a CAM image;
the CAM image reconstruction model is obtained by training an initial generative confrontation network model constructed by utilizing an input sample set and a generation sample set; the input sample set is obtained based on a number of CAM sample images; the generation sample set is obtained based on a plurality of VRS target generation images; the CAM sample image and the VRS target generation image are obtained by performing template matching processing using a CAM image and a VRS image of the same circuit board.
2. The method for reconstructing the CAM image according to claim 1, wherein a matching score between the CAM image and the VRS image is consistent with a preset matching score.
3. The method according to claim 1, further comprising, before inputting the CAM initial image into the CAM image reconstruction model to output a CAM image:
acquiring CAM images and VRS images of a plurality of circuit boards;
performing template matching processing by using the CAM image and the VRS image to respectively obtain a CAM sample image and a VRS target generation image;
obtaining an input sample set based on a plurality of CAM sample images; generating an image based on a plurality of VRS targets, and obtaining a generation sample set;
and training the constructed initial generation type confrontation network model by using the input sample set and the generation sample set to obtain a CAM image reconstruction model.
4. The method according to claim 3, wherein the obtaining a CAM sample image and a VRS target generation image by performing template matching processing using the CAM image and the VRS image, respectively, comprises:
performing template matching processing by using the CAM image and the VRS image to obtain a target area matched with the CAM image and the VRS image;
based on the target area, a CAM sample image and a VRS target generation image are obtained, respectively.
5. The method according to claim 4, wherein the obtaining a target region where the CAM image and the VRS image match by performing template matching processing using the CAM image and the VRS image includes:
overlapping and placing the CAM image above the VRS image, and obtaining similar target areas of the CAM image and the VRS image by sliding the CAM image;
and carrying out similarity comparison on a plurality of similar target areas, and selecting the similar target area with the highest similarity as a final target area.
6. The method according to claim 4, wherein the obtaining the CAM sample image and the VRS target generation image based on the target area respectively comprises:
based on the target area, cutting an image area corresponding to the target area in the CAM image to obtain a CAM sample image;
and based on the target area, cutting an image area corresponding to the target area in the VRS image to obtain a VRS target generation image.
7. The method according to claim 6, wherein the area of the VRS target generation image and the area of the CAM sample image are the same and equal to the area of the target region.
8. The method for reconstructing the CAM image according to claim 3, wherein the training the constructed initial generative confrontation network model by using the input sample set and the generation sample set to obtain the CAM image reconstruction model comprises:
constructing an initial generation type confrontation network model;
training the initial generative confrontation network model by using the input sample set and the generation sample set; during training, the CAM in the input sample set is used a1 After the sample image is input into the initially generated confrontation network model, the initially generated confrontation network model generates an output CAM b1 An image;
computing the CAM b1 VRS in image and the generated sample set 1 And (3) matching scores of the images, and stopping training until the matching scores reach preset matching scores to obtain a CAM image reconstruction model.
9. The method of claim 8, wherein the CAM image is reconstructed from the CAM image b1 VRS in image and the generated sample set 1 The matching score of the image is obtained by the following relation:
Figure 204093DEST_PATH_IMAGE001
wherein: the R (x, y) represents the CAM b1 VRS in image and the generated sample set 1 Matching scores of the images; t (x ', y') is VRS 1 Coordinate information of the image; the I (x + x ', y + y') is CAM a1 Coordinate information of the sample image; the (x, y) is coordinate information of the target area point in the CAM image, and the (x ', y') is coordinate information of the target area point in the VRS image.
10. A training method of a CAM image reconstruction model is characterized by comprising the following steps:
acquiring CAM images and VRS images of a plurality of circuit boards;
performing template matching processing by using the CAM image and the VRS image to respectively obtain a CAM sample image and a VRS target generation image;
obtaining an input sample set based on a number of the CAM sample images; generating an image based on a plurality of VRS targets, and obtaining a generation sample set;
and training the constructed initial generation type confrontation network model by using the input sample set and the generation sample set to obtain a CAM image reconstruction model.
11. The method for training the CAM image reconstruction model according to claim 10, wherein the performing the template matching process using the CAM image and the VRS image to obtain the CAM sample image and the VRS target generation image respectively comprises:
performing template matching processing by using the CAM image and the VRS image to obtain a target area matched with the CAM image and the VRS image;
based on the target area, a CAM sample image and a VRS target generation image are obtained, respectively.
12. The method for training a CAM image reconstruction model according to claim 11, wherein the performing a template matching process using the CAM image and the VRS image to obtain a target region where the CAM image and the VRS image match comprises:
overlapping and placing the CAM image above the VRS image, and obtaining similar target areas of the CAM image and the VRS image by sliding the CAM image;
and carrying out similarity comparison on a plurality of similar target areas, and selecting the similar target area with the highest similarity as a final target area.
13. The method for training the CAM image reconstruction model according to claim 11, wherein the obtaining the CAM sample image and the VRS target generation image based on the target region respectively comprises:
based on the target area, cutting an image area corresponding to the target area in the CAM image to obtain a CAM sample image;
and based on the target area, cutting an image area corresponding to the target area in the VRS image to obtain a VRS target generation image.
14. The method for training the CAM image reconstruction model according to claim 13, wherein the VRS target generation image and the CAM sample image have the same area and are equal to the area of the target region.
15. The method for training the CAM image reconstruction model according to claim 10, wherein the training the constructed initial generative confrontation network model by using the input sample set and the generation sample set to obtain the CAM image reconstruction model comprises:
constructing an initial generation type confrontation network model;
training the initial generative confrontation network model by using the input sample set and the generation sample set; in the training process, the CAM in the input sample set a1 After the sample image is input into the initially generated confrontation network model, the initially generated confrontation network model generates an output CAM b1 An image;
computing stationThe CAM b1 VRS in image and the generated sample set 1 And (3) matching scores of the images, and stopping training until the matching scores reach preset matching scores to obtain a CAM image reconstruction model.
16. The method of claim 15, wherein the CAM is configured as a CAM image reconstruction model b1 VRS in image and the generated sample set 1 The matching score of the image is obtained by the following relation:
Figure 26556DEST_PATH_IMAGE001
wherein: the R (x, y) represents the CAM b1 VRS in image and the generated sample set 1 Matching scores of the images; t (x ', y') is VRS 1 Coordinate information of the image; the I (x + x ', y + y') is CAM a1 Coordinate information of the sample image; the (x, y) is coordinate information of the target area point in the CAM image, and the (x ', y') is coordinate information of the target area point in the VRS image.
17. A CAM image reconstruction device, comprising:
the drawing module is used for drawing a CAM initial image of the target circuit board;
the output module is used for inputting the CAM initial image into a CAM image reconstruction model obtained through training so as to output a CAM image; the CAM image reconstruction model is obtained by training an initial generative confrontation network model constructed by utilizing an input sample set and a generation sample set; the input sample set is obtained based on a number of CAM sample images; the generation sample set is obtained based on a plurality of VRS target generation images; the CAM sample image and the VRS target generation image are obtained by performing template matching processing using a CAM image and a VRS image of the same circuit board.
18. A training device for a CAM image reconstruction model is characterized by comprising:
the acquisition module is used for acquiring CAM images and VRS images of a plurality of circuit boards;
the template matching module is used for performing template matching processing by utilizing the CAM image and the VRS image to respectively obtain a CAM sample image and a VRS target generation image;
the collection module is used for obtaining an input sample set based on a plurality of CAM sample images; generating an image based on a plurality of VRS targets, and obtaining a generation sample set;
and the training module is used for training the constructed initial generation type confrontation network model by utilizing the input sample set and the generation sample set to obtain a CAM image reconstruction model.
19. An electronic device, characterized in that the electronic device comprises a memory in which a computer program is stored and a processor, which executes the computer program, implementing the method according to any of claims 1-16.
20. A computer-readable storage medium, having a computer program stored thereon, which, when executed by a processor, performs the method of any one of claims 1-16.
CN202211388848.7A 2022-11-08 2022-11-08 CAM image reconstruction method, training method, device, equipment and medium Active CN115439720B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211388848.7A CN115439720B (en) 2022-11-08 2022-11-08 CAM image reconstruction method, training method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211388848.7A CN115439720B (en) 2022-11-08 2022-11-08 CAM image reconstruction method, training method, device, equipment and medium

Publications (2)

Publication Number Publication Date
CN115439720A true CN115439720A (en) 2022-12-06
CN115439720B CN115439720B (en) 2023-01-24

Family

ID=84252614

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211388848.7A Active CN115439720B (en) 2022-11-08 2022-11-08 CAM image reconstruction method, training method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN115439720B (en)

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2075640U (en) * 1990-08-09 1991-04-24 煤炭工业部重庆煤矿设计研究院 Electronic speed controller for fixed transport apparatus
DE19722365A1 (en) * 1996-05-28 1997-12-04 Nat Semiconductor Corp Reconfigurable computer component with adaptive logic processor
TW201130113A (en) * 2010-02-16 2011-09-01 Zvi Or-Bach System comprising a semiconductor device and structure
CN103631982A (en) * 2013-07-11 2014-03-12 吉林化工学院 Reverse engineering digital model reconstruction method based on PRO/E
CN104769774A (en) * 2012-04-04 2015-07-08 Hrl实验室有限责任公司 Antenna array with wide-band reactance reduction
CN107346061A (en) * 2012-08-21 2017-11-14 Fotonation开曼有限公司 For the parallax detection in the image using array camera seizure and the system and method for correction
US20180168490A1 (en) * 2016-12-15 2018-06-21 Progenity Inc. Ingestible device and associated methods
US20180293712A1 (en) * 2017-04-06 2018-10-11 Pixar Denoising monte carlo renderings using generative adversarial neural networks
CN109461167A (en) * 2018-11-02 2019-03-12 Oppo广东移动通信有限公司 The training method of image processing model scratches drawing method, device, medium and terminal
WO2020242987A1 (en) * 2019-05-24 2020-12-03 Apple Inc. 5g new radio load balancing and mobility robustness
WO2021045253A1 (en) * 2019-09-04 2021-03-11 엘지전자 주식회사 Method for communicating with vehicle in wireless communication system, and user terminal therefor
CN113408694A (en) * 2020-03-16 2021-09-17 辉达公司 Weight demodulation for generative neural networks
CN114631097A (en) * 2020-07-08 2022-06-14 辉达公司 Generating images using one or more neural networks
US20220187841A1 (en) * 2020-12-10 2022-06-16 AI Incorporated Method of lightweight simultaneous localization and mapping performed on a real-time computing and battery operated wheeled device
CN114842275A (en) * 2022-07-06 2022-08-02 成都数之联科技股份有限公司 Circuit board defect judging method, training method, device, equipment and storage medium

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2075640U (en) * 1990-08-09 1991-04-24 煤炭工业部重庆煤矿设计研究院 Electronic speed controller for fixed transport apparatus
DE19722365A1 (en) * 1996-05-28 1997-12-04 Nat Semiconductor Corp Reconfigurable computer component with adaptive logic processor
TW201130113A (en) * 2010-02-16 2011-09-01 Zvi Or-Bach System comprising a semiconductor device and structure
CN104769774A (en) * 2012-04-04 2015-07-08 Hrl实验室有限责任公司 Antenna array with wide-band reactance reduction
CN107346061A (en) * 2012-08-21 2017-11-14 Fotonation开曼有限公司 For the parallax detection in the image using array camera seizure and the system and method for correction
CN103631982A (en) * 2013-07-11 2014-03-12 吉林化工学院 Reverse engineering digital model reconstruction method based on PRO/E
US20180168490A1 (en) * 2016-12-15 2018-06-21 Progenity Inc. Ingestible device and associated methods
US20180293712A1 (en) * 2017-04-06 2018-10-11 Pixar Denoising monte carlo renderings using generative adversarial neural networks
CN109461167A (en) * 2018-11-02 2019-03-12 Oppo广东移动通信有限公司 The training method of image processing model scratches drawing method, device, medium and terminal
WO2020242987A1 (en) * 2019-05-24 2020-12-03 Apple Inc. 5g new radio load balancing and mobility robustness
WO2021045253A1 (en) * 2019-09-04 2021-03-11 엘지전자 주식회사 Method for communicating with vehicle in wireless communication system, and user terminal therefor
CN113408694A (en) * 2020-03-16 2021-09-17 辉达公司 Weight demodulation for generative neural networks
CN114631097A (en) * 2020-07-08 2022-06-14 辉达公司 Generating images using one or more neural networks
US20220187841A1 (en) * 2020-12-10 2022-06-16 AI Incorporated Method of lightweight simultaneous localization and mapping performed on a real-time computing and battery operated wheeled device
CN114842275A (en) * 2022-07-06 2022-08-02 成都数之联科技股份有限公司 Circuit board defect judging method, training method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN115439720B (en) 2023-01-24

Similar Documents

Publication Publication Date Title
CN114266773B (en) Display panel defect positioning method, device, equipment and storage medium
CN108334879B (en) Region extraction method, system and terminal equipment
CN110008917B (en) Fault detection method of fixed value single data of relay protection device based on table understanding
CN114155244B (en) Defect detection method, device, equipment and storage medium
US20210200971A1 (en) Image processing method and apparatus
CN113870256B (en) PCB defect evaluation method, device, equipment and medium
CN116109631B (en) PCBA (printed circuit board assembly) cold joint defect detection method, device, equipment and medium
CN109978964B (en) Image making method and device, storage medium and terminal equipment
CN114638824B (en) Fusion method, device, equipment and medium for collecting images based on AOI equipment
CN115239734A (en) Model training method, device, storage medium, equipment and computer program product
CN114677567B (en) Model training method and device, storage medium and electronic equipment
CN115861327A (en) PCB color change defect detection method, device, equipment and medium
CN115439720B (en) CAM image reconstruction method, training method, device, equipment and medium
CN114511696A (en) Control positioning method and device, electronic equipment and readable storage medium
CN117372346A (en) Small sample defect identification method, system, equipment and storage medium
CN115830599B (en) Industrial character recognition method, model training method, device, equipment and medium
CN115861293A (en) Defect contour extraction method, defect contour extraction device, storage medium, defect contour extraction device, and program product
CN116310744A (en) Image processing method, device, computer readable medium and electronic equipment
CN108268813B (en) Lane departure early warning method and device and electronic equipment
CN116091503A (en) Method, device, equipment and medium for discriminating panel foreign matter defects
CN115641512A (en) Satellite remote sensing image road identification method, device, equipment and medium
CN115661156A (en) Image generation method, image generation device, storage medium, equipment and computer program product
CN113033297B (en) Method, device, equipment and storage medium for programming real object
CN113886745B (en) Page picture testing method and device and electronic equipment
CN116740385B (en) Equipment quality inspection method, device and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant