A method for detecting surface defects of a microphone part on line

By combining traditional image processing and deep learning technologies, a multi-module integrated method for detecting surface defects in microphone components has been developed. This method solves the problems of low accuracy and low efficiency in microphone defect detection, achieving high precision and high accuracy in defect detection. It is suitable for microphone component inspection in industrial production.

CN115866502BActive Publication Date: 2026-06-09YANGTZE DELTA REGION INST OF UNIV OF ELECTRONICS SCI & TECH OF CHINE (HUZHOU)

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
YANGTZE DELTA REGION INST OF UNIV OF ELECTRONICS SCI & TECH OF CHINE (HUZHOU)
Filing Date
2022-10-18
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing microphone defect detection technologies suffer from low detection accuracy, low efficiency, high false negative and high false positive rates when processing complex datasets. They are particularly ineffective when samples are scarce, defect patterns are uncertain, defects are not visible, and signal-to-noise ratios are low.

Method used

A multi-module integrated detection process is adopted, combining traditional methods with neural networks. Through image processing techniques such as grayscale conversion, filtering, erosion, threshold segmentation, and edge detection, combined with ResNet and Deep Extreme Cut algorithms, feature matching is performed using encoders and classifiers to achieve the detection and re-inspection of various defects.

Benefits of technology

It achieves high precision and accuracy in defect detection even with a large variety of defects and a small sample size, reduces the false detection rate and the missed detection rate, and improves the robustness of the detection system. It is suitable for microphone semi-finished product inspection in industrial production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115866502B_ABST
    Figure CN115866502B_ABST
Patent Text Reader

Abstract

The application provides a kind of microphone parts surface defect on-line detection process, product defect usually has more than ten kinds, the order of detection has great influence on accuracy.Specifically including three steps: first, the surface damage, wire bending, scratch and other large area defects are detected.Second, its surface water spot, glue drop, uneven soldering, fracture and other defects susceptible to light are detected.Finally, its surface small foreign matter, stain, burr and the like are detected, and the previous two stages are rechecked at this stage.The detection process reduces the false detection rate and the missed detection rate of microphone semi-finished product defect detection on the production line, and greatly improves the detection efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of defect detection technology, and in particular to an online method for detecting surface defects in microphone components. Background Technology

[0002] Industrial products are ubiquitous in modern society, ranging from aircraft wings to microchips. Industrial defect detection, aimed at identifying surface defects in various industrial products, is a crucial technology for ensuring product quality and maintaining stable production. Traditional defect detection requires manual screening, which is costly, inefficient, and unable to meet large-scale quality inspection needs. Industrial defect detection can be used to inspect various industrial products, such as metals, textiles, and semiconductors, and boasts excellent accuracy and efficiency while providing a simple and safe operating environment. Therefore, industrial defect detection has become a vital fundamental research and technology in the field of intelligent manufacturing, and is widely applied in scenarios such as unmanned quality inspection, intelligent inspection, production control, and anomaly tracing.

[0003] In recent years, with the emergence of new technologies in fields such as industrial imaging, computer vision, and deep learning, vision-based microphone defect detection technology has made significant progress. However, current microphone defect detection technologies still have many shortcomings. Using traditional methods and deep learning methods alone has limitations when processing large datasets or detecting anomalies in high-dimensional data. For example, they are prone to failure when processing complex data such as images, and single-class classification based on kernel methods requires a large amount of memory to store support vectors. Current defect detection methods still do not perform ideally when the background is not uniform and the image data is complex.

[0004] Faced with challenges such as scarce samples, unpredictable defect patterns, low defect visibility with often low signal-to-noise ratios, and diverse defect types, this invention proposes a complete microphone surface defect detection process that achieves high precision and accuracy. In actual manufacturing, it enables simultaneous operation of actual production and intelligent inspection, reducing the rates of missed and false detections. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides an online detection method for surface defects in microphone components. This invention proposes a complete defect detection process for microphone components, employing multiple modules that work together to sequentially detect different defect types. It combines traditional methods with neural networks, and the final detection stage also serves as a check on the previous two stages. This addresses the problem of poor robustness in microphone semi-finished product defect detection systems due to the large variety of defect types and the limited or nonexistent sample size of defective products.

