Chip capacitor screen printing defect detection method, device, equipment and storage medium
By combining the YOLO V5 model and the Tensor RT engine, real-time defect detection in the screen printing process of chip capacitors was achieved, solving the problem of missed detections in manual sampling inspection, improving production efficiency and yield, and reducing costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGDONG ELECTRONICS TECH RES INST
- Filing Date
- 2023-02-01
- Publication Date
- 2026-07-24
AI Technical Summary
In the current technology, the detection of defects in the screen printing of chip capacitors mainly relies on manual sampling inspection, which has the problems of high missed detection rate and inability to inspect all defects. This results in defective products flowing into the next process, causing resource waste and low production efficiency.
The YOLO V5 model is used to detect defects in the acquired images. A weight file is generated by training the sample image set and then converted into a target model supported by the Tensor RT engine. Defects in the screen printing process of chip capacitors are detected in real time, and the equipment is stopped for troubleshooting when a defect is detected.
This enables real-time quality control of the screen printing process for chip capacitors, improving yield, reducing manual sampling workload, lowering production costs, and increasing production efficiency.
Smart Images

Figure CN116012354B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to machine vision inspection technology, and more particularly to a method, apparatus, equipment, and storage medium for detecting screen printing defects in chip capacitors. Background Technology
[0002] Surface mount capacitors are widely used in electronic products, including mobile phones and home appliances. The quality of surface mount capacitors determines the performance and lifespan of electronic products; therefore, strict quality control during the manufacturing process is crucial.
[0003] Screen printing appearance inspection of chip capacitors can detect defective products online in real time during the screen printing process, preventing unqualified products from flowing into the next process and causing unnecessary waste. It saves production raw materials, improves product quality, and increases production efficiency.
[0004] Currently, most chip capacitor manufacturers only conduct a full inspection before tape and reel assembly. During the screen printing process, most manufacturers still rely on manual sampling, examining products under an electronic magnifying glass to identify defects. Manual sampling has drawbacks such as the ease of missing defects, inability to promptly detect defective products, and the inability to achieve full inspection. Summary of the Invention
[0005] This invention provides a method, apparatus, equipment, and storage medium for detecting screen printing defects in chip capacitors, thereby enabling quality control during the chip capacitor production process, promptly curbing the generation of defective products, improving product yield and production efficiency, reducing the workload of on-site personnel for random inspections, and lowering production costs.
[0006] In a first aspect, the present invention provides a method for detecting defects in the screen printing of chip capacitors, comprising:
[0007] Obtain a sample image set for model training, the sample image set including multiple sample images, each of which records multiple capacitor electrodes formed on a dielectric layer by silkscreen printing;
[0008] A YOLO V5 model for detecting defects in capacitor electrodes was trained using the sample image set, resulting in a weight file.
[0009] The model weight file is converted to a new format to obtain the target model supported by the Tensor RT engine.
[0010] During the production process, the target model is used to perform defect detection on the acquired images to be inspected, and the detection results are obtained.
[0011] If a defect is found in the test results, the screen printing equipment for chip capacitors will be shut down to allow for troubleshooting.
[0012] Optionally, obtain a set of sample images for model training, including:
[0013] Acquire multiple images of defective products captured by an industrial camera;
[0014] Extract the effective area from the product image;
[0015] The effective region is segmented to obtain a sample image set including multiple sample images.
[0016] Optionally, a YOLO V5 model for detecting defects in capacitor electrodes is trained using the sample image set to obtain a weight file, including:
[0017] A predetermined number of sample images are randomly selected from the sample image set as the first dataset;
[0018] A YOLO V5 model for detecting defects in capacitor electrodes was trained using the first dataset, resulting in the first weight file;
[0019] Defect detection is performed on sample images outside the first dataset in the sample image set using the first weight file to obtain defect detection results;
[0020] The defect detection results are checked and corrected using annotation tools to obtain corrected sample images;
[0021] The corrected sample images and the sample images in the first dataset are merged into a second dataset;
[0022] The YOLO V5 model configured with the first weight file is trained using the second dataset to obtain the second weight file as the final weight file.
[0023] Optionally, a YOLO V5 model for detecting defects in capacitor electrodes is trained using the first dataset to obtain a first weight file, including:
[0024] The first dataset is divided into a first training set and a first validation set according to a preset ratio;
[0025] The YOLO V5 model is trained using the first training set to obtain the first intermediate weight file;
[0026] The YOLO V5 model configured with the first intermediate weight file is validated using the first validation set;
[0027] If the verification results do not meet expectations, adjust the hyperparameters of the YOLO V5 model and return to the step of training the YOLO V5 model using the first training set to obtain the first intermediate weight file;
[0028] When the verification results meet expectations, the training process is stopped, and the first intermediate weight file is used as the first weight file.
[0029] Optionally, the YOLO V5 model configured with the first weight file is trained using the second dataset to obtain the second weight file as the final weight file, including:
[0030] The second dataset is divided into a second training set and a second validation set according to a preset ratio;
[0031] The YOLO V5 model configured with the first weight file is trained using the second training set to obtain the second intermediate weight file;
[0032] The YOLO V5 model configured with the second intermediate weight file was validated using the second validation set;
[0033] If the verification results do not meet expectations, adjust the hyperparameters of the YOLO V5 model and return to the step of training the YOLO V5 model using the second training set to obtain the second intermediate weight file;
[0034] When the verification results meet expectations, the training process is stopped, and the second intermediate weight file is used as the final weight file.
[0035] Optionally, before performing defect detection on the acquired image to be detected using the target model, the method further includes:
[0036] The prediction code of the target model is converted into a DLL dynamic library that can be called by C++, providing model loading interface, parameter modification interface and prediction interface for upper-level software.
[0037] Optionally, after performing defect detection on the acquired image to be detected using the target model, the method further includes:
[0038] The detection results are recorded using a small SQLite database and saved in tabular format. The detection results include the batch and date in which the defects occurred.
[0039] Secondly, the present invention also provides a device for detecting screen printing defects in chip capacitors, comprising:
[0040] The image acquisition module is used to acquire a sample image set for model training. The sample image set includes multiple sample images, and each sample image records multiple capacitor electrodes formed on a dielectric layer by silkscreen printing.
[0041] The model training module is used to train a YOLOv5 model for detecting defects in capacitor electrodes using the sample image set, and to obtain a weight file.
[0042] The format conversion module is used to convert the format of the model weight file to obtain the target model supported by the Tensor RT engine;
[0043] The defect detection module is used to perform defect detection on the acquired image to be detected using the target model during the production process, and obtain the detection result.
[0044] The equipment control module is used to stop the chip capacitor screen printing equipment when defects are found in the test results, so as to facilitate troubleshooting.
[0045] Thirdly, the present invention also provides an electronic device, comprising:
[0046] One or more processors;
[0047] Memory, used to store one or more programs;
[0048] When the one or more programs are executed by the one or more processors, the one or more processors implement the chip capacitor screen printing defect detection method provided in the first aspect of the present invention.
[0049] Fourthly, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the chip capacitor screen printing defect detection method provided in the first aspect of the present invention.
[0050] The present invention provides a method for detecting defects in screen printing on chip capacitors, comprising: acquiring a sample image set for model training, the sample image set including multiple sample images, each sample image recording multiple capacitor electrodes formed on a dielectric layer by screen printing; training a YOLO V5 model for detecting defects in capacitor electrodes using the sample image set, obtaining a weight file; converting the model weight file to a format to obtain a target model supported by the Tensor RT engine; during production, using the target model to perform defect detection on the acquired images to be inspected, obtaining the detection results; when a defect is detected, controlling the chip capacitor screen printing equipment to stop for troubleshooting. This method can effectively control the quality of chip capacitor production, promptly curb the generation of defective products, improve the product yield and production efficiency, reduce the workload of on-site personnel for random inspection, and lower production costs.
[0051] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0052] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0053] Figure 1 A flowchart of a method for detecting screen printing defects in chip capacitors provided in an embodiment of the present invention;
[0054] Figure 2 This is a schematic diagram of a chip capacitor screen printing defect detection device provided in an embodiment of the present invention;
[0055] Figure 3 This is a schematic diagram of the structure of an electronic device provided as an embodiment of the present invention.
[0056] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0057] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0058] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0059] Figure 1 This is a flowchart illustrating a method for detecting screen printing defects in chip capacitors according to an embodiment of the present invention. This embodiment is applicable to situations where defects are detected online in real time during the screen printing process of chip capacitors. This method can be executed by the chip capacitor screen printing defect detection device provided in this embodiment of the present invention. This device can be implemented in software and / or hardware, and is typically configured in electronic devices, such as... Figure 1 As shown, the method for detecting defects in the screen printing of chip capacitors includes the following steps:
[0060] S101. Obtain a sample image set for model training. The sample image set includes multiple sample images, each of which records multiple capacitor electrodes formed on a dielectric layer using silkscreen printing.
[0061] Capacitor electrodes are typically printed onto an insulating dielectric layer using screen printing technology. A single screen printing operation can print multiple capacitor electrodes in an array on the dielectric layer. Sample images can be pre-processed images that conform to the YOLO V5 model input. Each sample image records multiple capacitor electrodes formed on the dielectric layer using screen printing. A collection of multiple sample images forms a sample image set.
[0062] For example, in some embodiments of the present invention, step S101 may include the following sub-steps:
[0063] 1. Acquire multiple images of defective products captured by an industrial camera.
[0064] For example, in some embodiments of the present invention, a 65-megapixel industrial camera is used on-site to photograph defective products and obtain 200 images of the defective products.
[0065] 2. Extract the effective area from the product image.
[0066] For example, the effective area of the product in the image can be cropped by the ROI. The effective area can be the area in the product image that contains all the sheet capacitor electrodes, such as the area after removing the edge areas of the product image.
[0067] 3. The effective region is segmented to obtain a sample image set including multiple sample images.
[0068] For example, the effective area is segmented into 5*5=25 small images with a resolution of 1280*1280. Then, the 200 product images are segmented into a total of 5000 small images as the sample image set of the YOLO V5 model.
[0069] S102. Train a YOLO V5 model for detecting defects in capacitor electrodes using the sample image set, and obtain the weight file.
[0070] In this embodiment of the invention, a YOLO V5 model for detecting defects in capacitor electrodes is trained using a sample image set to obtain a weight file.
[0071] The YOLO V5 network mainly consists of a Backbone, a Neck, and a Head. The Backbone is a convolutional neural network that aggregates and forms image features at different image granularities. It mainly uses Foucault, CSP (Cross Stage Partial), and SPP (Spatial Pyramid Pooling) structures. The Neck is a series of network layers that mix and combine image features and pass them to the prediction layer. It adopts the PANet (Path Aggregation Network) structure and is mainly used to generate feature pyramids. The Head predicts image features, generates bounding boxes, and predicts categories.
[0072] For example, in some embodiments of the present invention, step S102 may include the following sub-steps:
[0073] S1021. Randomly select a preset number of sample images from the sample image set as the first dataset.
[0074] For example, in some embodiments of the present invention, 1,000 images are randomly selected from 5,000 images in the sample image set as the dataset for the first training, referred to as the first dataset.
[0075] S1022. Use the first dataset to train a YOLO V5 model for detecting defects in capacitor electrodes, and obtain the first weight file.
[0076] For example, the LabelImg annotation tool is used to annotate 1000 images in the first dataset to obtain bounding boxes, as well as the location and category information of defects. A YOLO V5 model for detecting defects in capacitor electrodes is then trained using the annotated first dataset, resulting in the first weight file.
[0077] For example, in some embodiments of the present invention, step S1022 may include the following sub-steps:
[0078] 1. Divide the first dataset into a first training set and a first validation set according to a preset ratio.
[0079] For example, the 1000 images in the first dataset are divided into a first training set and a first validation set in a 9:1 ratio.
[0080] 2. Train the YOLO V5 model using the first training set to obtain the first intermediate weight file.
[0081] The YOLO V5 model is trained for the first time using the first training set, resulting in the first intermediate weight file. For example, images from the first training set are input into the YOLO V5 model for processing, yielding prediction results. These prediction results include the coordinates of the top-left and bottom-right corners of the predicted bounding box in the image coordinate system, as well as the confidence score. Specifically, the output of the YOLO V5 network model is (x1, y1, x2, y2, c), where (x1, y1) represents the top-left corner coordinate of the predicted bounding box in the image coordinate system, (x2, y2) is the bottom-right corner coordinate, and c represents the confidence score. When the confidence score is greater than a preset value, the detected target in the predicted bounding box is considered a defect. By calculating the loss between the prediction results and the annotations, the model parameters are adjusted until the loss is reduced to the preset value, thus obtaining the first intermediate weight file.
[0082] 3. Validate the YOLO V5 model configured with the first intermediate weight file using the first validation set.
[0083] For example, the first validation set is input into a YOLO V5 model configured with the first intermediate weight file for processing to obtain prediction results. The prediction results are compared with the labeled information to determine whether the prediction results are consistent with the labeled information, and the accuracy of the prediction results of the first validation set is calculated.
[0084] 4. If the verification results do not meet expectations, adjust the hyperparameters of the YOLO V5 model and return to the step of training the YOLO V5 model using the first training set to obtain the first intermediate weight file.
[0085] For example, if the accuracy of the prediction results of the first validation set is lower than the preset value, the hyperparameters of the YOLO V5 model are adjusted, and the process of training the YOLO V5 model using the first training set to obtain the first intermediate weight file is returned to be performed. The next iteration of training is then carried out until the validation results meet expectations, thereby optimizing the first intermediate weight file.
[0086] 5. When the verification results meet expectations, stop the training process and use the first intermediate weight file as the first weight file.
[0087] When the verification results meet expectations, stop the first training process and use the first intermediate weight file as the first weight file Cap_weight_1000.pt.
[0088] S1023. Use the first weight file to perform defect detection on sample images outside the first dataset in the sample image set, and obtain the defect detection results.
[0089] For example, a YOLO V5 model configured with the first weight file Cap_weight_1000.pt is used to perform defect detection on 4000 sample images outside the first dataset in the sample image set, and the defect detection results are obtained. For example, sample images outside the first dataset in the sample image set are input into the YOLO V5 model configured with the first weight file Cap_weight_1000.pt for processing, and the defect detection results are output. As mentioned above, the detection results include the coordinates of the top-left and bottom-right corners of the predicted bounding boxes in the image coordinate system, as well as the confidence score.
[0090] In existing technologies, all sample images in a dataset are typically manually labeled. Due to the large volume of data, manual labeling is time-consuming and costly. This invention addresses this by manually labeling a small portion of the data, using the labeled data to train a model, and then using the trained model to predict the remaining data in the dataset. The prediction results are then used as labels, achieving automatic labeling of the majority of the data, thus improving labeling efficiency and reducing labeling costs.
[0091] S1024. Use annotation tools to check and correct the defect detection results to obtain the corrected sample image.
[0092] For example, the labeling tool LabelImg can be used to check 4,000 images for any missing or incorrectly labeled bounding boxes and correct them, thereby improving the labeling accuracy.
[0093] S1025. Merge the corrected sample images and the sample images in the first dataset into the second dataset.
[0094] In this embodiment of the invention, the corrected sample images and the sample images in the first dataset are merged into a second dataset, which contains 5,000 images from the sample images, and each image is labeled.
[0095] S1026. Use the second dataset to train the YOLO V5 model configured with the first weight file, and obtain the second weight file as the final weight file.
[0096] The YOLO V5 model configured with the first weight file was trained a second time using the second dataset to optimize the first weight file, and the second weight file was obtained as the final weight file.
[0097] For example, step S1026 above may include the following sub-steps:
[0098] 1. Divide the second dataset into a second training set and a second validation set according to a preset ratio.
[0099] For example, the 5000 labeled images in the second dataset are divided into a second training set and a second validation set in a 9:1 ratio.
[0100] 2. Use the second training set to train the YOLO V5 model configured with the first weight file to obtain the second intermediate weight file.
[0101] The YOLO V5 model is trained a second time using the second training set to obtain a second intermediate weight file. For example, images from the second training set are input into the YOLO V5 model for processing to obtain prediction results. These prediction results include the coordinates of the top-left and bottom-right corners of the predicted bounding boxes in the image coordinate system, as well as the confidence score. The model parameters are adjusted by calculating the loss between the prediction results and the annotations until the loss is reduced to a preset value, thus obtaining the second intermediate weight file.
[0102] 3. Validate the YOLO V5 model configured with the second intermediate weight file using the second validation set.
[0103] For example, the second validation set is input into the YOLO V5 model configured with the second intermediate weight file for processing to obtain the prediction results. The prediction results are compared with the labeled information to determine whether the prediction results are consistent with the labeled information, and the accuracy of the prediction results of the second validation set is calculated.
[0104] 4. If the verification results do not meet expectations, adjust the hyperparameters of the YOLO V5 model and return to the step of training the YOLO V5 model using the second training set to obtain the second intermediate weight file.
[0105] For example, if the accuracy of the prediction results of the second validation set is lower than the preset value, the hyperparameters of the YOLO V5 model are adjusted, and the process is returned to the step of training the YOLO V5 model using the second training set to obtain the second intermediate weight file, and the next iteration of training is performed until the validation results meet expectations, thereby optimizing the second intermediate weight file.
[0106] 5. When the verification results meet expectations, stop the training process and use the second intermediate weight file as the final weight file.
[0107] When the verification results meet expectations, stop the second training process and use the second intermediate weight file as the final weight file Cap_weight_5000.pt.
[0108] S103. Convert the format of the model weight file to obtain the target model supported by the Tensor RT engine.
[0109] For example, in this embodiment of the invention, Cap_weight_5000.pt is first converted to a Cap_weight_5000.wts file, and then the Cap_weight_5000.wts file is converted to a Cap_weight_5000.engine file for application in the TensorRT engine. TensorRT is a deep learning inference acceleration engine that can reduce latency and improve throughput when deep learning models run on GPUs. TensorRT components mainly include: Builder creation, Network creation, Parser creation, input / output binding, serialization or deserialization, CPU-to-GPU data copying, inference execution, and GPU-to-CPU data copying to obtain the final result.
[0110] S104. During the production process, the target model is used to perform defect detection on the collected images to be inspected, and the detection results are obtained.
[0111] In actual production, a target model is used to perform defect detection on the acquired images to be inspected, and the detection results are obtained. For example, a 65-megapixel industrial camera is used on-site to photograph defective products, and the effective area of the product image is extracted. This effective area is then segmented into 25 small images (5*5=25) with a resolution of 1280*1280 pixels. These small images are then input into the target model for processing, and the detection results are output.
[0112] For example, before performing defect detection on the acquired image to be detected using the target model, the following steps are also included:
[0113] The prediction code of the target model is converted into a DLL dynamic library that can be called by C++, providing the upper-level software with model loading interface, parameter modification interface and prediction interface, so that customers can call the target model and modify the parameters of the target model.
[0114] For example, after performing defect detection on the acquired image to be detected using the target model, the process further includes:
[0115] The test results are recorded using a small SQLite database and saved in tabular format. The test results include the batch and date of the defect occurrence, which facilitates data query and management.
[0116] S105. When a defect is found in the test results, the screen printing equipment for chip capacitors shall be stopped in order to troubleshoot the problem.
[0117] For example, during real-time inspection, if a defect is detected, the chip capacitor screen printing equipment is stopped to allow production personnel to troubleshoot and repair the fault causing the defect. The equipment is then restarted after the production personnel have repaired the fault.
[0118] The chip capacitor screen printing defect detection method provided in this invention includes: acquiring a sample image set for model training, the sample image set including multiple sample images, each sample image recording multiple capacitor electrodes formed on a dielectric layer by screen printing; training a YOLO V5 model for detecting defects in capacitor electrodes using the sample image set, obtaining a weight file; converting the model weight file to a format to obtain a target model supported by the Tensor RT engine; during production, using the target model to perform defect detection on the acquired images to be detected, obtaining detection results; when a defect is detected, controlling the chip capacitor screen printing equipment to stop for troubleshooting; effectively controlling quality during the chip capacitor production process, promptly curbing the generation of defective products, improving product yield and production efficiency, reducing the workload of on-site personnel for random inspection, and lowering production costs.
[0119] This invention also provides a device for detecting screen printing defects on chip capacitors. Figure 2 This is a schematic diagram of a chip capacitor screen printing defect detection device provided in an embodiment of the present invention, as shown below. Figure 2 As shown, the chip capacitor screen printing defect detection device includes:
[0120] Image acquisition module 201 is used to acquire a sample image set for model training. The sample image set includes multiple sample images, and the sample images record multiple capacitor electrodes formed on a dielectric layer by silkscreen printing.
[0121] The model training module 202 is used to train a YOLO V5 model for detecting defects in capacitor electrodes using the sample image set, and to obtain a weight file.
[0122] The format conversion module 203 is used to convert the format of the model weight file to obtain the target model supported by the Tensor RT engine;
[0123] The defect detection module 204 is used to perform defect detection on the acquired image to be detected using the target model during the production process, and obtain the detection result.
[0124] The equipment control module 205 is used to control the screen printing equipment for chip capacitors to stop when defects are found in the test results, so as to carry out troubleshooting.
[0125] In some embodiments of the present invention, the image acquisition module 201 includes:
[0126] The image acquisition submodule is used to acquire multiple images of defective products captured by an industrial camera.
[0127] The cropping submodule is used to crop the effective area in the product image;
[0128] The cutting submodule is used to cut the effective region to obtain a sample image set including multiple sample images.
[0129] In some embodiments of the present invention, the model training module 202 includes:
[0130] The sample extraction submodule is used to randomly extract a preset number of sample images from the sample image set as the first dataset.
[0131] The first training submodule is used to train a YOLOv5 model for detecting defects in capacitor electrodes using the first dataset, and to obtain the first weight file.
[0132] The prediction submodule is used to perform defect detection on sample images outside the first dataset in the sample image set using the first weight file, and obtain defect detection results;
[0133] The result correction submodule is used to check and correct the defect detection results using annotation tools to obtain the corrected sample image;
[0134] The data merging submodule is used to merge the corrected sample images and the sample images in the first dataset into a second dataset;
[0135] The second training submodule is used to train the YOLO V5 model configured with the first weight file using the second dataset, and obtain the second weight file as the final weight file.
[0136] In some embodiments of the present invention, the first training submodule includes:
[0137] The first data partitioning unit is used to divide the first dataset into a first training set and a first validation set according to a preset ratio;
[0138] The first training unit is used to train the YOLO V5 model using the first training set to obtain the first intermediate weight file.
[0139] The first verification unit is used to verify the YOLO V5 model configured with the first intermediate weight file using the first verification set.
[0140] The first parameter tuning unit is used to adjust the hyperparameters of the YOLO V5 model when the verification results do not meet expectations, and return to the step of training the YOLO V5 model using the first training set to obtain the first intermediate weight file.
[0141] The first stopping unit is used to stop the training process when the verification result meets expectations, and to use the first intermediate weight file as the first weight file.
[0142] In some embodiments of the present invention, the second training submodule includes:
[0143] The second data partitioning unit is used to divide the second dataset into a second training set and a second validation set according to a preset ratio.
[0144] The second training unit is used to train the YOLO V5 model configured with the first weight file using the second training set to obtain the second intermediate weight file.
[0145] The second verification unit is used to verify the YOLO V5 model configured with the second intermediate weight file using the second verification set;
[0146] The second parameter tuning unit is used to adjust the hyperparameters of the YOLO V5 model when the verification results do not meet expectations, and then return to the step of training the YOLO V5 model using the second training set to obtain the second intermediate weight file.
[0147] The second stopping unit is used to stop the training process when the verification result meets expectations, and to use the second intermediate weight file as the final weight file.
[0148] In some embodiments of the present invention, the chip capacitor screen printing defect detection device further includes:
[0149] The conversion module is used to convert the prediction code of the target model into a DLL dynamic library that can be called by C++ before using the target model to perform defect detection on the acquired image to be detected. This provides the upper-level software with a model loading interface, a parameter modification interface, and a prediction interface.
[0150] In some embodiments of the present invention, the chip capacitor screen printing defect detection device further includes:
[0151] The recording module is used to record the detection results using a small SQLite database after the target model is used to detect defects in the acquired image to be detected, and save them in a table format. The detection results include the batch and date of the defects.
[0152] The above-described chip capacitor screen printing defect detection device can perform the chip capacitor screen printing defect detection method provided in any embodiment of this application, and has the corresponding functional modules and beneficial effects of performing the chip capacitor screen printing defect detection method.
[0153] Figure 3 This is a schematic diagram of an electronic device provided for an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0154] like Figure 3 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0155] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0156] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as the method for detecting defects in the screen printing of chip capacitors.
[0157] In some embodiments, the method for detecting screen printing defects in chip capacitors can be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the chip capacitor screen printing defect detection method described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform the chip capacitor screen printing defect detection method by any other suitable means (e.g., by means of firmware).
[0158] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0159] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0160] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0161] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0162] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0163] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0164] This invention also provides a computer program product, including a computer program that, when executed by a processor, implements the chip capacitor screen printing defect detection method provided in any embodiment of this application.
[0165] In implementing the computer program product, computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof. Programming languages include object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0166] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0167] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method for detecting screen printing defects in chip capacitors, characterized in that, include: Obtain a sample image set for model training, the sample image set including multiple sample images, each of which records multiple capacitor electrodes formed on a dielectric layer by silkscreen printing; A YOLO V5 model for detecting defects in capacitor electrodes was trained using the sample image set, resulting in a weight file. The model weight file is converted to a new format to obtain the target model supported by the Tensor RT engine. During the production process, the target model is used to perform defect detection on the acquired images to be inspected, and the detection results are obtained. If a defect is found in the test results, the chip capacitor screen printing equipment will be shut down for troubleshooting. Using the sample image set, a YOLO V5 model for detecting defects in capacitor electrodes is trained, resulting in a weight file including: A predetermined number of sample images are randomly selected from the sample image set as the first dataset; A YOLO V5 model for detecting defects in capacitor electrodes was trained using the first dataset, resulting in the first weight file; Defect detection is performed on sample images outside the first dataset in the sample image set using the first weight file to obtain defect detection results; The defect detection results are checked and corrected using annotation tools to obtain corrected sample images; The corrected sample images and the sample images in the first dataset are merged into a second dataset; The YOLO V5 model configured with the first weight file is trained using the second dataset to obtain the second weight file as the final weight file.
2. The method for detecting screen printing defects in chip capacitors according to claim 1, characterized in that, Obtain a sample image set for model training, including: Acquire multiple images of defective products captured by an industrial camera; Extract the effective area from the product image; The effective region is segmented to obtain a sample image set including multiple sample images.
3. The method for detecting screen printing defects in chip capacitors according to claim 1, characterized in that, Using the first dataset, a YOLO V5 model for detecting defects in capacitor electrodes is trained, resulting in a first weight file, including: The first dataset is divided into a first training set and a first validation set according to a preset ratio; The YOLO V5 model is trained using the first training set to obtain the first intermediate weight file; The YOLO V5 model configured with the first intermediate weight file is validated using the first validation set; If the verification results do not meet expectations, adjust the hyperparameters of the YOLO V5 model and return to the step of training the YOLO V5 model using the first training set to obtain the first intermediate weight file; When the verification results meet expectations, the training process is stopped, and the first intermediate weight file is used as the first weight file.
4. The method for detecting screen printing defects in chip capacitors according to claim 1, characterized in that, The YOLO V5 model configured with the first weight file is trained using the second dataset to obtain the second weight file as the final weight file, which includes: The second dataset is divided into a second training set and a second validation set according to a preset ratio; The YOLO V5 model configured with the first weight file is trained using the second training set to obtain the second intermediate weight file; The YOLO V5 model configured with the second intermediate weight file was validated using the second validation set; If the verification results do not meet expectations, adjust the hyperparameters of the YOLO V5 model and return to the step of training the YOLO V5 model using the second training set to obtain the second intermediate weight file; When the verification results meet expectations, the training process is stopped, and the second intermediate weight file is used as the final weight file.
5. The method for detecting screen printing defects in chip capacitors according to any one of claims 1-4, characterized in that, Before using the target model to perform defect detection on the acquired image to be detected, the following steps are also included: The prediction code of the target model is converted into a DLL dynamic library that can be called by C++, providing model loading interface, parameter modification interface and prediction interface for upper-level software.
6. The method for detecting screen printing defects in chip capacitors according to any one of claims 1-4, characterized in that, After performing defect detection on the acquired image to be detected using the target model, the process further includes: The detection results are recorded using a small SQLite database and saved in tabular format. The detection results include the batch and date in which the defects occurred.
7. A device for detecting screen printing defects on chip capacitors, characterized in that, A method for performing screen printing defect detection of chip capacitors as described in any one of claims 1-6, comprising: The image acquisition module is used to acquire a sample image set for model training. The sample image set includes multiple sample images, and each sample image records multiple capacitor electrodes formed on a dielectric layer by silkscreen printing. The model training module is used to train a YOLO V5 model for detecting defects in capacitor electrodes using the sample image set, and to obtain a weight file. The format conversion module is used to convert the format of the model weight file to obtain the target model supported by the Tensor RT engine; The defect detection module is used to perform defect detection on the acquired image to be detected using the target model during the production process, and obtain the detection result. The equipment control module is used to stop the chip capacitor screen printing equipment when defects are found in the test results, so as to facilitate troubleshooting.
8. An electronic device, characterized in that, include: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the chip capacitor screen printing defect detection method as described in any one of claims 1-6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by the processor, the program implements the chip capacitor screen printing defect detection method as described in any one of claims 1-6.
Citation Information
Patent Citations
Method for realizing microwave chip defect detection based on YOLOv5 algorithm and few-shot data set
CN113506286A