A defect detection system based on visual recognition technology

Through the multi-module combination of visual recognition technology, the problem of insufficient defect feature extraction, multi-scale fusion and online learning capabilities of the defect detection system is solved, high-precision and sensitive defect detection and model optimization are achieved, and detection efficiency and accuracy are improved. .

CN118470005BActive Publication Date: 2024-10-01GUANWEN NETWORK TECH (SUZHOU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410917764.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-10
Publication Date
2024-10-01
Estimated Expiration
2044-07-10

AI Technical Summary

Technical Problem

Existing defect detection systems have deficiencies in defect feature extraction, multi-scale feature fusion and online learning capabilities, resulting in low recognition accuracy and poor adaptability, which can easily lead to misjudgments or missed detections.

Method used

Adopting a system based on visual recognition technology, including image acquisition module, defect feature extraction module, grayscale analysis module, defect location module, interactive platform and online learning and model update module, through high-resolution image acquisition and multi-scale feature extraction With fusion, grayscale analysis, edge detection and contour analysis, interactive platform and online learning mechanism, we can achieve the accuracy and sensitivity of defect detection.

Benefits of technology

It improves the identification accuracy and sensitivity of defect detection, ensures image quality, achieves preliminary efficient screening, precise positioning of edge detection and contour analysis, accelerates subsequent processing processes, the interactive platform promotes model iteration, and the online learning mechanism optimizes model performance, providing Deep insights and fast decisions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118470005B_ABST
    Figure CN118470005B_ABST
Patent Text Reader

Abstract

The present invention discloses a defect detection system based on visual recognition technology, which relates to the technical field of defect detection, including: capturing an image of a panel to be detected; performing defect feature recognition and fusion on the captured image to obtain a fused defect map; calculating the tangential grayscale according to the fused defect map, and performing preliminary defect judgment in combination with an abnormal threshold; further locating the defect position by using edge detection and contour analysis; marking defects and non-defect points on a platform to generate marked data; automatically triggering an online learning mechanism based on the marked data to update an online model; analyzing the defect data after real-time detection to generate a defect detection report; utilizing high-precision image acquisition and processing technology, combined with multi-scale feature extraction and intelligent fusion, to achieve high-sensitivity recognition and positioning of defects; accelerating iteration through an interactive platform, adopting online learning and k-fold verification to ensure model optimization, and finally providing data analysis and automatic report generation to promote efficient decision-making and adaptive adjustment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of defect detection, and in particular to a defect detection system based on visual recognition technology. Background Art

[0002] In the field of modern industrial automation, visual recognition technology has gradually become a key component of product quality control, especially in high-precision, large-volume production lines, and its application in defect detection is becoming increasingly widespread. Despite this, current defect detection systems still face several challenges, mainly focusing on the effective extraction of defect features, the accuracy of multi-scale feature fusion, and the lack of online learning capabilities. Traditional methods often rely on fixed thresholds in the defect determination stage, lack adaptability to changing working conditions, and are prone to misjudgment or missed detection. Summary of the invention

[0003] In view of the above existing problems, the present invention is proposed.

[0004] Therefore, the present invention provides a defect detection system based on visual recognition technology to solve the problems of insufficient panel defect recognition accuracy and imperfect automated detection process in the industrial manufacturing field.

[0005] In order to solve the above technical problems, the present invention provides the following technical solutions:

[0006] In a first aspect, an embodiment of the present invention provides a defect detection system based on visual recognition technology, which includes an image acquisition module that captures an image of a panel to be detected through an online camera;

[0007] The defect feature extraction module identifies and fuses defect features of different scales on the captured images to obtain a fused defect map;

[0008] Grayscale analysis module calculates the tangential grayscale based on the fused defect map and makes a preliminary defect judgment based on the abnormal threshold.

[0009] The defect location module uses edge detection and contour analysis to further locate the defect position;

[0010] Interactive platform module: build an interactive platform to view preliminary defect judgments in real time, mark defects and non-defect points on the platform, and generate annotation data;

[0011] The online learning and model updating module automatically triggers the online learning mechanism and updates the online model based on the labeled data;

[0012] The defect data analysis and report generation module analyzes defect data and generates defect detection reports after real-time detection.

[0013] As a preferred solution of the defect detection system based on visual recognition technology of the present invention, wherein: the image of the panel to be detected is captured by the online camera, including:

[0014] Deploy a high-resolution online camera, set camera parameters and trigger mode to fix the frame rate Capture an image of the panel to be inspected.

[0015] As a preferred solution of the defect detection system based on visual recognition technology of the present invention, wherein: the defect feature recognition and fusion of the captured images at different scales to obtain the fused defect map includes:

[0016] A pyramid method combining bicubic downsampling and upsampling is used to form a multi-scale image sequence {I k}, where k represents the scale index;

[0017] Based on multi-scale image sequence {I k}, use fast Fourier transform and wavelet transform to extract multi-scale frequency domain features and the time-frequency characteristics w k w ;

[0018] Combine the multi-scale frequency domain features and time-frequency features into the defect feature vector F k , expressed as,

[0019] ;

[0020] According to the scale sensitivity, the fusion weight w of each scale is calculated k , then the defect feature vectors are weighted fused to obtain the fused defect graph F u , expressed as,

[0021] ;

[0022] ;

[0023] in, represents the hyperparameters controlling the weights, represents a scalar factor and j represents an index variable.

[0024] As a preferred solution of the defect detection system based on visual recognition technology of the present invention, wherein: the calculation of tangential grayscale includes:

[0025] First, for the fusion defect map F u , the Sobel operator is applied to calculate the local gradient direction at each pixel position (x, y). The Sobel operator uses two 3x3 discrete convolution kernels to calculate the horizontal direction G x and vertical direction Gy The gradient component of is expressed as,

[0026] ;

[0027] Based on the obtained gradient component G x (x,y) and G y (x,y), calculate the local gradient direction θ(x,y), expressed as,

[0028] ;

[0029] Then, based on the calculated local gradient direction θ(x,y), the fused defect map F u The grayscale G(x,y) is calculated along the tangent direction of each pixel position (x,y), expressed as,

[0030] ;

[0031] in, represents the angle step, θ' represents the angle variable, F u (x,y,θ') represents the eigenvalue in the neighborhood in the θ' direction around the point (x,y).

