An AI-based visual inspection method and system for detecting appearance defects in intelligent capacitor manufacturing.

By using AI visual inspection methods to perform multi-station, multi-angle image processing and process parameter correlation for capacitors, the problems of low efficiency and poor accuracy of traditional inspection methods are solved, achieving efficient and accurate defect detection and root cause analysis, thus improving the production quality of capacitors.

CN121661426BActive Publication Date: 2026-05-26SHENZHEN SINCERITY TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN SINCERITY TECH
Filing Date
2026-02-05
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Traditional manual visual inspection and fixed-rule machine vision methods suffer from low detection rates, high false detection rates, and insufficient efficiency in capacitor production. They also fail to link defects to upstream production processes, resulting in quality problems that cannot be solved at their root.

Method used

By employing AI visual inspection methods, multi-station, multi-angle images of capacitors and process parameter chains are acquired, pixel-level semantic segmentation is performed, and threshold determination and root cause localization are conducted in conjunction with a pre-determined mapping rule library to achieve efficient and high-precision automated defect detection.

Benefits of technology

It enables efficient and high-precision automated detection of micron-level appearance defects, significantly improving detection speed and accuracy, reducing labor costs, and accurately locating the specific production station and abnormal process parameters where defects occur, thus enabling root cause analysis of quality problems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121661426B_ABST
    Figure CN121661426B_ABST
Patent Text Reader

Abstract

This application provides an AI visual inspection method and system for intelligent manufacturing of capacitors to detect appearance defects. The method includes: acquiring multi-station, multi-angle images of the capacitor and a process parameter chain; wherein the process parameter chain represents the process parameters of each process the capacitor undergoes before reaching the current inspection station; performing pixel-level semantic segmentation based on the multi-station, multi-angle images to obtain a pixel-level segmentation mask image; performing rule matching based on the defect feature set corresponding to the pixel-level segmentation mask image and a pre-determined mapping rule base to obtain a list of rules to be checked; wherein the list of rules to be checked represents rule information used to guide process parameter checks; and performing threshold determination and root cause localization based on the list of rules to be checked and the process parameter chain to obtain a list of diagnostic results for the capacitor. This solution can efficiently and accurately achieve automated defect detection, thereby improving detection speed and accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electronic technology, specifically to an AI visual inspection method and system for intelligent manufacturing of capacitors to detect appearance defects. Background Technology

[0002] As electronic components become increasingly miniaturized and require higher reliability, the detection of capacitor appearance defects (such as pinholes, metallization layer misalignment, edge burrs, and contamination) has become a critical factor affecting product quality and yield. Traditional methods relying on manual visual inspection or machine vision based on fixed rules suffer from low detection rates, high false positive rates, and insufficient efficiency when dealing with large-scale production of billions of units annually. Furthermore, they cannot link defect phenomena to upstream production processes, preventing a closed-loop solution to quality problems at their root. Summary of the Invention

[0003] This application aims to provide an AI visual inspection method and system for intelligent manufacturing of capacitors to detect appearance defects, which can achieve automated defect detection with high efficiency and high precision, thereby improving detection speed and accuracy.

[0004] The technical solution of this application is implemented as follows:

[0005] In a first aspect, embodiments of this application provide an AI visual detection method for appearance defects in intelligent manufacturing of capacitors, the method comprising:

[0006] Acquire multi-station, multi-angle images of the capacitor and a process parameter chain list; wherein, the process parameter chain list is the complete process parameters of each process that the capacitor passes through before reaching the current inspection station;

[0007] Based on the multi-station, multi-angle images, pixel-level semantic segmentation is performed to obtain a pixel-level segmentation mask image.

[0008] Based on the defect feature set corresponding to the pixel-level segmentation mask image and the pre-determined mapping rule base, a list of rules to be checked is obtained; wherein, the list of rules to be checked represents the rule information used to guide the inspection of process parameters;

[0009] Based on the list of rules to be checked and the linked list of process parameters, threshold determination and root cause location are performed to obtain a list of diagnostic results for the capacitor.

[0010] In the above scheme, the step of performing pixel-level semantic segmentation based on the multi-position, multi-angle images to obtain a pixel-level segmentation mask image includes:

[0011] The multi-station, multi-angle images are subjected to standardization preprocessing to obtain filtered images; wherein, the standardization preprocessing includes grayscale normalization, size unification, and background segmentation;

[0012] By using a pre-determined defect detection model, feature extraction and fusion are performed on the filtered image to obtain a multi-feature map;

[0013] Based on the multi-feature map, multi-scale prediction and data processing are performed using a preset detection head to obtain the pixel-level segmentation mask map.

[0014] In the above scheme, the step of extracting and fusing features from the filtered image using a pre-determined defect detection model to obtain a multi-feature map includes:

[0015] By using a pre-determined defect detection model, feature extraction is performed on the filtered image to obtain multiple initial feature maps;

[0016] Based on the multiple initial feature maps, feature fusion is performed to obtain a multi-scale feature map; wherein, the multi-scale feature map includes a shallow feature map and a deep feature map; the shallow feature map includes a first feature map and a second feature map; the deep feature map includes a third feature map and a fourth feature map;

[0017] Any three of the first feature map, the second feature map, the third feature map, and the fourth feature map are determined as the multi-feature map.

[0018] In the above scheme, the step of obtaining the pixel-level segmentation mask map by performing multi-scale prediction and data processing based on the multi-feature map using a preset detection head includes:

[0019] Determine the preset anchor frame corresponding to each feature map in the multi-feature map;

[0020] Using the preset detection head, the offset and confidence level of the preset anchor box corresponding to each feature map in the multi-feature map are calculated; wherein, the confidence level is the confidence score of the preset anchor box belonging to each defect category; and the offset is the position of each preset anchor box after each feature map in the multi-feature map.

