[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

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

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

Info

Publication number
CN115439720B
CN115439720B CN202211388848.7A CN202211388848A CN115439720B CN 115439720 B CN115439720 B CN 115439720B CN 202211388848 A CN202211388848 A CN 202211388848A CN 115439720 B CN115439720 B CN 115439720B
Authority
CN
China
Prior art keywords
image
cam
vrs
sample set
target
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.)
Active
Application number
CN202211388848.7A
Other languages
Chinese (zh)
Other versions
CN115439720A (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]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Multimedia (AREA)
  • Computer Hardware Design (AREA)
  • Geometry (AREA)
  • General Engineering & Computer Science (AREA)
  • Image Analysis (AREA)

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, training method, device, equipment and 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 the process level and process design of a factory, and the CAM diagram of the PCB based on actual production often has a larger difference from an actual VRS (virtual rescan) diagram of the PCB, thereby causing a lower defect recognition rate of the subsequent PCB.
Disclosure of Invention
The application mainly aims to provide a CAM image reconstruction method, a CAM image training device, a CAM image reconstruction device and a CAM image training medium, and aims to solve the technical problem that an existing printed circuit board CAM image is different from an actual printed circuit board VRS image greatly.
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 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.
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, a target area matched with the CAM image and the VRS image is obtained by carrying out template matching processing on the CAM image and the VRS image, and a CAM sample image and a VRS target generation image are respectively obtained based on the target area; 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 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, on the basis of the target region, after the same target region is cut for 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 region; 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; inputting the input during the training processCAM in a 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 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; 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 Image and the generated sampleVRS in this 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 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.
In specific application, when the CAM image and the VRS image are subjected to template matching, a plurality of similar target areas may be encountered, and after the matching score of the similar target areas is calculated, the similar target area with the highest similarity is selected as a final target area; 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 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.
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; 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 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 output of the CAM image reconstruction model is reduced when the CAM image reconstruction model is actually appliedOutgoing CAM 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; 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 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.
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 having a computer program stored therein and a processor executing the computer program to implement 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; 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 present application;
FIG. 4 is a schematic diagram of a CAM image according to an embodiment of the present application;
FIG. 5 is a VRS target generated 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 graph 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 disclosure;
fig. 9 is a schematic 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 and not restrictive on the broad 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 and other faults are caused. 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 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 refers to a circuit board which needs to be detected whether the circuit board has defects, and the CAM initial image refers to an image which is manufactured by computer assistance according to various functional requirements on 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 through 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 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 a 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, the CAM image and the VRS image of the same circuit board are subjected to template matching processing to obtain a CAM sample image and a VRS target generation image which are in one-to-one correspondence, so that the difference between the output CAM image and the output VRS image of 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, the CAM sample image and the VRS target generation image form a one-to-one corresponding image pair, 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 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, on the basis of the target region, after the same target region is cut for 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 region; 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 or not.
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; 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 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 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; 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.
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.
Based on the same inventive concept, as shown in fig. 6, the embodiment of the present application further provides: a training method of a CAM image reconstruction model comprises the following steps:
and 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; and generating an image based on a plurality of VRS targets, and 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 or not.
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; 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 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; 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. The predetermined match score represents the CAM b1 Image and the VRS 1 Matching of imagesIn 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 specific application, before the CAM image reconstruction model is put into practical application, special training needs to be carried out on the CAM image reconstruction model, namely, a CAM sample image and a VRS target generation image obtained after template matching processing is carried out on the CAM image and the VRS image 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 carry out 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, 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, which is not described herein again.
Based on the same inventive concept, as shown in fig. 9, 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.
It should be noted that, in the present embodiment, each module in the training apparatus for a CAM image reconstruction model is in one-to-one correspondence with each step in the training method for a CAM image reconstruction model in the foregoing embodiment, and therefore, the specific implementation of the present embodiment may refer to the implementation of the training method for a CAM image reconstruction model, and details are not repeated here.
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 merits of the embodiments.
Through the description of the foregoing embodiments, it is clear to those skilled in the art that the method of the foregoing embodiments may be implemented by software plus a necessary general hardware platform, and certainly may also be implemented by hardware, but the former is a better embodiment in many cases. 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 (such as a rom/ram, a magnetic disk, and an optical disk), and includes instructions for enabling a multimedia terminal device (which may be a mobile phone, a computer, a television receiver, or a network device) to perform the methods 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 the equivalent structures or equivalent processes that can be directly or indirectly applied to other related technical fields by using the contents of the specification and the drawings of the present application are also included in the scope of the present application.

Claims (18)