[0006] The above-mentioned technical objective of the present invention is achieved through the following technical solution:

[0007] An online detection method for surface defects in microphone components, the method comprising:

[0008] Step 1: Inspect large-area defects such as surface damage, bent wires, and scratches on microphone parts;

[0009] Step two involves inspecting for defects on the surface that are easily affected by light, such as water stains, glue drips, uneven soldering, and cracks.

[0010] Step 3 involves inspecting the surface for minute foreign objects, stains, burrs, etc. This step also includes a re-inspection of the previous two steps.

[0011] The present invention is further configured such that: in step one, large-area defects such as surface damage, bent stitching, and scratches are detected, and the detection process includes:

[0012] The image to be inspected is converted to grayscale, and then Gaussian filtering and erosion are performed on the grayscale image.

[0013] The image data after the erosion operation is subjected to mean filtering, and the image data after mean filtering is subjected to binarization threshold segmentation.

[0014] After thresholding, edge detection is performed on the image data to find its contour points. After finding the contour points, straight line fitting is performed to find the defect area.

[0015] The present invention is further configured such that: in step two, defects easily affected by light, such as water stains, glue drips, uneven soldering, and breakage, are detected on the surface. The detection process includes:

[0016] After converting the image to grayscale, Gaussian filtering is performed, and then erosion is performed on the image data after Gaussian filtering.

[0017] The image data after erosion is then homogenized in brightness, and a morphological closing operation is performed on the image data after brightness homogenization.

[0018] After performing the difference and inversion operation on the image data after the morphological closing operation, Gaussian filtering is performed again, and the Gaussian filtered image data is then segmented by the maximum threshold.

[0019] Edge detection is performed on the data after maximum threshold segmentation, and the contour points of the edge-detected image are used to determine the defect area.

[0020] The present invention is further configured such that: in step three, minute foreign objects, stains, burrs, etc., on the surface are detected; this stage also performs a re-inspection of the first two stages; the detection process includes:

[0021] The network is pre-trained with ResNet as the backbone and a dataset of semi-finished microphone images. Given a normal image x, the patch size is set to n and the image is divided into multiple patches with a step size S.

[0022] For each patch, Deep Extreme Cut is used to extract objects from the bottom pixels of the four extreme points (leftmost, rightmost, topmost, and bottommost) of the image, ignoring the background;

[0023] Train a pair of encoders and classifiers to predict the relative position between two patches, and compute and store the representations of all normal patches;

[0024] During testing, the most similar patch is found with a step size S, and the Euclidean distance between them is calculated as the anomaly score.

[0025] An anomaly map is generated based on the anomaly score to locate the defect. The anomaly score is defined as follows:

[0026] .

[0027] The present invention is further configured to: train a pair of encoders, which are defined as:

[0028] ,

[0029] in, , The encoders have sensing field sizes of 64 and 32, respectively.

[0030] The invention is further configured such that the encoder is trained to minimize the Euclidean distance between the features and the center of the hypersphere using the following loss function:

[0031] ,

[0032] in, For encoder, For the input patch, These are adjacent patches with similar semantics.

[0033] The present invention has the following advantages:

[0034] This invention is based on computer vision and image processing, and adopts a multi-module integrated detection process and method. It also has the ability to train models under unsupervised input, so that the training process of the microphone semi-finished trap detection model in actual industrial production does not require a large amount of labeled data, which greatly saves production costs.

[0035] This invention uses multiple modules to work together to detect various defects, making great use of unlabeled data. The subsequent stage of detection can re-inspect the previous stage, greatly improving the accuracy of defect detection.

[0036] This invention is based on a feature distance metric method. The feature distance metric has a strong representational capability and does not require optimization of the interface. It matches the corresponding "normal template" in the feature space and directly compares it with the features of the sample to be tested, thus exhibiting good defect detection capability.

[0037] In summary, the microphone semi-finished product defect detection process provided by this invention can still ensure the robustness of the product defect detection system even when there are many types of defects and a small number of defective product samples. The integration of multiple modules allows for the re-inspection of previous detection modules, greatly improving detection accuracy and reducing the missed detection rate and false detection rate during the detection process. Attached Figure Description

[0038] Figure 1 A schematic diagram of a microphone semi-finished product defect detection process provided in an embodiment of the present invention;