[0021] Based on the offset and confidence level of the preset anchor box corresponding to each feature map in the multi-feature map, a candidate list is determined;

[0022] The candidate list is subjected to non-maximum suppression processing to obtain the pixel-level segmentation mask image.

[0023] In the above scheme, the step of obtaining a list of rules to be queried based on the defect feature set corresponding to the pixel-level segmentation mask image and a pre-determined mapping rule base includes:

[0024] Feature extraction is performed on the pixel-level segmentation mask to obtain a defect feature set; wherein, the defect feature set includes the main defect category, the defect region location, and the number of defect weights;

[0025] The defect feature set is matched with the mapping rule base to obtain the list of rules to be checked; wherein, the mapping rule base represents the mapping relationship between defect features, workstations and parameters; the list of rules to be checked includes all successfully matched rules; each rule contains trigger conditions, inspection workstations and parameter inspection items.

[0026] In the above scheme, the step of performing threshold determination and root cause location based on the list of rules to be checked and the process parameter linked list to obtain the diagnostic result list of the capacitor includes:

[0027] Based on the inspection stations and parameter inspection items in the list of rules to be checked, data location and extraction are performed on the process parameter chain to obtain the parameter values ​​corresponding to each inspection station.

[0028] The parameter values ​​corresponding to each inspection station are compared with preset thresholds to determine the judgment result of the inspection station.

[0029] Based on the judgment results of the inspection station, multi-rule processing and sorting are performed to obtain the diagnostic result list of the capacitor.

[0030] In the above scheme, before extracting features from the filtered image using a pre-determined defect detection model to obtain a multi-feature map, the method further includes:

[0031] Acquire images of real defects, images of normal capacitors, and labels for specific defect categories;

[0032] Based on the normal capacitor image and the specific defect category label, an image is generated by a generator to obtain a defect-generated image.

[0033] Based on the real defect image and the generated defect image, adversarial training is performed using a discriminator to obtain the training result;

[0034] Based on the training results, the normal capacitor image, and the specific defect category label, the generator performs image generation to obtain defect sample images.

[0035] Based on the defect sample images and the real defect images, training set data is determined; and the initial defect detection model is trained using the training set data to obtain the defect detection model.

[0036] Secondly, embodiments of this application provide an AI visual inspection system for detecting appearance defects in intelligent capacitor manufacturing. This system includes: an acquisition module, a segmentation module, a matching module, and a positioning module.

[0037] The acquisition module is used to acquire multi-station, multi-angle images of the capacitor and a process parameter chain list; wherein, the process parameter chain list is the complete process parameters of each process that the capacitor passes through before reaching the current inspection station;

[0038] The segmentation module is used to perform pixel-level semantic segmentation based on the multi-position, multi-angle image to obtain a pixel-level segmentation mask image.

[0039] The matching module is used to obtain a list of rules to be checked based on the set of defect features corresponding to the pixel-level segmentation mask and a pre-determined mapping rule base; wherein, the list of rules to be checked represents rule information used to guide the inspection of process parameters;

[0040] The positioning module is used to perform threshold determination and root cause location based on the list of rules to be checked and the process parameter chain, and obtain a list of diagnostic results for the capacitor.

[0041] Thirdly, embodiments of this application provide an AI visual inspection device for detecting appearance defects in intelligent manufacturing of capacitors, comprising: a processor and a memory; wherein,

[0042] The memory is used to store computer programs;

[0043] The processor is configured to call and run the computer program from the memory to perform the method as described in the first aspect.

[0044] Fourthly, embodiments of this application provide a computer-readable storage medium storing executable instructions for causing a processor to perform the method described in the first aspect.

[0045] This application provides an AI visual inspection method and system for intelligent manufacturing of capacitors to detect appearance defects. The method includes: acquiring multi-station, multi-angle images of the capacitor and a process parameter list; wherein the process parameter list represents the complete process parameters of each process the capacitor undergoes before reaching the current inspection station; performing pixel-level semantic segmentation based on the multi-station, multi-angle images to obtain a pixel-level segmentation mask; obtaining a list of rules to be checked based on the defect feature set corresponding to the pixel-level segmentation mask and a pre-determined mapping rule library; wherein the list of rules to be checked represents rule information used to guide process parameter checks; and performing threshold determination and root cause localization based on the list of rules to be checked and the process parameter list to obtain a list of diagnostic results for the capacitor. In the above scheme, by performing pixel-level semantic segmentation on the acquired multi-station, multi-angle images, efficient and high-precision automated defect detection of micron-level appearance defects is achieved, completely replacing inefficient and inconsistent manual visual inspection, significantly improving detection speed and accuracy, and greatly reducing labor costs. By intelligently linking visual defect features with structured production history data through a rule base, the specific production station and abnormal process parameters that caused the defect can be accurately located, realizing the root cause analysis of quality problems and surpassing the traditional model of only identifying defects. Attached Figure Description

[0046] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the specification, serve to explain the technical solutions of this application. Obviously, the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.

[0047] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.

[0048] Figure 1 This is an optional flowchart illustrating an AI visual inspection method for detecting appearance defects in intelligent manufacturing of capacitors, provided in an embodiment of this application.

[0049] Figure 2 This diagram illustrates an optional candidate list generation method for an AI visual detection method of appearance defects in intelligent manufacturing of capacitors, as provided in an embodiment of this application.

[0050] Figure 3This is a schematic diagram of the structure of an AI visual inspection system for intelligent manufacturing appearance defects of capacitors, provided in an embodiment of this application.

[0051] Figure 4 This is a schematic diagram of the structure of an AI visual inspection device for intelligent manufacturing of capacitors to detect appearance defects, provided in an embodiment of this application. Detailed Implementation

[0052] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the specific technical solutions of this application will be further described in detail below with reference to the accompanying drawings of the embodiments of this application. The following embodiments are used to illustrate this application, but are not intended to limit the scope of this application.