[0032] As a preferred solution of the defect detection system based on visual recognition technology described in the present invention, the preliminary defect judgment is performed in combination with the abnormal threshold, including:

[0033] Set the abnormal threshold to T g ;

[0034] When G(x,y) is greater than or equal to T g When , the pixel is classified as a normal area;

[0035] When G(x,y) is less than T g When the pixels are marked as potential defect points, all images marked with potential defect points are integrated to generate a preliminary defect detection map.

[0036] As a preferred solution of the defect detection system based on visual recognition technology of the present invention, further locating the defect position includes:

[0037] Apply the Canny edge detection algorithm to enhance the edge of the defect detection map and obtain the edge map E((x,y);

[0038] The edge graph E(x,y) is simplified by the Douglas-Peucker algorithm to extract the contour coordinates. ;

[0039] For each contour coordinate , calculate the centroid coordinates , expressed as,

[0040] ;

[0041] Based on centroid coordinates , locate the defect position.

[0042] As a preferred solution of the defect detection system based on visual recognition technology of the present invention, wherein: the construction of the interactive platform includes:

[0043] Create a real-time interactive platform and design system architecture;

[0044] Develop real-time interactive functions on the front end, design user authentication and image display areas, use Vuetify's Image component, and develop annotation toolbars;

[0045] The backend builds API and database to process business logic, creates interfaces, receives image uploads, obtains preliminary detection results, saves annotation data, establishes a WebSocket server, and integrates database and AI services.

[0046] As a preferred solution of the defect detection system based on visual recognition technology of the present invention, wherein: the real-time viewing of preliminary defect judgment, marking of defects and non-defect points on the platform, and generation of marking data include:

[0047] Log in to the interactive platform and use the annotation tool to mark potential defects in real-time transmission;

[0048] If the potential defect point is a defect point, mark A at the defect position;

[0049] If the potential defect point is a non-defect point, mark B at the defect position;

[0050] Integrate annotations A and B to generate annotation data D, and transmit it to the interactive platform backend in real time.

[0051] As a preferred solution of the defect detection system based on visual recognition technology of the present invention, wherein: based on the labeled data, automatically triggering the online learning mechanism and updating the online model include:

[0052] Set a data volume threshold S for the labeled data as a trigger condition. The system automatically detects and immediately starts the incremental learning strategy once the data volume threshold S is exceeded.

[0053] The k-fold cross-validation method is used to divide the annotation feedback dataset into k subsets. The model is trained with k-1 subsets each time, and the remaining subsets are used for validation. This is repeated k times and the validation indicators are averaged.

[0054] Monitor performance metrics of online models, including area under the curve, recall, and precision;

[0055] During the training process, the performance indicators on the validation set are continuously monitored. Once abnormalities are found in consecutive iteration cycles, the online model parameters are modified and online monitoring and learning are restarted.

[0056] As a preferred solution of the defect detection system based on visual recognition technology of the present invention, after the real-time detection, the defect data is analyzed and a defect detection report is generated, as follows:

[0057] Detect defect data in real time using continuously updated online models;

[0058] Use the Pandas library to classify the detected defect data based on defect type, count the frequency of each defect, and generate a defect type distribution chart;

[0059] The DBSCAN algorithm is used to cluster the defect locations, output the clustering results, mark the high-density defect areas, and generate the location clustering heat map;

[0060] Automatically generate defect detection reports based on defect type distribution charts and location cluster heat maps.

[0061] The beneficial effects of the present invention are as follows: through high-resolution image acquisition, combined with precise parameter setting, image quality is ensured, laying the foundation for accurate detection. Multi-scale extraction and intelligent fusion technology of defect features greatly improve the accuracy and range of recognition, and effectively capture different types of defects. Grayscale analysis and tangential processing strategies improve detection sensitivity and achieve preliminary efficient screening. Edge detection and contour analysis technology accurately locate defects and accelerate subsequent processing procedures. The introduction of an interactive platform accelerates data annotation and feedback collection, and promotes instant iteration and upgrading of the model. The online learning mechanism and k-fold validation method ensure continuous optimization of model performance and respond to actual changes. Data analysis and automatic report generation functions provide deep insights and guide quick decision-making. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0063] Figure 1 This is a flow chart of the defect detection system based on visual recognition technology in Example 1.