[0039] Figure 2 A structural diagram of a microphone semi-finished product provided in an embodiment of the present invention;

[0040] Figure 3 The following are partial results of defect detection as shown in the embodiments of the present invention, wherein (a) is a schematic diagram of bending and scratch defects, (b) is a schematic diagram of damage defects, and the rectangular box represents the detected defect area;

[0041] Figure 4 The following are partial results of defect detection as shown in the embodiments of the present invention, wherein (a) is a schematic diagram of defects such as water stains, uneven solder, and broken solder, and (b) is a schematic diagram of defects such as exposed glue. The rectangular boxes represent the detected defect areas.

[0042] Figure 5 The following are partial results of defect detection as shown in the embodiments of the present invention, wherein (a) is a schematic diagram of stain and burr defects, (b) is a schematic diagram of foreign object defects, and the rectangular box represents the detected defect area. Detailed Implementation

[0043] The technical solutions of the present invention will be further described below with reference to the accompanying drawings and embodiments.

[0044] This invention specifically addresses the problem of microphone defect detection in industrial production. Addressing the issues of long detection times, low accuracy, and high false negative and false positive rates in current detection technologies, this invention proposes an online detection method for microphone component surface defects. This method detects different types of defects separately, thereby improving the accuracy of defect detection. An online detection process for microphone component surface defects is provided, consisting of the following step-by-step steps.

[0045] Please see Figure 1 This invention proposes an online detection method for surface defects in microphone components, comprising:

[0046] Step 1: First, inspect the microphone parts for large-area defects such as surface damage, bent wires, and scratches.

[0047] Step 2: Next, inspect the surface for defects that are easily affected by light, such as water stains, glue drips, uneven soldering, and cracks.

[0048] Step 3: Finally, inspect the surface for minor foreign objects, stains, burrs, etc. This step also involves a re-inspection of the previous two steps.

[0049] Please see Figure 2 Different types of defects may appear on different structures of microphone components. The order of inspection and the appropriate handling methods for different defects have a great impact on the inspection results. The specific handling methods are as follows:

[0050] In step one:

[0051] The following are the steps for inspecting large-area defects such as surface damage, bent stitching, and scratches:

[0052] A method based on OpenCV is used to convert the image to grayscale.

[0053] After grayscale conversion, the image is subjected to Gaussian filtering followed by erosion.

[0054] The image data after the erosion operation is subjected to mean filtering, and then binarized thresholding is performed on the mean-filtered image data.

[0055] After thresholding, edge detection is performed on the image data to find its contour points. After finding the contour points, straight line fitting is performed to find the defect area.

[0056] The large-area defect is a region where the defect area is significant.

[0057] In step two:

[0058] The following are the steps for inspecting defects that are easily affected by light, such as water stains, glue drips, uneven soldering, and cracks:

[0059] The image to be inspected is converted to grayscale and then subjected to Gaussian filtering.

[0060] Perform an erosion operation on the image data after Gaussian filtering;

[0061] The image data after the erosion operation is then processed to achieve uniform brightness.

[0062] Perform morphological closing operations on the image data after brightness homogenization.

[0063] After performing a morphological closing operation, the image data is subtracted, inverted, and then subjected to a Gaussian filter operation again.

[0064] The image data after Gaussian filtering is segmented using maximum thresholding, and edge detection is then performed on the segmented data.

[0065] The defect area is determined by finding the contour points of the edge-detected image.

[0066] The light difference defect detection module is designed for detecting defects that are susceptible to light exposure and the influence of light intensity.

[0067] In step three:

[0068] The inspection process includes detecting minute foreign objects, stains, burrs, and other defects. This stage also involves a re-inspection of the previous two stages, and includes the following steps:

[0069] The network is pre-trained using a normal microphone semi-finished image dataset with ResNet as the backbone.

[0070] Given a normal image x, set the patch size to n and divide the image into multiple patches with a step size S;

[0071] For each patch, Deep Extreme Cut is used to extract the object from the bottom pixels of the four extreme points of the image: leftmost, rightmost, topmost, and bottommost, ignoring the background;

[0072] Training a pair of encoders A classifier is used to predict the relative position between two patches;

[0073] The encoder is defined as:

[0074]

[0075] in, , The encoders have sensing field sizes of 64 and 32, respectively.

