Image-based inductor defect detection method, device and electronic device
Through the image-based inductor defect detection method, image acquisition, color correction and feature generation model processing are used to achieve efficient and accurate detection of inductor surface defects, solving the problems of low efficiency and poor accuracy of traditional methods, reducing the misjudgment rate and Labor costs.
Patent Information
- Application Number
- CN202410358290.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-27
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2044-03-27
AI Technical Summary
Traditional inductor surface image defect detection methods have low detection efficiency, low accuracy and high labor costs, making it difficult to meet the needs of modern electronic equipment for efficient and accurate detection.
The image-based inductor defect detection method is used to automatically detect inductor surface defects by acquiring inductor images, color correction, feature generation model processing and feature difference analysis, reducing the misjudgment rate and saving labor costs.
It improves the efficiency and accuracy of inductor defect detection, reduces the misjudgment rate, saves labor costs, and improves the quality control level in the inductor manufacturing process.
Smart Images

Figure CN118261870B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of image detection technology, and in particular to an image-based inductor defect detection method, device and electronic device. Background Art
[0002] An inductor is an electronic component used to store energy. It can convert electrical energy into magnetic energy and release it when needed. Inductors are widely used in various electronic devices, such as transformers, power supplies, and communication equipment. However, due to the working environment and working principle of the inductor, its surface is easily affected by the external environment, resulting in surface defects such as cracks, dents, oxidation, etc. These surface defects can reduce the performance and life of the inductor and may even cause safety hazards. Traditional methods for detecting surface image defects of inductors include visual inspection, microscopic inspection, and X-ray inspection. These methods have some problems, such as low detection efficiency, low accuracy, and high labor costs. With the development of artificial intelligence technology, image recognition and analysis technology based on artificial intelligence has been widely used in various fields. Therefore, there is an urgent need for an inductor surface image defect detection method based on artificial intelligence. An efficient and accurate inductor surface image defect detection method is developed using artificial intelligence technology. Summary of the invention
[0003] In order to solve the above technical problems or at least partially solve the above technical problems, the embodiments of the present disclosure provide an image-based inductor defect detection method, device, electronic device and storage medium, which improve the detection efficiency and accuracy of inductor defects, reduce the misjudgment rate, and save labor costs.
[0004] In a first aspect, an embodiment of the present disclosure provides an image-based inductor defect detection method, the method comprising:
[0005] acquiring a target inductance image of the inductor;
[0006] Performing color correction on the target inductance image based on the color correction model to obtain a corrected target inductance image;
[0007] Performing feature processing on the corrected target inductance image based on the trained feature generation model to obtain target inductance features;
[0008] Determining an inductance characteristic difference according to the target inductance characteristic, the defective inductance characteristic and the normal inductance characteristic;
[0009] The detection result of the inductance is determined according to the inductance characteristic difference and a preset value.
[0010] In a second aspect, the present disclosure also provides an image-based device fault diagnosis apparatus, the apparatus comprising:
[0011] An image acquisition module, used for acquiring a target inductance image of the inductor;
[0012] A correction image acquisition module is used to perform color correction on the target inductance image based on a color correction model to obtain a corrected target inductance image;
[0013] An inductance feature acquisition module, used to perform feature processing on the corrected target inductance image based on a trained feature generation model to obtain target inductance features;
[0014] A feature difference determination module, used to determine the inductance feature difference according to the target inductance feature, the defective inductance feature and the normal inductance feature;
[0015] The detection result acquisition module is used to determine the detection result of the inductance according to the inductance characteristic difference and a preset value.
[0016] In a third aspect, an embodiment of the present disclosure further provides an electronic device, comprising: one or more processors; a storage device for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the image-based inductor defect detection method as described above.
[0017] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the image-based inductor defect detection method as described above.
[0018] An image-based inductor defect detection method provided by an embodiment of the present disclosure includes obtaining a target inductor image of an inductor; performing color correction on the target inductor image based on a color correction model to obtain a corrected target inductor image; performing feature processing on the corrected target inductor image based on a trained feature generation model to obtain a target inductor feature; determining an inductor feature difference based on the target inductor feature, a defective inductor feature and a normal inductor feature; and determining a detection result of the inductor based on the inductor feature difference and a preset value, thereby improving the detection efficiency and accuracy of inductor defects, reducing the misjudgment rate and saving labor costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0020] Figure 1 is a flow chart of an image-based inductor defect detection method in an embodiment of the present disclosure;
[0021] Figure 2 is a schematic diagram of the structure of pixel linear interpolation of an image in an embodiment of the present disclosure;
[0022] Figure 3 A schematic diagram of the structural relationship between the position of a pixel and the corresponding neighboring pixels in an embodiment of the present disclosure;
[0023] Figure 4 is a structural schematic diagram of an image-based inductor defect detection device in an embodiment of the present disclosure;
[0024] Figure 5 It is a structural schematic diagram of an electronic device in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0025] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0026] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0027] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0028] In response to the above problems, the embodiments of the present disclosure provide an image-based inductor defect detection method, which improves the detection efficiency and accuracy of inductor defects, reduces the misjudgment rate, and saves labor costs by utilizing the target inductor image for detection.
[0029] Figure 1 1 is a flow chart of an image-based inductor defect detection method in an embodiment of the present disclosure. The method can be executed by an image-based inductor defect detection device, which can be implemented in software and / or hardware, and can be configured in an electronic device. Figure 1 As shown, the method may specifically include the following steps:
[0030] S110 , obtaining a target inductance image of the inductor.
[0031] Specifically, an inductor is an electronic component used to store energy. It can convert electrical energy into magnetic energy and release it when needed. Inductors are widely used in various electronic devices, such as transformers, power supplies, and communication equipment. The target inductor image is an image of the inductor component collected by a sensor, such as a camera or a high-resolution image sensor. The target inductor image is used to detect whether there are defects in the working inductor component.
[0032] S120, performing color correction on the target inductance image based on the color correction function to obtain a corrected target inductance image;
[0033] For example, images taken under different lighting conditions may have color deviations. Color correction can keep the colors of these images consistent and enhance the overall visual effect. Therefore, it is necessary to construct a color correction model to correct the acquired inductance image. The present disclosure constructs a color correction model, and its expression is:
[0034] ;
[0035] in, represents the corrected inductance image, represents the inductance image, and Representing two random pixels of the inductor image, of The light intensity of the pixel, yes The light intensity of a pixel, express Pixels and The pixel mean of the pixels, express Pixels and The spatial distance of pixels.
[0036] The color correction model disclosed in this embodiment can make the color of the inductance image more accurate and realistic, improve the visual effect, and make the image look clearer and more vivid.
[0037] S130 , performing feature processing on the corrected target inductance image based on the trained feature generation model to obtain target inductance features.
[0038] Specifically, the trained feature generation model is used to distinguish between normal inductors and defective inductors, but the feature generation model needs to be trained using historical and sample inductor images corrected by a color correction model to obtain the trained feature generation model.
[0039] In one embodiment, before determining the inductance characteristic difference according to the target inductance characteristic, the defective inductance characteristic and the normal inductance characteristic, the method includes:
[0040] The feature generation model is trained using the corrected historical inductance image to obtain a trained feature generation model; wherein the feature type corresponding to the defective inductance image in the corrected historical inductance image is 0, and the feature type corresponding to the normal inductance image in the corrected historical inductance image is 1.
[0041] Among them, the expression of the feature generation model is:
[0042] ;
[0043] in, Represents a pixel in the corrected inductance image Image after bilinear interpolation, C is the inductance image The corresponding feature type, and They are Direction and The gradient of the direction, Inductance image Pixels, Inductance image Medium Pixels In the neighborhood The mean value of pixels within Indicates from Direction and Direction feature map.
[0044] Specifically, the application of interpolation in image processing is to use the grayscale values of known neighboring pixels or the three-color values in RGB to generate the grayscale values or RGB three-color values of unknown pixels, with the purpose of regenerating an image with higher resolution from the original image. Bilinear interpolation is interpolation from two directions, refer to Figure 2 As shown, a five-pointed star represents a pixel point. The goal is to obtain the pixel value of the interpolated pixel point P(x, y). Given Q 11 (x1,y1),Q 12 (x1,y2),Q 21 (x2,y1),Q 22 The coordinates of (x2, y2) and the corresponding pixel values. First, interpolation is performed in the x direction to obtain R1 and R2, and then interpolation is performed in the y direction to obtain P. The present disclosure uses the above-mentioned bilinear interpolation method to perform bilinear interpolation on the pixels of the target inductance image to obtain the interpolated target inductance image .
[0045] For each pixel of the target inductor image, For example, the pixel The nearest pixel is taken as the neighborhood pixel, refer to Figure 3 As shown, the target pixel As the center, there are 4 corresponding neighborhood pixels, namely, , neighborhood pixels , neighborhood pixels and neighborhood pixels ;The pixel mean is the pixel The average value of each neighboring pixel corresponding to it. is the area corresponding to the neighborhood pixels.
[0046] and Indicates that the Gaussian kernel function is used to Direction and The feature mapping obtained from the x-direction and y-direction using the Gaussian kernel function means that in the target inductance image processing, the features are weighted by the Gaussian kernel function to capture the changes in pixel values in different directions. Specifically: Indicates that in the x direction, the target pixel is processed by the Gaussian kernel function The difference between the target pixel and its neighboring pixels is weighted to obtain the feature map in the x direction. This helps to capture the relationship between the target pixel and its neighboring pixels in the x direction, and then extract the feature information in the x direction. Similarly, Indicates that in the y direction, the target pixel is quantized by the Gaussian kernel function. The difference between the target pixel and its neighboring pixels is weighted to obtain the feature map in the y direction. This helps to capture the relationship between the target pixel and its neighboring pixels in the y direction, and then extract the feature information in the y direction. In this way, the difference between the target pixel and its neighboring pixels in different directions can be comprehensively considered, so as to more comprehensively describe the characteristics of the target inductance image.
[0047] It should be noted that when a pixel is located at the center, there are 4 neighboring pixels; when a pixel is located at the boundary, there may be 2 or 3 neighboring pixels. The corresponding neighboring pixels of the pixel are fewer, but the method of calculating the pixel mean is the same, which will not be repeated here.
[0048] Exemplarily, the corrected historical inductance image is an inductance image obtained by correcting the historical and sample inductance images through a color correction model. The defective inductance image in the corrected historical inductance image is input into the feature generation model, and the feature generation model is trained to obtain defective inductance features, and the feature type C of the defective inductance features is 0; the normal inductance image in the corrected historical inductance image is input into the feature generation model, and the feature generation model is trained to obtain normal inductance features, and the feature type C of the defective inductance features is 1; through the above training, a trained feature generation model is obtained.
[0049] After obtaining the trained feature generation model, the corrected target inductance image is input into the trained feature generation model to obtain the target inductance feature.
[0050] It should be noted that before obtaining the target inductance feature, it is necessary to use the historical inductance image to obtain the defective inductance feature and the normal inductance feature; it can be understood that the target inductance image is corrected in the same way as the historical inductance image, the historical inductance image includes a normal inductance image and a defective inductance image, the normal inductance image and the defective inductance image are obtained in the same way as the target inductance image, the defective inductance feature and the normal inductance feature are obtained in the same way as the target inductance feature, and both use the feature generation model; the difference is: when the normal inductance feature is generated based on the normal inductance image using the feature generation model, the feature type C of the feature generation model is 1; when the defective inductance feature is generated based on the defective inductance image using the feature generation model, the feature type C of the feature generation model is 0.
[0051] The feature generation model disclosed in this embodiment can generate different inductance features for different input inductance images, has certain flexibility, and can adapt to different types of inductance image data, so as to better extract and generate corresponding inductance features. It can capture the feature information of the inductance image more comprehensively, which helps to improve the expressiveness of the inductance features, making the generated features more distinguishable and representative.
[0052] S140: Determine an inductance characteristic difference according to the target inductance characteristic, the defective inductance characteristic and the normal inductance characteristic.
[0053] Specifically, based on the above embodiment, after the defect inductance feature is obtained, the defect inductance feature can be enhanced by using a mapping enhancement matrix to obtain an enhanced defect inductance feature.
[0054] Furthermore, in one embodiment, the step of enhancing the defect inductance feature to obtain the enhanced defect inductance feature includes:
[0055] Determining an enhancement matrix according to the spatial variation function and the defect inductance characteristics;
[0056] According to the defect inductance characteristics and the enhancement matrix, an enhanced defect inductance characteristic is obtained.
[0057] After obtaining the defect inductance feature, the defect inductance feature can be enhanced by using the mapping enhancement matrix to obtain an enhanced defect inductance feature. Specifically, based on the defect inductance feature Features in the X direction and features in the Y direction And the spatial transformation function ,use , constantly adjusting When the value of is set to minimize the variance, the optimal two-dimensional mapping enhancement matrix is obtained; then, based on the optimal two-dimensional mapping enhancement matrix and the defect inductance feature, the enhanced defect inductance feature is obtained. Specifically, based on the above embodiment, the spatial transformation function The defect inductance characteristic Mapping to Enhanced Defect Inductance Features , and its enhanced defect inductance characteristic expression is: ;
[0058] in, is the optimal two-dimensional mapping enhancement matrix, is the defect inductance characteristic, To enhance the defect inductance characteristics.
[0059] This embodiment enhances the defective inductor image by using an enhancement matrix to obtain a high-quality and clear image, wherein the enhanced image can make the details of the image more clearly visible, facilitate observation of faulty pixels, and make the defective inductor features clearer.
[0060] Furthermore, in one embodiment, determining the inductance characteristic difference according to the target inductance characteristic, the defective inductance characteristic and the normal inductance characteristic includes:
[0061] Performing enhancement processing on the defect inductance feature to obtain an enhanced defect inductance feature;
[0062] Determining a first inverse covariance matrix according to the enhanced defect inductance feature and the target inductance feature;
[0063] Determining a first covariance matrix according to the normal inductance feature and the target inductance feature;
[0064] The inductance feature difference is determined according to the target inductance feature, the enhanced defect inductance feature, the normal inductance feature, the first inverse covariance matrix, the first covariance matrix, the matrix transpose and the spatial feature distance metric.
[0065] Exemplarily, based on the above embodiment, an enhanced defect inductance feature is obtained, and the inductance feature difference is determined according to the target inductance feature, the enhanced defect inductance feature, the normal inductance feature, the first inverse covariance matrix, the first covariance matrix, the matrix transposition and the spatial feature distance metric, wherein the expression of the inductance feature difference is:
[0066] ;
[0067] in, Indicates the difference in inductance characteristics, represents the enhanced defect inductance characteristics, represents the target inductance characteristic, represents the normal inductance characteristic, E represents the matrix transpose, Representation Matrix and matrix The first inverse covariance matrix of Representation Matrix and matrix The first covariance matrix of is a spatial feature distance metric.
[0068] Among them, the spatial feature distance metric is used to measure the distance between different features in the feature space. The emphasis on spatial feature distance can be controlled, thus affecting the final feature difference measurement result.
[0069] It should be noted that the feature type C of the target inductance feature is unknown. The feature type C is determined by correlating the normal inductance feature, the defective inductance feature and the target inductance feature and determining the difference in the inductance features obtained by the correlation.
[0070] This embodiment determines the difference in inductance characteristics by associating normal inductance characteristics, defective inductance characteristics and target inductance characteristics, and determines whether the inductance image is a defective inductance image based on the difference in inductance characteristics, thereby improving the accuracy of inductance image detection.
[0071] S150: Determine a detection result of the inductance according to the inductance characteristic difference and a preset value.
[0072] Exemplarily, the preset value is considered to be pre-set and can be adjusted according to actual conditions, for example, the preset value can be 0. The detection results of the inductance include whether the inductance is normal and whether the inductance is defective. When the inductance feature difference D(P, R, J)>0, it can be determined that the feature type C corresponding to the target inductance feature is 1, and the target inductance image belongs to a normal inductance image; when the inductance feature difference D(P, R, J)<0, it can be determined that the feature type C corresponding to the target inductance feature is 0, and the target inductance image belongs to a defective inductance image. By determining the inductance feature difference between the target inductance feature and the defective inductance feature and the normal inductance feature, the defective inductance image is detected, and then the defective inductance image is used to determine whether the inductance is defective or normal.
[0073] The image-based inductor defect detection method provided in this embodiment obtains target inductor features by performing feature processing on the target inductor image based on a trained feature model; determines the inductor feature difference according to the target inductor feature, the defective inductor feature and the normal inductor feature; and then determines whether the inductor is normal or defective by using the inductor feature difference and a preset value, thereby reducing manual dependence on inductor defect detection, reducing detection costs and improving production efficiency; and through automated inductor image detection, inductor defects are discovered and processed in a timely manner, thereby improving the quality control level in the inductor manufacturing process, reducing the defective rate and improving product quality.
[0074] Figure 4 FIG. 1 is a schematic diagram of the structure of an image-based inductor defect detection device in an embodiment of the present disclosure. Figure 4 As shown: The device includes:
[0075] An image acquisition module 210, used to acquire a target inductance image of the inductor;
[0076] The correction image acquisition module 220 is used to perform color correction on the target inductance image based on the color correction model to obtain a corrected target inductance image;
[0077] An inductance feature acquisition module 230, configured to perform feature processing on the calibrated target inductance image based on a trained feature generation model to obtain target inductance features;
[0078] A characteristic difference determination module 240, configured to determine an inductance characteristic difference according to the target inductance characteristic, the defective inductance characteristic and the normal inductance characteristic;
[0079] The detection result acquisition module 250 is used to determine the detection result of the inductance according to the inductance characteristic difference and a preset value.
[0080] Wherein, the expression of the color correction model is:
[0081] ;
[0082] in, represents the corrected inductance image, represents the inductance image, and Representing two random pixels of the inductor image, of The light intensity of the pixel, yes The light intensity of a pixel, express Pixels and The pixel mean of the pixels, express Pixels and The spatial distance of pixels.
[0083] The expression of the feature generation model is:
[0084] ;
[0085] in, Represents a pixel in the corrected inductance image The image after bilinear interpolation, Inductance image The corresponding feature type, and They are Direction and The gradient of the direction, Inductance image Pixels, Inductance image Medium Pixels In the neighborhood The mean value of pixels within Indicates from Direction and Direction feature map.
[0086] Optionally, the device includes an acquisition module, and the acquisition module is used for, before determining the inductance characteristic difference according to the target inductance characteristic, the defective inductance characteristic and the normal inductance characteristic, comprising:
[0087] The feature generation model is trained using the corrected historical inductance image to obtain a trained feature generation model; wherein the feature type corresponding to the defective inductance image in the historical inductance image is 0, and the feature type corresponding to the normal inductance image in the historical inductance image is 1.
[0088] Optionally, the feature difference module 240 is further used to enhance the defect inductance feature to obtain an enhanced defect inductance feature;
[0089] Determining a first inverse covariance matrix according to the enhanced defect inductance feature and the target inductance feature;
[0090] Determining a first covariance matrix according to the normal inductance feature and the target inductance feature;
[0091] The inductance feature difference is determined according to the target inductance feature, the enhanced defect inductance feature, the normal inductance feature, the first inverse covariance matrix, the first covariance matrix, the matrix transpose and the spatial feature distance metric.
[0092] Optionally, the feature difference module 240 is further used to enhance the defect inductance feature to obtain an enhanced defect inductance feature, including:
[0093] Determining an enhancement matrix according to the spatial variation function and the defect inductance characteristics;
[0094] According to the defect inductance characteristics and the enhancement matrix, an enhanced defect inductance characteristic is obtained.
[0095] Wherein, the expression of the inductance characteristic difference is:
[0096] ;
[0097] in, Indicates the difference in inductance characteristics, represents the enhanced defect inductance characteristics, represents the target inductance characteristic, represents the normal inductance characteristic, E represents the matrix transpose, Representation Matrix and matrix The first inverse covariance matrix of Representation Matrix and matrix The first covariance matrix of is a spatial feature distance metric.
[0098] The image-based inductor defect detection device provided in the embodiment of the present disclosure can execute the steps of the image-based inductor defect detection method provided in the method embodiment of the present disclosure, and the execution steps and beneficial effects are no longer repeated here.
[0099] Figure 5 Schematic diagram of the structure of an electronic device in the embodiment of the present disclosure. Figure 5 It shows a schematic structural diagram of an electronic device 500 suitable for implementing the embodiments of the present disclosure. Figure 5 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0100] like Figure 4As shown, the electronic device 500 may include a processing device 501, a read-only memory (ROM) 502, a random access memory (RAM) 503, a bus 504, an input / output (I / O) interface 505, an input device 506, an output device 507, a storage device 508, and a communication device 509. The processing device (e.g., a central processing unit, a graphics processor, etc.) 501 can perform various appropriate actions and processes according to the program in the ROM 502 or the program loaded from the storage device 508 to the RAM 503 to implement the method of the embodiment described in the present disclosure. In the RAM 503, various programs and data required for the operation of the electronic device 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other through the bus 504. The input / output (I / O) interface 505 is also connected to the bus 504.
[0101] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart, thereby implementing the base image inductance defect detection method as described above. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 509, or installed from the storage device 508, or installed from the ROM 502. When the computer program is executed by the processing device 501, the above functions defined in the method of the embodiment of the present disclosure are executed.
[0102] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0103] The computer-readable medium may be included in the electronic device; or it may exist independently without being assembled into the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: obtains a target inductance image of the inductor; performs color correction on the target inductance image based on a color correction model to obtain a corrected target inductance image; performs feature processing on the corrected target inductance image based on a trained feature generation model to obtain a target inductance feature; determines the inductance feature difference based on the target inductance feature, defective inductance feature and normal inductance feature; determines the detection result of the inductance based on the inductance feature difference and a preset value.
[0104] Optionally, when the above one or more programs are executed by the electronic device, the electronic device may also execute other steps described in the above embodiments.
[0105] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0106] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
Claims
1. An image-based inductor defect detection method, characterized in that: The method includes: acquiring a target inductance image of the inductor; Performing color correction on the target inductance image based on a color correction model to obtain a corrected target inductance image; Performing feature processing on the corrected target inductance image based on the trained feature generation model to obtain target inductance features; Determining an inductance characteristic difference according to the target inductance characteristic, the defective inductance characteristic and the normal inductance characteristic; Determining the detection result of the inductance according to the inductance characteristic difference and the preset value, Among them, the expression of the feature generation model is: ; in, Represents a pixel in the inductance image Image after bilinear interpolation, C is the inductance image The corresponding feature type, and They are Direction and The gradient of the direction, Inductance image Pixels, Inductance image Medium Pixels In the neighborhood The mean value of pixels within Indicates from Direction and Direction feature map.
2. The method according to claim 1, characterized in that The expression of the color correction model is: ; in, represents the corrected inductance image, represents the inductance image, and Representing two random pixels of the inductor image, of Light intensity, The light intensity of a pixel, express Pixels and The pixel mean of the pixels, express Pixels and The spatial distance of pixels.
3. The method according to claim 1, characterized in that Before determining the inductance characteristic difference according to the target inductance characteristic, the defective inductance characteristic and the normal inductance characteristic, the method includes: The feature generation model is trained using the corrected historical inductance image to obtain a trained feature generation model; wherein the feature type corresponding to the defective inductance image in the corrected historical inductance image is 0, and the feature type corresponding to the normal inductance image in the corrected historical inductance image is 1.
4. The method according to claim 1, characterized in that: Determining the inductance characteristic difference according to the target inductance characteristic, the defective inductance characteristic and the normal inductance characteristic includes: Performing enhancement processing on the defect inductance feature to obtain an enhanced defect inductance feature; Determining a first inverse covariance matrix according to the enhanced defect inductance feature and the target inductance feature; Determining a first covariance matrix according to the normal inductance feature and the target inductance feature; The inductance feature difference is determined according to the target inductance feature, the enhanced defect inductance feature, the normal inductance feature, the first inverse covariance matrix, the first covariance matrix, the matrix transpose and the spatial feature distance metric.
5. The method according to claim 4, characterized in that The step of enhancing the defect inductance feature to obtain an enhanced defect inductance feature includes: Determining an enhancement matrix according to the spatial variation function and the defect inductance characteristics; According to the defect inductance characteristics and the enhancement matrix, an enhanced defect inductance characteristic is obtained.
6. The method according to claim 4, characterized in that The expression of the inductance characteristic difference is: ;in, Indicates the difference in inductance characteristics, represents the enhanced defect inductance characteristics, represents the target inductance characteristic, represents the normal inductance characteristic, E represents the matrix transpose, Representation Matrix and matrix The first inverse covariance matrix of Representation Matrix and matrix The first covariance matrix of is a spatial feature distance metric.
7. An image-based inductor defect detection device, using the image-based inductor defect detection method according to any one of claims 1 to 6, characterized in that: include: An image acquisition module, used for acquiring a target inductance image of the inductor; A correction image acquisition module is used to perform color correction on the target inductance image based on a color correction model to obtain a corrected target inductance image; An inductance feature acquisition module, used to perform feature processing on the corrected target inductance image based on a trained feature generation model to obtain target inductance features; A feature difference determination module, used to determine the inductance feature difference according to the target inductance feature, the defective inductance feature and the normal inductance feature; The detection result acquisition module is used to determine the detection result of the inductance according to the inductance characteristic difference and a preset value.
8. An electronic device, characterized in that The electronic device comprises: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.