[0064] Figure 2 This is the determination diagram of the defect point in Example 1. DETAILED DESCRIPTION

[0065] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings.

[0066] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0067] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.

[0068] Example 1, reference Figure 1 and Figure 2 , which is the first embodiment of the present invention, and provides a defect detection system based on visual recognition technology, comprising the following steps:

[0069] S1, image acquisition module, captures the image of the panel to be inspected through an online camera.

[0070] Deploy a high-resolution online camera, set camera parameters (such as resolution, exposure time, gain, white balance, gamma correction, and color space) and trigger mode (such as continuous trigger) to fix the frame rate (e.g. 30fps) capture the image of the panel to be inspected;

[0071] It should be noted that the image acquisition module captures the image of the panel to be inspected at a fixed frame rate 𝑓 by deploying a high-resolution online camera and finely setting parameters, ensuring the stability and consistency of the image quality and providing a solid foundation for subsequent precise analysis.

[0072] S2, defect feature extraction module, identifies and fuses defect features of different scales on the captured images to obtain a fused defect map.

[0073] By combining bicubic downsampling and upsampling techniques, we progressively reduce and enlarge the image size according to different scaling factors to construct a set of multi-scale image sequences {I k}, each scale index k corresponds to a resolution level of the image;

[0074] Based on multi-scale image sequence {I k}, use fast Fourier transform and wavelet transform to extract multi-scale frequency domain features and the time-frequency characteristics w k w ;

[0075] Combine the multi-scale frequency domain features and time-frequency features into the defect feature vector F k , expressed as,

[0076] ;

[0077] According to the scale sensitivity, the fusion weight w of each scale is calculated k , then the defect feature vectors are weighted fused to obtain the fused defect graph F u , expressed as,

[0078] ;

[0079] ;

[0080] in, represents the hyperparameters controlling the weights, represents a scalar factor and j represents an index variable.

[0081] It should be noted that the defect feature extraction module realizes the accurate identification and fusion of multi-scale defect features through the innovative bicubic downsampling and upsampling pyramid method combined with fast Fourier transform and wavelet transform.

