CN112184636A - Detection method and detection device for fixing part in circuit board - Google Patents

Detection method and detection device for fixing part in circuit board Download PDF

Info

Publication number
CN112184636A
CN112184636A CN202010959800.1A CN202010959800A CN112184636A CN 112184636 A CN112184636 A CN 112184636A CN 202010959800 A CN202010959800 A CN 202010959800A CN 112184636 A CN112184636 A CN 112184636A
Authority
CN
China
Prior art keywords
circuit board
detected
detection
fixing piece
area
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.)
Pending
Application number
CN202010959800.1A
Other languages
Chinese (zh)
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.)
Gree Electric Appliances Inc of Zhuhai
Zhuhai Lianyun Technology Co Ltd
Original Assignee
Gree Electric Appliances Inc of Zhuhai
Zhuhai Lianyun 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 Gree Electric Appliances Inc of Zhuhai, Zhuhai Lianyun Technology Co Ltd filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN202010959800.1A priority Critical patent/CN112184636A/en
Publication of CN112184636A publication Critical patent/CN112184636A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • 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
    • 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)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Biophysics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Quality & Reliability (AREA)
  • Geometry (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)

Abstract

The embodiment of the invention provides a detection method of a circuit board fixing piece, and solves the problems that the detection efficiency and the detection quality are low and the detection effect can not reach the unified standard in the existing manual detection method for detecting the setting effect of the fixing piece on the circuit board. The detection method of the fixing piece in the circuit board. The method comprises the following steps: acquiring an image of a circuit board to be detected; analyzing all to-be-detected areas of the to-be-detected circuit board image based on the fixing piece distribution standard file; sequentially traversing all the areas to be detected based on the trained deep learning detection model, and determining the areas provided with the fixing pieces in all the areas to be detected; and judging whether the arrangement of the fixing piece in the circuit board is qualified or not based on the comparison result of the area provided with the fixing piece in all the areas to be detected and a preset area threshold value.

Description