[0053] Unless otherwise defined, all technical and scientific terms used in this application have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. The terminology used in this application is for the purpose of describing embodiments of this application only and is not intended to be limiting of this application.

[0054] In the following description, references to "some embodiments," "this embodiment," "this application embodiment," and examples, etc., describe a subset of all possible embodiments. However, it is understood that "some embodiments" may be the same subset or different subset of all possible embodiments and may be combined with each other without conflict.

[0055] If the application documents contain similar descriptions such as "first / second", the following explanation shall be added: In the following description, the terms "first / second / third" are used only to distinguish similar objects and do not represent a specific order of objects. It is understood that "first / second / third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.

[0056] This application provides an AI visual detection method for intelligent manufacturing of capacitors to detect appearance defects. Figure 1 This is an optional flowchart illustrating an AI visual inspection method for detecting appearance defects in capacitors during intelligent manufacturing, provided in an embodiment of this application. Figure 1 The steps shown are explained.

[0057] S101. Obtain multi-station, multi-angle images of the capacitor and a process parameter chain list; wherein, the process parameter chain list contains the complete process parameters of each process that the capacitor passes through before reaching the current inspection station.

[0058] In some embodiments of this application, the process parameter chain list is the complete process parameters of each process that the capacitor goes through before reaching the current testing station; the multi-station multi-angle image is an image of the capacitor obtained from multiple angles at different stations, which includes multiple images.

[0059] In some embodiments of this application, an AI visual detection method for intelligent manufacturing of capacitors to detect appearance defects is adapted to the scenario of capacitor appearance defect detection.

[0060] In some embodiments of this application, an AI visual inspection method for detecting appearance defects in intelligent capacitor manufacturing is adapted to an AI visual inspection system for detecting appearance defects in intelligent capacitor manufacturing.

[0061] In some embodiments of this application, multi-station, multi-angle images of capacitors are acquired by high-resolution industrial cameras deployed at key workstations on the production line. Simultaneously, complete process parameters of each process that the capacitor passes through before reaching the current inspection station are extracted from the manufacturing execution system in real time and stored in a structured manner as a process parameter chain, thereby obtaining a process parameter chain list.

[0062] For example, high-resolution industrial cameras are deployed at key workstations on the production line to image each capacitor from multiple angles, obtaining multi-station, multi-angle images. Simultaneously, the complete process parameters of each process that the capacitor has passed through before reaching the current inspection station are extracted in real time from the Manufacturing Execution System and stored in a structured linked list of process parameters. As shown in Table 1, the linked list of process parameters uses the capacitor's unique serial number (e.g., CAP-20240520-0001) as the primary key and records its workstation data throughout the entire process.

[0063] Table 1

[0064]

[0065] It should be noted that the data is structured: each row represents a physical workstation, and parameters are strongly bound to the workstation, avoiding data ambiguity. It is also traceable: the workstation number and timestamp together constitute the spatiotemporal trajectory of the production process.

[0066] S102. Based on multi-position and multi-angle images, perform pixel-level semantic segmentation to obtain a pixel-level segmentation mask image.

[0067] In some embodiments of this application, multi-station, multi-angle images are subjected to standardized preprocessing to obtain filtered images; wherein, the standardized preprocessing includes grayscale normalization, size unification, and background segmentation; through a predetermined defect detection model, the filtered images are subjected to feature extraction and fusion to obtain multi-feature maps; based on the multi-feature maps, multi-scale prediction and data processing are performed through a preset detection head to obtain pixel-level segmentation mask maps.

[0068] In some embodiments of this application, the pixel-level segmentation mask image includes the pixel-level location, category label, and confidence level of the defect.

[0069] S103. Based on the defect feature set corresponding to the pixel-level segmentation mask image and the pre-determined mapping rule base, rule matching is performed to obtain a list of rules to be checked; wherein, the list of rules to be checked represents the rule information used to guide the inspection of process parameters.

[0070] In some embodiments of this application, feature extraction is performed on the pixel-level segmented mask image to obtain a defect feature set; wherein, the defect feature set includes the main defect category, the defect region location, and the number of defect weights; the defect feature set is matched with the mapping rule base to obtain a list of rules to be checked; wherein, the list of rules to be checked includes all successfully matched rules; each rule includes triggering conditions, inspection station, and parameter inspection items.

[0071] S104. Based on the list of rules to be checked and the process parameter chain, threshold determination and root cause location are performed to obtain a list of diagnostic results for the capacitor.

[0072] In some embodiments of this application, based on the inspection stations and parameter inspection items in the list of rules to be checked, data location and extraction are performed on the process parameter chain to obtain the parameter values ​​corresponding to each inspection station; the parameter values ​​corresponding to each inspection station are compared with preset thresholds to determine the judgment result of the inspection station; based on the judgment result of the inspection station, multi-rule processing and sorting are performed to obtain a list of diagnostic results for the capacitor.

[0073] For example, addressing the problems of traditional capacitor appearance quality inspection being reliant on manual labor, inefficient, and disconnected from the production process, this application proposes a data-driven, causal-correlation-based, closed-loop management-based intelligent defect detection and process traceability method. Its core lies in constructing a three-layer progressive system architecture, as follows:

[0074] Front-end precision perception layer: Employs a multi-scale deep learning network with ResNet-FPN as its core to perform pixel-level semantic segmentation on the appearance of capacitors, achieving automated, high-precision identification and quantitative feature extraction of micron-level defects, replacing traditional manual visual inspection.

[0075] Mid-range intelligent inference layer: Constructs a rule-based mapping and tracing mechanism for "defect features - process parameters". By matching the extracted pixel-level defect features with a predefined expert rule base, it automatically generates accurate workstation inspection instructions; then, based on the instructions, it retrieves the historical records of structured process parameters corresponding to the capacitor, performs deterministic threshold comparison and anomaly location, obtains tracing diagnosis results, and directly associates the defect phenomenon with the abnormal parameters of the specific production process.