[0076] The encoder is trained by minimizing the Euclidean distance between the features and the center of the hypersphere using the following loss function:

[0077]

[0078] in, For encoder, For the input patch, These are adjacent patches with similar semantics.

[0079] Calculate and store the representations of all normal patches;

[0080] During testing, the most similar patch is found with a step size S, and the Euclidean distance between them is calculated as the anomaly score.

[0081] Anomaly score is defined as:

[0082]

[0083] Anomaly maps are generated based on anomaly scores to pinpoint the location of defects.

[0084] The detected defects are labeled and a detection report is sent, indicating the object number and defect location to facilitate subsequent processing. For example... Figure 3 The defect detection diagrams shown are: (a) a schematic diagram of bending and scratch defects in the stitching, and (b) a schematic diagram of damage defects. The rectangular boxes represent the detected defect areas. Figure 4 The defect detection diagrams shown are as follows: (a) is a schematic diagram of water stains, uneven soldering, and broken soldering defects; (b) is a schematic diagram of glue leakage defects. The rectangular boxes represent the detected defect areas. Figure 5 The defect detection diagrams shown are: (a) a schematic diagram of stain and burr defects, and (b) a schematic diagram of foreign object defects. The defect types are foreign objects and stains in small defects. The rectangles represent the detected defect areas.

[0085] The term "micro-foreign object" refers to a small-area, inconspicuous defect on the surface of a microphone component.

[0086] In this implementation, Deep Extreme Cut is an algorithm for image segmentation in deep learning. It is based on adding an extra channel to the image in a convolutional neural network. The network contains a Gaussian distribution centered at each extreme point, extracting objects from them using the four extreme points of the object: top, bottom, left, and right.

[0087] In the embodiments of this invention, it should be noted that before detecting the image, the data needs to be preprocessed. The preprocessing steps include:

[0088] Define a template image and perform pyramid downsampling on the template image;

[0089] Read the image and perform pyramid downsampling on it;

[0090] The template matching algorithm is called, and a rectangle is drawn to extract the template area to obtain the image to be inspected.

[0091] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A method for online detection of surface defects in microphone components, characterized in that, The method includes: Step 1: Inspect large-area defects of microphone parts, including surface damage, bent wires, and scratches. Step two, inspect the microphone parts for defects that are susceptible to light, including surface water stains, glue drips, uneven soldering, and breakage. Step 3: Inspect the microphone components for minor defects, including small foreign objects, stains, and burrs on the surface. This step also involves a re-inspection of the previous two steps. The detection of large-area defects in step one specifically includes: The image to be inspected is converted to grayscale, and then Gaussian filtering is applied to the grayscale image before erosion. The image data after the erosion operation is subjected to mean filtering, and the image data after mean filtering is subjected to binarization threshold segmentation. After performing edge detection on the image data after binarized threshold segmentation, the contour points are found, and then straight line fitting is performed to find the defect area. Step two involves detecting defects that are susceptible to light, specifically including: After converting the image to grayscale, perform a Gaussian filter operation, and then perform an erosion operation on the image data after Gaussian filtering. Brightness homogenization is performed on the image data after erosion, and morphological closing operation is performed on the image data after brightness homogenization. After performing the difference and inversion operation on the image data after the morphological closing operation, a Gaussian filtering operation is performed again, and the image data after the Gaussian filtering operation is segmented by the maximum threshold. After performing edge detection on the image data segmented by the maximum threshold, find its contour points to determine the defect area; Step three involves detecting minute defects. This stage also includes a re-inspection of the previous two stages, specifically including: Using ResNet as the backbone network, the network is pre-trained with a dataset of images of normal microphone semi-finished products. Given a normal image x, the patch size is set to n, and the image is divided into multiple patches with a stride S. For each patch, Deep Extreme Cut is used to extract objects from the image based on the bottom pixels of the four extreme points: leftmost, rightmost, topmost, and bottommost, ignoring the background. Train a pair of encoders and classifiers to predict the relative position between two patches, and compute and store the representations of all normal patches; During testing, the most similar patch is found with a step size S, and the Euclidean distance between them is calculated as the anomaly score. Anomaly maps are generated based on anomaly scores to pinpoint defect locations. Anomaly scores are defined as follows: , in, This indicates the encoder.