A method for detecting the surface of an automobile part based on a large model

By combining spectral imaging technology and large-scale deep learning algorithms, the problems of poor generalization ability and high computational resource consumption of deep learning methods in the detection of surface defects in automotive parts are solved, achieving high-precision, real-time defect detection and classification, which is suitable for large-scale production environments.

CN119904423BActive Publication Date: 2025-11-07ZHEJIANG HAIZHICHEN IND EQUIPMENT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411965249.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-11-07
Estimated Expiration
2044-12-30

AI Technical Summary

Technical Problem

Existing deep learning-based defect detection methods for detecting surface defects in automotive parts suffer from problems such as reliance on large amounts of labeled data, poor generalization ability, high computational resource consumption, and insufficient real-time performance, making it difficult to adapt to rapid changes and diverse defect types in complex environments.

Method used

By combining spectral imaging technology and large-scale deep learning algorithms, high-resolution images and spectral data are acquired to perform feature extraction, cluster analysis, and anomaly pattern recognition. The detection accuracy and computing resources are dynamically adjusted to adapt to both simple and complex defects.

Benefits of technology

It achieves high-precision, real-time defect detection, accurately locates and classifies defects such as cracks, scratches, and bubbles, reduces manual inspection errors and costs, and is suitable for large-scale production environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119904423B_ABST
    Figure CN119904423B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on big model's automobile parts surface defect detection method, comprising the following steps: the feature data of target surface is obtained using multidimensional imaging equipment;Feature extraction, cluster analysis and abnormal pattern recognition are carried out by big model;Abnormal region is extracted and statistical model is generated;Based on statistical model and standard sample data comparison, determine the position of abnormal region;Classify and identify defect type, and dynamically optimize the allocation of computing resources to adapt to detection complexity;Finally output defect type and position.The application combines spectral imaging technology and deep learning algorithm, realize high-precision detection, positioning and classification crack, scratch, bubble and other defects, generate intuitive detection report, suitable for real-time quality control in large-scale production, improve detection efficiency and accuracy, reduce artificial error and cost.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to a method for detecting the surface of automobile parts based on large models, and in particular to an automobile part defect detection technology combining spectral imaging technology and deep learning models. BACKGROUND

[0002] With the rapid development of the automobile industry, the quality and performance requirements of automobile parts are increasingly improved. In particular, during the manufacturing process of automobiles, defect detection of parts has become a key link to ensure product quality, improve production efficiency and reduce production cost. Defects on the surface of parts, such as cracks, scratches, bubbles, surface contaminants, etc., often directly affect the performance and safety of the parts. Therefore, how to accurately and quickly detect these defects has become a technical problem to be solved in the automobile manufacturing industry.

[0003] Traditional defect detection methods usually rely on manual detection or automated recognition based on simple image processing algorithms. However, manual detection is not only time-consuming but also limited by the experience and fatigue level of the detection personnel, and is prone to missed detection or misjudgment. While the automated detection method based on image processing can improve detection efficiency, its detection accuracy and stability are often affected by image quality, background noise and defect types, making it difficult to cope with complex surface defect types, especially in some fine surfaces or relatively small defect detection, traditional methods have great limitations.

[0004] With the continuous development of image recognition and computer vision technology, automatic defect detection technology based on deep learning has been gradually applied to the recognition of part surface defects. Deep learning technology can automatically extract features from images by training large-scale data sets, recognize patterns and rules in images, and greatly improve the accuracy and robustness of defect detection. However, although deep learning models have made significant progress in image processing, they still face many challenges in dealing with defect detection in various complex environments in actual production.

[0005] First, existing deep learning defect detection methods usually rely on a large amount of labeled data for training, and obtaining high-quality labeled data is very difficult and costly. Second, traditional deep learning methods often assume that the types and locations of defects are fixed, but in actual production, the types and characteristics of part surface defects have high diversity, and each production batch of parts may have different defect types, resulting in poor generalization ability of existing models in different scenarios, which cannot adapt to rapidly changing production demands. In addition, deep learning models usually require a large amount of computing resources, which may cause significant resource consumption and delay for real-time defect detection applications, affecting production efficiency. SUMMARY

[0006] To solve the above problems in the prior art, the present application proposes a method for detecting the surface of automobile parts based on a large model, which comprises the following steps:

[0007] Step 1: Obtain feature data of the target surface based on a multi-dimensional imaging device;

[0008] Step 2: Use a large model to extract features, cluster analysis and anomaly pattern recognition on the obtained feature data;

[0009] Step 3: According to the distribution difference of the target surface feature data, extract the abnormal area and generate a statistical model;

[0010] Step 4: Based on the comparison between the statistical model and the standard sample data, determine the specific location of the abnormal area;

[0011] Step 5: Use the large model algorithm to classify and identify the defect type of the identified abnormal area;

[0012] Step 6: Dynamically optimize the allocation of computing resources to adapt to different complexity of detection tasks;

[0013] Step 7: Output the defect type and specific location of the detection target.

[0014] The step 1 further comprises obtaining high-resolution magnified images of unit areas for identifying defects by using white incident light to irradiate the surface of automobile parts.

[0015] The step 2 further comprises obtaining spectral data of the target surface by a spectral imager; inputting the obtained spectral data into a large model, and using the large model to extract features, cluster analysis and anomaly pattern recognition to identify the location and type of the target surface defects.

[0016] The step 3 further comprises grouping the spectral data, generating a frequency distribution histogram of each group; comparing the generated histogram with the histogram of the normal state, and identifying the target surface defect area according to the frequency distribution difference.