Detection method and detection device for fixing part in circuit board
Technical Field
The invention relates to the technical field of detection, in particular to a detection method and a detection device for a fixing piece in a circuit board.
Background
In the industrial production scene of the circuit board of the household electrical appliance equipment, a method for spraying hot melt adhesive is generally used for fixing components with larger body sizes on the circuit board, but the hot melt adhesive spraying effect of the circuit board is mainly detected manually at present. The manual detection has the following disadvantages: during manual detection, a detector needs to take up the controller from the conveyor belt and then put back the conveyor belt after detection, so that the detection efficiency is low; the colors of the hot melt adhesive and the circuit board are usually white, the colors of the hot melt adhesive and the circuit board are similar, so that the human eyes are easy to fatigue after a detector works for a long time, the detection efficiency and the detection quality are reduced, the detection omission is easy to cause, and if the hot melt adhesive is poor in spraying effect and is not detected, the quality problems such as loss of functions of the circuit board and the like caused by falling of components can be caused; moreover, manual detection has artificial subjective problems, the result of the detection of the same product by the same person at different times or different persons can be different, whether the hot melt adhesive is sprayed partially or not, whether the spraying amount meets the technical requirements or not and the like can not guarantee uniform detection standards.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for detecting a fixing element in a circuit board, which solve the problems that the existing manual detection fixing element setting effect has low detection efficiency and detection quality, and the detection effect cannot be guaranteed to reach the unified standard.
The invention provides a detection method and a detection device for a fixing piece in a circuit board. The method comprises the following steps: acquiring an image of a circuit board to be detected; analyzing all areas to be detected of the circuit board image to be detected based on the fixing piece distribution standard file; sequentially traversing all the areas to be detected based on the trained deep learning detection model, and determining the areas provided with the fixing pieces in all the areas to be detected; and judging whether the arrangement of the fixing piece in the circuit board is qualified or not based on the comparison result of the area provided with the fixing piece in all the areas to be detected and a preset area threshold value.
In an embodiment, before analyzing all regions to be detected of the circuit board image to be detected based on the fixture distribution standard file, the method further includes: making the fixing piece distribution standard file comprises the following steps: acquiring a circuit board template image; marking all areas to be detected on the template image based on the preset position of the preset fixing piece on the circuit board template; and generating a text file according to the position information of the area to be detected.
In an embodiment, sequentially traversing all the regions to be detected based on a trained deep learning detection model, and before determining the region provided with the fixing member in all the regions to be detected, the method further includes: obtaining a data set for training the detection model, wherein the data set at least comprises at least one of data information of the outline and the position of the fixing part on the circuit board; deep learning training is performed on the initial model using the dataset.
In one embodiment, training the detection model comprises: and training the detection model based on a Mask RCNN algorithm.
In one embodiment, analyzing all to-be-detected regions of the to-be-detected circuit board image based on the fastener distribution standard file includes analyzing target detection regions and non-target detection regions of the to-be-detected circuit board image based on the fastener distribution standard file, where the target detection regions include key detection regions.
In one embodiment, determining that the setting of the fixture in the circuit board is acceptable comprises: the area of the fixing piece in the target detection area is larger than a first preset threshold value; the area of the fixing piece in the non-target detection area is smaller than a second preset threshold value; and the area of the fixing piece in the key detection area is larger than a third preset threshold value.
In one embodiment, the method further comprises: when the fixed part is judged to be unqualified in the circuit board, rotating the circuit board image to be detected for a preset number of times, and judging that the fixed part is qualified in the circuit board if the detection result is qualified; and if the detection results of the preset times are unqualified, judging that the fixing piece is set to be unqualified in the circuit board.
In an embodiment, before determining whether the setting of the fixing element in the circuit board is qualified based on a comparison result between the area of the area provided with the fixing element in all the areas to be detected and a preset area threshold, the method further includes: judging whether the detection is the first detection; if yes, judging whether the arrangement of the fixing piece in the circuit board is qualified or not based on the comparison result of the area provided with the fixing piece in all the areas to be detected and a preset area threshold value; if the fixed piece is set to be unqualified in the circuit board, rotating the circuit board for secondary detection; if not, judging whether the arrangement of the fixing piece in the circuit board is qualified or not based on the comparison result of the area provided with the fixing piece in all the areas to be detected and a preset area threshold value; and if the fixed piece is set to be unqualified in the circuit board, judging that the final detection result is unqualified.
A circuit board mount detection apparatus, comprising: the acquisition module is configured to acquire an image of the circuit board to be detected; the analysis module is configured to analyze all to-be-detected areas of the to-be-detected circuit board image based on the fixing piece distribution standard file; the detection processing module is configured to sequentially traverse all the areas to be detected based on the trained deep learning detection model, and determine the areas provided with the fixing pieces in all the areas to be detected; and the judging module is configured to judge whether the arrangement of the fixing piece in the circuit board is qualified or not based on a comparison result of the area provided with the fixing piece in all the areas to be detected and a preset area threshold value.
A computer-readable storage medium, in which a computer program is stored, which, when executed by a processor, is configured to implement the method for detecting a circuit board fixing member according to any one of the above.
An electronic device comprising a memory and a processor, the memory storing one or more computer instructions, wherein the one or more computer instructions, when executed by the processor, are configured to implement the method of circuit board fixture detection of any of the above.
The embodiment of the invention provides a detection method of a fixing piece in a circuit board. The detection method of the fixing piece in the circuit board comprises the following steps: acquiring an image of a circuit board to be detected; analyzing all to-be-detected areas of the to-be-detected circuit board image based on the fixing piece distribution standard file; sequentially traversing all the areas to be detected based on the trained deep learning detection model, and determining the areas provided with the fixing pieces in all the areas to be detected; and judging whether the arrangement of the fixing piece in the circuit board is qualified or not based on the comparison result of the area provided with the fixing piece in all the areas to be detected and a preset area threshold value. By the detection method of the fixing piece in the circuit board, automatic detection of the fixing piece of the circuit board is realized, so that whether the position of the fixing piece is at an expected position or not is judged, and data such as the whole quantity, the production reject ratio and the like of the produced circuit board can be counted. The invention saves the labor cost, reduces the labor intensity of detection personnel, improves the detection precision and speed, and improves the automation level of the whole production line.
Drawings
Fig. 1 is a schematic flow chart illustrating a method for detecting a circuit board fixing element according to an embodiment of the present invention.
Fig. 2 is a schematic flow chart illustrating a method for detecting a circuit board fixing element according to another embodiment of the present invention.
Fig. 3 is a schematic diagram illustrating a result of the detection apparatus for a circuit board fixing member according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In an embodiment of the present invention, as shown in fig. 1, the method for detecting the arrangement of the circuit board fixing member includes:
and step 01, acquiring an image of the circuit board to be detected. And acquiring an image of the circuit board to be detected to obtain an image of the circuit board to be detected. The image of the circuit board to be detected can be the image of the surface, provided with the fixing piece, of the circuit board to be detected.
And 02, analyzing all to-be-detected areas of the to-be-detected circuit board image based on the fixing piece distribution standard file. Wherein the detection area can be divided into a target detection area and a non-target detection area. The fixing part distribution standard file is marked with a detection area, and as the specifications of the circuit boards of the same model are the same, the detection area on the circuit board image to be detected can be obtained only by contrasting the detection area on the fixing part distribution standard file, in other words, the position of the detection area on the fixing part distribution standard file and the position of the detection area on the circuit board image to be detected can be the same. The target detection area is an area provided with a fixing piece, and the non-target detection area is an area not provided with a fixing piece. The target detection area may include a key detection area, and the key detection area is a key portion where the fixing member is connected to the circuit board.
And 03, traversing all the areas to be detected in sequence based on the trained deep learning detection model, and determining the areas provided with the fixing pieces in all the areas to be detected. Inputting the circuit board image to be detected into a detection model, and carrying out model detection on the circuit board image to be detected by the detection model so as to obtain the region of the circuit board image to be detected, wherein the region of the circuit board image to be detected is provided with the fixing piece, and further determine the region of the circuit board image to be detected, wherein the fixing piece is arranged in all the regions to be detected.
It can be understood that the detection model may be a target detection segmentation (Mask RCNN) model, and in addition, the type of the detection model may be selected according to actual requirements, and the type of the detection model is not limited in the present invention.
And step 04, judging whether the arrangement of the fixing piece in the circuit board is qualified or not based on the comparison result of the area provided with the fixing piece in all the areas to be detected and a preset area threshold value. Judging whether the target detection area contains a fixing piece according to the area, provided with the fixing piece, of the circuit board image to be detected in the step 03, and if so, obtaining the area of the fixing piece arranged in the target detection area; whether a fixing piece is arranged in a non-target detection area can be judged, and if the area of the fixing piece arranged in the target detection area is obtained; whether the key detection area is provided with the fixing piece can be judged, and if the key detection area is provided with the fixing piece, the area of the fixing piece can be obtained.
It can be understood that the area of the fixing part in the target detection area and the area of the fixing part in the non-target detection area may be obtained by measuring and calculating the side length of the fixing part by using a measuring tool, and the method for obtaining the area of the fixing part in the target detection area and the area of the fixing part in the non-target detection area may be optional.
Whether the setting of the fixing piece in the circuit board is qualified or not is judged, and the specific judgment standard can be as follows:
and if the area of the fixing piece in the target detection area is larger than a first preset threshold value, judging that the area spraying of the fixing piece in the target detection area is qualified, otherwise, judging that the area spraying of the fixing piece in the target detection area is unqualified.
And if the area of the fixing piece in the non-target detection area is smaller than a first preset threshold value, judging that the area spraying of the fixing piece in the non-target detection area is qualified, otherwise, judging that the area spraying of the fixing piece in the non-target detection area is unqualified.
And if the area of the fixing piece in the key detection area is larger than a third preset threshold value, judging that the area spraying of the fixing piece in the key detection area is qualified, otherwise, judging that the area spraying of the fixing piece in the key detection area is unqualified.
When judging whether the whole circuit board is qualified, the circuit board fixing piece can be judged to be qualified only by meeting three conditions that the target detection area is qualified, the non-target detection area is qualified and the key detection area is qualified, and otherwise, the circuit board fixing piece is judged to be unqualified. When the circuit board fixing piece is judged to be unqualified, in order to prevent the false detection of the final detection result caused by the missed detection of the detection model, the circuit board image to be detected can be rotated for rechecking for a preset number of times (repeating the steps 03-05), and if the rechecking result is qualified within the preset number of times, the fixing piece is judged to be qualified; and if the detection result of the first preset times is still unqualified, judging that the fixing piece is set to be unqualified.
It can be understood that the circuit board image to be detected may be rotated 180 degrees for the detection of the preset times, or may be rotated 90 degrees or other angles for the detection of the preset times, and the rotation angle of the circuit board image to be detected when the detection of the preset times is performed is set according to the actual situation.
Or, before the setting of the fixing part in the circuit board is qualified based on the comparison result of the area provided with the fixing part in all the areas to be detected and the preset area threshold, the method also comprises the step of judging whether the detection of the fixing part of the circuit board is the first detection, if the detection of the fixing part of the circuit board is judged to be the first detection, whether the setting of the fixing part in the circuit board is qualified is judged based on the comparison result of the area provided with the fixing part in all the areas to be detected and the preset area threshold, if the setting of the fixing part in the circuit board is qualified, the final detection result is judged to be qualified, and if the setting of the fixing part in the circuit board is unqualified, the circuit board is rotated to carry; if the detection of the circuit board fixing piece is judged not to be the first detection, whether the setting of the fixing piece in the circuit board is qualified or not is judged based on the comparison result of the area provided with the fixing piece in all the areas to be detected and a preset area threshold value, if the setting of the fixing piece in the circuit board is unqualified, the final detection result is judged to be unqualified, if the setting of the fixing piece in the circuit board is qualified, the final detection result is judged to be qualified, and the method can prevent the false detection of the final detection result caused by the missed detection of the detection model.
The detection method for the setting effect of the circuit board can quickly and accurately detect the position information of the fixing piece on the circuit board, and has high detection efficiency; the problem that the position of the fixing piece is not easy to detect by a traditional image detection method when the color of the fixing piece is similar to that of the circuit board is solved; the automatic detection and accurate detection of the circuit board fixing piece are realized, the detection omission and the detection shortage are avoided, and the defect of manual detection of the circuit board fixing piece is avoided; the method comprises the steps of quickly identifying information such as the position and the area of a fixing piece on a circuit board by using a target detection algorithm, judging whether the area with the fixing piece is provided with the fixing piece, whether the position of the fixing piece has deviation and the like, and whether the arrangement of the fixing piece meets technical requirements and the like; the problem of false alarm of detection results caused by missed detection is solved.
It can be understood that the detection method can be used for detecting the hot melt adhesive spraying effect of the circuit board, and can also be used for detecting other fixing part settings, such as the detection of a buzzer, a capacitor and the like of the circuit board. The invention is not limited to the specific application of the detection method.
In one embodiment of the invention, a fixing piece distribution standard file needs to be manufactured before analyzing all detection areas of a circuit board image to be detected based on the fixing piece distribution standard file, and the manufacturing process of the fixing piece distribution standard file comprises the steps of acquiring a template image; marking all detection areas on the template image, wherein the detection areas comprise target detection areas and non-target detection areas, and the target detection areas comprise key detection areas; and producing a text file by using the position information of the detection area. And acquiring a circuit board image as a template image, wherein the circuit boards of the same model are identical in specification, so that the circuit boards of the same model can use the same template image. Marking all detection areas on the template image, namely manufacturing a fixing part distribution standard file on the template image, taking the detection of the hot melt adhesive spraying effect of the circuit board as an example: 3 areas where hot melt glue is required to be sprayed are arranged on the circuit board, and the 3 areas where the hot melt glue is required to be sprayed are set as target detection areas, namely A1, A2 and A3; 5 areas where the hot melt adhesive cannot be sprayed are arranged on the circuit board, and the 5 areas where the hot melt adhesive cannot be sprayed are set as non-target detection areas, namely B1, B2, B3, B4 and B5; in order to detect whether the hot melt adhesive is sprayed or not, namely, the hot melt adhesive is sprayed into the area A, but is not sprayed to the key parts of the connection of the components and the circuit board, so that the function of fixing the components cannot be achieved, and therefore, important detection areas are further set for the key parts of the connection of the components and the circuit board, namely, C1, C2 and C3, wherein C1, C2 and C3 are in the areas A1, A2 and A3. The detection regions may be marked by drawing rectangular frames on the template image, that is, the rectangular frames are marked in sequence according to the order of a1, a2 and A3 as target detection regions, the rectangular frames are marked in sequence according to the order of B1, B2, B3, B4 and B5 as non-target detection regions, and the rectangular frames are marked in sequence according to the order of C1, C2 and C3 as highlight detection regions. And after the rectangular frame is drawn, generating text files by using the position information of the rectangular frame, namely finishing the distribution standard of the hot melt adhesive of the circuit board.
In an embodiment of the present invention, as shown in fig. 3, taking the detection of the hot melt adhesive spraying effect of the circuit board as an example: after the detection is started, loading a circuit board image to be detected, reading the circuit board image to be detected into a Mask RCNN hot melt adhesive detection model, carrying out Mask RCNN model detection on the circuit board image to be detected, obtaining the area of a detected hot melt adhesive area, and simultaneously determining the area to be detected in the image to be detected according to the hot melt adhesive distribution standard, wherein the area to be detected comprises a target detection area (the area which needs to be sprayed with the hot melt adhesive) and a non-target detection area (the area which needs not to be sprayed with the hot melt adhesive), and the target detection area comprises a key detection area (a key area which is connected with an electronic device and a circuit; and traversing the to-be-detected region to judge whether the area of the hot melt adhesive in the to-be-detected region reaches a threshold value or not based on the obtained detected area of the hot melt adhesive region and the to-be-detected region in the to-be-detected image, wherein the threshold value is qualified if the area of the hot melt adhesive in the to-be-detected region reaches the threshold value, and otherwise. Judging whether the area of hot melt adhesive in the area to be detected reaches a threshold value or not, judging whether the areas A1-A3 are qualified or not, judging whether the areas B1-B5 are qualified or not, judging whether the areas C1-C3 are qualified or not, judging whether the spraying of the hot melt adhesive on the circuit board is qualified or not by combining the judging results of the three areas, judging whether the detection is the first detection or not, and judging that the detection result of the hot melt adhesive effect of the circuit board is qualified if the detection is the first detection and all the three areas A, B and C are qualified, thereby finishing the detection. (ii) a And if the first detection is carried out and at least one of the A, B and the C areas is unqualified, rotating the image to be detected by 180 degrees to form a new image to be detected, and carrying out second detection on the new image to be detected. And if the detection is not the first detection and all the A, B and C areas are qualified, judging that the hot melt adhesive effect detection result of the circuit board is qualified, and finishing the detection. (ii) a And if the first detection is carried out and at least one of the A, B area and the C area is unqualified, judging that the hot melt adhesive effect detection result of the circuit board is unqualified, and finishing the detection.
In an embodiment of the present invention, sequentially traversing all regions to be detected based on the trained deep learning detection model, and before determining the region in which the fixing element is disposed in all the regions to be detected, the method further includes: and training the detection model. It can be understood that the detection model can be trained based on the Mask RCNN algorithm, and unlike other algorithms in the deep learning, such as the YOLOv3 algorithm and the SSD algorithm, the Mask RCNN algorithm can be used as a frame selection shape according to the actual shape of the real object, and the frame selection shapes of the real objects of other algorithms are preset shapes, such as a square, a rectangle, and the like, so that the detection accuracy can be improved by using the Mask RCNN algorithm in the deep learning. In addition, the algorithm used for training the detection model can be selected according to the actual situation, and the invention does not limit the algorithm used for training the detection model.
Taking a detection model for training the hot melt adhesive spraying effect based on the Mask RCNN algorithm as an example, the optional training method comprises the following steps: obtaining a data set of a training detection model; the initial model is deep learning trained using the dataset. Obtaining a dataset for training the detection model comprises: collecting the image data of the circuit board coated with the hot melt adhesive, marking the outline of the hot melt adhesive on the image data of the circuit board, and taking the image data of the circuit board marked with the outline of the hot melt adhesive as a data set for training a detection model. It can be understood that the outline of the hot melt adhesive can be labeled by labelme software, and besides, the labeling method of the outline of the hot melt adhesive is optional, and the labeling method of the outline of the hot melt adhesive is not limited by the invention. Deep learning training of a detection model is carried out based on a Mask RCNN network model to obtain a required model file, wherein the model file can comprise a pre-trained weight file (. pb format file), and the other model file is a text graphic file adjusted by a DNN support group of OpenCV, so that the network can be loaded by using OpenCV (. pbtxt format file), and the two model files are obtained through a project algorithm. Optionally, when performing instance segmentation Mask RCNN algorithm training on the hot melt adhesive region extraction model according to the actual pixel category of the known hot melt adhesive color image, taking a Mask RCNN model of a backbone neural network inclusion v2 provided by a machine learning system (tensrflow) as an initial model, and training the known hot melt adhesive color image on the initial model to obtain a trained hot melt adhesive region extraction model. The example segmentation Mask RCNN algorithm used by the invention is adaptively adjusted, for example, the image resolution parameter is adjusted to be the same as the image resolution acquired by the user; modifying the anchor parameter, wherein scales are modified to [0.1, 0.25,0.5,1.0,2.0 ], aspect _ rates are modified to [0.25, 0.5,1.0,2.0 ], aiming at increasing the range of the sensing area and increasing the characteristics, and meanwhile, because the image resolution per se is 1280 x 960, the detail characteristics are not obvious when the hot melt adhesive characteristics are extracted if the hot melt adhesive characteristics are subdivided, and the minimum sensing area is smaller than the hot melt adhesive resolution; the speed can be increased by modifying the size of the mask to be 11, and when the size of the mask is 11, the required calculation speed can meet the requirement of the method and the required area integrity. In an image, the detection area may appear anywhere on the image, and may be of any size and shape, so an anchor represents a set of preset borders that first outline the object roughly at the possible locations, and then adjust on the basis of these preset borders. In order to frame the position where the target may appear as much as possible, the predefined frames are usually thousands or more, before deep learning, the original image is slid to generate preset frames in different positions, then one preset frame is scaled by area and length to generate a series of preset frames, scale in the anchor parameter represents the size of the target, and aspect _ ratios represents the shape of the target. For example: the existing anchor parameters: scales is [0.25, 0.5,1.0,2.0 ], aspect _ ratios is [0.5, 1.0,2.0 ], and optionally, in the present invention, for each anchor (16 × 16 rectangular frame) center point, 20 preset frames are generated around it, first (16 × 0.1), (16 × 0.25,16 × 0.25),
five square frames of (16 × 0.5), (16 × 1,16 × 1), (16 × 2), and then, with each area kept constant, scaling the length and width, the aspect ratio is (0.25,0.5,1.0,2.0), respectively, to form 20 preset frames. Compared with the prior art, scales in the invention are increased by 0.25, scale _ ratios are increased by 0.25, the number of anchors is increased, and a smaller sensing area is increased, so that the number of features which can be extracted is increased. In addition, when preparing a data set for training, different circuit board models need to be prepared for acquisition as much as possible, and when components needing to be sprayed with hot melt adhesive on the circuit board are newly added, a newly added hot melt adhesive region extraction model of the circuit board needs to be further trained, so that the trained model can adapt to the new circuit board model.
In an embodiment of the present invention, as shown in fig. 3, the apparatus 100 for detecting a circuit board fixing member includes: the device comprises an acquisition module 10, an analysis module 20, a detection processing module 30 and a judgment module 40. The acquisition module 10 is configured to acquire an image of a circuit board to be detected; the analysis module 20 is configured to analyze all to-be-detected regions of the to-be-detected circuit board image based on the fixing piece distribution standard file; the detection processing module 30 is configured to sequentially traverse all the regions to be detected based on the trained deep learning detection model, and determine the regions in which the fixing members are arranged in all the regions to be detected; the judging module 40 is configured to judge whether the setting of the fixing member in the circuit board is qualified based on a comparison result between the area of the region provided with the fixing member in all the regions to be detected and a preset area threshold. In addition, the detection processing module 30 is further configured to train a detection model before detecting the circuit board image to be detected, and an optional training method includes: obtaining a data set of a training detection model; the initial model is deep learning trained using the dataset. The invention realizes the automatic detection of the setting of the fixing piece of the circuit board, thereby judging whether the setting position of the fixing piece is at the expected position, and simultaneously counting the data of the whole quantity, the reject ratio and the like of the produced circuit board. The invention saves the labor cost, reduces the labor intensity of detection personnel, improves the detection precision and speed, and improves the automation level of the whole production line.
It is to be appreciated that training the detection model by the detection processing module 30 includes training the detection model based on the Mask RCNN algorithm. In addition, the algorithm for training the detection model by the detection processing module 30 can be selected according to actual requirements, and the invention does not limit the type of the algorithm for training the detection model.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention. It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form. The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program check codes, such as a U disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
An electronic device in this embodiment includes a memory and a processor, where the memory is configured to store one or more computer instructions, and when the one or more computer instructions are executed by the processor, the method for detecting a circuit board fixing element setting in the foregoing embodiment is implemented.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims. The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and the like that are within the spirit and principle of the present invention are included in the present invention.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and the like that are within the spirit and principle of the present invention are included in the present invention.

Claims (11)

1. A method for detecting a fixing part in a circuit board is characterized by comprising the following steps:
acquiring an image of a circuit board to be detected;
analyzing all areas to be detected of the circuit board image to be detected based on the fixing piece distribution standard file;
sequentially traversing all the areas to be detected based on the trained deep learning detection model, and determining the areas provided with the fixing pieces in all the areas to be detected;
and judging whether the arrangement of the fixing piece in the circuit board is qualified or not based on the comparison result of the area provided with the fixing piece in all the areas to be detected and a preset area threshold value.
2. The method for detecting the fixing member in the circuit board according to claim 1, wherein before analyzing all the regions to be detected of the circuit board image to be detected based on the fixing member distribution standard file, the method further comprises: making the fixing piece distribution standard file comprises the following steps:
acquiring a circuit board template image;
marking all areas to be detected on the template image based on the preset position of the preset fixing piece on the circuit board template;
and generating a text file according to the position information of the area to be detected.
3. The method for detecting the circuit board fixing member according to claim 1, wherein before sequentially traversing all the regions to be detected based on the trained deep learning detection model and determining the region in which the fixing member is disposed in all the regions to be detected, the method further comprises:
obtaining a data set for training the detection model, wherein the data set at least comprises at least one of data information of the outline and the position of the fixing part on the circuit board;
deep learning training is performed on the initial model using the dataset.
4. The method of claim 3, wherein training the inspection model comprises: and training the detection model based on a Mask RCNN algorithm.
5. The method for detecting the circuit board fixing member according to claim 1, wherein the analyzing out all the regions to be detected of the circuit board image to be detected based on the fixing member distribution standard file includes: and analyzing a target detection area and a non-target detection area of the circuit board image to be detected based on the fixing piece distribution standard file, wherein the target detection area comprises a key detection area.
6. The method of claim 5, wherein determining that the setting of the mount in the circuit board is acceptable comprises:
the area of the fixing piece in the target detection area is larger than a first preset threshold value;
the area of the fixing piece in the non-target detection area is smaller than a second preset threshold value; and
the area of the fixing piece in the key detection area is larger than a third preset threshold value.
7. The method of claim 1, further comprising: when the fixed part is judged to be unqualified in the circuit board, rotating the circuit board image to be detected for a preset number of times, and judging that the fixed part is qualified in the circuit board if the detection result is qualified; and if the detection results of the preset times are unqualified, judging that the fixing piece is set to be unqualified in the circuit board.
8. The method for detecting a circuit board fixture according to claim 1, wherein before determining whether the fixture is disposed in the circuit board based on a comparison result between an area of all the areas to be detected, in which the fixture is disposed, and a preset area threshold, the method further comprises: judging whether the detection is the first detection;
if yes, judging whether the arrangement of the fixing piece in the circuit board is qualified or not based on the comparison result of the area provided with the fixing piece in all the areas to be detected and a preset area threshold value; if the fixed piece is set to be unqualified in the circuit board, rotating the circuit board for secondary detection;
if not, judging whether the arrangement of the fixing piece in the circuit board is qualified or not based on the comparison result of the area provided with the fixing piece in all the areas to be detected and a preset area threshold value; and if the fixed piece is set to be unqualified in the circuit board, judging that the final detection result is unqualified.
9. A detection device for a circuit board fixing member is characterized by comprising:
the acquisition module is configured to acquire an image of the circuit board to be detected;
the analysis module is configured to analyze all to-be-detected areas of the to-be-detected circuit board image based on the fixing piece distribution standard file;
the detection processing module is configured to sequentially traverse all the areas to be detected based on the trained deep learning detection model, and determine the areas provided with the fixing pieces in all the areas to be detected;
and the judging module is configured to judge whether the arrangement of the fixing piece in the circuit board is qualified or not based on a comparison result of the area provided with the fixing piece in all the areas to be detected and a preset area threshold value.
10. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, is adapted to carry out the method of detecting a circuit board fixture according to any one of claims 1 to 8.
11. An electronic device comprising a memory and a processor, the memory storing one or more computer instructions, wherein the one or more computer instructions, when executed by the processor, implement the method of circuit board fixture detection of claims 1-8.
CN202010959800.1A 2020-09-14 2020-09-14 Detection method and detection device for fixing part in circuit board Pending CN112184636A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010959800.1A CN112184636A (en) 2020-09-14 2020-09-14 Detection method and detection device for fixing part in circuit board

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010959800.1A CN112184636A (en) 2020-09-14 2020-09-14 Detection method and detection device for fixing part in circuit board

Publications (1)

Publication Number Publication Date
CN112184636A true CN112184636A (en) 2021-01-05

Family

ID=73920769

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010959800.1A Pending CN112184636A (en) 2020-09-14 2020-09-14 Detection method and detection device for fixing part in circuit board

Country Status (1)

Country Link
CN (1) CN112184636A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113030121A (en) * 2021-03-11 2021-06-25 微讯智造(广州)电子有限公司 Automatic optical detection method, system and equipment for circuit board components

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113030121A (en) * 2021-03-11 2021-06-25 微讯智造(广州)电子有限公司 Automatic optical detection method, system and equipment for circuit board components

Similar Documents

Publication Publication Date Title
CN107229930B (en) Intelligent identification method for numerical value of pointer instrument
CN102521560B (en) Instrument pointer image identification method of high-robustness rod
CN103994786B (en) Image detecting method for arc ruler lines of pointer instrument scale
CN108955901B (en) Infrared temperature measurement method and system and terminal equipment
CN109741314A (en) A kind of visible detection method and system of part
CN110378227B (en) Method, device and equipment for correcting sample labeling data and storage medium
Thipakorn et al. Egg weight prediction and egg size classification using image processing and machine learning
CN105763871A (en) Real time detection system and detection method for camera definition
CN115077425A (en) Product detection equipment and method based on structured light three-dimensional vision
CN113030102A (en) Paint surface flaw inspection system based on machine vision
CN109410138A (en) Modify jowled methods, devices and systems
CN109559342B (en) Method and device for measuring animal body length
CN114066848A (en) FPCA appearance defect visual inspection system
CN117589109B (en) Quality detection and control method for quartz center tray manufacturing process
CN112184636A (en) Detection method and detection device for fixing part in circuit board
CN107945237A (en) Multiple dimensioned scaling board
CN114549513A (en) Part identification method, part identification device, quality inspection method, electronic device, and storage medium
CN109102486B (en) Surface defect detection method and device based on machine learning
CN108171756A (en) Self-adapting calibration method, apparatus and terminal
CN103472064A (en) Appraisal method of circular bright polished gemstone cut
CN112837271B (en) Melon germplasm resource character extraction method and system
CN116071335A (en) Wall surface acceptance method, device, equipment and storage medium
KR101024598B1 (en) Surface inspection method using algorithm calculating variance of variance on surface brightness
CN114037993A (en) Substation pointer instrument reading method and device, storage medium and electronic equipment
CN117132174B (en) Model training method and system applied to quality detection of industrial assembly line

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