1. 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 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 subjected to template matching processing by utilizing a CAM image and a VRS image of the same circuit board to obtain target areas matched with the CAM image and the VRS image, and the target areas are obtained respectively based on the target areas.
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 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.
4. The method for reconstructing the CAM image according to claim 1, wherein the obtaining the target area where the CAM image and the VRS image match by performing the template matching process using 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.
5. The method for reconstructing the CAM image according to claim 1, 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.
6. The method of reconstructing a CAM image according to claim 5, 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.
7. 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;
using the input sample set and the generatorTraining the initial generation type confrontation network model by an integrated 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.
8. The method of reconstructing a CAM image according to claim 7, wherein the CAM is configured to reconstruct a 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 608983DEST_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.
9. A method for training 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 obtain a target area matched with the CAM image and the VRS image; respectively obtaining a CAM sample image and a VRS target generation image based on the target area;
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.
10. The method for training a CAM image reconstruction model according to claim 9, 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.
11. The method for training the CAM image reconstruction model according to claim 9, 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.
12. A training method for a CAM image reconstruction model according to claim 11, 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.
13. The method for training the CAM image reconstruction model according to claim 9, 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.
14. The method of claim 13, wherein the CAM is trained on 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 318707DEST_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.
15. 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 subjected to template matching processing by utilizing a CAM image and a VRS image of the same circuit board to obtain target areas matched with the CAM image and the VRS image, and the target areas are obtained respectively based on the target areas.
16. 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 obtain a target area matched with the CAM image and the VRS image; respectively obtaining a CAM sample image and a VRS target generation image based on the target area;
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.
17. 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 to implement the method according to any of claims 1-14.
18. 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-14.
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 CN115439720A (en) 2022-12-06
CN115439720B true 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 (7)

* 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 transportation equipment
DE19722365A1 (en) * 1996-05-28 1997-12-04 Nat Semiconductor Corp Reconfigurable computer component with adaptive logic processor
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
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

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI798525B (en) * 2010-02-16 2023-04-11 凡 歐貝克 System comprising a semiconductor device and structure
CA3046975A1 (en) * 2016-12-15 2018-06-21 Progenity, Inc. Ingestible device and associated methods
US10607319B2 (en) * 2017-04-06 2020-03-31 Pixar Denoising monte carlo renderings using progressive neural networks
CN109461167B (en) * 2018-11-02 2020-07-21 Oppo广东移动通信有限公司 Training method, matting method, device, medium and terminal of image processing model
DE102021105291A1 (en) * 2020-03-16 2021-09-16 Nvidia Corporation WEIGHT DEMODULATION FOR A GENERATING NEURAL NETWORK
US20220012858A1 (en) * 2020-07-08 2022-01-13 Nvidia Corporation Image generation 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
CN114842275B (en) * 2022-07-06 2023-04-07 成都数之联科技股份有限公司 Circuit board defect judging method, training method, device, equipment and storage medium

Patent Citations (7)

* 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 transportation equipment
DE19722365A1 (en) * 1996-05-28 1997-12-04 Nat Semiconductor Corp Reconfigurable computer component with adaptive logic processor
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
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

Also Published As

Publication number Publication date
CN115439720A (en) 2022-12-06

Similar Documents

Publication Publication Date Title
CN114266773B (en) Display panel defect positioning method, device, equipment and storage medium
CN116109631B (en) PCBA (printed circuit board assembly) cold joint defect detection method, device, equipment and medium
CN114155244B (en) Defect detection 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
CN113870256B (en) PCB defect evaluation method, device, equipment and medium
CN115861293A (en) Defect contour extraction method, defect contour extraction device, storage medium, defect contour extraction device, and program product
CN115861327A (en) PCB color change defect detection method, device, equipment and medium
CN112528318A (en) Image desensitization method and device and electronic 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
CN116310744A (en) Image processing method, device, computer readable medium and electronic equipment
CN115439720B (en) CAM image reconstruction method, training method, device, equipment and medium
CN113033297B (en) Method, device, equipment and storage medium for programming real object
CN114511696A (en) Control positioning method and device, electronic equipment and readable storage medium
CN113886745B (en) Page picture testing method and device and electronic equipment
CN108268813B (en) Lane departure early warning method and device and electronic equipment
CN113971738B (en) Image detection method, device, electronic equipment and storage medium
CN117011532A (en) Image processing method, apparatus, device, storage medium, and program product
CN113887300A (en) Method and device for detecting target, human face and human face key point and storage medium
CN113379637A (en) Image restoration method, system, medium, and device based on progressive learning strategy
CN112669267B (en) Circuit board defect detection method and device, electronic equipment and storage medium
CN116740385B (en) Equipment quality inspection method, device and system
CN114037711B (en) Method, device and equipment for checking disconnection line and readable storage medium
CN118365647B (en) Industrial defect target detection method, system, equipment and storage medium

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