Image-enhanced method and system for detecting defects in key components of overload protectors
By acquiring images of fixed positions and parameters during the detection of key components of overload protectors, constructing an image enhancement network and calculating the deviation vector, the problems of model redundancy and low detection efficiency are solved, and efficient and accurate defect detection is achieved.
Patent Information
- Application Number
- CN202511454738.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-13
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2045-10-13
AI Technical Summary
Existing methods for detecting defects in key components of overload protectors suffer from problems such as model redundancy, high maintenance costs, and low detection efficiency. In particular, the lack of a unified comparison reference and the need to build a separate detection model for each type of component leads to high computational power consumption and low detection efficiency.
By acquiring images of the overload protector's preset components at preset fixed positions, along with camera and lighting parameters, a standardized image enhancement network is constructed. The camera and lighting deviation vectors are calculated, and enhanced healthy images are output. Based on a similarity threshold, qualified images are identified, reducing the use of invalid detection models.
It achieves lightweight, precise, and efficient defect detection of key components of overload protectors, eliminates interference from camera and lighting differences, improves detection accuracy and efficiency, and reduces model maintenance costs.
Smart Images

Figure CN120931638B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of image defect recognition, and in particular to an image-enhanced overload protector key component defect detection method and system. BACKGROUND
[0002] Overload protectors are widely used in power systems, industrial control devices, household appliances and other fields. Defects in the key components of the overload protector can directly cause the protector to fail, trigger circuit overload, and even cause equipment to burn out or safety accidents. Therefore, accurate defect detection of the key components of the overload protector is an important prerequisite for ensuring electrical safety and maintaining stable operation of the equipment.
[0003] However, the existing overload protector key component defect detection method has the following limitations: on the one hand, it relies on building a special detection model for each type of defect of each specific model of component, resulting in a large number of models and high maintenance costs; on the other hand, each image to be inspected needs to be input into all associated special models for detection, which consumes a lot of computing power and has low detection efficiency.
[0004] Therefore, there is an urgent need for an overload protector key component defect detection method that integrates image enhancement technology to address the issues of model redundancy, high maintenance costs, and low detection efficiency in existing technology. SUMMARY
[0005] The present application provides an image-enhanced overload protector key component defect detection method and system to address the technical problems of model redundancy, high maintenance costs, and low detection efficiency in the prior art.
[0006] The technical solution of the present application to solve the above technical problems is as follows:
[0007] In a first aspect, the present application provides an image-enhanced overload protector key component defect detection method, comprising:
[0008] Obtaining a to-be-inspected image of an overload protector preset component positioned at a preset fixed position, a first camera control parameter, and a first environmental lighting parameter;
[0009] From a healthy image database, retrieving a healthy image of the overload protector preset component positioned at the preset fixed position, a second camera control parameter, and a second environmental lighting parameter;
[0010] Calculating a camera control deviation vector of the second camera control parameter and the first camera control parameter, and calculating an environmental lighting deviation vector of the first environmental lighting parameter and the second environmental lighting parameter;
[0011] The preset element first enhanced health image is output by processing the overload protector preset element health image, the camera control deviation vector and the ambient light deviation vector through an image enhancement network.
[0012] When the image similarity between the to-be-inspected image and the preset element first enhanced health image is greater than or equal to a similarity threshold, the to-be-inspected image is marked as quality qualified, otherwise, the to-be-inspected image is marked as quality abnormal.
[0013] In a second aspect, the present application provides an image-enhanced overload protector key component defect detection system, comprising:
[0014] A data acquisition module is configured to acquire a to-be-inspected image of an overload protector preset element positioned at a preset fixed position, a first camera control parameter and a first ambient light parameter;
[0015] A standard parameter calling module is configured to call an overload protector preset element health image positioned at a preset fixed position, a second camera control parameter and a second ambient light parameter from a health image database;
[0016] A deviation calculation module is configured to calculate a camera control deviation vector of the second camera control parameter and the first camera control parameter, and calculate an ambient light deviation vector of the first ambient light parameter and the second ambient light parameter;
[0017] A preset health image output module is configured to output a preset element first enhanced health image by processing the overload protector preset element health image, the camera control deviation vector and the ambient light deviation vector through an image enhancement network;
[0018] A defect identification module is configured to mark the to-be-inspected image as quality qualified when the image similarity between the to-be-inspected image and the preset element first enhanced health image is greater than or equal to a similarity threshold, otherwise, mark the to-be-inspected image as quality abnormal.
[0019] The present application has the following beneficial effects:
[0020] Compared with the prior art, the present application firstly acquires the to-be-inspected image of the overload protector preset element positioned at the preset fixed position, the first camera control parameter and the first environmental light parameter, thereby providing reliable original data support for subsequent deviation calculation, image enhancement and accurate comparison. Secondly, from the healthy image database, the healthy image of the overload protector preset element positioned at the preset fixed position, the second camera control parameter and the second environmental light parameter are called, and a standardized comparison framework is built for subsequent accurate detection by calling the healthy image data. Thirdly, the camera control deviation vector of the second camera control parameter and the first camera control parameter is calculated, and the environmental light deviation vector of the first environmental light parameter and the second environmental light parameter is calculated, thereby providing accurate adjustment basis for subsequent image enhancement to eliminate the interference of comparison condition difference on detection accuracy. Further, the healthy image of the overload protector preset element, the camera control deviation vector and the environmental light deviation vector are processed through the image enhancement network, and the first enhanced healthy image of the preset element is output, thereby eliminating the image visual interference caused by the difference of camera control parameter and environmental light parameter. Finally, when the image similarity of the to-be-inspected image and the first enhanced healthy image of the preset element is greater than or equal to the similarity threshold, the to-be-inspected image is marked as qualified, otherwise, the to-be-inspected image is marked as abnormal, which can accurately distinguish the qualified and abnormal states of the to-be-inspected element, effectively eliminate the interference of shooting condition difference to improve the accuracy and reliability of defect detection, and effectively reduce the invalid defect detection model calling frequency of qualified parts, reduce unnecessary computing resource consumption, and improve the processing efficiency of the overall detection process.
[0021] Through the above technical solution, the present application eliminates the interference of camera parameter and light condition difference on image comparison, avoids the misjudgment problem caused by the fluctuation of traditional shooting environment, and improves the accuracy of defect detection; the quality qualification can be quickly completed based on the similarity threshold, only the images determined as quality abnormal are subjected to targeted defect identification, the invalid computing power consumption is greatly reduced, and the detection efficiency is improved; through healthy image enhancement and similarity determination, it is not necessary to construct a special model for each type of element and each type of defect, the number of models is effectively simplified, and the model maintenance cost is reduced. In this way, the lightweight, accurate and efficient defect detection of the key components of the overload protector is realized, which can meet the needs of industrial batch inspection. BRIEF DESCRIPTION OF DRAWINGS
[0022] Figure 1 The flowchart of the image-enhanced overload protector key component defect detection method provided by the present application is shown in the figure;
[0023] Figure 2 The structure diagram of the image-enhanced overload protector key component defect detection system provided by the present application is shown in the figure.
[0024] In the drawings, the components represented by the respective reference numerals are as follows:
[0025] The data acquisition module 11, the standard parameter calling module 12, the deviation calculation module 13, the preset health image output module 14, and the defect identification module 15. DETAILED DESCRIPTION
[0026] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by a person skilled in the art without creative work fall within the protection scope of the present application.
[0027] In the description of the present application, the terms "first", "second" are used only for the purpose of description, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined with "first", "second" can explicitly or implicitly include one or more of the features. In the description of the present application, the meaning of "a plurality of" is two or more, unless otherwise specifically limited.
[0028] In the description of the present application, the term "for example" is used to indicate "as an example, illustration or explanation". Any embodiment described as "for example" in the present application is not necessarily interpreted as more preferred or more advantageous than other embodiments. The following description is given in order to enable any person skilled in the art to implement and use the present application. In the following description, details are listed for the purpose of explanation. It should be understood that a person skilled in the art can realize the present application without using these specific details. In other examples, well-known structures and processes will not be described in detail to avoid unnecessary details making the description of the present application obscure. Therefore, the present application is not intended to be limited to the shown embodiments, but is consistent with the broadest scope in accordance with the principles and characteristics disclosed.
[0029] In one embodiment, as shown in the accompanying drawings, the present application provides an image-enhanced overload protector key component defect detection method, which comprises the following steps: Figure 1
[0030] S10: Obtain the to-be-inspected image of the preset element of the overload protector positioned at the preset fixed position, the first camera control parameter and the first environmental light parameter.
[0031] In the defect detection process of the overload protector element, the shooting conditions will directly affect the quality of the obtained image, for example, the camera focus deviation may cause image blur, and the uneven light intensity may cover the subtle defects on the element surface, thereby interfering with the subsequent defect recognition and judgment process, and ultimately affecting the accuracy of the defect detection result.
[0032] To solve the above problems, the application obtains a to-be-inspected image of an overload protector preset element positioned at a preset fixed position, first camera control parameters, and first environmental light parameters.
[0033] The preset fixed position refers to a constraint condition for shooting the to-be-inspected overload protector preset element at a specific spatial position by a mechanical fixing device or visual positioning technology, ensuring that the spatial posture of the element (such as the distance from the camera, the placement angle, the orientation, etc.) is completely consistent each time the image is taken, thereby eliminating image differences caused by position changes, such as local area obstruction and shooting angle deviation, and ultimately ensuring that the to-be-inspected image and the subsequent healthy image used for comparison have strict comparability in the shooting angle, avoiding interference of position deviation on defect judgment.
[0034] The to-be-inspected image refers to the image of the to-be-inspected overload protector preset element taken at the above-mentioned preset fixed position, which is the object directly used for analyzing whether there is a quality problem in the defect detection process.
[0035] The first camera control parameters are the core setting parameters of the camera when shooting the to-be-inspected image, at least including focal length, exposure time, aperture size, ISO sensitivity, white balance mode, etc., which directly determine the visual features of the image, such as sharpness, brightness, and color restoration, and are the basic data for subsequent calculation of camera parameter deviation and realization of image standardization.
[0036] The first environmental light parameters are the environmental light feature parameters when shooting the to-be-inspected image, at least including light intensity, light source type, color temperature, and light angle, which directly affect the visual effects of the image, such as brightness contrast and color performance, and together with the first camera control parameters, constitute the key input for subsequent image enhancement, used to eliminate the interference of environmental differences on image comparison.
[0037] In this way, through the above-mentioned standardized data acquisition process, reliable raw data support is provided for subsequent deviation calculation, image enhancement, and accurate comparison, thereby guaranteeing the accuracy of defect detection from the source.
[0038] Further, step S10 in the method comprises determining the overload protector preset element:
[0039] obtaining an overload protector failure transaction set, wherein any overload protector failure transaction in the overload protector failure transaction set includes a fault element model set;
[0040] Based on the failure element model set, the triggering frequency of each element model in the overload protector failure transaction set is counted;
[0041] The element model with the triggering frequency greater than or equal to the triggering frequency threshold is set as the preset element of the overload protector.
[0042] In the embodiment of the application, the overload protector failure transaction set is obtained first. The overload protector failure transaction set is a record set of all overload protector failures in history. Any overload protector failure transaction includes a failure element model set, and the failure element model set includes the models of all elements confirmed to cause failure in this failure. For example, a certain overload protector failure transaction includes a failure element model set composed of all element models confirmed to cause failure in this failure, such as {relay R-123, capacitor C-456}, indicating that the failure is caused by relay R-123 and capacitor C-456 together or separately.
[0043] Secondly, based on the failure element model set, the triggering frequency of each element model in the overload protector failure transaction set is counted. For example, the proportion of the number of times that each element model appears in the overload protector failure transaction set to the total number of failure transactions is calculated, and the calculation formula is: triggering frequency=(the number of times that the element model appears in the overload protector failure transaction set) / (the total number of failure transactions) x 100%. For example, if the total number of failure transactions is 100, and relay R-123 appears 60 times in 100 failure transactions, then the triggering frequency of relay R-123 is 60 / 100=60%, and the triggering frequency of each element model in the overload protector failure transaction set is calculated in the same way.
[0044] Finally, the element model with the triggering frequency greater than or equal to the triggering frequency threshold is set as the preset element of the overload protector. The triggering frequency threshold is the core basis for determining whether the element model is a key node of quality control of the overload protector. When the failure triggering frequency of a certain element model is greater than or equal to the triggering frequency threshold, it indicates that the failure of the element model is more likely to directly cause the failure of the overload protector. Those skilled in the art can dynamically set the triggering frequency threshold by combining the application field of the overload protector, the functional attributes of the element itself, the sample size of historical failure data, and other factors, to ensure that the triggering frequency threshold is set to match the actual quality control requirements.
[0045] Exemplarily, if the trigger frequency threshold is set to 30% for an industrial overload protector combined with the failure record in the past year, and then the trigger frequency is traversed to screen out the element model whose trigger frequency is greater than or equal to the trigger frequency threshold, the element model is set as the preset element of the overload protector. For example, the trigger frequency of the relay R-123 is 60%, which is greater than the trigger frequency threshold, so the relay R-123 is set as the preset element of the overload protector.
[0046] In this way, the key detection objects are screened in a data-driven manner, ensuring that the defect detection focuses on the element model that has the greatest impact on the overall reliability, avoiding ineffective detection of low-risk elements, improving the detection pertinence, reducing the number of defect type detection models that do not need to be called subsequently, reducing the algorithm consumption, and improving the overall detection efficiency.
[0047] In summary, compared with the prior art, the application obtains the to-be-inspected image of the overload protector preset element positioned at the preset fixed position, the first camera control parameter and the first environmental light parameter. In this way, reliable original data support is provided for subsequent deviation calculation, image enhancement and accurate comparison.
[0048] S20: From the healthy image database, call the overload protector preset element healthy image positioned at the preset fixed position, the second camera control parameter and the second environmental light parameter.
[0049] In the traditional defect detection of key components of overload protectors, there is a lack of defect-free healthy images under unified constraint conditions (such as fixed shooting position, unified camera parameter, and unified environmental light) as reference templates, which leads to the loss of objective comparison basis in the defect detection process, and makes it difficult to define whether the element has defects through quantitative indicators.
[0050] To solve the above problems, the application calls the overload protector preset element healthy image positioned at the preset fixed position, the second camera control parameter and the second environmental light parameter from the healthy image database.
[0051] The healthy image database is a pre-constructed standardized database for storing healthy image data of the overload protector preset element in a defect-free state. Each piece of healthy image data in the healthy image database includes a healthy image, an overload protector preset element model, a preset fixed position, a camera control parameter, and an environmental light parameter. Through multi-dimensional information association, the healthy data can be accurately matched with the to-be-inspected scene, avoiding comparison deviation caused by data misplacement, and providing a reliable benchmark reference source for subsequent image enhancement, deviation calculation and quality judgment.
[0052] The preset element health image of the overload protector is a standard image without any quality defects, which is acquired from the health image database and has the same element model and the same preset fixed position as the to-be-inspected image. The preset fixed position is 15 cm away from the camera and 45° angle to the front. The same element model and the same fixed position are used to avoid distortion caused by the shooting angle and position deviation in subsequent comparison.
[0053] The second camera control parameter is a core setting parameter of the camera when the preset element health image of the overload protector is shot. The parameter type is the same as the first camera control parameter in S10, and is a reference basis for subsequent calculation of the camera parameter deviation. By comparing the numerical value of the first camera control parameter, the difference in the camera control parameter between the to-be-inspected scene and the health image scene can be accurately quantified, and the device adaptability of the image enhancement network to the health image can be provided as a basis.
[0054] The second environment light parameter is an environment light feature parameter when the preset element health image of the overload protector is shot. The parameter type is the same as the first environment light parameter in S10, and is a reference basis for subsequent calculation of the light deviation. By comparing the numerical value of the first environment light parameter, the difference in the environment light between the to-be-inspected scene and the health image scene can be accurately quantified, and the precise basis for the image enhancement network to eliminate the interference of light on the visual effect of the image can be provided.
[0055] In summary, compared with the prior art, the preset element health image of the overload protector positioned at the preset fixed position, the second camera control parameter and the second environment light parameter are retrieved from the health image database. In this way, the health image data is retrieved to build a standardized comparison framework for subsequent accurate detection.
[0056] S30: Calculate the camera control deviation vector of the second camera control parameter and the first camera control parameter, and calculate the environment light deviation vector of the first environment light parameter and the second environment light parameter.
[0057] The difference in the camera control parameter and the difference in the environment light when shooting will directly damage the visual feature consistency between the to-be-inspected image and the health standard image. For example, due to the difference in the environment light, the brightness distribution and color restoration degree of the to-be-inspected image deviate from the health standard image, which may misjudge the defect-free as defective, affecting the accuracy of defect detection. The traditional detection method lacks quantitative means for these two types of differences, cannot objectively define the source of the visual feature deviation, makes it difficult to effectively distinguish the abnormal features found in the detection process, and finally causes the risk of false detection and missed detection to increase.
[0058] To solve the above problems, the application calculates a camera control deviation vector of the second camera control parameter and the first camera control parameter, and calculates an ambient light deviation vector of the first ambient light parameter and the second ambient light parameter.
[0059] For example, for the camera control deviation vector, the camera control deviation values of different dimensions are calculated respectively, and the calculation formula is: the camera control deviation value of a single dimension = the second camera control parameter of a certain dimension - the first camera control parameter of the same dimension, and then all the camera control deviation values of different dimensions are combined and arranged in a preset dimension order as the camera control deviation vector.
[0060] For example, if the second camera control parameter as the comparison reference in a certain detection scene is: [50mm (focal length), 1 / 120s (exposure), f / 8 (aperture), 100 (ISO), 5500K (white balance)], and the first camera control parameter to be detected is: [55mm (focal length), 1 / 80s (exposure), f / 11 (aperture), 200 (ISO), 6000K (white balance)], the camera control deviation values of different dimensions are calculated as follows: focal length deviation value = 50-55 = -5mm, exposure time deviation value = 1 / 120-1 / 80 = -1 / 240 ≈ -0.0042s, aperture deviation value = 8-11 = -3 (it should be noted that the f value is inversely related, which is simplified as a numerical difference here, and can be adjusted according to the aperture coefficient formula), ISO deviation value = 100-200 = -100, white balance deviation value = 5500-6000 = -500K, and the camera control deviation vector is obtained by arranging the focal length, exposure, aperture, ISO, and white balance in order as: [-5mm, -0.0042s, -3, -100, -500K]. The camera control deviation vector can reflect the difference dimension and degree between the camera settings of the image to be detected and the camera settings of the healthy standard image.
[0061] For example, for the ambient light deviation vector, the ambient light deviation values of different dimensions are calculated respectively, and for continuous numerical parameters such as light intensity, color temperature, and light angle, the calculation formula is: the ambient light deviation value of a single dimension = the second ambient light parameter of a certain dimension - the first ambient light parameter of the same dimension; and for classification coding parameters such as light source type, the calculation formula is: the ambient light deviation value of a single dimension = the second ambient light parameter coding value of a certain dimension - the first ambient light parameter coding value of the same dimension, and then all the ambient light deviation values of different dimensions are combined and arranged in a preset dimension order as the ambient light deviation vector.
[0062] For example, if the second environmental lighting parameter serving as the comparison reference in a detection scene is: [600 lux (intensity), 1 (natural light, code value), 5500 K (color temperature), 30° (lighting angle)], and the first environmental lighting parameter to be detected is: [500 lux (intensity), 2 (LED, code value), 6000 K (color temperature), 45° (lighting angle)], the environmental lighting deviation values in each dimension are calculated as follows: lighting intensity deviation value = 600-500 = 100 lux, light source type deviation value = 1-2 = -1 (code difference, quantized light source type difference), color temperature deviation value = 5500-6000 = -500 K, and lighting angle deviation value = 30°-45° = -15°. In the order of lighting intensity, light source type, color temperature, and lighting angle, the environmental lighting deviation vector is obtained as: [100 lux, -1, -500 K, -15°]. The environmental lighting deviation vector can reflect the difference dimension and degree between the shooting environmental lighting of the image to be inspected and the shooting environmental lighting of the health standard image.
[0063] In summary, compared with the prior art, the camera control deviation vector of the second camera control parameter and the first camera control parameter is calculated, and the environmental lighting deviation vector of the first environmental lighting parameter and the second environmental lighting parameter is calculated. In this way, the multi-dimensional difference of the camera control parameter and the environmental lighting parameter is converted into a calculable vector, which provides accurate adjustment basis for subsequent image enhancement to eliminate the interference of comparison condition difference on detection accuracy.
[0064] S40: processing the overload protector preset element health image, the camera control deviation vector and the environmental lighting deviation vector through an image enhancement network, and outputting a preset element first enhanced health image.
[0065] When the overload protector preset element itself has no quality defects, if images are collected in different shooting scenes, only because of the difference in camera control parameters or environmental lighting parameters, the element image will produce non-defect visual interference, such as insufficient image clarity, local over-brightness / over-darkness, color distortion, and appearance of pseudo-shadows, which will interfere with detection, making it difficult to distinguish the visual deviation caused by shooting conditions from the real defects of the element, and thus the image deviation of the non-defective element may be misrecognized as a real defect.
[0066] To solve the above problems, the image enhancement network is used to process the overload protector preset element health image, the camera control deviation vector and the environmental lighting deviation vector, and output a preset element first enhanced health image.
[0067] Specifically, step S40 in the method comprises:
[0068] loading the second camera control parameter and the second ambient light parameter of the user terminal customized configuration;
[0069] loading the first image of the ith element in the preset position attitude with the second camera control parameter and the second ambient light parameter as constraints;
[0070] randomly loading a plurality of second images of the ith element in the preset position attitude, wherein the plurality of second images have a plurality of camera control record parameters and a plurality of ambient light record parameters corresponding thereto;
[0071] calculating a plurality of camera control deviation record vectors of the plurality of camera control record parameters and the second camera control parameter, and a plurality of ambient light deviation record vectors of the plurality of ambient light record parameters and the second ambient light parameter;
[0072] extracting the kth camera control deviation record vector from the plurality of camera control deviation record vectors;
[0073] extracting the kth ambient light deviation record vector from the plurality of ambient light deviation record vectors based on the kth camera control deviation record vector, and extracting the kth second image from the plurality of second images;
[0074] constructing a first group of data with the kth camera control deviation record vector, the kth camera control deviation record vector and the first image as inputs, and the kth second image as supervision, and adding the first group of data into a plurality of groups of data;
[0075] when the number of groups of data in the plurality of groups of data satisfies a training quantity threshold, calling the plurality of groups of data to train the image enhancement network.
[0076] In the embodiments of the present application, first, the second camera control parameter and the second ambient light parameter of the user terminal customized configuration are loaded, and the second camera control parameter and the second ambient light parameter represent the reference parameters for shooting standard healthy images, such as focal length 50mm, exposure 1 / 120s, light intensity 600lux, color temperature 5500K, etc., and all subsequent training data deviation calculations are based on these two parameters.
[0077] Secondly, the first image of the ith element in the preset position attitude is loaded with the second camera control parameter and the second ambient light parameter as constraints. The ith element refers to a certain type of overload protector element, such as a relay R-123, and the preset position attitude refers to the standard placement state of the overload protector element in the fixed position, such as 15cm away from the camera and 45° angle to the front face, etc. Exemplarily, the defect-free healthy image of the overload protector element in the preset position attitude is retrieved as the first image with the second camera control parameter and the second ambient light parameter as constraints.
[0078] Again, load the ith element in a plurality of second images in a preset pose, wherein the plurality of second images have a one-to-one corresponding plurality of camera control record parameters and a plurality of environmental light record parameters. Among them, the second image refers to the health image of the same overload protector element, the same pose, but under non-standard shooting conditions, such as shooting under non-standard shooting conditions of focal length 55mm, exposure 1 / 80s, light intensity 500lux, color temperature 6000K, etc. The second image is accompanied by a one-to-one corresponding camera control record parameter and environmental light record parameter. The purpose of loading a plurality of second images is to obtain enough sample data of different shooting conditions to ensure the generalization of network learning.
[0079] Further, calculate a plurality of camera control deviation record vectors of a plurality of camera control record parameters and a plurality of second camera control parameters, and a plurality of environmental light deviation record vectors of a plurality of environmental light record parameters and a plurality of second environmental light parameters. In this way, the difference between the second image shot under non-standard shooting conditions and the first image shot under standard shooting conditions is quantified as a vector, for example, if the camera control record parameter of a certain second image is focal length 55mm, exposure 1 / 80s, and the second camera control parameter is focal length 50mm, exposure 1 / 120s, the camera control deviation record vector can be calculated as [5mm, 1 / 240s]. A set of camera control deviation record vectors and environmental light deviation record vectors can be calculated for each second image in the same way.
[0080] Further, from a plurality of camera control deviation record vectors, extract the kth camera control deviation record vector, based on the kth camera control deviation record vector, correspondingly extract the kth environmental light deviation record vector from a plurality of environmental light deviation record vectors, and extract the kth second image from a plurality of second images.
[0081] Further, take the kth camera control deviation record vector, the kth camera control deviation record vector and the first image as input, and take the kth second image as supervision to construct a first group of data, add it to a plurality of groups of data, and repeat the operation to obtain a plurality of groups of data and add them to a plurality of groups of data. Each group of data in the plurality of groups of data contains input features: the first image shot under standard shooting conditions, the deviation vector of the actual shooting condition (including the camera control deviation record vector, the camera control deviation record vector), and the supervision label: the second image shot under the actual shooting condition.
[0082] Finally, when the number of groups of data meets the training quantity threshold, the groups of data are called to train the image enhancement network. The training quantity threshold is to ensure that the image enhancement network can learn a sufficient amount of samples, such as 10,000 groups, and a person skilled in the art can dynamically set it according to the actual application scene and the demand for computing power. Illustratively, the training quantity threshold is set to 10,000 groups, and when the number of groups of data is ≥10,000, the groups of data are called to train the image enhancement network.
[0083] Illustratively, the image enhancement network can be trained through the following technical path: 1. Data preparation: The camera control bias record vector, the camera control bias record vector and the corresponding first image, the second image in the plurality of groups of data are divided into a training set, a validation set and a test set according to a ratio of 7:1.5:1.5.
[0084] 2. Model construction: mainly composed of an input layer, an Encoder layer, a Decoder layer and an output layer, wherein the input layer is divided into two paths, one path extracts initial visual features through a 3x3 convolutional layer and generates a feature map, and the other path splices the camera control bias record vector and the ambient light bias record vector into a comprehensive bias vector, which is mapped into a bias feature map through a fully connected layer and then up-sampled, and then spliced with the image feature map to form a fusion feature map; the Encoder layer gradually compresses the feature map size and increases the channel number through four encoding blocks containing convolution, BatchNorm and maximum pooling, to extract deep association features of the image and the bias; the Decoder layer is symmetrical to the Encoder, and restores the feature map to the resolution consistent with the input image through four decoding blocks containing up-sampling, skip connection (preserving shallow details) and convolution; the output layer is composed of a 1x1 convolutional layer, which outputs an enhanced healthy image matching the pixel range of the real image.
[0085] 3. Model training: the camera control bias record vector, the camera control bias record vector and the first image in the training set are input, the corresponding second image is supervised, the difference between the generated image and the supervision label is minimized, the Adam optimizer (initial learning rate 1e-4) is adopted, the MSE loss function is selected to calculate the pixel-level error between the generated enhanced image and the second image, the image is generated through forward propagation, the parameters are updated through back propagation, the performance is evaluated every 1 round of training with the validation set to avoid overfitting, when the MSE loss of the training set decreases by less than 1e-5 for 5 consecutive rounds of training, and the MSE loss of the validation set is stable below 0.01, the model is determined to be converged, the training is stopped and the final network parameters are saved, and the image enhancement network is obtained.
[0086] Further, a pre-trained image enhancement network is called to input the preset element health image of the overload protector, the camera control deviation vector and the ambient light deviation vector, and output a first enhanced health image of the preset element. The first enhanced health image is a standardized health image strictly matching the shooting condition to be inspected, and can accurately reflect the real visual features of the preset element of the overload protector in a defect-free state under the shooting condition to be inspected, eliminate image visual interference caused by differences in camera control parameters and differences in ambient light parameters, and focus only on whether the element has real defects in subsequent comparison between the image to be inspected and the first enhanced health image, rather than non-defect differences caused by shooting conditions.
[0087] In summary, compared with the prior art, the image enhancement network is used to process the overload protector preset element health image, the camera control deviation vector and the ambient light deviation vector, and output a first enhanced health image of the preset element. In this way, image visual interference caused by differences in camera control parameters and differences in ambient light parameters is eliminated, and subsequent comparison between the image to be inspected and the first enhanced health image focuses only on whether the element has real defects, rather than non-defect differences caused by shooting conditions.
[0088] S50: When the image similarity between the image to be inspected and the first enhanced health image of the preset element is greater than or equal to a similarity threshold, the image to be inspected is marked as qualified, otherwise, the image to be inspected is marked as abnormal.
[0089] Traditional defect detection of key components of overload protectors relies on specific detection models, and a model needs to be built for each type of defect of each model of element, resulting in a large number of models and high maintenance costs. At the same time, the traditional method only focuses on identifying defects and lacks quality qualification judgment logic for defect-free images to be inspected, which further leads to the inability to efficiently complete the rapid identification of qualified parts.
[0090] To solve the above problems, the image to be inspected is marked as qualified when the image similarity between the image to be inspected and the first enhanced health image of the preset element is greater than or equal to a similarity threshold, otherwise, the image to be inspected is marked as abnormal.
[0091] Specifically, the similarity threshold configuration process in step S50 of the method includes:
[0092] A first historical quality qualified image of the overload protector preset element positioned at a preset fixed position, historical camera control parameters and historical ambient light parameters are obtained.
[0093] After processing the overload protector preset element health image based on the historical camera control parameters and the historical ambient light parameters through the image enhancement network, a second enhanced health image of the preset element is obtained.
[0094] calculating a first reference image similarity between the first historical quality qualified image and the preset component second enhanced healthy image, and adding the first reference image similarity into a reference image similarity set;
[0095] when the number of the reference image similarity set is greater than or equal to a fitting number threshold, performing centralized trend analysis on the reference image similarity set to obtain a centralized reference image similarity set;
[0096] taking the minimum value of the centralized reference image similarity set as the similarity threshold.
[0097] In the embodiment of the application, first, a first historical quality qualified image of the overload protector preset component positioned at a preset fixed position is obtained, as well as historical camera control parameters and historical environmental lighting parameters when the first historical quality qualified image is taken. The preset fixed position ensures that the shooting angle of the historical image is consistent with that of the image to be inspected, and excludes positional deviation interference. The first historical quality qualified image refers to a healthy image of the overload protector preset component without any defects verified by manual review or actual verification.
[0098] Secondly, a pre-trained image enhancement network is called, and the historical camera control parameters, the historical environmental lighting parameters, and a healthy image of the overload protector preset component obtained from a healthy image database are input, and a preset component second enhanced healthy image is output. The preset component second enhanced healthy image is image data adapted to the actual historical camera control parameters and the historical environmental lighting parameters.
[0099] Thirdly, a first reference image similarity between the first historical quality qualified image and the preset component second enhanced healthy image is calculated, and the first reference image similarity is added into a reference image similarity set. For example, referring to the subsequent image similarity calculation process, the first reference image similarity between the first historical quality qualified image and the preset component second enhanced healthy image is calculated to be 95%, and 95% is added into the reference image similarity set. The process is repeated to calculate a plurality of image similarities, which are added into the reference image similarity set.
[0100] Further, when the number of the reference image similarity set is greater than or equal to a fitting number threshold, centralized trend analysis is performed on the reference image similarity set to obtain a centralized reference image similarity set. The fitting number threshold is a lower limit of the sample size set to ensure that the reference image similarity set has statistical significance and avoid threshold calculation deviation caused by small samples. Preferably, the fitting number threshold can be set to 50, which can be dynamically adjusted by a person skilled in the art according to the actual scene.
[0101] Exemplarily, if the fitting quantity threshold is set to 50, when the number of the reference image similarity set is greater than or equal to 50, the reference image similarity set is subjected to centralized trend analysis: for example, first, outliers are removed by using the box plot method, and valid samples conforming to normal distribution are retained; then the central range of the valid samples is counted, usually 80% of the samples around the median are taken, taking into account representativeness and anti-volatility, and a small number of edge fluctuation samples are excluded, if the similarity distribution of the valid samples is 82%-99%, the sample interval of 80% around the median is 85%-98%, and the interval is the centralized reference image similarity set, representing the similarity distribution range of the vast majority of real qualified samples.
[0102] Finally, the minimum value of the centralized reference image similarity set is taken as the similarity threshold. Wherein, taking the minimum value of the centralized reference image similarity set can ensure that the similarity of almost all real qualified component images is greater than or equal to the similarity threshold, avoiding misjudging the real qualified component as abnormal.
[0103] Specifically, the image similarity calculation process in step S50 in the method includes:
[0104] Obtaining a user-defined preset component image feature attribute deviation threshold set;
[0105] Comparing the quality inspection image with the preset component first enhanced health image to obtain a preset component image feature attribute deviation set;
[0106] Based on the preset component image feature attribute deviation threshold set, the proportion of image feature attribute deviations in the preset component image feature attribute deviation set that are less than or equal to the preset component image feature attribute deviation threshold is counted, and is set as the image similarity.
[0107] In the embodiments of the present application, first, a user-defined preset component image feature attribute deviation threshold set is obtained. The feature attribute refers to a key quality-related feature for determining the quality state of the preset component, i.e., a visual feature directly related to the functional reliability and structural safety of the component. Preferably, the common feature attributes and corresponding deviation thresholds can be set as follows: shape contour (geometric feature of the component, such as pin spacing, tab width, shell edge radius, etc.): the deviation threshold can be set to ±0.5 mm, surface texture (microstate feature of the component surface, such as whether there are cracks, scratches, stains, etc.): the deviation threshold can be set to crack length ≤0.3 mm, stain / crack area ratio ≤1%, color feature (color attribute of the component surface, such as normal metal color of the terminal, standard color of the plastic shell, etc.): the deviation threshold can be set to RGB channel color step difference ≤10, structural integrity (integrity feature of the overall structure of the component, such as whether there is deformation, corner loss, component loss, etc.): the deviation threshold can be set to maximum deformation ≤0.2 mm and no component loss, all features and corresponding deviation thresholds together constitute the preset component image feature attribute deviation threshold set. In this way, the similarity calculation is strictly focused on the core features that directly affect the quality of the component, excluding irrelevant features that interfere with the determination result, thereby ensuring the accuracy of defect detection from the feature dimension.
[0108] Secondly, based on the preset component image feature attribute deviation threshold set, the deviations of the quality inspection image and the first enhanced healthy image of the preset component on each feature attribute are compared one by one to form a preset component image feature attribute deviation set. For example, the deviations on the shape contour and the surface texture are compared, in the shape contour feature, the pin spacing of the quality inspection image is 5.0 mm, and the pin spacing of the first enhanced healthy image of the preset component is 5.4 mm, so the pin spacing deviation is 0.4 mm, in the surface texture feature, the stain area of the quality inspection image is 1.5%, and the stain area of the first enhanced healthy image of the preset component is 0%, so the stain area deviation is 1.5%, the actual deviation values of all feature attributes are calculated one by one according to the same method, and the preset component image feature attribute deviation set is formed after the actual deviation values are summarized.
[0109] Finally, based on the preset component image feature attribute deviation threshold set, the proportion of the image feature attribute deviations in the preset component image feature attribute deviation set that are less than or equal to the preset component image feature attribute deviation threshold is calculated, which is set as the image similarity. For example, if there are 10 feature attributes in total for the preset component, and it is found through comparison that the actual deviation values of 5 feature attributes are less than or equal to the corresponding preset component image feature attribute deviation threshold, then the image similarity = 5 / 10 = 0.5, which means that the quality inspection image and the first enhanced healthy image of the preset component have differences exceeding the allowed range in 50% of the key quality features, indicating that the core visual feature matching degree of the two is low.
[0110] Further, a similarity threshold is calculated based on the foregoing steps, and an image similarity between the to-be-inspected image and the first enhanced healthy image of the preset element is calculated. When the image similarity between the to-be-inspected image and the first enhanced healthy image of the preset element is greater than or equal to the similarity threshold, it is indicated that the differences in all key quality characteristics such as the contour and the surface texture of the two are within the allowable range, and it can be determined that there is no significant quality defect, and therefore the to-be-inspected image is marked as qualified; otherwise, it is indicated that there are differences in some key quality characteristics beyond the allowable range, which prompts that there may be real defects, and therefore the to-be-inspected image is marked as abnormal, and further defect type identification needs to be performed.
[0111] Specifically, the step S50 in the method includes:
[0112] A plurality of defect type detection models are called to process the to-be-inspected image, and a plurality of defect type detection results are obtained.
[0113] The defect types with the defect type detection result of 1 are added to the overload protector preset element defect detection result.
[0114] The quality abnormality mark is constructed according to the overload protector preset element defect detection result.
[0115] In the embodiment of the application, a plurality of defect type detection models are called to process the to-be-inspected image, and a plurality of defect type detection results are obtained. The plurality of defect type detection models are a group of specialized defect identification models, each of which is responsible for identifying a specific type of defect, ensuring high accuracy of specific defect identification. For example, the to-be-inspected image is input into a plurality of defect type detection models, and each defect type detection model outputs a binary classification detection result. The result of 1 indicates that the defect type detection model determines that the to-be-inspected image contains the defect corresponding to the defect type detection model, and the result of 0 indicates that the to-be-inspected image does not contain the defect. For example, a to-be-inspected image is input into three defect type detection models, and the output results are 1 for the contact adhesion model, 0 for the shell crack model, and 1 for the pin deformation model, that is, two possible defects of contact adhesion and pin deformation are preliminarily detected.
[0116] Secondly, the defect types with the defect type detection result of 1 are added to the overload protector preset element defect detection result. For example, if the output results of the three defect type detection models are 1 for the contact adhesion model, 0 for the shell crack model, and 1 for the pin deformation model, the contact adhesion and the pin deformation are added to the overload protector preset element defect detection result.
[0117] Finally, according to the preset element defect detection result of the overload protector, a quality anomaly identifier is constructed. Exemplarily, the defect detection result is combined with the basic information of the preset element of the overload protector to generate a structured, traceable and executable quality anomaly identifier, for example: basic information: overload protector preset element: relay R-123, detection time: 2024-09-17, defect information: contact sticking, pin deformation, processing suggestion: suggest rework and disassembly for maintenance and recheck. In this way, clear, quantitative and executable basis is provided for the whole process quality control and problem tracing of the preset element of the overload protector.
[0118] Further, the "calling a plurality of defect type detection models, processing the image to be inspected to obtain a plurality of defect type detection results" comprises:
[0119] A first image set of a preset model element with a preset defect is collected, and a first output identifier set is constructed as 1;
[0120] A second image set of a preset model element without a preset defect is collected, and a second output identifier set is constructed as 0;
[0121] The preset model element preset defect detection model is trained with the output identifier set as supervision and the image set as input, and is added to the plurality of defect type detection models.
[0122] In the embodiment of the application, a plurality of first images of a preset model element with a preset defect are first collected to form a first image set, and all the first images are uniformly labeled with an output identifier 1, and a first output identifier set is constructed as 1. The preset defect needs to cover common defect types, and 1 represents that the image contains the preset defect in the supervised training. Exemplarily, 1000 images of a relay R-123 with contact sticking are collected to form a first image set, and the output identifier of all the first images is set to 1.
[0123] Secondly, a second image set of a preset model element without a preset defect is collected, and a second output identifier set is constructed as 0. Exemplarily, a second image set of the same preset model element (such as a relay R-123) without any preset defect is collected, and all the second images are uniformly labeled with an output identifier 0, and 0 represents that the image does not contain the preset defect in the supervised training. For example, 1000 images of a relay R-123 without contact sticking are collected to form a second image set, and the output identifier of each image is set to 0.
[0124] Finally, the preset model component preset defect detection model is trained with the output identification set as supervision and the image set as input, and a plurality of defect type detection models are added. For example, a lightweight convolutional neural network can be used to construct the defect type detection model. In the training process, the first image set is mixed with the first image set in a 1:1 ratio, and then randomly divided into a training set and a validation set in a 7:3 ratio. In the training process, the output identification is used as a supervision signal, a cross-entropy loss function is used to quantify the difference between the predicted result and the output identification, and an Adam optimizer (with an initial learning rate of 1e-4) is used to optimize the model parameters. When the accuracy of the defect type detection model on the validation set is ≥98%, the model is determined to be converged, and a detection model for a preset defect of a preset model component is obtained. A plurality of defect type detection models are added for subsequent detection and calling, and a standardized comparison framework is built for subsequent accurate detection by retrieving healthy image data.
[0125] It should be noted that the lightweight convolutional neural network used to construct the defect type detection model in the present application is based on a network structure known in the art, and therefore the specific structural details of the lightweight convolutional neural network will not be described here.
[0126] In summary, compared with the prior art, the present application identifies the quality of the to-be-inspected image as qualified when the image similarity between the to-be-inspected image and the first enhanced healthy image of the preset component is greater than or equal to the similarity threshold, and otherwise identifies the quality of the to-be-inspected image as abnormal. In this way, based on the quantitative determination of the similarity threshold, the qualified and abnormal states of the to-be-inspected component can be accurately distinguished, effectively excluding the interference of differences in shooting conditions to improve the accuracy and reliability of defect detection. By starting the hierarchical determination logic of subsequent defect identification only when the quality is identified as abnormal, the frequency of invalid defect detection model calling of qualified components is effectively reduced, unnecessary computing resource consumption is reduced, and the processing efficiency of the overall detection process is improved.
[0127] In summary, the embodiments of the present application have at least the following technical effects:
[0128] Compared with the prior art, the present application first acquires a to-be-inspected image of an overload protector preset component positioned at a preset fixed position, first camera control parameters and first environmental lighting parameters. In this way, reliable original data support is provided for subsequent deviation calculation, image enhancement and accurate comparison.
[0129] Secondly, the present application retrieves a healthy image of an overload protector preset component positioned at a preset fixed position, second camera control parameters and second environmental lighting parameters from a healthy image database. In this way, a standardized comparison framework is built for subsequent accurate detection by retrieving healthy image data.
[0130] Again, the application calculates a camera control deviation vector of the second camera control parameter and the first camera control parameter, and calculates an ambient light deviation vector of the first ambient light parameter and the second ambient light parameter. In this way, the multi-dimensional difference of camera control parameters and ambient light parameters is converted into a calculable vector, providing accurate adjustment basis for subsequent image enhancement to eliminate the interference of comparison condition difference on detection accuracy.
[0131] Further, the application processes the overload protector preset element health image, the camera control deviation vector and the ambient light deviation vector through the image enhancement network, and outputs a preset element first enhanced health image. In this way, the image visual interference caused by the difference in camera control parameters and ambient light parameters is eliminated, so that the subsequent comparison between the image to be inspected and the first enhanced health image focuses only on whether the element has real defects, rather than non-defect differences caused by shooting conditions.
[0132] Finally, when the image similarity between the image to be inspected and the preset element first enhanced health image is greater than or equal to a similarity threshold, the application identifies the image to be inspected as quality qualified, otherwise, the application identifies the image to be inspected as quality abnormal. In this way, based on the quantitative judgment of the similarity threshold, the qualified and abnormal states of the element to be inspected can be accurately distinguished, effectively excluding the interference of shooting condition difference to improve the accuracy and reliability of defect detection; by starting the subsequent layered judgment logic of defect recognition only when it is identified as quality abnormal, the invalid defect detection model calling frequency of qualified parts is effectively reduced, unnecessary computing resource consumption is reduced, and the processing efficiency of the overall detection process is improved.
[0133] Through the above technical solutions, the application eliminates the interference of camera parameters and light condition difference on image comparison, avoids the misjudgment problem caused by the fluctuation of the shooting environment in the traditional method, and improves the accuracy of defect detection; based on the similarity threshold, the quality qualified identification can be quickly completed, and only the image identified as quality abnormal is subjected to targeted defect recognition, which greatly reduces the invalid computing power consumption and improves the detection efficiency; through health image enhancement and similarity judgment, there is no need to build a special model for each type of defect of each type of element, which effectively simplifies the number of models and reduces the model maintenance cost. In this way, the lightweight, accurate and efficient defect detection of the key components of the overload protector is realized, which can meet the needs of industrial batch inspection.
[0134] Embodiment two, as shown in Figure 2 based on the same inventive concept of the image enhanced overload protector key component defect detection method provided in embodiment one, the image enhanced overload protector key component defect detection system is provided, which comprises:
[0135] a data collection module 11, configured to obtain a to-be-inspected image of a preset element of an overload protector positioned at a preset fixed position, a first camera control parameter and a first ambient light parameter;
[0136] a standard parameter retrieval module 12, configured to retrieve, from a healthy image database, a healthy image of the preset element of the overload protector positioned at the preset fixed position, a second camera control parameter and a second ambient light parameter;
[0137] a deviation calculation module 13, configured to calculate a camera control deviation vector of the second camera control parameter and the first camera control parameter, and calculate an ambient light deviation vector of the first ambient light parameter and the second ambient light parameter;
[0138] a preset healthy image output module 14, configured to process the healthy image of the preset element of the overload protector, the camera control deviation vector and the ambient light deviation vector through an image enhancement network, and output a first enhanced healthy image of the preset element;
[0139] a defect identification module 15, configured to perform quality pass identification on the to-be-inspected image when an image similarity between the to-be-inspected image and the first enhanced healthy image of the preset element is greater than or equal to a similarity threshold, or perform quality abnormal identification on the to-be-inspected image otherwise.
[0140] The data collection module 11 is specifically configured to:
[0141] obtain a set of overload protector failure transactions, wherein any overload protector failure transaction in the set of overload protector failure transactions includes a set of faulty element models;
[0142] based on the set of faulty element models, count a triggering frequency of each element model in the set of overload protector failure transactions;
[0143] count element models with a triggering frequency greater than or equal to a triggering frequency threshold as the preset element of the overload protector.
[0144] The standard parameter retrieval module 12 is specifically configured to:
[0145] retrieve, from a healthy image database, a healthy image of the preset element of the overload protector positioned at the preset fixed position, a second camera control parameter and a second ambient light parameter.
[0146] The deviation calculation module 13 is specifically configured to:
[0147] a camera control bias vector of the second camera control parameter and the first camera control parameter, and an ambient light bias vector of the first ambient light parameter and the second ambient light parameter.
[0148] The preset health image output module 14 is configured to:
[0149] Load the second camera control parameter and the second ambient light parameter of the user terminal customized configuration;
[0150] Load the first image of the ith element in the preset fixed position and posture with the second camera control parameter and the second ambient light parameter as constraints;
[0151] Randomly load a plurality of second images of the ith element in the preset fixed position and posture, wherein the plurality of second images have a plurality of camera control record parameters and a plurality of ambient light record parameters corresponding thereto;
[0152] Calculate a plurality of camera control bias record vectors of the plurality of camera control record parameters and the second camera control parameter, and calculate a plurality of ambient light bias record vectors of the plurality of ambient light record parameters and the second ambient light parameter;
[0153] Extract the kth camera control bias record vector from the plurality of camera control bias record vectors;
[0154] Extract the kth ambient light bias record vector from the plurality of ambient light bias record vectors based on the kth camera control bias record vector, and extract the kth second image from the plurality of second images;
[0155] Construct a first group of data by taking the kth camera control bias record vector, the kth camera control bias record vector, and the first image as inputs, and taking the kth second image as supervision, and add the first group of data into a plurality of groups of data;
[0156] When the number of groups of data satisfies a training quantity threshold, retrieve the plurality of groups of data, and train the image enhancement network.
[0157] The defect identification module 15 is configured to:
[0158] Specifically, the "similarity threshold value" configuration process includes:
[0159] Obtain the first historical quality qualified image, the historical camera control parameter, and the historical ambient light parameter of the overload protector preset element in the preset fixed position and posture;
[0160] Based on the historical camera control parameters and the historical ambient light parameters, the image enhancement network is used to process the overload protector preset component health image, and a preset component second enhanced health image is obtained;
[0161] A first reference image similarity between the first historical quality qualified image and the preset component second enhanced health image is calculated, and the reference image similarity set is added;
[0162] When the number of the reference image similarity set is greater than or equal to the fitting number threshold, the reference image similarity set is analyzed for central tendency, and a central reference image similarity set is obtained;
[0163] The minimum value of the central reference image similarity set is taken as the similarity threshold.
[0164] Specifically, the "image similarity" calculation process includes:
[0165] A user-defined preset component image feature attribute deviation threshold set is obtained;
[0166] The quality inspection image is compared with the preset component first enhanced health image to obtain a preset component image feature attribute deviation set;
[0167] Based on the preset component image feature attribute deviation threshold set, the proportion of image feature attribute deviations in the preset component image feature attribute deviation set that are less than or equal to the preset component image feature attribute deviation threshold is calculated, and the image similarity is set.
[0168] Further, the "quality anomaly identification of the image to be inspected" includes:
[0169] A plurality of defect type detection models are called to process the image to be inspected, and a plurality of defect type detection results are obtained;
[0170] The defect types with the defect type detection result of 1 are added to the overload protector preset component defect detection result;
[0171] According to the overload protector preset component defect detection result, a quality anomaly identification is constructed.
[0172] Further, the "calling a plurality of defect type detection models to process the image to be inspected, and obtaining a plurality of defect type detection results" includes:
[0173] A first image set of a preset model component with a preset defect is collected, and a first output identification set is constructed as 1;
[0174] A second image set of a preset model component without a preset defect is collected, and a second output identification set is constructed as 0;
[0175] The preset model element preset defect detection model is trained by taking the output identification set as supervision and taking the image set as input, and is added into the plurality of defect type detection models.
[0176] To sum up, the embodiments of the present application have at least the following technical effects:
[0177] Compared with the prior art, first, the data acquisition module is used to obtain the to-be-inspected image of the overload protector preset element positioned at the preset fixed position, the first camera control parameter and the first environmental light parameter, thereby providing reliable original data support for subsequent deviation calculation, image enhancement and accurate comparison. Second, the standard parameter calling module is used to call the healthy image of the overload protector preset element positioned at the preset fixed position, the second camera control parameter and the second environmental light parameter from the healthy image database, thereby building a standardized comparison framework for subsequent accurate detection by calling the healthy image data. Third, the deviation calculation module is used to calculate the camera control deviation vector of the second camera control parameter and the first camera control parameter, and to calculate the environmental light deviation vector of the first environmental light parameter and the second environmental light parameter, thereby providing accurate adjustment basis for subsequent image enhancement to eliminate the interference of comparison condition differences on detection accuracy. Further, the preset healthy image output module is used to process the healthy image of the overload protector preset element, the camera control deviation vector and the environmental light deviation vector through the image enhancement network, and to output the first enhanced healthy image of the preset element, thereby eliminating the image visual interference caused by the differences in camera control parameters and environmental light parameters. Finally, the defect identification module is used to perform quality qualified identification on the to-be-inspected image when the image similarity between the to-be-inspected image and the first enhanced healthy image of the preset element is greater than or equal to the similarity threshold, and to perform quality abnormal identification on the to-be-inspected image otherwise, thereby accurately distinguishing the qualified and abnormal states of the to-be-inspected element, effectively excluding the interference of shooting condition differences to improve the accuracy and reliability of defect detection, effectively reducing the invalid defect detection model calling frequency of qualified pieces, reducing unnecessary calculation resource consumption, and improving the processing efficiency of the overall detection process. In this way, the lightweight, accurate and efficient defect detection of the key components of the overload protector is realized, which can meet the needs of industrial batch inspection.
[0178] It should be noted that in the above embodiments, the description of each embodiment has its own emphasis, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.
[0179] Those skilled in the art will appreciate that embodiments of the present application can be devised for a variety of applications. It is intended that the present application be limited only by the scope of the appended claims, and it is intended that there be a full range of equivalents. Many embodiments of the application embody one or more of the following features:
[0180] The present application is described in reference to the drawings using a flowchart and / or a block diagram of the method, apparatus (system) and computer program product according to embodiments of the application. It will be understood that each block of the flowchart and / or block diagram, and combinations of blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart and / or block diagram block or blocks. Figure 1 one or more of the flowchart and / or block diagram blocks. Figure 1 means for performing the functions specified in the flowchart and / or block diagram block or blocks.
[0181] These computer program instructions can also be stored in a computer- readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the flowchart and / or block diagram block or blocks. Figure 1 one or more of the flowchart and / or block diagram blocks. Figure 1 means for performing the functions specified in the flowchart and / or block diagram block or blocks.
[0182] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the flowchart and / or block diagram block or blocks. Figure 1 one or more of the flowchart and / or block diagram blocks. Figure 1 means for performing the functions specified in the flowchart and / or block diagram block or blocks.
[0183] While preferred embodiments of the application have been described, modifications and variations can be apparent to those skilled in the art once aware of the general underlying concepts.
[0184] Obviously, numerous modifications and variations of the present application are possible in light of the above teachings. It is therefore to be understood that within the scope of the present application and its equivalents, the application can be practiced otherwise than as specifically described.
Claims
1. An image-enhanced overload protector critical component defect detection method, characterized by, The method comprises the following steps: acquire the image to be inspected, the first camera control parameter and the first ambient light parameter of the overload protector preset element positioned at the preset fixed position; from the healthy image database, call the healthy image of the overload protector preset element positioned at the preset fixed position, the second camera control parameter and the second ambient light parameter; calculate the camera control deviation vector of the second camera control parameter and the first camera control parameter, and calculate the ambient light deviation vector of the first ambient light parameter and the second ambient light parameter; process the healthy image of the overload protector preset element, the camera control deviation vector and the ambient light deviation vector through the image enhancement network, and output the first enhanced healthy image of the preset element; when the image similarity of the image to be inspected and the first enhanced healthy image of the preset element is greater than or equal to the similarity threshold, the image to be inspected is marked as quality qualified, otherwise, the image to be inspected is marked as quality abnormal; processing the healthy image of the overload protector preset element, the camera control deviation vector and the ambient light deviation vector through the image enhancement network, and outputting the first enhanced healthy image of the preset element, comprising: loading the second camera control parameter and the second ambient light parameter customized by the user end; loading the first image of the ith element at the preset positioning attitude with the second camera control parameter and the second ambient light parameter as constraints; randomly loading a plurality of second images of the ith element at the preset positioning attitude, wherein the plurality of second images have a one-to-one correspondence between the plurality of camera control record parameters and the plurality of ambient light record parameters; calculate the plurality of camera control deviation record vectors of the plurality of camera control record parameters and the second camera control parameter, and calculate the plurality of ambient light deviation record vectors of the plurality of ambient light record parameters and the second ambient light parameter; extracting the kth camera control deviation record vector from the plurality of camera control deviation record vectors; based on the kth camera control deviation record vector, extracting the kth ambient light deviation record vector from the plurality of ambient light deviation record vectors, and extracting the kth second image from the plurality of second images; taking the kth camera control deviation record vector, the kth camera control deviation record vector and the first image as input, and taking the kth second image as supervision, constructing a first group of data, and adding it to a plurality of groups of data; when the number of groups of data meets the training quantity threshold, call the plurality of groups of data to train the image enhancement network; the similarity threshold configuration process comprises: obtain the first historical quality qualified image, the historical camera control parameter and the historical ambient light parameter of the overload protector preset element positioned at the preset fixed position; based on the historical camera control parameter and the historical ambient light parameter, process the healthy image of the overload protector preset element through the image enhancement network to obtain the second enhanced healthy image of the preset element; calculate the first reference image similarity between the first historical quality qualified image and the second enhanced healthy image of the preset element, and add it to the reference image similarity set; When the number of the reference image similarity sets is greater than or equal to the fitting number threshold, the reference image similarity sets are subjected to centralized trend analysis to obtain a centralized reference image similarity set; The minimum value of the centralized reference image similarity set is taken as the similarity threshold.
2. The method of claim 1, wherein, The overload protector preset element determination process comprises: An overload protector failure transaction set is obtained, wherein any overload protector failure transaction of the overload protector failure transaction set comprises a fault element model set; Based on the fault element model set, the triggering frequency of each element model in the overload protector failure transaction set is counted; Element models with a triggering frequency greater than or equal to a triggering frequency threshold are counted and set as the overload protector preset element.
3. The method of claim 1, wherein, The quality anomaly identification of the image to be inspected comprises: A plurality of defect type detection models are called to process the image to be inspected to obtain a plurality of defect type detection results; Defect types with a defect type detection result of 1 are added to the overload protector preset element defect detection result; The quality anomaly identification is constructed according to the overload protector preset element defect detection result.
4. The method of claim 3, wherein, The plurality of defect type detection models are called to process the image to be inspected to obtain a plurality of defect type detection results, comprising: A first image set of a preset model element with a preset defect is collected, and a first output identification set is constructed as 1; A second image set of a preset model element without a preset defect is collected, and a second output identification set is constructed as 0; The preset model element preset defect detection model is trained with the output identification set as supervision and the image set as input, and is added to the plurality of defect type detection models.
5. The method of claim 1, wherein, The image similarity calculation process comprises: A user-defined preset element image feature attribute deviation threshold set is obtained; The inspection image and the preset element first enhanced health image are compared to obtain a preset element image feature attribute deviation set; Based on the preset element image feature attribute deviation threshold set, the proportion of image feature attribute deviations in the preset element image feature attribute deviation set that are less than or equal to the preset element image feature attribute deviation threshold is counted and set as the image similarity.
6. An image-enhanced overload protector critical component defect detection system characterized by, For performing the method of any one of claims 1-5, comprising: A data acquisition module is configured to obtain an image to be inspected of an overload protector preset element positioned at a preset fixed position, first camera control parameters, and first ambient light parameters; A standard parameter calling module is configured to call, from a health image database, an overload protector preset element health image positioned at a preset fixed position, second camera control parameters, and second ambient light parameters; A deviation calculation module is configured to calculate a camera control deviation vector of the second camera control parameters and the first camera control parameters, and to calculate an ambient light deviation vector of the first ambient light parameters and the second ambient light parameters; A preset health image output module is configured to process the overload protector preset element health image, the camera control deviation vector, and the ambient light deviation vector through an image enhancement network to output a preset element first enhanced health image; and A quality anomaly identification output module is configured to output the quality anomaly identification of the image to be inspected. The defect identification module is configured to perform quality pass identification on the image to be inspected when the image similarity between the image to be inspected and the image of the preset element first enhanced health image is greater than or equal to a similarity threshold, and otherwise, perform quality abnormality identification on the image to be inspected.
Citation Information
Patent Citations
Wafer surface defect detection method and device before epitaxy
CN119069376A