[0082] It should be noted that the bicubic downsampling and upsampling technology effectively improves the multi-dimensional feature extraction capability of image analysis, enhances the recognition accuracy and adaptability of defects of different scales, and lays a solid foundation for subsequent high-quality visual inspection and recognition tasks.

[0083] S3, grayscale analysis module, calculates the tangential grayscale based on the fused defect map, and makes a preliminary defect judgment based on the abnormal threshold.

[0084] S3.1. First, for the fusion defect map F u , the Sobel operator is applied to calculate the local gradient direction at each pixel position (𝑥,𝑦). The Sobel operator uses two 3×3 discrete convolution kernels to calculate the horizontal direction G x and vertical direction G y The gradient component of is expressed as,

[0085] ;

[0086] Based on the obtained gradient component G x (x,y) and G y(x,y), calculate the local gradient direction θ(x,y), expressed as,

[0087] ;

[0088] Then, based on the calculated local gradient direction θ(x,y), the fused defect map F u The grayscale G(x,y) is calculated along the tangent direction of each pixel position (x,y), expressed as,

[0089] ;

[0090] in, represents the angle step, θ' represents the angle variable, F u (x,y,θ') represents the eigenvalue in the neighborhood in the θ' direction around the point (x,y).

[0091] S3.2. Set the abnormal threshold to T g ;

[0092] When G(x,y) is greater than or equal to T g When , the pixel is classified as a normal area;

[0093] When G(x,y) is less than T g When the pixels are marked as potential defect points, all images marked with potential defect points are integrated to generate a preliminary defect detection map.

[0094] It should be noted that the grayscale analysis module accurately calculates the local gradient direction through the Sobel operator, and calculates the grayscale along the tangent direction accordingly, and performs preliminary defect screening in combination with the preset abnormal threshold.

[0095] S4, defect location module, uses edge detection and contour analysis to further locate the defect position.

[0096] Apply the Canny edge detection algorithm to the defect detection map, and effectively enhance and accurately extract the defect edge information in the image through multi-level filtering, gradient calculation, non-maximum suppression and double threshold screening, so as to obtain a clear edge map E(x,y);

[0097] The Douglas-Peucker algorithm is used to optimize the edge graph E(x,y), and the simplified contour coordinates are efficiently extracted by recursively comparing and retaining key points, removing redundant details, and efficiently extracting the simplified contour coordinates. ;

[0098] For each contour coordinate , calculate the centroid coordinates , expressed as,

[0099] ;

[0100] Based on centroid coordinates , locate the defect position.

[0101] It should be noted that the defect location module uses the efficient combination of Canny edge detection and Douglas-Peucker algorithm to achieve accurate edge positioning and contour simplification of the preliminary detection map, thereby accurately calibrating the defect position.

[0102] S5, interactive platform module, builds an interactive platform, checks preliminary defect judgments in real time, marks defects and non-defect points on the platform, and generates annotation data.

[0103] S5.1. Create a real-time interactive platform and design the system architecture;

[0104] Develop real-time interactive functions on the front end, design user authentication and image display areas, use Vuetify's Image component, and develop annotation toolbars;

[0105] The backend builds API and database to process business logic, creates interfaces, receives image uploads, obtains preliminary detection results, saves annotation data, establishes a WebSocket server, and integrates database and AI services.

[0106] S5.2. Log in to the interactive platform and use the annotation tool to mark potential defects in real-time transmission;

[0107] If the potential defect point is a defect point, mark A at the defect position;

[0108] If the potential defect point is a non-defect point, mark B at the defect position;

[0109] Integrate annotations A and B to generate annotation data D, and transmit it to the interactive platform backend in real time.

[0110] It should be noted that the construction of the interactive platform module provides users with an intuitive and efficient real-time interactive environment, which not only accelerates the annotation process, but also promotes the immediate integration of user feedback, providing a high-quality data foundation for the continuous optimization of the model.

[0111] S6, online learning and model updating module, automatically triggers the online learning mechanism and updates the online model based on the labeled data.

[0112] Set a data volume threshold S=1000 for the labeled data as a trigger condition. When S is less than or equal to 1000, continue the labeling task. When S is greater than 1000, immediately start the incremental learning strategy (such as the playback strategy or the regularization-based strategy).

[0113] The k-fold cross-validation method is used to divide the annotation feedback dataset into k subsets. The model is trained with k-1 subsets each time, and the remaining subsets are used for validation. This is repeated k times and the validation indicators are averaged.