[0076] Back-end closed-loop execution layer: Based on the traceability and diagnosis results, it automatically generates structured diagnostic reports and executable process optimization suggestions, and feeds them back to the manufacturing execution system in real time to drive the adjustment of production parameters or the pre-maintenance of equipment, forming a quality control closed loop of "detection-diagnosis-feedback-optimization".

[0077] Understandably, by performing pixel-level semantic segmentation on the acquired multi-station, multi-angle images, efficient and high-precision automated defect detection of micron-level appearance defects is achieved. This completely replaces inefficient and inconsistent manual visual inspection, significantly improving detection speed and accuracy while drastically reducing labor costs. Intelligent association of defect visual features with structured production history data through a rule base enables precise location of the specific production station and abnormal process parameters leading to the defect, achieving root cause analysis of quality problems and surpassing the traditional model that only identifies defects.

[0078] In some embodiments of this application, S102 can be implemented by S201-S203, as follows:

[0079] S201. Perform standardization preprocessing on multi-station, multi-angle images to obtain filtered images; wherein, standardization preprocessing includes grayscale normalization, size unification, and background segmentation.

[0080] For example, each multi-station, multi-angle image acquired is subjected to standardized preprocessing. The preprocessing methods include grayscale normalization, size unification to a fixed resolution (such as 1024×1024 pixels), and background segmentation. The purpose of preprocessing is to remove interference information that is irrelevant to defect identification and obtain a filtered image.

[0081] S202. Using a pre-determined defect detection model, feature extraction and fusion are performed on the filtered image to obtain a multi-feature map.

[0082] In some embodiments of this application, a filter image is subjected to feature extraction using a pre-determined defect detection model to obtain multiple initial feature maps; based on the multiple initial feature maps, feature fusion is performed to obtain multi-scale feature maps; wherein, the multi-scale feature maps include shallow feature maps and deep feature maps; the shallow feature maps include a first feature map and a second feature map; the deep feature maps include a third feature map and a fourth feature map; any three of the first feature map, the second feature map, the third feature map, and the fourth feature map are determined as the multi-feature map.

[0083] For example, the filtered image is input into the multi-scale feature extraction network of the defect detection model for feature extraction and fusion to obtain multiple feature maps. The multi-scale feature extraction network uses a pre-trained ResNet-50 as the backbone network to construct a feature pyramid network (FPN). The four stages of ResNet-50 output multiple initial feature maps (C2, C3, C4, C5), which are fused with the FPN through the top-down path and lateral connections to generate multi-scale feature maps (P2, P3, P4, P5). The shallow feature maps (such as P2 and P3) retain rich detail information, while the deep feature maps (such as P4 and P5) contain high-level semantic information.

[0084] In practice, to optimize speed, the final feature map will use any three of P2, P3, P4, and P5 to determine a multi-feature map.

[0085] It should be noted that P2 is the first feature map, P3 is the second feature map, P4 is the third feature map, and P5 is the fourth feature map.

[0086] In some embodiments of this application, before extracting features from the filtered image using a predetermined defect detection model to obtain a multi-feature map, the following steps are also included:

[0087] Acquire images of real defects, images of normal capacitors, and labels for specific defect categories;

[0088] Based on normal capacitor images and specific defect category labels, a generator is used to generate defect-generated images.

[0089] Based on real defect images and defect-generated images, adversarial training is performed using a discriminator to obtain training results;

[0090] Based on the training results, normal capacitor images, and specific defect category labels, a generator is used to generate defect sample images.

[0091] The training set data is determined based on defect sample images and real defect images; and the initial defect detection model is trained using the training set data to obtain the defect detection model.

[0092] For example, to address the problem of imbalanced positive and negative samples in actual production, especially the scarcity of certain severely defective samples, a conditional generative adversarial network is constructed for data augmentation.

[0093] S1. Use a normal capacitor image and a specific defect category label as input to the generator G.

[0094] S2. Train the discriminator D to distinguish between real defect images and generated images. Through adversarial training, the generator can synthesize visually realistic images with diverse defect morphologies.

[0095] S3. Add the generated defect images to the training set for iterative optimization of the ResNet-FPN detection model (i.e., the defect detection model), which can significantly improve the model's robustness in identifying rare defects.

[0096] S203. Based on multiple feature maps, multi-scale prediction and data processing are performed using a preset detection head to obtain a pixel-level segmentation mask map.

[0097] In some embodiments of this application, a preset anchor box corresponding to each feature map in a multi-feature map is determined; the offset and confidence level of the preset anchor box corresponding to each feature map in the multi-feature map are calculated using a preset detection head; wherein, the confidence level is the confidence score of the preset anchor box belonging to each defect category; the offset is the position of each preset anchor box after each feature map in the multi-feature map; a candidate list is determined based on the offset and confidence level of the preset anchor box corresponding to each feature map in the multi-feature map; and non-maximum suppression processing is performed on the candidate list to obtain a pixel-level segmentation mask map.

[0098] For example, to balance detection accuracy and implementation complexity, a multi-scale fixed anchor box pre-set strategy is adopted instead of the adaptive anchor box mechanism. Specifically, based on statistical analysis of historical defect annotation data, a set of fixed-size anchor boxes is pre-set for each feature map layer of the FPN, as follows:

[0099] P2 layer (highest resolution): Sets a preset small-sized anchor frame (such as 8×8, 16×16 pixels), specifically for detecting tiny defects such as "pinholes" and "micro-scratches".

[0100] P3 layer: Set a preset medium-sized anchor frame (such as 32×32, 64×64 pixels) to detect common defects such as "metal layer offset" and "edge burrs".

[0101] P4 / P5 layer (lower resolution): Set a preset larger anchor frame (such as 128×128, 256×256 pixels) to detect macroscopic defects such as "large area contamination" and "uneven coating".

