Resistance disc appearance defect detection method and system
By constructing an associated defect topology group and a migration training mechanism, and combining a dynamic collaborative detection strategy of a general model with a targeted enhancement model, the problems of accuracy degradation and insufficient adaptability in resistor defect detection are solved, and efficient and adaptive resistor defect detection is achieved.
Patent Information
- Application Number
- CN202510840176.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-23
- Publication Date
- 2025-09-16
AI Technical Summary
Existing resistor chip defect detection systems fail to effectively utilize the physical correlation characteristics between defects and the feedback value of historical detection data, resulting in reduced detection accuracy and high missed detection rates, and a lack of adaptability to dynamic changes in production lines.
By building an associated defect topology group and migration training mechanism, and combining a dynamic collaborative detection strategy with general models and targeted enhancement models, we can achieve high-precision and adaptive quality control of resistors throughout their life cycle through process knowledge-driven model optimization.
It significantly improves the composite detection capability of related defects such as oxidation discoloration and cracks, reduces the operation and maintenance cost of model retraining, and forms an intelligent defect detection system with process perception capabilities and autonomous evolution characteristics.
Smart Images

Figure CN120655633A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of defect detection, and in particular to a method and system for detecting appearance defects of resistor sheets. Background Art
[0002] As a key component in electronic circuits, the appearance quality of resistors directly affects their conductivity and equipment stability. Traditional inspections rely primarily on manual visual inspection and single algorithm model recognition, which suffers from low efficiency and high missed detection rates. With the development of machine vision technology, deep learning-based defect detection methods have been applied in industrial scenarios, but they still face challenges in identifying small defects in resistors. On the one hand, defects such as oxidation discoloration and cracks often show morphological correlations due to fluctuations in process parameters, and a single model cannot easily capture the causal relationships between multiple defects. On the other hand, existing models lack adaptability to dynamic changes in production lines. When processing equipment wears or material batches change, detection accuracy is prone to decline, requiring frequent model retraining, which affects the continuous operation efficiency of the inspection system.
[0003] In current technology, most inspection systems use a static model architecture, failing to effectively utilize the physical correlation characteristics between defects and the feedback value of historical inspection data. For example, dimensional deviations in resistors are often accompanied by edge cracks, but traditional methods treat each type of defect as an independent event, resulting in a cumulative increase in the missed detection rate of associated defects. In addition, existing incremental learning solutions often use a fixed weight update mechanism, which makes it difficult to balance the relationship between learning new defect patterns and retaining historical features. The model is not robust enough in the complex environment of multi-variable coupling on the production line. There is an urgent need to build an inspection system with defect correlation reasoning capabilities and dynamic evolution characteristics, and to achieve high-precision and adaptive quality control of resistors throughout their life cycle through process knowledge-driven model optimization. Summary of the Invention
[0004] In order to solve the above technical problems, a method and system for detecting appearance defects of resistor sheets are provided. This technical solution solves the problem that in the above-mentioned current technologies, most detection systems adopt a static model architecture and fail to effectively utilize the physical correlation characteristics between defects and the feedback value of historical detection data.
[0005] In order to achieve the above objects, the technical solution adopted by the present invention is: A method for detecting appearance defects of a resistor sheet, comprising: Based on the historical appearance defect detection data of resistors as sample data, a general appearance defect detection model is trained; Based on the front-to-back correlation attributes between the appearance defects of the resistor, a correlation defect topology group corresponding to each appearance defect is constructed; Based on the associated defect topology group corresponding to the appearance defects, the general appearance defect detection model is transferred and trained to obtain the associated defect targeted enhanced detection model corresponding to the appearance defects; Call the general appearance defect detection model to perform appearance defect detection on the resistor. When an appearance defect is detected, within the set enhancement cycle, call the corresponding associated defect targeted enhancement detection model to perform appearance defect enhancement detection on the resistor. Incremental learning optimization of the general appearance defect detection model is performed based on the appearance defect detection data of resistors.
[0006] Preferably, the training of a general appearance defect detection model based on historical appearance defect detection data of resistor sheets as sample data specifically includes: Summarize all appearance defect types of resistors and extract at least 1,000 standard defect images of each appearance defect type at a 1:1 ratio from the historical appearance defect inspection data of resistors as sample data; Label the defect location and defect type for each sample data to obtain the model training data set; Based on the model training data set, a general appearance defect detection model is trained. The general appearance defect detection model takes a resistor sheet photo as input and outputs whether there is an appearance defect and the type and location of the appearance defect.
[0007] Preferably, the method of constructing a correlation defect topology group corresponding to each appearance defect based on the contextual correlation attributes between the appearance defects of the resistor sheet specifically includes: Based on the processing experience of resistor chips, a physical association rule library is constructed between appearance defects such as oxidation discoloration, cracks, and dimensional deviations; Based on the physical association rule base between appearance defects, other appearance defects that have a causal relationship with the appearance defect are recorded as associated defects corresponding to the appearance defect; All associated defects corresponding to the appearance defect are combined into an associated defect topology group corresponding to the appearance defect.
[0008] Preferably, the transfer training of the general appearance defect detection model based on the associated defect topology group corresponding to the appearance defect to obtain the associated defect targeted enhanced detection model corresponding to the appearance defect specifically includes: Based on the causal relationship between appearance defects and the corresponding associated defect topology group, the detection data corresponding to the associated defects are selected from the historical detection data of the general appearance defect detection model as the transfer learning sample data; Freeze the feature extraction layer parameters of the general appearance defect detection model, and perform enhanced training and adjustment on the top-level parameters of the general appearance defect detection model based on the transfer learning sample data to obtain the initial enhanced detection model; Based on the detection application data of the initial enhanced detection model, the feature extraction layer is gradually unfrozen, and the initial enhanced detection model is trained through feedback learning based on the application data of the initial enhanced detection model under associated defect recognition detection, so as to obtain a targeted enhanced detection model adapted to the associated defect topology group.
[0009] Preferably, the selecting, based on the causal relationship between the appearance defect and the corresponding associated defect topology group, detection data corresponding to the associated defect from historical detection data of the general appearance defect detection model as transfer learning sample data specifically includes: Based on the comparison of the number of appearance defects and related defects appearing on the same resistor in the historical inspection data with the number of appearance defects, the correlation coefficient between the appearance defects and the related defects is obtained; Based on the ratio of the correlation coefficients between appearance defects and all associated defects, the same ratio of detection data corresponding to associated defects is selected from the historical detection data of the general appearance defect detection model as the transfer learning sample data of appearance defects.
[0010] Preferably, the incremental learning optimization of the general appearance defect detection model based on the appearance defect detection data of the resistor specifically includes: Setting a data update cycle, and based on the ratio of appearance defect detection of the resistor sheet within the data update cycle, setting the ratio of the number of samples of each appearance defect type in the incremental learning training data set within the current data update cycle; Set a dynamic forgetting factor to update the weights of the incremental learning training dataset for each data update; Based on the incremental learning training dataset and its corresponding training weights, the general appearance defect detection model is incrementally optimized; Specifically, the calculation formula of the dynamic forgetting factor is: Where, is the weight of the incremental learning training dataset in the kth data update cycle, is the attenuation coefficient, The maximum number of current data update cycles. is the corresponding number of data update cycles.
[0011] Furthermore, a resistor chip appearance defect detection system is proposed, which is used to implement the above-mentioned resistor chip appearance defect detection method, including: A data storage module is used to store historical appearance defect detection data of resistors and configuration rules of associated defect topology groups; a model training module, connected to the data storage module, configured to train a general appearance defect detection model based on historical appearance defect detection data, and execute a transfer training process including freezing feature extraction layer parameters, transfer learning sample data reinforcement training, and feedback learning training; A topology construction module is connected to the data storage module and is configured to construct a physical association rule base of appearance defects based on the experience of resistor processing technology, and generate an associated defect topology group including oxidation discoloration, cracks, and dimensional deviation defects; A detection execution module, comprising a parallel computing unit and an enhancement cycle controller, configured to activate an enhancement cycle when an appearance defect is detected, and synchronously call a general-purpose model and an associated defect-specific enhancement detection model to perform composite detection; The incremental optimization module, which includes a dynamic weight allocator and a forgetting factor calculation unit, is configured to dynamically adjust the weights of the training dataset based on the proportion of appearance defect detection and perform incremental learning optimization on the general appearance defect detection model; The system achieves real-time defect detection and model updating through edge computing devices deployed between industrial cameras and PLC controllers.
[0012] Compared with the prior art, the present invention has the following beneficial effects: The present invention realizes the deep coupling of process experience and defect causal relationship by constructing the associated defect topology group and migration training mechanism, thereby significantly improving the composite detection capability of associated defects such as oxidation discoloration and cracks; adopts the dynamic collaborative detection strategy of general model and targeted enhancement model to enhance the recognition accuracy of associated defects while maintaining basic detection efficiency; combines the dynamic optimization incremental learning mechanism to effectively balance the learning of new defect features and the retention of historical parameters, so that the detection system maintains stable detection performance when the processing conditions fluctuate, significantly reduces the operation and maintenance cost of model retraining, and forms an intelligent defect detection system with process perception capability and autonomous evolution characteristics. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 Flowchart of the resistor chip appearance defect detection method proposed in this solution; Figure 2 This is a flow chart of the method for training a general appearance defect detection model in this solution; Figure 3 Flowchart of the method for constructing an associated defect topology group corresponding to each appearance defect in this solution; Figure 4 This is a flow chart of the method for transferring and training a general-purpose appearance defect detection model in this solution; Figure 5 This is a flow chart of the method for selecting the inspection data corresponding to the associated defects as the sample data for transfer learning in this solution; Figure 6 This is a flow chart of the incremental learning optimization method for the general appearance defect detection model in this solution; Figure 7 This is a diagram of the architecture of the electronic equipment in this solution; Figure 8 This is a schematic diagram of the computer-readable storage medium structure in this solution.
[0014] The numbers in the figure are: 500 - electronic device; 501 - bus; 502 - CPU; 503 - ROM; 504 - RAM; 505 - communication port; 506 - input / output component; 507 - hard disk; 508 - user interface; 600 - computer-readable storage medium. DETAILED DESCRIPTION
[0015] The following description is intended to disclose the present invention so that those skilled in the art can implement the present invention. The preferred embodiments described below are merely examples, and those skilled in the art may conceive of other obvious variations.
[0016] Reference Figure 1 As shown, a method for detecting appearance defects of a resistor sheet includes: Based on the historical appearance defect detection data of resistors as sample data, a general appearance defect detection model is trained; By training the model with historical data, it can cover various defect types commonly seen in the resistor production process, such as oxidation discoloration, cracks, and dimensional deviation, ensuring that the model has basic generalization capabilities. Based on the front-to-back correlation attributes between the appearance defects of the resistor, a correlation defect topology group corresponding to each appearance defect is constructed; The Correlated Defect Topology Group analyzes the physical causal relationships in resistor chip processing, such as how oxidation discoloration may be accompanied by coating loss and cracks may be caused by dimensional deviations, to construct a logical relationship network between defects. This topology group can be generated based on expert experience rules or co-occurrence probabilities in historical data, providing a knowledge-driven Correlated Defect Detection framework for subsequent targeted model migration. Based on the associated defect topology group corresponding to the appearance defects, the general appearance defect detection model is transferred and trained to obtain the associated defect targeted enhanced detection model corresponding to the appearance defects; Through intensive training on associated defect samples, the model retains its basic capabilities while significantly improving its sensitivity to specific defect combinations. For example, the ability to identify coating anomalies during oxidation discoloration detection is enhanced. Call the general appearance defect detection model to perform appearance defect detection on the resistor. When an appearance defect is detected, within the set enhancement cycle, call the corresponding associated defect targeted enhancement detection model to perform appearance defect enhancement detection on the resistor. The enhancement cycle is dynamically set by the production line cycle time or defect trigger threshold, and dual-model collaborative reasoning is achieved through parallel computing units. For example, when the general model detects a crack, the crack-related dimensional deviation enhancement model is immediately activated to perform a second scan of the edge area of the same resistor, avoiding missed detections due to the limited attention of a single model. Incremental learning optimization of the general appearance defect detection model is performed based on the appearance defect detection data of resistors.
[0017] Incremental learning uses a dynamic weight allocation mechanism to adjust the weight of historical data based on the distribution characteristics of new defect data, preventing the model from forgetting historical features due to excessive bias towards new samples. An online verification mechanism is also introduced to verify the effectiveness of model updates through real-time test results, ensuring that the optimization process does not affect the normal inspection rhythm of the production line, forming a closed-loop self-evolving system.
[0018] Reference Figure 2 As shown in the figure, based on the historical appearance defect detection data of resistor sheets as sample data, the training of a general appearance defect detection model specifically includes: Summarize all appearance defect types of resistors and extract at least 1,000 standard defect images of each appearance defect type at a 1:1 ratio from the historical appearance defect inspection data of resistors as sample data; Label the defect location and defect type for each sample data to obtain the model training data set; Based on the model training data set, a general appearance defect detection model is trained. The general appearance defect detection model takes a photo of a resistor sheet as input and outputs whether there is an appearance defect, as well as the type and location of the appearance defect.
[0019] Through balanced sample construction and multi-dimensional labeling strategies, the problem of missed detection of specific defects caused by uneven sample distribution in traditional defect detection models has been effectively solved. Standard images of various defects are extracted at a 1:1 ratio to ensure balanced representation of different defect types such as oxidation discoloration and cracks in the training data, avoiding excessive focus of the model on high-frequency defects due to data skew; combined with the dual labeling mechanism of defect location and type, the model simultaneously learns the spatial distribution characteristics and semantic classification characteristics of defects, thereby generating a general-purpose detection model that can simultaneously output defect existence judgment, type identification and positioning information. Through an end-to-end multi-task learning architecture, the model completes comprehensive inspection in a single inference, significantly improving production line inspection efficiency while reducing the risk of superposition of false detection rates due to staged inspection, providing a high-reliability basic judgment basis for subsequent enhanced detection of related defects.
[0020] Reference Figure 3 As shown in FIG, based on the front-back correlation attributes between the appearance defects of the resistor sheet, the associated defect topology group corresponding to each appearance defect is constructed, specifically including: Based on the processing experience of resistor chips, a physical association rule library is constructed between appearance defects such as oxidation discoloration, cracks, and dimensional deviations; Based on the physical association rule base between appearance defects, other appearance defects that have a causal relationship with the appearance defect are recorded as associated defects corresponding to the appearance defect; All associated defects corresponding to the appearance defect are combined into an associated defect topology group corresponding to the appearance defect.
[0021] By building a process-driven defect association rule base, we can break through the limitations of traditional detection methods that treat defects as independent events and achieve systematic traceability detection of resistor quality issues. Based on processing experience, physical association rules for defects such as oxidation discoloration and cracks are established. The causal relationships such as edge cracks caused by dimensional deviations and coating shedding associated with oxidation discoloration are encoded into topological groups to form a knowledge graph for multi-defect coupling detection. When a specific appearance defect is detected, the system can automatically trigger a targeted re-inspection of associated defects based on the topological group. For example, when identifying oxidation discoloration areas, the detection sensitivity of coating thickness anomalies is simultaneously enhanced, effectively solving the problem of missed detection of hidden quality problems caused by defect chain reactions. This mechanism transforms process experience into iteratively optimized detection logic, providing a defect association-enhanced detection framework for subsequent migration training, significantly improving the identification integrity of complex defects and the preventive maintenance capabilities of production lines.
[0022] Reference Figure 4 As shown in the figure, based on the associated defect topology group corresponding to the appearance defects, the general appearance defect detection model is transferred and trained to obtain the associated defect targeted enhanced detection model corresponding to the appearance defects. Specifically, it includes: Based on the causal relationship between appearance defects and the corresponding associated defect topology group, the detection data corresponding to the associated defects are selected from the historical detection data of the general appearance defect detection model as the transfer learning sample data; Freeze the feature extraction layer parameters of the general appearance defect detection model, and perform enhanced training and adjustment on the top-level parameters of the general appearance defect detection model based on the transfer learning sample data to obtain the initial enhanced detection model; Based on the detection application data of the initial enhanced detection model, the feature extraction layer is gradually unfrozen, and the initial enhanced detection model is trained through feedback learning based on the application data of the initial enhanced detection model under associated defect recognition detection, so as to obtain a targeted enhanced detection model adapted to the associated defect topology group.
[0023] Through layered transfer training and dynamic feedback mechanisms, the detection model's ability to identify associated defects is enhanced in a targeted manner. A feature extraction layer freezing strategy is used to retain the general feature representation capabilities of the general model, and the classification layer is strengthened through training of associated defect samples, so that the model maintains basic detection stability while significantly improving its response sensitivity to causal defects. Subsequently, through gradual unfreezing of the feature layer and feedback training of online detection data, the model can achieve adaptive parameter adjustment of the associated defect topology group, forming a dual-mode collaborative architecture that takes into account both generalization ability and special detection accuracy. This mechanism breaks through the path dependence of traditional transfer learning on full network parameter adjustment, effectively balances the relationship between special defect detection optimization and historical feature inheritance, enables the system to simultaneously activate the crack recognition channel when detecting oxidation discoloration, and constructs a detection logic closed loop with defect association perception characteristics, greatly reducing the risk of false detection rate fluctuations caused by excessive model tuning.
[0024] Reference Figure 5 As shown, based on the causal relationship between appearance defects and the corresponding associated defect topology group, the detection data corresponding to the associated defects are selected from the historical detection data of the general appearance defect detection model as the transfer learning sample data, specifically including: Based on the comparison of the number of appearance defects and related defects appearing on the same resistor in the historical inspection data with the number of appearance defects, the correlation coefficient between the appearance defects and the related defects is obtained; Based on the ratio of the correlation coefficients between appearance defects and all associated defects, the same ratio of detection data corresponding to associated defects is selected from the historical detection data of the general appearance defect detection model as the transfer learning sample data of appearance defects.
[0025] Through the data-driven correlation defect sample screening mechanism, the limitations of traditional transfer learning that relies on manual experience to select training data are overcome, and the precise configuration of model optimization resources is achieved. Based on the dynamic calculation of the correlation coefficient based on the probability of defect co-occurrence, the defect groups with process causal relationships such as oxidation discoloration and coating peeling, cracks and dimensional deviations are quantitatively associated, and based on this, historical inspection data are proportionally extracted to construct a migration sample set to ensure the balanced representation of the characteristics of the associated defects during the model reinforcement training. This method replaces subjective experience judgment with objective co-occurrence rules, effectively eliminating the bias of artificial sample selection, so that the model can inherit the general detection capabilities of the general model during the fine-tuning process, and form a special perception advantage for high-frequency correlation defect combinations, significantly improving the recognition accuracy of complex defects such as crack propagation path prediction and oxidation area boundary determination, while avoiding the interference of invalid samples on model parameters, forming an efficient learning optimization path under the data closed loop.
[0026] Reference Figure 6 As shown in the figure, the incremental learning optimization of the general appearance defect detection model based on the appearance defect detection data of resistor sheets specifically includes: Setting a data update cycle, and based on the ratio of appearance defect detection of the resistor sheet within the data update cycle, setting the ratio of the number of samples of each appearance defect type in the incremental learning training data set within the current data update cycle; Set a dynamic forgetting factor to update the weights of the incremental learning training dataset for each data update; Based on the incremental learning training dataset and its corresponding training weights, the general appearance defect detection model is incrementally optimized; Specifically, the calculation formula of the dynamic forgetting factor is: Where, is the weight of the incremental learning training dataset in the kth data update cycle, is the attenuation coefficient, The maximum number of current data update cycles. is the corresponding number of data update cycles.
[0027] Through the incremental learning mechanism of dynamic weight allocation and closed-loop feedback, the problem of feature loss or overfitting caused by the fixed forgetting strategy in traditional model updates is overcome. The distribution of training data is dynamically adjusted based on the defect detection ratio, so that the model can adapt to new defect patterns caused by changes in material properties or process parameter drift in the production line; combined with the dynamic forgetting factor linked to the attenuation coefficient and the update cycle, an intelligent balance is achieved between the strength of historical feature retention and the demand for new data learning. While ensuring that the model continues to learn progressive defect features such as the diffusion morphology of oxidation discoloration and subtle crack expansion, this mechanism avoids the problem of increased dimensional deviation misjudgment rate due to excessive bias towards new samples, forming an autonomous evolution capability that fits the actual quality fluctuation law of the production line, significantly reducing the frequency of manual calibration, and building a defect detection system with long-term stability.
[0028] Furthermore, based on the same inventive concept as the above-mentioned resistor chip appearance defect detection method, this solution also proposes a resistor chip appearance defect detection system, specifically comprising: A data storage module is used to store historical appearance defect detection data of resistors and configuration rules of associated defect topology groups; a model training module, connected to the data storage module, configured to train a general appearance defect detection model based on historical appearance defect detection data, and execute a transfer training process including freezing feature extraction layer parameters, transfer learning sample data reinforcement training, and feedback learning training; A topology construction module is connected to the data storage module and is configured to construct a physical association rule base of appearance defects based on the experience of resistor chip processing technology, and generate an associated defect topology group including oxidation discoloration, cracks, and dimensional deviation defects; A detection execution module, comprising a parallel computing unit and an enhancement cycle controller, configured to activate an enhancement cycle when an appearance defect is detected, and synchronously call a general-purpose model and an associated defect-specific enhancement detection model to perform composite detection; The incremental optimization module, which includes a dynamic weight allocator and a forgetting factor calculation unit, is configured to dynamically adjust the weights of the training dataset based on the proportion of appearance defect detection and perform incremental learning optimization on the general appearance defect detection model; The system achieves real-time defect detection and model update through edge computing devices deployed between industrial cameras and PLC controllers.
[0029] Furthermore, the method according to the embodiment of the present application can also be used with the aid of Figure 7 The electronic device architecture shown in FIG. Figure 7 As shown, the electronic device 500 may include a bus 501, one or more CPUs 502, ROM 503, RAM 504, a communication port 505 connected to a network, an input / output component 506, a hard disk 507, etc. The storage device in the electronic device 500, such as ROM 503 or hard disk 507, may store a method for detecting appearance defects of a resistor sheet provided in this application. The electronic device 500 may also include a user interface 508. Of course, Figure 7 The architecture shown is only exemplary and can be omitted according to actual needs when implementing different devices. Figure 7 One or more components of an electronic device are shown.
[0030] Figure 8 This is a schematic diagram of the computer-readable storage medium structure provided by an embodiment of the present application. Figure 8 1 shows a computer-readable storage medium 600 according to one embodiment of the present application. Computer-readable instructions are stored on the computer-readable storage medium 600. When the computer-readable instructions are executed by a processor, the method for detecting appearance defects in a resistor sheet according to an embodiment of the present application described with reference to the above figures can be executed. The storage medium 600 includes, but is not limited to, volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and cache memory. Non-volatile memory may include, for example, read-only memory (ROM), a hard disk, flash memory, etc.
[0031] To sum up, the advantages of the present invention are: by constructing an associated defect topology group and a migration training mechanism, deep coupling of process experience and defect causal relationship is achieved, and the composite detection capability of associated defects such as oxidation discoloration and cracks is significantly improved; a dynamic collaborative detection strategy of a general model and a targeted enhancement model is adopted to enhance the recognition accuracy of associated defects while maintaining basic detection efficiency; combined with a dynamically optimized incremental learning mechanism, the learning of new defect features and the retention of historical parameters are effectively balanced, so that the detection system maintains stable detection performance when processing conditions fluctuate, significantly reducing the operation and maintenance cost of model retraining, and forming an intelligent defect detection system with process perception capabilities and autonomous evolution characteristics.
[0032] The above shows and describes the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The above embodiments and descriptions merely illustrate the principles of the present invention. Various changes and modifications may be made to the present invention without departing from the spirit and scope of the present invention. Such changes and modifications are intended to fall within the scope of the present invention. The scope of protection claimed by the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for detecting appearance defects of a resistor, characterized in that: include: Based on the historical appearance defect detection data of resistors as sample data, a general appearance defect detection model is trained; Based on the front-to-back correlation attributes between the appearance defects of the resistor, a correlation defect topology group corresponding to each appearance defect is constructed; Based on the associated defect topology group corresponding to the appearance defects, the general appearance defect detection model is transferred and trained to obtain the associated defect targeted enhanced detection model corresponding to the appearance defects; Call the general appearance defect detection model to perform appearance defect detection on the resistor. When an appearance defect is detected, within the set enhancement cycle, call the corresponding associated defect targeted enhancement detection model to perform appearance defect enhancement detection on the resistor. Incremental learning optimization of the general appearance defect detection model is performed based on the appearance defect detection data of resistors.
2. The method for detecting appearance defects of a resistor according to claim 1, wherein: The training of a general appearance defect detection model based on historical appearance defect detection data of resistor sheets as sample data specifically includes: Summarize all appearance defect types of resistors and extract at least 1,000 standard defect images of each appearance defect type at a 1:1 ratio from the historical appearance defect inspection data of resistors as sample data; Label the defect location and defect type for each sample data to obtain the model training data set; Based on the model training data set, a general appearance defect detection model is trained. The general appearance defect detection model takes a resistor sheet photo as input and outputs whether there is an appearance defect and the type and location of the appearance defect.
3. The method for detecting appearance defects of a resistor according to claim 2, wherein: The method of constructing a topological group of associated defects corresponding to each appearance defect based on the contextual association attributes between the appearance defects of the resistor specifically includes: Based on the processing experience of resistor chips, a physical association rule library is constructed between appearance defects such as oxidation discoloration, cracks, and dimensional deviations; Based on the physical association rule base between appearance defects, other appearance defects that have a causal relationship with the appearance defect are recorded as associated defects corresponding to the appearance defect; All associated defects corresponding to the appearance defect are combined into an associated defect topology group corresponding to the appearance defect.
4. The method for detecting appearance defects of a resistor according to claim 3, wherein: The transfer training of the general appearance defect detection model based on the associated defect topology group corresponding to the appearance defect to obtain the associated defect targeted enhanced detection model corresponding to the appearance defect specifically includes: Based on the causal relationship between appearance defects and the corresponding associated defect topology group, the detection data corresponding to the associated defects are selected from the historical detection data of the general appearance defect detection model as the transfer learning sample data; Freeze the feature extraction layer parameters of the general appearance defect detection model, and perform enhanced training and adjustment on the top-level parameters of the general appearance defect detection model based on the transfer learning sample data to obtain the initial enhanced detection model; Based on the detection application data of the initial enhanced detection model, the feature extraction layer is gradually unfrozen, and the initial enhanced detection model is trained through feedback learning based on the application data of the initial enhanced detection model under associated defect recognition detection, so as to obtain a targeted enhanced detection model adapted to the associated defect topology group.
5. The method for detecting appearance defects of a resistor according to claim 4, characterized in that: The method of selecting detection data corresponding to the associated defects from historical detection data of the general appearance defect detection model as transfer learning sample data based on the causal relationship between the appearance defects and the corresponding associated defect topology group specifically includes: Based on the comparison of the number of appearance defects and related defects appearing on the same resistor in the historical inspection data with the number of appearance defects, the correlation coefficient between the appearance defects and the related defects is obtained; Based on the ratio of the correlation coefficients between appearance defects and all associated defects, the same ratio of detection data corresponding to associated defects is selected from the historical detection data of the general appearance defect detection model as the transfer learning sample data of appearance defects.
6. The method for detecting appearance defects of a resistor according to claim 5, characterized in that: The incremental learning optimization of the general appearance defect detection model based on the appearance defect detection data of the resistor specifically includes: Setting a data update cycle, and based on the ratio of appearance defect detection of the resistor sheet within the data update cycle, setting the ratio of the number of samples of each appearance defect type in the incremental learning training data set within the current data update cycle; Set a dynamic forgetting factor to update the weights of the incremental learning training dataset for each data update; Based on the incremental learning training dataset and its corresponding training weights, the general appearance defect detection model is incrementally optimized; Specifically, the calculation formula of the dynamic forgetting factor is: Where, is the weight of the incremental learning training dataset in the kth data update cycle, is the attenuation coefficient, The maximum number of current data update cycles. is the corresponding number of data update cycles.
7. A resistor chip appearance defect detection system, characterized in that: A method for detecting appearance defects of a resistor sheet according to any one of claims 1 to 6, comprising: A data storage module is used to store historical appearance defect detection data of resistors and configuration rules of associated defect topology groups; a model training module, connected to the data storage module, configured to train a general appearance defect detection model based on historical appearance defect detection data, and execute a transfer training process including freezing feature extraction layer parameters, transfer learning sample data reinforcement training, and feedback learning training; A topology construction module is connected to the data storage module and is configured to construct a physical association rule base of appearance defects based on the experience of resistor processing technology, and generate an associated defect topology group including oxidation discoloration, cracks, and dimensional deviation defects; A detection execution module, comprising a parallel computing unit and an enhancement cycle controller, configured to activate an enhancement cycle when an appearance defect is detected, and synchronously call a general-purpose model and an associated defect-specific enhancement detection model to perform composite detection; The incremental optimization module, which includes a dynamic weight allocator and a forgetting factor calculation unit, is configured to dynamically adjust the weights of the training dataset based on the proportion of appearance defect detection and perform incremental learning optimization on the general appearance defect detection model; The system achieves real-time defect detection and model updating through edge computing devices deployed between industrial cameras and PLC controllers.
8. An electronic device, characterized in that: include: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the resistor chip appearance defect detection method according to any one of claims 1 to 6.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for detecting appearance defects of resistor sheets according to any one of claims 1 to 6 is implemented.