[0114] Monitor performance metrics of online models, including area under the curve, recall, and precision;

[0115] During the training process, the performance indicators on the validation set are continuously monitored. Once no significant improvement is found for several consecutive iterations, the online model parameters are modified and online monitoring and learning are restarted.

[0116] It should be noted that the online learning and model update module uses an automatically triggered incremental learning mechanism, real-time updates based on user annotation feedback, and the k-fold cross-validation method to optimize the model, ensuring the continuous evolution and optimal performance of the online model, improving the system's adaptability and long-term effectiveness, and reducing the need for manual intervention.

[0117] It should be noted that the incremental learning strategy aims to solve the problem of how to effectively use new data for continuous learning during model training, especially when data arrives in a streaming manner or the data set continues to expand. Incremental learning avoids the need to retrain the entire model every time new data arrives, which greatly saves computing resources and time costs, allowing the model to adapt to changes more quickly, especially in the case of large amounts of data. In the data stream, new data may bring new categories or imbalances between categories. The incremental learning strategy can dynamically adjust the model to better handle this imbalance and improve the ability to recognize samples of each category. In scenarios that require continuous online services, incremental learning enables the model to be updated without interrupting services, ensuring the continuity and quality of services.

[0118] S7, defect data analysis and report generation module, after real-time detection, analyzes defect data and generates defect detection reports.

[0119] Detect defect data in real time using continuously updated online models;

[0120] Use the Pandas library to classify the defect data after detection based on defect type, and further group them according to the macro / micro division. Count the number of occurrences of each defect type on the grouped data to obtain frequency statistics and generate a defect type distribution chart.

[0121] The DBSCAN algorithm is used to cluster the defect locations, output the clustering results, mark the high-density defect areas, and generate the location clustering heat map;

[0122] Automatically generate defect detection reports based on defect type distribution charts and location cluster heat maps.

[0123] It should be noted that the defect data analysis and report generation module uses a combination of data analysis tools and clustering algorithms to not only provide a real-time overview of defect data, but also deeply analyzes the defect type distribution and location clustering characteristics, automatically generates detailed inspection reports, and improves overall production efficiency and quality management level.

[0124] In summary, the beneficial effects of the present invention are that high-resolution image acquisition combined with precise parameter setting ensures image quality and lays the foundation for accurate detection; multi-scale extraction of defect features and intelligent fusion technology greatly improve the accuracy and range of recognition and effectively capture different types of defects; grayscale analysis and tangential processing strategies improve detection sensitivity and achieve preliminary efficient screening; edge detection and contour analysis technologies accurately locate defects and accelerate subsequent processing procedures; the introduction of an interactive platform accelerates data annotation and feedback collection, and promotes instant iterative upgrades of the model; online learning mechanisms and k-fold validation methods ensure continuous optimization of model performance and respond to actual changes; data analysis and automatic report generation functions provide deep insights and guide quick decision-making. Example 2

[0125] Referring to Table 1, which is the second embodiment of the present invention, in order to further verify the advancement of the present invention, experimental simulation data of a defect detection system based on visual recognition technology is provided.

[0126] In order to verify the innovation and advantages of the present invention, we designed a simulation experiment for surface defect detection of semiconductor wafers. The experimental environment was equipped with a high-resolution online camera (resolution of 4096x4096 pixels, frame rate of 30fps), and the camera parameters (such as exposure time, gain, etc.) were optimized for specific production line conditions. The experiment selected 100 wafers containing various typical defects (such as scratches, stains, particles, etc.) as the objects to be detected to ensure the diversity and representativeness of the samples.

[0127] The implementation process is divided into the following key steps:

[0128] 1. Image acquisition: The online camera continuously captures wafer images according to the set parameters, taking 10 images for each wafer to improve the reliability of detection.

[0129] 2. Defect feature extraction: A pyramid method of bicubic downsampling and upsampling is used to construct a multi-scale image sequence from scale k=0 to k=4. Frequency domain features are extracted by fast Fourier transform and wavelet transform. and time-frequency characteristics Fusion weights Based on scale sensitivity calculation, the fused defect map is finally obtained. .