[0102] A lightweight detection head with shared weights is applied to each feature map layer (P2 to P5) of the FPN. This detection head contains two parallel branches, as follows:

[0103] Classification branch: Using a 3×3 convolutional layer, calculate the confidence score for each preset anchor box to belong to each defect category (including "background").

[0104] Regression branch: Using a 1×1 convolutional layer, the fine adjustment (offset) of the coordinates of each preset anchor box is calculated, that is, the position of each preset anchor box after each P.

[0105] Multi-scale prediction and preliminary summary as follows Figure 2 As shown, layers P2 to P5 are predicted using the aforementioned detection head at their respective feature scales, generating T2 to T5. Shallow layers (such as P2) focus on detecting small defects (such as pinholes), while deeper layers (such as P5) focus on detecting large defects. The predicted bounding boxes generated by all layers, after initial confidence screening, along with their category and offset information, are aggregated into a unified candidate list.

[0106] Non-maximum suppression is applied to the aggregated candidate list to eliminate overlapping detection boxes for the same defect; specifically, the box with the highest confidence score is retained. The system ultimately outputs a unified detection result, presented as a pixel-level segmentation mask. In this pixel-level segmentation mask, each identified defect region is precisely delineated and associated with its specific category label (e.g., "pinhole") and a confidence score between 0 and 100, as shown in Table 2.

[0107] Table 2

[0108]

[0109] It should be noted that the "%" in the confidence calculation in Table 2 is the modulo operation. The confidence calculation formula is 100 - pixel value % 100. Taking 100 - 149 % 100 as an example, after performing the modulo operation between 149 and 100, we get 49. Then, we subtract 49 from 100 to get 51. That is, the confidence level corresponding to the pixel value 149 is 51.

[0110] In some embodiments of this application, S103 can be implemented by S301-S303, as follows:

[0111] S301. Extract features from the pixel-level segmentation mask to obtain a defect feature set; wherein, the defect feature set includes the main defect category, the defect region location, and the number of defect weights.

[0112] S302. Match the defect feature set with the mapping rule base to obtain a list of rules to be checked; wherein, the mapping rule base represents the mapping relationship between defect features, workstations and parameters; the list of rules to be checked includes all successfully matched rules; each rule contains triggering conditions, inspection workstations and parameter inspection items.

[0113] For example, the defect feature set D of the current capacitor is parsed from the pixel-level segmentation mask image. The defect feature set D includes the following:

[0114] D.type: Defect main category (enumerated values, such as "pinhole", "edge burr", "metal layer offset").

[0115] D.location: The location of the defect on the device (enumerated values, such as "top electrode edge", "dielectric layer center", "arbitrary").

[0116] D.count: The number of weights for the same type of defect, calculated using the following formula:

[0117]

[0118] in, thr 0 and thr 1 represents the threshold for the corresponding main defect category; for example, for pinholes, thr 0 = 99 thr 1=199; type indicates whether it is the main defect category to be counted, pix is ​​the pixel value of the pixel-level segmentation mask, H and W are the height and width of the pixel-level segmentation mask, and i and j are the pixel indices respectively.

[0119] The defect feature set D is matched against a predefined mapping rule base one by one to find all rules that meet the conditions. Successfully matched rules are collected to form a list of rules to be searched, such as:

[0120] Rule R001: IF (defect type == “pinhole”) THEN Inspection station:

[10] ; Inspection parameters: {station 10, parameter: “vacuum degree”, threshold type: “greater than”, threshold: 1.0e-2 Pa};

[0121] Rule R002: IF (defect type == “edge burr”) & (size > 100 pixels) THEN Inspection station:

[20] ; Inspection parameters: {station 20, parameter: “winding tension”, threshold type: “range”, lower threshold: 22 N, upper threshold: 28 N};

[0122] Rule R003: IF (Defect Type == “Metal Layer Offset”) & (Location == “Electrode Area”) THEN Inspection Station: [20, 40]; Inspection Parameters: {Station 20, Parameter: “Alignment Accuracy”, Threshold: >0.05mm}; {Station 40, Parameter: “Photolithography Offset”, Threshold: >0.03mm}.

[0123] It should be noted that the list of rules to be queried contains all successfully matched rules, and each rule contains the following key information:

[0124] Triggering conditions: Which specific defect features triggered this rule;

[0125] Inspection station: One or more station numbers that need to be inspected (e.g.,

[10] , [20, 40]).

[0126] Parameter check items: Specific parameters and thresholds that need to be checked for each workstation.

[0127] In some embodiments of this application, S104 can be implemented by S401-S403, as follows:

[0128] S401. Based on the inspection stations and parameter inspection items in the list of rules to be checked, perform data location and extraction on the process parameter chain to obtain the parameter values ​​corresponding to each inspection station.

[0129] S402. Compare the parameter values ​​corresponding to each inspection station with the preset thresholds to determine the judgment result of the inspection station.

[0130] S403. Based on the judgment results of the inspection station, perform multi-rule processing and sorting to obtain a list of diagnostic results for the capacitor.

[0131] For example, operations are performed based on a list of rules to be checked, which specifies: which workstations need to be checked (via the "Check Workstation" field); which parameters need to be checked for each workstation (via the "Parameter Check Item" field); and what the normal threshold range for each parameter is (via fields such as "Lower Threshold", "Upper Threshold", etc.).

[0132] The specific processing flow for performing operations based on the list of rules to be queried is as follows:

[0133] Data location and extraction: For each rule in the list of rules to be checked, locate the corresponding workstation row from the process parameter chain table according to the "inspection station" field in the rule; extract the actual value P_actual of the corresponding parameter from the workstation row according to the "parameter inspection item" in the rule.

[0134] Threshold comparison and judgment: For each extracted parameter, a threshold judgment is performed, comparing P_actual with the threshold range defined in the rule. The judgment logic is as follows:

[0135] If P_actual exceeds the threshold range, mark the workstation as a "highly suspicious root cause" and record the abnormal parameters, actual values, thresholds, and degree of deviation.

[0136] If P_actual is within the threshold range, mark the workstation as "normal" (exclude it from the suspicious list).

[0137] Multi-rule processing and sorting: If a defect triggers multiple rules, all check items of all rules are processed in parallel.

[0138] Summarize all workstations marked as "highly suspicious root causes"; sort the suspicious workstations by the severity of the anomaly (e.g., percentage deviation from the threshold).

[0139] Output: List of diagnostic results.

[0140] This list contains all workstations deemed suspicious and their anomaly details, formatted as follows:

[0141] text [

[0143] {

[0144] Suspicious workstation: 20

[0145] Abnormal parameter: "winding tension",

[0146] Actual parameter value: "20 N",

[0147] Threshold range: "22-28 N",

[0148] Deviation level: -9% (below the lower limit)

[0149] Suspiciousness level: "High"

[0150] },

[0151] {

[0152] Suspicious workstations: 40

[0153] Abnormal parameter: "Alignment precision",

[0154] Actual parameter value: ±0.06mm

[0155] Threshold range: "<±0.05mm",

[0156] Deviation level: +20% (exceeding the upper limit)

[0157] Suspiciousness level: "Medium"

[0158] } ]

[0160] Understandably, this embodiment enables efficient and high-precision automated defect detection. Through a pixel-level semantic segmentation model based on ResNet-FPN, it achieves automatic identification and quantification of micron-level appearance defects, completely replacing inefficient and inconsistent manual visual inspection. This significantly improves detection speed and accuracy while drastically reducing labor costs. An interpretable defect-process traceability mechanism is established: Visual features of defects are intelligently correlated with structured production history data through a rule base. This allows for precise location of the specific production station and abnormal process parameters leading to the defect, enabling root cause analysis of quality problems and surpassing the traditional model that only identifies defects. The previously isolated "quality inspection" step is deeply integrated into the manufacturing process, achieving end-to-end connectivity from "defect discovery" to "locating and eliminating the root cause." This significantly improves product yield, reduces quality costs, and provides an interpretable, implementable, efficient, and reliable core quality control tool for intelligent manufacturing.

[0161] Based on the above embodiments, an AI visual inspection method for detecting appearance defects in intelligent capacitor manufacturing is provided. This application also provides an AI visual inspection system for detecting appearance defects in intelligent capacitor manufacturing, such as... Figure 3 As shown, Figure 3 This is a schematic diagram of the structure of an AI visual inspection system for intelligent manufacturing appearance defects of capacitors provided in an embodiment of this application. The AI ​​visual inspection system 3 for intelligent manufacturing appearance defects of capacitors includes: an acquisition module 301, a segmentation module 302, a matching module 303, and a positioning module 304. The acquisition module 301 is used to acquire multi-station, multi-angle images of the capacitor and a process parameter chain list. The process parameter chain list contains the complete process parameters of each process that the capacitor passes through before reaching the current inspection station.

[0162] The segmentation module 302 is used to perform pixel-level semantic segmentation based on the multi-position multi-angle image to obtain a pixel-level segmentation mask image.

[0163] The matching module 303 is used to obtain a list of rules to be checked based on the set of defect features corresponding to the pixel-level segmentation mask and a pre-determined mapping rule base; wherein, the list of rules to be checked represents rule information used to guide the inspection of process parameters;

[0164] The positioning module 304 is used to perform threshold determination and root cause location based on the list of rules to be checked and the process parameter chain to obtain a list of diagnostic results for the capacitor.

[0165] In some embodiments of this application, the segmentation module 302 is further configured to perform standardized preprocessing on the multi-station, multi-angle image to obtain a filtered image; wherein, the standardized preprocessing includes grayscale normalization, size unification, and background segmentation; through a pre-determined defect detection model, the filtered image is subjected to feature extraction and fusion to obtain a multi-feature map; based on the multi-feature map, multi-scale prediction and data processing are performed through a preset detection head to obtain the pixel-level segmentation mask map.

[0166] In some embodiments of this application, the segmentation module 302 is further configured to extract features from the filtered image using a pre-determined defect detection model to obtain multiple initial feature maps; and to perform feature fusion based on the multiple initial feature maps to obtain a multi-scale feature map; wherein the multi-scale feature map includes a shallow feature map and a deep feature map; the shallow feature map includes a first feature map and a second feature map; the deep feature map includes a third feature map and a fourth feature map; and any three of the first feature map, the second feature map, the third feature map, and the fourth feature map are determined as the multi-feature map.

[0167] In some embodiments of this application, the segmentation module 302 is further configured to determine a preset anchor box corresponding to each feature map in the multi-feature map; calculate the offset and confidence level of the preset anchor box corresponding to each feature map in the multi-feature map using the preset detection head; wherein, the confidence level is the confidence score of the preset anchor box belonging to each defect category; the offset is the position of each preset anchor box after each feature map in the multi-feature map; determine a candidate list based on the offset and confidence level of the preset anchor box corresponding to each feature map in the multi-feature map; and perform non-maximum suppression processing on the candidate list to obtain the pixel-level segmentation mask map.

[0168] In some embodiments of this application, the matching module 303 is further configured to extract features from the pixel-level segmentation mask image to obtain a defect feature set; wherein the defect feature set includes the main defect category, the defect region location, and the number of defect weights; and to perform rule matching between the defect feature set and the mapping rule base to obtain the list of rules to be checked; wherein the list of rules to be checked includes all successfully matched rules; each rule includes triggering conditions, inspection station, and parameter inspection items.