[0017] The calculation of the frequency distribution difference is specifically to quantify the difference between the two by calculating the difference between the histogram frequency distribution P = {f1, f2,..., f N} of the current image and the normal histogram frequency distribution Q = {g1, g2,..., g N}, wherein the difference degree D KL (P||Q) is calculated by the following formula:

[0018]

[0019] Wherein,

[0020] f i This represents the frequency of the i-th group in the current image, where i = 1, ..., N;

[0021] g i This represents the frequency of the i-th group in a normal histogram, where i = 1, ..., N;

[0022] N is the total number of groups in the bar chart;

[0023] When D KL When the value of (P||Q) exceeds the preset threshold, it is determined that there is an abnormal region in the current image. By further analyzing the changing trend of frequency distribution in the abnormal region, potential defect regions that do not conform to normal surface features are identified and their locations are determined.

[0024] Step 4 further includes:

[0025] A standard mode layer structure is established based on the spectral data of a normal target surface, wherein the standard mode layer structure includes the spectral distribution characteristics of the normal surface and its corresponding spatial coordinates.

[0026] Locate pixels with different frequency distributions and calculate their coordinates (x, y) in the image. i ,y i );

[0027] The coordinates of the pixels with frequency distribution differences are compared with the corresponding coordinates (x, y) in the standard mode layer structure. j ,y j The comparison is performed, the difference distance d is calculated, and it is determined whether it exceeds the preset threshold.

[0028] The comparison results show that the regions where pixels are located at a distance d exceeding the threshold are potential defect areas;