[0130] 3. Grayscale analysis: Apply the Sobel operator to calculate the local gradient direction, and then calculate the grayscale along the tangent direction of each pixel , set the abnormal threshold =0.3, preliminarily screen out potential defects.

[0131] 4. Defect location: Use Canny edge detection and Douglas-Peucker algorithm to simplify the contour and accurately locate the center coordinates of the defect .

[0132] 5. Interactive platform: A web-based interactive platform was built, and real-time image display and annotation functions were implemented through the Vuetify framework. Users can view the inspection results instantly and perform A / B annotations on suspected defects.

[0133] 6. Online learning and model updating: Set the data volume threshold S=1000. Once enough labeled data is collected, online learning is triggered. The k-fold cross-validation (k=5) strategy is used to optimize the model, and performance indicators are continuously monitored.

[0134] 7. Defect data analysis and reporting: Use Pandas to classify and count defect data, combine DBSCAN algorithm for cluster analysis, and generate detailed defect detection reports.

[0135] The details are shown in the following table:

[0136] Table 1 Experimental record table

[0137] Wafer number Defect Type Grayscale mean of initial defect image Grayscale mean of fused defect image Abnormal threshold determination Positioning accuracy (μm) Dimension Type Model update times W001 Scratches 0.24 0.89 defect 2.1 A 2 W002 stain 0.31 0.92 defect 1.8 A 1 W003 Particles 0.28 0.91 defect 2.3 A 3 ... ... ... ... ... ... ... ... W100 Scratches 0.29 0.93 defect 1.9 A 2

[0138] Data Analysis and Discussion:

[0139] By comparing the grayscale mean of the initial defect image and the fused defect image, it is observed that the grayscale mean of the fused image has increased significantly in all cases (by about 200% to 300%), indicating that the defect feature extraction module has effectively enhanced the defect signal. In addition, by setting a reasonable abnormal threshold , successfully distinguished normal areas from potential defect areas, and all points marked as defects were verified in subsequent positioning, demonstrating the effectiveness of grayscale analysis.

[0140] In terms of defect positioning, the average positioning accuracy reaches 1.95μm, which is a significant improvement over the common 5μm positioning accuracy of the prior art, proving the innovation of the present invention in precise positioning.

[0141] The use of the interactive platform enables users to participate in the defect detection process immediately, improving the efficiency and accuracy of annotation. Through the inspection and annotation of 100 wafers, a total of 1,250 annotation data were collected (an average of 12.5 per wafer), triggering two online learning updates. The recall rate of the model increased from 78% in the first use to 92%, the accuracy increased from 85% to 96%, and the area under the curve (AUC) also increased from 0.88 to 0.94, demonstrating the advantages of the online learning and model update modules.

[0142] Based on the above data analysis, the defect detection system based on visual recognition technology of the present invention not only shows excellent performance in defect recognition and precise positioning, but also realizes continuous optimization of the model through real-time learning mechanism, significantly improving the accuracy and efficiency of defect detection, overcoming the shortcomings of traditional methods such as insensitive defect recognition, inaccurate positioning and delayed model updating, and fully demonstrating its innovation and practicality.

[0143] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.

Claims

1. A defect detection system based on visual recognition technology, Features: include, An image acquisition module captures the image of the panel to be inspected through an online camera; The defect feature extraction module identifies and fuses defect features of different scales on the captured images to obtain a fused defect map; Grayscale analysis module calculates the tangential grayscale based on the fused defect map and makes a preliminary defect judgment based on the abnormal threshold. The defect location module uses edge detection and contour analysis to further locate the defect position; Interactive platform module: build an interactive platform to view preliminary defect judgments in real time, mark defects and non-defect points on the platform, and generate annotation data; The online learning and model updating module automatically triggers the online learning mechanism and updates the online model based on the labeled data; Defect data analysis and report generation module: After real-time detection, it analyzes defect data and generates defect detection reports; The calculation of the tangential grayscale comprises: First, for the fusion defect map F u , the Sobel operator is applied to calculate the local gradient direction at each pixel position (x, y). The Sobel operator uses two 3x3 discrete convolution kernels to calculate the horizontal direction G x and vertical direction G y The gradient component of is expressed as, ; Based on the obtained gradient component G x (x,y) and G y (x,y), calculate the local gradient direction θ(x,y), expressed as, ; Then, based on the calculated local gradient direction θ(x,y), the fused defect map F u The grayscale G(x,y) is calculated along the tangent direction of each pixel position (x,y), expressed as, ; in, represents the angle step, θ' represents the angle variable, F u (x,y,θ') represents the eigenvalue in the neighborhood in the θ' direction around the point (x,y); Combined with the abnormal threshold, preliminary defect judgment includes: Set the abnormal threshold to T g ; When G(x,y) is greater than or equal to T g When , the pixel is classified as a normal area; When G(x,y) is less than T g When the pixel is marked as a potential defect point, all images marked with potential defect points are integrated to generate a preliminary defect detection map; Further defect location includes: Apply edge detection algorithm to enhance the edge of defect detection map and obtain edge map E(x,y); Simplify the edge map E(x,y) and extract the contour coordinates ; For each contour coordinate , calculate the centroid coordinates ; Based on centroid coordinates , locate the defect position.