[0169] In some embodiments of this application, the positioning module 304 is used to locate and extract data from the process parameter chain based on the inspection stations and parameter inspection items in the list of rules to be checked, to obtain the parameter values ​​corresponding to each inspection station; compare the parameter values ​​corresponding to each inspection station with preset thresholds to determine the judgment result of the inspection station; and perform multi-rule processing and sorting based on the judgment result of the inspection station to obtain the diagnostic result list of the capacitor.

[0170] In some embodiments of this application, the acquisition module 301 is further configured to: acquire a real defect image, a normal capacitor image, and a specific defect category label before extracting features from the filtered image using a pre-determined defect detection model to obtain a multi-feature map; generate a defect-generated image using a generator based on the normal capacitor image and the specific defect category label; perform adversarial training using a discriminator based on the real defect image and the defect-generated image to obtain a training result; generate a defect sample image using the generator based on the training result, the normal capacitor image, and the specific defect category label; determine training set data based on the defect sample image and the real defect image; and train the initial defect detection model using the training set data to obtain the defect detection model.

[0171] Based on the above embodiments, an AI visual inspection method for detecting appearance defects in intelligent capacitor manufacturing is provided. This application also provides an AI visual inspection device for detecting appearance defects in intelligent capacitor manufacturing, such as... Figure 4 As shown, Figure 4 This is a schematic diagram of the structure of an AI visual inspection device for intelligent manufacturing appearance defects of capacitors, provided in an embodiment of this application. The AI ​​visual inspection device 4 for intelligent manufacturing appearance defects of capacitors includes a processor 401 and a memory 402. The memory 402 is used to store computer programs; the processor 401 is used to call and run the computer programs from the memory to execute the AI ​​visual inspection method for intelligent manufacturing appearance defects of capacitors as described in the above embodiment.

[0172] In the embodiments of this application, the processor 401 described above can be at least one of the following: Application-Specific Integrated Circuit (ASIC), Digital Signal Processor (DSP), Digital Signal Processing Device (DSPD), Programmable Logic Device (PLD), Field-Programmable Gate Array (FPGA), Central Processing Unit (CPU), Controller, Microcontroller, and Microprocessor. It is understood that for different devices, the electronic device used to implement the above processor function can also be other types, and the embodiments of this application do not specifically limit it.

[0173] This application provides a computer-readable storage medium storing a computer program for implementing, when executed by a processor, an AI visual detection method for detecting appearance defects in intelligent manufacturing of capacitors as described in any of the above embodiments.

[0174] For example, the program instructions corresponding to the AI ​​visual detection method for intelligent manufacturing appearance defects of capacitors in this embodiment can be stored on storage media such as optical discs, hard disks, and USB flash drives. When the program instructions corresponding to the AI ​​visual detection method for intelligent manufacturing appearance defects of capacitors in the storage media are read or executed by an electronic device, the AI ​​visual detection method for intelligent manufacturing appearance defects of capacitors as described in any of the above embodiments can be realized.

[0175] Furthermore, in the embodiments of this application, the functional modules can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional module.

[0176] If the integrated unit is implemented as a software functional module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the method of this embodiment. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0177] It should be understood that the phrases "one embodiment," "an embodiment," or "some embodiments" mentioned throughout the specification mean that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of this application. Therefore, "in one embodiment," "in one embodiment," or "in some embodiments" appearing throughout the specification do not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. It should be understood that in the various embodiments of this application, the sequence numbers of the above-described processes do not imply a sequential order of execution; the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application. The sequence numbers of the embodiments in this application are merely for descriptive purposes and do not represent the superiority or inferiority of the embodiments. The descriptions of the various embodiments above tend to emphasize the differences between the various embodiments; their similarities or commonalities can be referred to mutually, and for the sake of brevity, these will not be repeated here.

[0178] The modules described above as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules. They may be located in one place or distributed across multiple network units. Some or all of the modules may be selected to achieve the purpose of this embodiment according to actual needs.

[0179] In addition, each functional module in the various embodiments of this application can be integrated into one processing unit, or each module can be a separate unit, or two or more modules can be integrated into one unit; the integrated modules can be implemented in hardware or in the form of hardware plus software functional units.

[0180] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media that can store program code, such as mobile storage devices, read-only memory (ROM), magnetic disks, or optical disks.

[0181] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.

[0182] The features disclosed in the several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.

[0183] The features disclosed in the several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method or device embodiments.

[0184] The above description is merely an embodiment of this application, but the protection scope of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the protection scope of this application. Therefore, the protection scope of this application should be determined by the protection scope of the claims.

Claims

1. An AI visual inspection method for detecting appearance defects in intelligent manufacturing of capacitors, characterized in that, The method includes: Acquire multi-station, multi-angle images of the capacitor and a process parameter chain list; wherein, the process parameter chain list is the complete process parameters of each process that the capacitor passes through before reaching the current inspection station; Based on the multi-station, multi-angle images, pixel-level semantic segmentation is performed to obtain a pixel-level segmentation mask image. Based on the defect feature set corresponding to the pixel-level segmentation mask image and the pre-determined mapping rule base, a list of rules to be checked is obtained; wherein, the list of rules to be checked represents the rule information used to guide the inspection of process parameters; Based on the list of rules to be checked and the process parameter chain, threshold determination and root cause location are performed to obtain a list of diagnostic results for the capacitor. The step of obtaining a list of rules to be queried based on the defect feature set corresponding to the pixel-level segmentation mask image and a pre-determined mapping rule base includes: Feature extraction is performed on the pixel-level segmentation mask to obtain a defect feature set; wherein, the defect feature set includes the main defect category, the defect region location, and the number of defect weights; The defect feature set is matched with the mapping rule base to obtain the list of rules to be checked; wherein, the mapping rule base represents the mapping relationship between defect features, workstations and parameters; the list of rules to be checked includes all successfully matched rules; each rule contains trigger conditions, inspection workstations and parameter inspection items; The step of performing threshold determination and root cause location based on the list of rules to be checked and the process parameter linked list to obtain a list of diagnostic results for the capacitor includes: Based on the inspection stations and parameter inspection items in the list of rules to be checked, data location and extraction are performed on the process parameter chain to obtain the parameter values ​​corresponding to each inspection station. The parameter values ​​corresponding to each inspection station are compared with preset thresholds to determine the judgment result of the inspection station. Based on the judgment results of the inspection station, multi-rule processing and sorting are performed to obtain the diagnostic result list of the capacitor; The formula for calculating the number of defect weights, D.count, is as follows: Where type indicates whether it is the main defect category to be counted, pix is ​​the pixel value of the pixel-level segmentation mask, H and W are the height and width of the pixel-level segmentation mask, and i and j are the pixel indices.