[0029] The center position (x) of the defect region is calculated by aggregating pixel coordinates with frequency distribution differences. c ,y c ), where (x c ,y c The result was obtained by weighted average method:

[0030] in:

[0031] x c ,y c : The calculated horizontal and vertical coordinates of the center of the defect area;

[0032] k: Index variable, representing each pixel with a different frequency distribution;

[0033] w kWeight value of pixel k, representing the degree of frequency distribution difference of the pixel, the greater the weight, the higher the importance of the pixel to defect positioning;

[0034] x k ,y k Horizontal and vertical coordinates of pixel k, respectively representing the specific position of the pixel in the image;

[0035] ∑ k w k x k Weighted sum of the horizontal coordinates of all frequency distribution difference pixels and their weights;

[0036] ∑ k w k y k Weighted sum of the vertical coordinates of all frequency distribution difference pixels and their weights;

[0037] ∑ k w k Sum of all weight values, used for normalizing the weighted sum result.

[0038] The step 5 further includes re-clustering optimization of the pixels identified as defects, optimizing the grouping result based on the spectral features, spatial distribution and texture features of the pixels; inputting the optimized abnormal component cluster into the large model to extract features thereof through the large model;

[0039] According to the extracted features, the large model is used to identify the defect type and output the type information of each defect region.

[0040] The step 6 further includes:

[0041] Based on the geometric shape, texture feature and spectral response mode of the defect, the defect complexity is evaluated and a defect complexity score C complexity is generated;

[0042] According to the defect complexity score, an adaptive precision adjustment algorithm is used to dynamically adjust the detection precision, and the adjusted precision parameter E adjusted is generated by the formula E adjusted =E0×(1+k complexity ×C complexity ), wherein E0 is the basic precision parameter, k complexity is the complexity adjustment coefficient;

[0043] In the detection of simple defects, a low precision mode is adopted to complete the detection quickly; in the detection of complex defects, the detection precision is improved, and the calculation resources are dynamically allocated.

[0044] The step 7 further comprises: based on the spectral data, pixel clustering information and defect complexity evaluation results, analyzing the optimized abnormal component cluster through a large model to identify the type of each defect; comparing the pixel coordinates of the defect area with the coordinate data of the standard mode layer structure to accurately locate the position of each defect; and outputting the detection results containing the defect type and its specific position on the target surface.

[0045] The present application realizes high-precision detection of surface defects of automobile parts by combining spectral imaging technology with large model deep learning algorithm. By dynamically adjusting the detection precision and computing resources, it adaptively deals with simple and complex defects, improving the detection efficiency and accuracy. This method can accurately locate and classify defect types such as cracks, scratches and bubbles, and generate intuitive detection reports, providing an intelligent solution for production quality control, significantly reducing the error and cost of manual detection, and suitable for real-time defect detection needs in large-scale production environment. BRIEF DESCRIPTION OF DRAWINGS

[0046] The drawings described herein are used to provide further understanding of the present application, and form a part of this application, but do not constitute improper limitation on the present application. In the drawings:

[0047] Figure 1 The detection overall flowchart of the present application is shown. DETAILED DESCRIPTION

[0048] The present application will be described in detail below in combination with the drawings and specific embodiments, in which the illustrative embodiments and descriptions are used to explain the present application, but do not constitute a limitation on the present application.

[0049] The present application relates to a method for detecting the surface of automobile parts based on a large model, especially using spectral imaging technology and large model intelligent analysis to accurately detect and identify surface defects of automobile parts. In this embodiment, the surface image data of the multi-layer film substrate is input into the large model for detailed defect identification and classification. The technical implementation of the present application will be described in combination with the specific embodiments.

[0050] Step 1: Obtain magnified image

[0051] In the implementation process of the present application, the first step is to irradiate the surface of the automobile part with white incident light to obtain a high-resolution magnified image of the unit area for identifying defects. The main goal of this step is to clearly capture the surface image, magnify and present the subtle defects, so as to facilitate subsequent defect analysis and identification. This is crucial for accurate positioning and identification of surface defects, especially when the surface of the part has complex structure or tiny defects.

[0052] To ensure the quality of the images, high-resolution imaging equipment is used in combination with precisely controlled light source configurations to ensure optimal contrast and brightness levels. Specifically, white incident light is used to illuminate the surface of the component through a uniform light source, which is selected based on the material and surface reflectance properties. The intensity, angle, and uniformity of the light source have a significant impact on the final image quality.

[0053] To further improve the accuracy and detail capture of the imaging, high-performance optical lenses are used to ensure the clarity and detail presentation of the magnified images by precisely adjusting the focal length. The resolution of the camera equipment should be at a sufficient level to capture every small surface defect, providing effective basis for subsequent spectral data extraction and defect analysis. In addition, the shooting angle and distance of the image should be reasonably set according to the specific shape and surface state of the component to reduce imaging distortion or blur caused by improper angle.

[0054] In actual operation, the generated images need to have high accuracy and repeatability. After each image collection, the system will automatically perform quality assessment to check whether the image clarity, contrast, and light distribution meet the set standards. Only images that meet these quality requirements can enter the subsequent spectral data extraction and defect analysis process, ensuring the authenticity and reliability of each image data.

[0055] The magnified images obtained through this step provide a solid foundation for subsequent spectral data collection. Each pixel in the image will be accurately mapped to its corresponding spectral data, ensuring that surface defects can be clearly identified in subsequent analysis and that the final defect detection effect will not be affected by image quality problems. Therefore, this step is crucial in the entire defect detection process, directly determining the accuracy of subsequent steps and the final detection effect.

[0056] Step 2: Obtain spectral data and input into large model

[0057] After Step 1 is completed, proceed to Step 2, which involves obtaining the spectral data of the magnified image through a spectral imager. The core of this step is to use spectral imaging technology to obtain the spectral information of each pixel and transmit these data to the large model for processing, thereby providing accurate raw data for defect identification and classification.

[0058] A spectral imager is a device that can acquire reflectance intensity information at multiple spectral bands simultaneously through multi-band light sources and corresponding detectors. Unlike traditional RGB image imaging, a spectral imager can capture the reflectance spectral data of each pixel at different wavelengths through its multiple band sensors, typically covering from visible to near-infrared and even mid-infrared bands. The spectral data of each pixel not only records the reflectance intensity of that point, but also contains information about the surface characteristics, chemical composition, and structural features of the material.

[0059] Specifically, a spectral imager performs multi-dimensional acquisition of reflectance intensity on each pixel through its multiple spectral channels. This process includes the following steps:

[0060] 1. Light source configuration and irradiation: The spectral imager irradiates the surface of the automotive parts with a built-in light source system. To ensure that light of different wavelengths can uniformly irradiate the target surface, the light source will consider the radiation intensity and wavelength selection of each band when designed.

[0061] 2. Reflectance spectrum capture: Under the irradiation of the light source, the surface of the automotive parts will reflect light of different wavelengths. The detector of the spectral imager will capture these reflected light signals and perform digital processing to generate spectral data for each pixel. The spectral information of each pixel generally includes data from multiple bands, typically including multiple spectral channels from ultraviolet to near-infrared (e.g., 400nm-2500nm range). The reflectance data of each pixel will reflect the characteristics of that point at different spectral bands.

[0062] 3. Data acquisition and conversion: The spectral data of each pixel is stored in a high-dimensional array, represented as a multi-dimensional data matrix, where each row represents a pixel and each column represents a spectral band. These data contain all the spatial information and spectral characteristics of the image.

[0063] After obtaining the complete spectral data, the next step is to input these data into the large model for feature extraction. The large model uses deep learning algorithms to automatically extract key features from the input spectral data through learning on a large number of training data sets. The model uses advanced deep learning methods such as convolutional neural networks (CNN) for feature extraction.

[0064] 1. Data preprocessing: The large model first performs standardization processing on the input spectral data, converting the reflectance intensity of different bands to a unified scale to reduce the bias that may be brought by different devices and different light source conditions. This process helps the model better understand the data differences of different spectral channels.

[0065] 2. Feature extraction: After standardization, the large model uses a multi-layer convolutional neural network (CNN) to extract features from the spectral data. Convolutional layers can automatically capture texture, color difference, structure, and other features in the input data through convolution operations. Through multiple layers of nonlinear mapping, the model can extract high-level features from the image, such as surface texture, gloss variation, structural abnormalities, etc., which provide rich information for defect detection.

[0066] 3. Cluster analysis and preliminary classification: Based on feature extraction, the large model also performs cluster analysis on key features in the image. Cluster analysis algorithms (such as K-means clustering, DBSCAN, etc.) can group similar features in the image together and preliminarily classify them. Cluster analysis not only helps determine potential defect areas in the image, but also can preliminarily classify different types of defects based on feature similarity. For example, texture and structural abnormalities may be classified as one category, while color difference and reflection intensity changes may be classified as another category.

[0067] 4. Outlier detection: During cluster analysis, the large model also performs outlier detection. By calculating the deviation of each data point within the cluster, it can identify areas that deviate from the normal pattern, i.e., potential defect locations. Through this method, the model can effectively find small or hidden defects in the image.

[0068] The spectral data provided by the spectral imager, combined with the large model's feature extraction and cluster analysis, provides strong support for subsequent defect detection and classification. Through this combination, the model not only can detect defects based on single visual information, but also can use multi-dimensional spectral information to improve detection accuracy and robustness.

[0069] By analyzing the reflection intensity changes at different wavelengths, the model can identify the characteristics of different materials, surface states, or potential defects, further improving the accuracy and reliability of identification. For example, for defects such as micro-cracks or uneven coating on the surface of automobile parts, simple visual image processing may not be able to accurately identify them, but through the deep physical features provided by spectral data, the model can more accurately locate the defect type and position.

[0070] Through the above steps, the spectral data processed by the large model will generate classification results for different defects, outputting the types and possible locations of defects. In this process, the large model not only captures key information from the image through feature extraction, but also effectively identifies potential defects using cluster analysis and outlier detection techniques. These results provide clear defect candidate areas for subsequent steps, providing accurate guidance for defect repair and quality control.

[0071] Step 3: Generate a histogram and identify defects

[0072] In Step 2, the large model performs preliminary processing and feature extraction on the spectral data. The next step is to group the spectral data and generate a histogram to further identify potential defect areas. The core of this step is to cluster the spectral features of the image and reveal potential abnormal areas through the frequency distribution of the histogram, thereby determining the presence of defects.

[0073] First, at the beginning of Step 3, the spectral data has been preliminarily extracted and analyzed by the large model, which includes the reflection intensity information of each pixel at different spectral bands. In order to facilitate subsequent defect recognition, the next step is to group these data according to spectral features.

[0074] The basic principle of grouping is to classify similar spectral information into the same group based on the spectral features of the pixels. The specific grouping process can use the following steps:

[0075] Spectral data standardization: In order to avoid the interference of different spectral band reflection intensity value ranges on the clustering process, first, the spectral data of each pixel needs to be standardized. The common method of standardization is to subtract the mean value of each spectral value and divide by the standard deviation, so that the mean value of the data is 0 and the standard deviation is 1. This step can reduce the bias caused by different devices or measurement conditions.

[0076] Clustering algorithm selection: In order to group the spectral data, K-means clustering, DBSCAN (density-based clustering algorithm) or Gaussian Mixture Model (GMM) can be used. Taking K-means algorithm as an example, first determine the number of clusters K, then calculate the Euclidean distance between each pixel and the cluster center, and assign the pixel to the nearest cluster. K-means clustering adjusts the cluster center position through multiple iterations until the algorithm converges, i.e. the pixel classification result in the cluster is stable.

[0077] Grouping result output: Through the processing of the clustering algorithm, each pixel in the image will be assigned to a specific group. The pixels in each group have similar spectral features, representing areas in the image with similar surface characteristics or structures.

[0078] After completing the grouping of spectral data, the next task is to generate a histogram and calculate the frequency distribution of each group. Each column of the histogram represents a group, and the height of the column represents the number of pixels in the group, i.e. the frequency. The specific steps to generate the histogram are as follows:

[0079] Calculate frequencies: For each bin, count the number of pixels contained within that bin. Assuming there are N bins, the frequency of each bin i can be represented as:

[0080]

[0081] where n i represents the number of pixels in the i-th bin, and N represents the total number of pixels in the image. The frequency f i represents the proportion of pixels in the i-th bin in the entire image. By calculating these frequencies, we can obtain the distribution of each bin.

[0082] Generate a histogram: Based on the frequency of each bin, generate a histogram. The horizontal axis of the histogram represents different bins, and the vertical axis represents the frequency of pixels in each bin. The height of each column reflects the proportion of pixels in the image for that bin. Through the histogram, we can visually observe the frequency distribution of different bins, providing a basis for subsequent defect identification.

[0083] After generating the histogram of the image, the next step is to compare it with the histogram under normal conditions. The histogram under normal conditions represents the standard surface features without defects, and the frequency distribution contained has certain regularity and consistency. In practical applications, we usually use a large amount of normal image data to establish a reference model of the "normal" histogram. The frequency distribution of this normal histogram should contain the standard pixel distribution of each bin, which is used to compare with the histogram of the current image.

[0084] The specific comparison method is as follows:

[0085] Calculate frequency difference: By calculating the difference between the current histogram and the normal histogram, we can use standard similarity measurement methods to measure the degree of difference between the two. Assuming that the frequency distribution of the current image is f1,f2,...,f N , and the frequency of the normal histogram is g1,g2,...,g N , then we can use KL divergence to quantify the difference between the two:

[0086]

[0087] where P represents the frequency distribution of the current image, and Q represents the frequency distribution of the normal histogram. If the KL divergence value is large, it means that the difference between the two is large, indicating that there may be abnormal areas in the current image.

[0088] Identifying Defect Regions: When significant differences appear in the frequency distribution, it indicates that certain areas in the current image do not conform to normal surface features. These areas may contain defects. The appearance of defective regions is often accompanied by anomalies in the frequency distribution, such as a sharp increase or decrease in the frequency of certain groups. Through further analysis, the specific defect type and its location can be determined.

[0089] After comparing frequency distributions and identifying regions with significant differences, the next step is to further confirm and classify these potential defective regions. The specific defect type will be determined through more refined analysis in subsequent steps, potentially involving re-clustering, location identification, and type classification.

[0090] Overall, step 3, by generating a histogram and calculating the frequency distribution, and comparing it with the histogram under normal conditions, provides an important basis for subsequent defect identification and classification. This method can effectively identify frequency distribution differences in images caused by material defects, surface damage, or coating abnormalities, thereby accurately determining defect areas and providing data support for defect type classification.

[0091] Step 4: Identify the location of the defect

[0092] After identifying potential defective areas in step 3, the next crucial step is to accurately pinpoint the exact location of these defects. This step locates the defective areas by comparing pixels with frequency differences to their corresponding positions in the standard pattern layer structure, providing accurate information for subsequent repair or replacement work.

[0093] The standard pattern layer structure is constructed based on surface images of normal automotive parts. The standard pattern is typically created by scanning and analyzing a large number of normal component surfaces, extracting their spectral information, and then forming a model representing the "standard" surface characteristics. This model includes spectral data and spatial distribution characteristics of different regions under normal conditions, serving as a reference framework for subsequent defect detection.

[0094] Specifically, the standard pattern layer structure is constructed through the following steps:

[0095] Data Collection: Extract spectral data from a large number of images of normal automotive component surfaces. These images should cover a variety of typical component surfaces to ensure that the standard patterns can represent a wide range of possible normal conditions.

[0096] Spectral feature extraction: Spectral analysis is performed on each surface image to extract the spectral features of each pixel. Spectral features can include reflectance intensity or other relevant optical properties across multiple wavelength ranges.

[0097] Pattern modeling: By aggregating the spectral features of different components, a standard pattern layer structure is established. Typically, clustering algorithms such as K-means clustering or Gaussian Mixture Model (GMM) are used to divide the pixels in the image into multiple groups, establishing a distribution model of the standard layer structure. This model can represent the spectral distribution of the normal component surface in different areas.

[0098] The establishment of the standard pattern layer structure needs to ensure that it can accurately reflect the state of the component surface under normal circumstances, and has strong robustness to adapt to the slight differences of different types of components.

[0099] Once the standard pattern layer structure is established, the system will continue to execute the following steps to accurately determine the specific location of the defect by locating the pixels with frequency differences.

[0100] Frequency difference pixel calculation: In step 3, the potential defect area has been found through the frequency distribution of the histogram. Specifically, some pixels in the image have a significant deviation from the normal state pattern due to their spectral features, resulting in a significant frequency difference. For these pixels with frequency differences, the system needs to accurately calculate their coordinate positions in the image.

[0101] For each pixel with frequency difference, the system calculates the two-dimensional coordinates (x, y) of the pixel. The coordinates are determined based on the pixel coordinate system of the image resolution, where x is the horizontal coordinate and y is the vertical coordinate. This coordinate information provides the basis for the preliminary positioning of the defect area.

[0102] Comparison of standard pattern layer structure: Once the coordinates of the frequency difference pixels are calculated, the next step is to compare these pixel coordinates with the corresponding positions in the standard pattern layer structure. The standard pattern layer structure provides an ideal coordinate framework for each component surface area, including the spectral distribution and position of each area under normal circumstances.

[0103] For each pixel with significant frequency difference, its coordinate position needs to be compared with the corresponding coordinate in the standard pattern layer structure. If the position of the pixel deviates significantly from the position in the standard pattern, it indicates that the area may have a defect. The core idea of comparison is to calculate the difference d between each frequency difference pixel in the image and the corresponding pixel position in the standard pattern, which can be quantified by the Euclidean distance, that is:

[0104]

[0105] Where (x i ,y i ) is the coordinate of the current frequency difference pixel, (x j ,yj ) is the corresponding coordinate in the standard pattern layer structure. If the distance d exceeds a certain set threshold, it is considered that there is a defect in the area where the pixel is located.

[0106] After completing the positioning of the frequency difference pixels and comparing with the standard pattern layer structure, the system can further accurately identify the specific location of the defect. By calculating the deviation between each difference pixel and the standard pattern, the system can not only mark the rough position of the defect area, but also determine the positioning accuracy of the defect. This positioning accuracy is crucial for subsequent repair or replacement work.

[0107] The steps of accurate positioning include:

[0108] Multi-point positioning: For multiple pixels with frequency difference, the position deviation is calculated by accumulation to determine a whole defect area. This area can be obtained by aggregating the coordinates of multiple pixels with large deviation, and the weighted average method is usually used to calculate the center position of the defect. Assuming P k = (x k , y k ) is the coordinate of the kth difference pixel, and w k is the weight of the pixel, then the center position of the defect (x c , y c ) can be calculated by the following formula:

[0109]

[0110] Where:

[0111] x c , y c : the horizontal and vertical coordinates of the calculated center of the defect area;

[0112] k: index variable, representing each pixel with frequency distribution difference;

[0113] w k : the weight value of pixel k, indicating the degree of frequency distribution difference of the pixel, the greater the weight, the higher the importance of the pixel to the positioning of the defect;

[0114] x k , y k : the horizontal and vertical coordinates of pixel k, respectively representing the specific position of the pixel in the image;

[0115] ∑ k w k x k : the weighted sum of the horizontal coordinates of all frequency distribution difference pixels and their weights;

[0116] ∑ k w k yk : Weighted sum of vertical coordinates of all frequency distribution difference pixels with their weights;

[0117] ∑ k w k : Sum of all weight values for normalizing the weighted sum result.

[0118] Defect region boundary identification: By further analyzing the spatial positions of all pixels with large deviations, the system can identify the boundaries of the defect regions. These boundaries often exhibit irregular shapes, so edge detection algorithms (such as the Canny algorithm or Sobel operator) are typically used to further extract the contours of the defects. The results of boundary identification can provide information about the specific location, shape, and size of the defects, facilitating subsequent repair operations.

[0119] Finally, the system outputs the identified defect locations as a visual report showing the specific location, shape, and size of the defects. This report can be displayed through a graphical interface or recorded in a digital format for further processing.

[0120] Specific output information includes:

[0121] Defect center coordinates: Provide the specific location of the defect, usually in the form of pixel coordinates (x, y).

[0122] Defect range: Through boundary identification, output the specific boundary and size of the defect, usually in the form of a rectangular frame or polygon.

[0123] Defect type: Combine with the subsequent defect type identification step to output the specific type information of the defect.

[0124] Through this series of steps, the invention can accurately locate defects on the surface of the parts, providing important technical support for subsequent repair, analysis, and quality control.

[0125] Step 5: Optimize grouping and identify defect types

[0126] After determining the location of the defect region in step 4, the next step is to re-cluster the pixels identified as defects, thereby optimizing the grouping results. The main purpose of re-clustering is to further refine the boundaries of the defect region and effectively distinguish the pixels in the defect region from other normal region pixels. Optimized grouping can provide more accurate input data for subsequent defect classification, helping to improve the accuracy of defect type identification.

[0127] Specifically, the re-clustering process first conducts a detailed spatial analysis on the identified defective pixels to identify and separate different defect regions. The pixels in each defect region are re-classified and aggregated based on their spectral characteristics, spatial distribution, and texture features, etc. The clustering method can use various algorithms such as K-means algorithm, DBSCAN algorithm, etc., which can classify pixels into the same class according to their similarity. At this time, the pixels in each class have high similarity and can accurately reflect the actual situation of the defect region.

[0128] Once the pixel grouping of the defect region is completed, the optimized abnormal component cluster will be input into the large model. The large model can extract more complex and detailed features from the optimized component cluster through further processing. Based on deep learning technology, especially powerful model architectures such as Convolutional Neural Networks (CNN), the large model can automatically identify various defect types through learning from a large amount of labeled data.

[0129] In the process of defect type identification, the large model first matches the feature patterns in the image with the trained defect type database. Defect types can include cracks, bubbles, surface scratches, corrosion, pits, and other categories. Each defect has its unique spectral characteristics, morphological characteristics, and texture characteristics, and the large model will classify them according to these characteristics and output the type information of each defect region.

[0130] This process relies on the powerful capabilities of deep learning models, which are trained through backpropagation algorithms to neural networks, enabling the model to efficiently identify various defects in different detection scenarios. Specifically, the model learns the specific patterns and location distribution of defects by analyzing the spectral information and image features of the defect region, and can still maintain high accuracy and recognition ability when encountering new types of defects.

[0131] In addition, to improve the accuracy and efficiency of defect type identification, the invention also uses data augmentation techniques to generate virtual defect image samples to expand the training data set, thereby enhancing the model's generalization ability. This enables the large model to adapt to a wider range of defect types and their variations, providing more reliable technical support for the quality detection of automotive parts.

[0132] Through type identification of the optimized abnormal component cluster, the invention realizes high-precision, multi-class identification of surface defects of automotive parts, and can significantly improve the efficiency and accuracy of defect detection in practical applications.

[0133] Step 6: Adaptive Precision Adjustment Method

[0134] The present application is based on the evaluation of defect complexity, using adaptive precision adjustment method, dynamically adjusting the allocation of detection accuracy and computing resources. In the present application, the system can dynamically adjust the detection accuracy according to the complexity of the defect, so as to reasonably allocate the computing resources according to the actual needs, so as to improve the overall processing efficiency and reduce the computing cost while ensuring the detection accuracy.

[0135] In order to realize adaptive precision adjustment, first of all, the complexity of the defect to be detected must be evaluated. This process is through the analysis of the characteristics of the input data to determine the type and complexity of the defect. The evaluation of defect complexity is based on multiple factors, including the geometric shape of the defect, the texture feature, and its performance in the spectral image, etc.

[0136] Defect type recognition: the system first judges which category the defect in the current image belongs to (for example, surface scratch, bubble, crack, etc.) through preliminary spectral data analysis. Different types of defects have different detection complexity. For example, cracks may be more difficult to accurately identify because of their nonlinear structure, while surface scratches are usually simple and easy to detect.

[0137] Defect geometric complexity: for defects such as cracks and bubbles, geometric features are an important basis for evaluating their complexity. The shape of the crack may present irregular linear or branched shape, with high computational complexity. Bubble may have a more regular circular or elliptical shape, with lower recognition difficulty.

[0138] Texture feature analysis: through texture analysis technology (such as gray level co-occurrence matrix, local binary pattern, etc.), the system can quantify the texture features of the defect area. Defects with complex texture (such as surface cracks, micro-cracks caused by internal stress, etc.) usually exhibit complex texture patterns, making detection more difficult. The system can adjust the detection accuracy according to the texture complexity.

[0139] Spectral data wavelength response: different types of defects have different reflection characteristics at different spectral wavelengths. Complex defects (such as cracks under multi-layer coating) may produce more complex change patterns in spectral response, while common defects (such as surface scratches) usually exhibit simpler reflection patterns.

[0140] According to the results of the complexity evaluation of the defect, the system uses adaptive precision adjustment algorithm to dynamically adjust the accuracy of detection and computing resources. The core idea of this algorithm is to determine whether the detection accuracy needs to be improved according to the complexity and importance of the defect.

[0141] Simple defect detection (low precision mode): For simple defects detected (such as surface scratches, relatively regular bubbles, etc.), the system will choose a lower precision mode for fast detection. In this mode, the system reduces the computational load by reducing the pixel sampling precision or reducing the spectral band analysis, and quickly identifies the defects. This mode is suitable for detecting common defects and can improve the detection efficiency in mass production.

[0142] Complex defect detection (high precision mode): For complex or rare defects (such as cracks, bubble internal structure, surface micro-cracks, etc.), the system will automatically improve the detection precision. For example, increase the pixel density, increase the spectral resolution of the spectral imager, increase the data analysis calculation time, etc., so as to improve the identification ability of complex defects. In this mode, the system will invest more computing resources, through the fine analysis of more wavelengths and more pixels, to ensure the accurate identification of defects.

[0143] Precision adjustment mechanism: The key mechanism of precision adjustment is to control the change of detection precision through a "precision adjustment factor". This factor is dynamically generated according to the evaluation results of defect complexity and type. For example, if the evaluation result shows that the defect is relatively complex, the precision adjustment factor will increase, thereby improving the detection precision; if the defect is simple, the factor will decrease, reducing the detection precision. The adjustment of the precision adjustment factor can be based on the following formula:

[0144] E adjusted =E0×(1+k complexity ×C complexity )

[0145] Where:

[0146] E adjusted is the adjusted precision parameter;

[0147] E0 is the basic precision parameter;

[0148] k complexity is the complexity adjustment coefficient, which controls the influence of complexity on precision;

[0149] C complexity is the defect complexity score, the more complex the defect, the higher the value.

[0150] Computing resource allocation mechanism: Based on the precision adjustment factor, the system will dynamically allocate computing resources. If the detection precision is improved, more computing resources (such as more CPU / GPU processing power, memory and storage resources, etc.) will be allocated. The system can also dynamically adjust the allocation of resources through resource scheduling mechanisms (such as a hybrid mode based on cloud computing and local computing) when computing resources are tight, so that the accuracy is guaranteed while not exceeding the limit of hardware resources.

[0151] The implementation of adaptive precision adjustment method relies on the following key technical elements:

[0152] Computational resource scheduling and optimization: The system needs to use dynamic scheduling algorithms to allocate computing resources in combination with cloud computing and local computing resources. When the detection precision requirement is high, the system can transfer the computing task to the cloud for processing, taking advantage of the powerful computing power and flexibility of cloud computing. When the system detects simple defects, it can fall back to local computing resources for fast processing. Specific resource scheduling can use load balancing-based strategies, such as dynamic scheduling based on resource load or task complexity.

[0153] Real-time complexity evaluation and decision system: This system needs to be able to evaluate defect complexity in real time and quickly adjust precision and computing resources according to the complexity evaluation results. In actual operation, the decision-making process of complexity evaluation and precision adjustment needs to be completed within a few milliseconds to ensure the real-time nature of the overall detection process.

[0154] Automatic adjustment and feedback mechanism: The system not only adjusts precision based on initial complexity evaluation, but also adjusts precision based on real-time feedback during the detection process. For example, if the system detects that the initial precision is too low and fails to identify some minor defects, the system will automatically increase the precision to re-detect.

[0155] Adaptive precision adjustment method can effectively balance the contradiction between detection precision and computing resource usage, and improve the overall system performance. By dynamically adjusting precision and resource allocation, the system can efficiently and quickly handle common defects, while maintaining high precision when facing complex defects.

[0156] In addition, by combining the system with machine learning models, the precision adjustment algorithm can be continuously optimized. As the detection data accumulates and the model training continues to improve, the system can adaptively adjust the precision adjustment strategy, further improving the recognition accuracy and reducing the computational overhead.

[0157] Step 7: Output defect type and location

[0158] After completing all the above steps, the large model can automatically identify defects and accurately output the type and location of defects by analyzing the optimized grouping results in depth. At this time, the system relies on the deep learning capabilities of the large model, combining all detection results, including spectral data, pixel clustering information, defect complexity evaluation, etc., to conduct comprehensive defect identification.

[0159] Specifically, the large model will conduct a final analysis on all optimized clusters of abnormal components, accurately classify and identify the type of each defect through in-depth learning of different features such as texture, color difference, geometric shape, spectral characteristics, etc. For example, the system can distinguish and identify various common and rare defect types such as cracks, holes, bubbles, surface scratches, and coating peeling. These defect types have been clearly defined through the training process of the model and can be accurately determined according to various feature patterns in the training data set.

[0160] Each identified defect will not only be classified into a specific type, but also be spatially located according to the defect location determined in the previous step. The system accurately identifies the location of each defect on the surface of the automotive component by comparing the pixel coordinates of the defect area with the coordinate data in the standard pattern layer structure. These coordinate data are mapped to the specific location on the surface of the automotive component, ensuring the accuracy of defect positioning.

[0161] When generating the final inspection report, the system will present the defect types and their locations in a clear graphical and textual manner. The report not only includes the type of each defect (such as cracks, bubbles, surface scratches, etc.), but also marks the specific location of the defect on the surface of the automotive component (such as coordinate position or relative position to other reference points). This information is of great significance for subsequent repair, maintenance, or quality inspection.

[0162] In addition, the system can provide different forms of report output according to different needs, such as:

[0163] Graphical report: The system makes defect identification more intuitive by marking the location and type of defects on the 3D model or two-dimensional image of the component surface, making it easier for maintenance personnel to quickly locate the problem area.

[0164] Data report: The report can also be provided in the form of a data table, with detailed information such as the type, location, severity of each defect clearly listed, facilitating subsequent quality tracking or analysis.

[0165] Automatic alarm function: For important or serious defects, the system can also automatically trigger an alarm mechanism to timely feedback relevant information to operators or quality control personnel, so as to take timely repair measures.

[0166] Through this series of automated defect identification and report generation, the defect detection of automotive components not only has high precision and efficiency, but also covers more complex and diverse defect types. This technology not only improves the ability of automotive manufacturers to detect defects during production, but also greatly optimizes the repair and quality control process, ensuring high-quality production and use of components.

[0167] Overall, the defect detection method of the present application provides an efficient, accurate and comprehensive defect detection solution by combining the deep learning capabilities of large models with adaptive precision adjustment and efficient resource scheduling mechanisms, greatly improving the level of product quality control and production efficiency.

[0168] The above process can provide strong support for efficient and accurate detection of surface defects of automobile parts by combining deep learning models and spectral data, ensuring the improvement of detection accuracy and automation level.

[0169] Through the method of the present application, various defects on the surface of automobile parts can be efficiently and accurately identified, and the precision and computing resources can be dynamically adjusted. This makes the present application have strong adaptability and flexibility in practical application, and can automatically adjust according to the needs in different detection scenarios, thereby improving the overall detection efficiency and identification accuracy. The present application has wide application prospect, especially suitable for use in automatic quality detection system, which can significantly improve the production quality and detection speed of automobile parts.

[0170] The above is only the preferred embodiment of the present application, so any equivalent changes or modifications made to the structure, features and principles described in the scope of the present application are included in the scope of the present application.

Claims

1. A method for detecting the surface of an automobile part based on a large model, characterized by: The method comprises the following steps: Step 1: Obtain feature data of the target surface based on a multi-dimensional imaging device; Step 2: Use a large model to extract features, cluster analysis and anomaly pattern recognition on the obtained feature data; Step 3: According to the distribution difference of the target surface feature data, extract the abnormal area and generate a statistical model; Step 4: Based on the comparison of the statistical model and the standard sample data, determine the specific location of the abnormal area; Step 5: Use the large model algorithm to classify and identify the type of the identified abnormal area; Step 6: Dynamically optimize the allocation of computing resources to adapt to detection tasks of different complexity; Step 7: Output the defect type and specific location of the detection target; The step 4 further comprises: Establish a standard mode layer structure based on the spectral data of the normal target surface, wherein the standard mode layer structure contains the spectral distribution characteristics of the normal surface and the corresponding spatial coordinates; Positioning the pixels having frequency distribution difference and calculating their coordinates (x i ,y i ) in the image; The coordinates of the frequency distribution difference pixels are compared with corresponding coordinates (x j ,y j ) in a standard mode layer structure, a difference distance d is calculated, and it is determined whether the difference distance d exceeds a preset threshold value; The comparison result shows that the area where the distance d exceeds the threshold value is the potential defect area; The center position (x) of the defect region is calculated by aggregating pixel coordinates with frequency distribution differences. c ,y c ), where (x c ,y c The result was obtained through the weighted average method: Wherein: x c ,y c : calculated horizontal and vertical coordinates of the center of the defect area; k: index variable, representing each pixel with frequency distribution difference; w k : weight value of pixel k, representing the degree of difference in frequency distribution of the pixel, the greater the weight, the higher the importance of the pixel to defect positioning; x k ,y k : horizontal and vertical coordinates of pixel k, respectively indicating the specific position of the pixel in the image; ∑ k w k x k : weighted sum of horizontal coordinates of all frequency distribution difference pixels and their weights; ∑ k w k y k : Weighted sum of vertical coordinates of all frequency distribution difference pixels with their weights ∑ k w k : sum of all weight values for normalizing the weighted sum result.

2. The method for detecting the surface of the automobile part based on the large model according to claim 1, characterized in that: The step 1 further comprises obtaining high-resolution magnified images of unit areas for identifying defects by using white incident light to irradiate the surface of automobile parts.

3. The method for detecting the surface of the automobile part based on the large model according to claim 1, characterized in that: The step 2 further comprises obtaining spectral data of the target surface by a spectral imager; inputting the obtained spectral data into a large model, and using the large model to extract features, cluster analysis and anomaly pattern recognition to identify the location and type of the target surface defects.

4. The method for detecting the surface of the automobile part based on the large model according to claim 1, wherein: The step 3 further comprises grouping the spectral data to generate a frequency distribution histogram for each group; compare the generated histogram with the histogram of the normal state, and identify the target surface defect area according to the frequency distribution difference.

5. The method for detecting the surface of the automobile part based on the large model according to claim 4, characterized in that: The calculation of the frequency distribution difference is specifically quantifying the difference degree between the current image histogram frequency distribution P = {f1, f2,..., f N} and the normal histogram frequency distribution Q = {g1, g2,..., g N}, wherein the difference degree D KL (P||Q) is calculated by the following formula: Wherein, f i denotes the frequency of the i-th group in the current image, i = 1,..., N; g i denotes the frequency of the i-th bin in the normal histogram, i = 1,..., N; N is the total number of groups in the histogram; When D KL When the value of (P||Q) exceeds a preset threshold, it is determined that there is an abnormal region in the current image, and by further analyzing the change trend of the frequency distribution in the abnormal region, a potential defect region inconsistent with normal surface features is identified and its position is determined.

6. The method for detecting the surface of the automobile part based on the large model according to claim 1, wherein: The step 5 further comprises re-clustering optimization of the pixels identified as defects, and optimizing the grouping results based on the spectral features, spatial distribution and texture features of the pixels; input the optimized abnormal component cluster into the large model, and extract features by the large model; According to the extracted features, use the large model to identify the defect type and output the type information of each defect area.

7. The method for detecting the surface of the automobile parts based on the large model according to claim 1, characterized in that: The step 6 further comprises: Based on the geometry, texture features and spectral response patterns of the defects, the defect complexity is evaluated and a defect complexity score C is generated complexity ; According to the defect complexity score, the detection accuracy is dynamically adjusted by using an adaptive precision adjustment algorithm, and the adjusted precision parameter E adjusted is generated by the formula E adjusted = E0 x (1 + k complexity x C complexity ), wherein E0 is a basic precision parameter, k complexity is a complexity adjustment coefficient; When detecting simple defects, use low-precision mode to complete detection quickly; when detecting complex defects, improve detection accuracy and dynamically allocate computing resources.

8. The method for detecting the surface of the automobile part based on the large model according to claim 1, wherein: The step 7 further comprises analyzing the optimized abnormal component cluster by the large model based on the spectral data, pixel clustering information and defect complexity evaluation results, identifying the type of each defect; compare the pixel coordinates of the defect area with the coordinate data of the standard mode layer structure to accurately locate the position of each defect; output the detection result containing the defect type and its specific position on the target surface.

Citation Information

Patent Citations

  • Industrial surface defect detection system and method based on data analysis

    CN118469996A

  • Seasoning packet packaging integrity detection method and system based on machine vision

    CN119068270A