2. The defect detection system based on visual recognition technology as claimed in claim 1, Features: The capturing of the image of the panel to be inspected by the online camera comprises: Deploy a high-resolution online camera, set camera parameters and trigger mode to fix the frame rate Capture an image of the panel to be inspected.

3. The defect detection system based on visual recognition technology as claimed in claim 2, Features: The captured images are subjected to defect feature recognition and fusion at different scales to obtain a fused defect map including: The pyramid method combining bicubic downsampling and upsampling is used to form a multi-scale image sequence {I k }, where k represents the scale index; Based on multi-scale image sequence {I k }, use fast Fourier transform and wavelet transform to extract multi-scale frequency domain features and the time-frequency characteristics w k w ; Combine the multi-scale frequency domain features and time-frequency features into the defect feature vector F k , expressed as, ; According to the scale sensitivity, the fusion weight w of each scale is calculated k , then the defect feature vectors are weighted fused to obtain the fused defect graph F u , expressed as, ; ; in, represents the hyperparameters controlling the weights, represents a scalar factor and j represents an index variable.

4. The defect detection system based on visual recognition technology as claimed in claim 3, Features: The calculated centroid coordinates It is expressed as, 。 5. The defect detection system based on visual recognition technology as claimed in claim 4, Features: The said construction of interactive platform comprises: Create a real-time interactive platform and design system architecture; Develop real-time interactive functions on the front end, design user authentication and image display areas, use Vuetify's Image component, and develop annotation toolbars; The backend builds API and database to process business logic, creates interfaces, receives image uploads, obtains preliminary detection results, saves annotation data, establishes a WebSocket server, and integrates database and AI services.

6. The defect detection system based on visual recognition technology as claimed in claim 5, Features: The real-time viewing of preliminary defect judgment, marking of defects and non-defect points on the platform, and generation of marking data include: Log in to the interactive platform and use the annotation tool to mark potential defects in real-time transmission; If the potential defect point is a defect point, mark A at the defect position; If the potential defect point is a non-defect point, mark B at the defect position; Integrate annotations A and B to generate annotation data D, and transmit it to the interactive platform backend in real time.

7. The defect detection system based on visual recognition technology as claimed in claim 6, Features: The automatic triggering of the online learning mechanism based on the labeled data and updating of the online model include: Set a data volume threshold S for the labeled data as a trigger condition. The system automatically detects and immediately starts the incremental learning strategy once the data volume threshold S is exceeded. The k-fold cross-validation method is used to divide the annotation feedback dataset into k subsets. The model is trained with k-1 subsets each time, and the remaining subsets are used for validation. This is repeated k times and the validation indicators are averaged. Monitor performance metrics of online models, including area under the curve, recall, and precision; During the training process, the performance indicators on the validation set are continuously monitored. Once abnormalities are found in consecutive iteration cycles, the online model parameters are modified and online monitoring and learning are restarted.

8. The defect detection system based on visual recognition technology as claimed in claim 7, Features: After the real-time detection, the defect data is analyzed and a defect detection report is generated, including: Detect defect data in real time using continuously updated online models; Use the Pandas library to classify the detected defect data based on defect type, count the frequency of each defect, and generate a defect type distribution chart; The DBSCAN algorithm is used to cluster the defect locations, output the clustering results, mark the high-density defect areas, and generate the location clustering heat map; Automatically generate defect detection reports based on defect type distribution charts and location cluster heat maps.