2. The method according to claim 1, characterized in that, The step of performing pixel-level semantic segmentation based on the multi-position, multi-angle images to obtain a pixel-level segmentation mask image includes: The multi-station, multi-angle images are subjected to standardization preprocessing to obtain filtered images; wherein, the standardization preprocessing includes grayscale normalization, size unification, and background segmentation; By using a pre-determined defect detection model, feature extraction and fusion are performed on the filtered image to obtain a multi-feature map; Based on the multi-feature map, multi-scale prediction and data processing are performed using a preset detection head to obtain the pixel-level segmentation mask map.

3. The method according to claim 2, characterized in that, The process involves extracting and fusing features from the filtered image using a pre-determined defect detection model to obtain a multi-feature map, including: By using a pre-determined defect detection model, feature extraction is performed on the filtered image to obtain multiple initial feature maps; Based on the multiple initial feature maps, feature fusion is performed to obtain a multi-scale feature map; wherein, the multi-scale feature map includes a shallow feature map and a deep feature map; the shallow feature map includes a first feature map and a second feature map; the deep feature map includes a third feature map and a fourth feature map; Any three of the first feature map, the second feature map, the third feature map, and the fourth feature map are determined as the multi-feature map.

4. The method according to claim 2, characterized in that, The step of obtaining the pixel-level segmentation mask map by performing multi-scale prediction and data processing based on the multi-feature map using a preset detection head includes: Determine the preset anchor frame corresponding to each feature map in the multi-feature map; Using the preset detection head, the offset and confidence level of the preset anchor box corresponding to each feature map in the multi-feature map are calculated; wherein, the confidence level is the confidence score of the preset anchor box belonging to each defect category; and the offset is the position of each preset anchor box after each feature map in the multi-feature map. Based on the offset and confidence level of the preset anchor box corresponding to each feature map in the multi-feature map, a candidate list is determined; The candidate list is subjected to non-maximum suppression processing to obtain the pixel-level segmentation mask image.

5. The method according to claim 2, characterized in that, Before obtaining a multi-feature map by extracting and fusing features from the filtered image using a pre-determined defect detection model, the method further includes: Acquire images of real defects, images of normal capacitors, and labels for specific defect categories; Based on the normal capacitor image and the specific defect category label, an image is generated by a generator to obtain a defect-generated image. Based on the real defect image and the generated defect image, adversarial training is performed using a discriminator to obtain the training result; Based on the training results, the normal capacitor image, and the specific defect category label, the generator performs image generation to obtain defect sample images. Based on the defect sample images and the real defect images, training set data is determined; and the initial defect detection model is trained using the training set data to obtain the defect detection model.

6. An AI visual inspection system for detecting appearance defects in intelligent capacitor manufacturing, characterized in that, The AI ​​visual inspection system for detecting appearance defects in intelligent capacitor manufacturing includes: an acquisition module, a segmentation module, a matching module, and a positioning module, wherein... The acquisition module is used to acquire multi-station, multi-angle images of the capacitor and a process parameter chain list; wherein, the process parameter chain list is the complete process parameters of each process that the capacitor passes through before reaching the current inspection station; The segmentation module is used to perform pixel-level semantic segmentation based on the multi-position, multi-angle image to obtain a pixel-level segmentation mask image. The matching module is used to obtain a list of rules to be checked based on the set of defect features corresponding to the pixel-level segmentation mask and a pre-determined mapping rule base; wherein, the list of rules to be checked represents rule information used to guide the inspection of process parameters; The positioning module is used to perform threshold determination and root cause location based on the list of rules to be checked and the process parameter chain, and obtain a list of diagnostic results for the capacitor. The matching module is further configured to extract features from the pixel-level segmentation mask image to obtain a defect feature set; wherein the defect feature set includes the main defect category, defect region location, and defect weight quantity; and to perform rule matching between the defect feature set and the mapping rule base to obtain the list of rules to be checked; wherein the mapping rule base represents the mapping relationship between defect features, workstations, and parameters; the list of rules to be checked includes all successfully matched rules; each rule includes triggering conditions, inspection workstations, and parameter inspection items. The step of performing threshold determination and root cause location based on the list of rules to be checked and the process parameter linked list to obtain a list of diagnostic results for the capacitor includes: Based on the inspection stations and parameter inspection items in the list of rules to be checked, data location and extraction are performed on the process parameter chain to obtain the parameter values ​​corresponding to each inspection station. The parameter values ​​corresponding to each inspection station are compared with preset thresholds to determine the judgment result of the inspection station. Based on the judgment results of the inspection station, multi-rule processing and sorting are performed to obtain the diagnostic result list of the capacitor; The formula for calculating the number of defect weights, D.count, is as follows: Where type indicates whether it is the main defect category to be counted, pix is ​​the pixel value of the pixel-level segmentation mask, H and W are the height and width of the pixel-level segmentation mask, and i and j are the pixel indices.

7. An AI visual inspection device for intelligent manufacturing appearance defects of capacitors, characterized in that, include: Processor and memory, of which, The memory is used to store computer programs; The processor is configured to call and run the computer program from the memory to perform the method as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, It stores executable instructions for causing a processor to execute, thereby implementing the method of any one of claims 1 to 5.