Method for detecting surfaces of automobile parts based on large model

By combining spectral imaging technology and deep learning methods of large model, the problems of low accuracy and high resource consumption in surface defect detection of automotive parts are solved, and efficient and accurate defect detection is achieved, suitable for complex environments and diverse defects.

CN119904423AActive Publication Date: 2025-04-29ZHEJIANG HAIZHICHEN IND EQUIPMENT CO LTD

Patent Information

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

AI Technical Summary

Technical Problem

The prior art has problems such as low accuracy, high resource consumption, and difficulty in adapting to complex environments and diversity defects in surface defect detection of automotive parts.

Method used

Using a method combining spectral imaging technology and deep learning of big models, feature data is obtained through multi-dimensional imaging devices, feature extraction, cluster analysis and abnormal pattern recognition are used for large models, and computing resource allocation is dynamically optimized to achieve high-precision defect detection.

Benefits of technology

It realizes high-precision detection of surface defects of automotive parts, improves detection efficiency and accuracy, is suitable for complex environments and diverse defects, and significantly reduces the error and cost of manual inspection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119904423A_ABST
    Figure CN119904423A_ABST
Patent Text Reader

Abstract

The invention discloses an automobile part surface defect detection method based on a large model. The method comprises the following steps: acquiring feature data of a target surface by using a multi-dimensional imaging device; feature extraction, clustering analysis and abnormal mode recognition are carried out through the large model; extracting an abnormal region and generating a statistical model; comparing the statistical model with standard sample data to determine the position of an abnormal region; defect types are classified and identified, and resource allocation is dynamically optimized and calculated to adapt to detection complexity; and finally outputting defect types and positions. According to the method, the spectral imaging technology and the deep learning algorithm are combined, high-precision detection, positioning and classification of defects such as cracks, scratches and bubbles are achieved, a visual detection report is generated, the method is suitable for real-time quality control in large-scale production, the detection efficiency and accuracy are improved, and manual errors and cost are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

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

[0003] Traditional defect detection methods usually rely on manual inspection or automated identification based on simple image processing algorithms. However, manual inspection is not only time-consuming but also easily limited by the experience and fatigue of the inspectors, and is prone to missed inspections or misjudgments. Although automated inspection methods based on image processing can improve inspection efficiency, their inspection accuracy and stability are often affected by image quality, background noise, and defect types, and are difficult to deal with complex surface defect types, especially in the detection of some refined surfaces or relatively small defects. 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 gradually been applied to the identification of surface defects of parts. Deep learning technology can automatically extract features in images by training large-scale data sets, identify patterns and regularities in images, and greatly improve the accuracy and robustness of defect detection. However, although deep learning models have achieved remarkable results in the field of image processing, they still face many challenges when 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, but 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 surface defects on parts are highly diverse, and each production batch of parts may have different types of defects, resulting in poor generalization capabilities of existing models in different scenarios and inability to adapt to rapidly changing production needs. In addition, deep learning models usually require a large amount of computing resources, which may cause large resource consumption and delays for defect detection applications with high real-time requirements, affecting production efficiency. Summary of the invention

[0006] In order to solve the above problems in the prior art, the present invention proposes a method for detecting the surface of automobile parts based on a large model, and the method comprises the following steps:

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

[0008] Step 2: Use the large model to perform feature extraction, cluster analysis and abnormal pattern recognition on the acquired feature data;

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

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

[0011] Step 5: Use the large model algorithm to classify the identified abnormal areas and identify the defect types;

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

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

[0014] The step 1 further includes obtaining a high-resolution magnified image of a unit area for identifying defects by irradiating the surface of the automobile part with white incident light.

[0015] The step 2 further includes acquiring spectral data of the target surface through a spectral imager; inputting the acquired spectral data into a large model, and using the large model to perform feature extraction, cluster analysis and abnormal pattern recognition to identify the location and type of defects on the target surface.

[0016] The step 3 further includes grouping the spectral data to generate a frequency distribution histogram for 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 performed by calculating the histogram frequency distribution P of the current image = {f 1 ,f 2 ,...,f N} and the normal histogram frequency distribution Q = {g 1 ,g 2 ,...,g N The difference between the two quantifies the degree of difference between the two, where the degree of difference D KL (P||Q) is calculated by the following formula:

[0018]

[0019] in,

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

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

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

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

[0024] The step 4 further comprises:

[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 frequency distribution differences and calculate their coordinates in the image (x i ,y i );

[0027] The coordinates of the frequency distribution difference pixel are compared with the corresponding coordinates (x j ,y j ) to compare, calculate the difference distance d, and determine whether it exceeds a preset threshold;

[0028] The comparison results show that the area where the pixels with distance d exceeding the threshold are located is a potential defect area;

[0029] By aggregating pixel coordinates with frequency distribution differences, the center position (x c ,y c ), where (x c ,y c ) is calculated by weighted average method:

[0030] in:

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

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

[0033] w k : The weight value of pixel k, which indicates the degree of difference in the frequency distribution of the pixel. The larger the weight, the more important the pixel is for defect location.

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

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

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

[0037] ∑ k w k : The sum of all weight values, used to normalize the weighted summation result.

[0038] The step 5 further includes re-clustering and optimizing the pixels identified as defects, optimizing the grouping results based on the spectral characteristics, spatial distribution and texture characteristics of the pixels; inputting the optimized abnormal component clusters into the large model, and extracting features from them through the large model;

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

[0040] The step 6 further comprises:

[0041] Based on the defect geometry, texture features and spectral response pattern, the defect complexity is evaluated and a defect complexity score C is generated. complexity ;

[0042] According to the defect complexity score, the detection accuracy is dynamically adjusted using the adaptive accuracy adjustment algorithm. The adjusted accuracy parameter E adjusted According to formula E adjusted =E 0 ×(1+k complexity ×C complexity ) is generated, where E 0 is the basic accuracy parameter, k complexity is the complexity adjustment factor;

[0043] When detecting simple defects, a low-precision mode is used to quickly complete the detection; when detecting complex defects, the detection accuracy is improved and computing resources are dynamically allocated.

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

[0045] The present invention combines spectral imaging technology with a large-model deep learning algorithm to achieve high-precision detection of surface defects of automotive parts. By dynamically adjusting the detection accuracy and computing resources, it can adaptively respond to simple and complex defects, thereby improving detection efficiency and accuracy. The method can accurately locate and classify defect types such as cracks, scratches, and bubbles, generate intuitive detection reports, and provide an intelligent solution for production quality control, significantly reducing the error and cost of manual detection, and is suitable for real-time defect detection needs in large-scale production environments. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0047] Figure 1 The overall flow chart of the detection of the present invention is shown. DETAILED DESCRIPTION

[0048] The present invention will be described in detail below in conjunction with the accompanying drawings and specific embodiments, wherein the illustrative embodiments and descriptions are only used to explain the present invention but are not intended to limit the present invention.

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

[0050] Step 1: Get the enlarged image

[0051] In the implementation of the present invention, the first step is to illuminate the surface of the automotive parts 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 subtle defects for subsequent defect analysis and identification. This is crucial for accurately locating and identifying surface defects, especially when the surface of the parts has complex structures or tiny defects.

[0052] To ensure the quality of the image, high-resolution imaging equipment is used, combined with a precisely controlled light source configuration to ensure that the contrast and brightness of the image reach the optimal level. Specifically, the white incident light is illuminated on the surface of the component through a uniform light source, and the choice of light source needs to be adjusted according to the reflective characteristics of the material and surface. In this process, the intensity, angle and uniformity of the light source have an important impact on the final image quality.

[0053] In order to further improve the accuracy of imaging and the ability to capture details, a high-performance optical lens is used to accurately adjust the focal length to ensure the clarity and detail presentation of the magnified image. The resolution of the camera equipment should reach a sufficient level to capture every tiny surface defect, thereby providing an effective basis for subsequent spectral data extraction and defect analysis. In addition, the shooting angle and distance of the image should also be reasonably set according to the specific shape and surface state of the parts to reduce imaging distortion or blur caused by improper angles.

[0054] In actual operation, the generated images need to be highly accurate and repeatable. After each image acquisition, the system automatically performs a quality assessment to check whether the image clarity, contrast, and illumination distribution meet the set standards. Only images that meet these quality requirements can enter the subsequent spectral data extraction and defect analysis process to ensure the authenticity and reliability of each image data.

[0055] The magnified image obtained through this step provides 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 issues. Therefore, this step plays a vital role in the entire defect detection process and directly determines the accuracy of subsequent steps and the final effect of the detection.

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

[0057] After step 1 is completed, the second step is to obtain the spectral data of the enlarged image through the spectral imager. The core of this step is to use spectral imaging technology to obtain the spectral information of each pixel and transmit this 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 simultaneously obtain information on the intensity of reflected light in multiple spectral bands through a multi-band light source and corresponding detectors. Unlike traditional RGB imaging, a spectral imager can capture the reflected spectral data of each pixel at different wavelengths through its multi-band sensors, usually covering from visible light to near-infrared and even mid-infrared bands. The spectral data of each pixel not only records the intensity of the reflected light at that point, but also contains information such as the surface characteristics, chemical composition, and structural characteristics of the material.

[0059] Specifically, the spectral imager collects the reflected light intensity in multiple dimensions at each pixel through its multiple spectral channels. The process includes the following steps:

[0060] 1. Light source configuration and irradiation: The spectral imager uses a built-in light source system to illuminate the surface of automotive parts with white light. In order to ensure that light of different wavelengths can evenly illuminate the target surface, the radiation intensity and wavelength selection of each wavelength are considered when designing the light source.

[0061] 2. Reflection 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 digitize them to generate spectral data for each pixel. The spectral information of each pixel generally includes data from multiple bands, usually including multiple spectral channels from ultraviolet to near infrared (for example: 400nm-2500nm range). The reflection data of each pixel will reflect the characteristics of the point in 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 multidimensional data matrix, where each row represents a pixel and each column represents a spectral band. These data contain all the spatial information of the image and its spectral characteristics.

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

[0064] 1. Data preprocessing: The large model first standardizes the input spectral data and converts the reflected light intensity of different bands into a unified scale to reduce the deviation that may be caused by different equipment and different light sources. This process helps the model better understand the data differences in different spectral channels.

[0065] 2. Feature extraction: After standardization, the large model uses a multi-layer convolutional neural network (CNN) to extract features from spectral data. The convolution layer can automatically capture the texture, color difference, structure and other features in the input data by performing convolution operations on the input data. Through multi-layer nonlinear mapping, the model can extract high-level features in the image layer by layer, such as surface texture, glossiness changes, structural anomalies, etc. These features provide rich information for defect detection.

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

[0067] 4. Outlier detection: During cluster analysis, the large model also performs outlier detection. By calculating the degree of deviation for each data point within the cluster, it is able to identify areas that deviate from the normal pattern, i.e. potential defect locations. In this way, the model can effectively discover small or hidden defects that may exist in the image.

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

[0069] By analyzing the changes in reflection intensity at different wavelengths, the model can identify the characteristics of different materials, surface conditions or potential defects, further improving the accuracy and reliability of identification. For example, for defects such as microcracks or uneven coatings on the surface of automotive parts, simple visual image processing may be difficult to accurately identify, but the deep physical characteristics provided by spectral data can more accurately locate the defect type and location.

[0070] Through the above steps, after the spectral data is processed by the large model, classification results for different defects will be generated, and the types of defects and their possible locations will be output. In this process, the large model not only captures the key information of the image through feature extraction, but also effectively identifies potential defects using cluster analysis and anomaly detection technology. These results provide clear defect candidate areas for subsequent steps, which can provide precise guidance for defect repair and quality control.

[0071] Step 3: Generate histogram and perform defect identification

[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 to determine the existence of defects.

[0073] First, at the beginning of step 3, the spectral data has been preliminarily feature extracted and analyzed by the large model. These data include the reflection intensity information of each pixel in different spectral bands. In order to facilitate subsequent defect identification, these data need to be grouped according to spectral features.

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

[0075] Spectral data standardization: To avoid interference in the clustering process caused by different ranges of reflectance intensity values ​​in different spectral bands, the spectral data of each pixel needs to be standardized first. The common method of standardization is to subtract the mean from each spectral value and divide it by the standard deviation, so that the mean of the data is 0 and the standard deviation is 1. This step can reduce the deviation caused by different equipment or measurement conditions.

[0076] Clustering algorithm selection: In order to group spectral data, algorithms such as K-means clustering, DBSCAN (density-based clustering algorithm) or Gaussian Mixture Model (GMM) can be used. Taking the K-means algorithm as an example, the number of clusters K is first determined, and then the Euclidean distance between each pixel and the cluster center is calculated to assign the pixel to the closest cluster. K-means clustering gradually adjusts the cluster center position through multiple iterations until the algorithm converges, that is, the pixel classification results within the cluster are 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 characteristics and represent areas in the image with similar surface characteristics or structures.

[0078] After completing the grouping of the 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, where the height of the column represents the number of pixels in the group, that is, the frequency. The specific steps to generate a histogram are as follows:

[0079] Calculate frequency: For each group, count the number of pixels contained in the group. Assuming there are N groups, the frequency of each group i can be expressed as:

[0080]

[0081] Among them, n i represents the number of pixels in the i-th group, and N represents the total number of all pixels in the image. i Represents the pixel proportion of the i-th group in the entire image. By calculating these frequencies, the distribution of each group can be obtained.

[0082] Generate a histogram: Generate a histogram based on the frequency of each group. The horizontal axis of the histogram represents different groups, and the vertical axis represents the pixel frequency of each group. The height of each column reflects the pixel proportion of the group in the image. Through the histogram, you can intuitively observe the frequency distribution of different groups, thus providing a basis for subsequent defect identification.

[0083] After generating the histogram of the image, the next step is to compare the histogram with the histogram of the normal state. The histogram of the normal state represents the standard surface characteristics without defects, and the frequency distribution contained has a certain regularity and consistency. In practical applications, we usually use a large amount of normal image data to establish a reference model of a "normal" histogram. The frequency distribution of this normal histogram should contain the standard pixel distribution of each group for comparison 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, a standard similarity metric can be used to measure the degree of difference between the two. Assume that the frequency distribution of the current image is f 1 ,f 2 ,...,f N , while the frequency of the normal histogram is g 1 ,g 2 ,...,g N , the difference between the two can be quantified by KL divergence:

[0086]

[0087] Among them, 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] Determine defective areas: When there is a significant difference in the frequency distribution, it indicates that some areas in the current image do not conform to the normal surface characteristics. These areas may have defects. The appearance of defective areas is often accompanied by abnormal frequency distribution, such as a significant 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 the frequency distribution and finding areas with obvious differences, these potential defect areas need to be further confirmed and classified. The specific defect type will be determined through more detailed analysis in subsequent steps, which may involve further steps such as re-clustering, location identification and type classification.

[0090] In general, step 3 provides an important basis for subsequent defect identification and classification by generating a histogram and calculating the frequency distribution, and comparing it with the histogram under normal conditions. This method can effectively identify the frequency distribution differences caused by material defects, surface damage, or coating anomalies in the image, and then accurately determine the defect area and provide data support for the defect type classification.

[0091] Step 4: Identify defect location

[0092] After the potential defect areas are identified in step 3, the next critical step is to accurately identify the specific locations of these defects. This step locates the defect areas by comparing the pixels with frequency differences with the corresponding positions in the standard pattern layer structure, and provides accurate information for subsequent repair or replacement work.

[0093] The construction of the standard mode layer structure is based on the surface image of normal automotive parts. The standard mode is usually obtained by scanning and analyzing a large number of normal parts surfaces, extracting their spectral information, and forming a model representing the "standard" surface characteristics with these data. This model contains the spectral data of different regions under normal conditions and their spatial distribution characteristics, which serves as a reference framework for subsequent defect detection.

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

[0095] Data collection: Spectral data is extracted from a large number of images of normal automotive parts surfaces. These images should cover a variety of typical parts surfaces to ensure that the standard pattern can represent a variety 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 reflection intensity or other relevant optical properties in multiple wavelength ranges.

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

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

[0099] Once the standard pattern layer structure is established, the system proceeds to the following steps to pinpoint the exact location of the defect by locating 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 significant frequency differences due to their spectral characteristics being significantly deviated from the normal state. 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. The coordinate information provides a 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 coordinates of these pixels need to be compared 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 there may be defects in the area. The core idea of ​​the comparison is to calculate the difference d between each frequency difference pixel in the image and the corresponding pixel position in the standard pattern. This process can be quantified by the Euclidean distance, that is:

[0104]

[0105] Among them, (x i ,y i ) is the coordinate of the current frequency difference pixel, (x j ,yj ) is the corresponding coordinate in the standard mode 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 them 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 location of the defect area, but also determine the position accuracy of the defect. This positioning accuracy is crucial for subsequent repair or replacement work.

[0107] The steps for precise positioning include:

[0108] Multi-point positioning: For multiple pixels with frequency differences, the position deviation is accumulated to determine an overall defect area. This area can be obtained by aggregating the coordinates of multiple pixels with large deviations. The weighted average method is usually used to calculate the defect center position. Assume 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 defect center position (x c ,y c ) can be calculated by the following formula:

[0109]

[0110] in:

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

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

[0113] w k : The weight value of pixel k, which indicates the degree of difference in the frequency distribution of the pixel. The larger the weight, the more important the pixel is for defect location.

[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 : The weighted sum of the vertical coordinates of all frequency distribution difference pixels and their weights;

[0117] ∑ k w k : The sum of all weight values, used to normalize the weighted summation result.

[0118] Defective area boundary identification: By further analyzing the spatial positions of all pixels with large deviations, the system can identify the boundaries of the defective area. These boundaries usually have irregular shapes, so edge detection algorithms (such as the Canny algorithm or the Sobel operator) are usually used to further extract the contours of the defects. The results of boundary identification can provide information such as the specific location, shape, and size of the defect, which is convenient for subsequent repair operations.

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

[0120] The specific output information includes:

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

[0122] Defect range: Through boundary recognition, the specific boundaries and sizes of the defects are output, usually in the form of a rectangular box or polygon.

[0123] Defect type: Combined with the subsequent defect type identification steps, output the specific type information of the defect.

[0124] Through this series of steps, the present invention can accurately locate defects on the surface of parts and provide 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 defective area in step 4, the next step is to re-cluster the pixels identified as defects to optimize the grouping results. The main purpose of re-clustering is to further refine the boundaries of the defective area and effectively distinguish the pixels in the defective area from the pixels in other normal areas. The optimized grouping can provide more accurate input data for subsequent defect classification, which helps to improve the accuracy of defect type identification.

[0127] Specifically, the re-clustering process first performs a detailed spatial analysis of the identified defective pixels to identify and separate different defective areas. The pixels in each defective area are reclassified and clustered based on their spectral characteristics, spatial distribution, and texture characteristics. Clustering methods can use a variety of algorithms, such as the K-means algorithm and the DBSCAN algorithm, which can classify pixels into the same class based on their similarities. At this point, the pixels in each class have a high degree of similarity and can accurately reflect the actual condition of the defective area.

[0128] Once the pixel grouping of the defective area is completed, the optimized abnormal component clusters will be used as input to the large model. The large model can extract more complex and detailed features from these optimized component clusters by further processing them. The large model is based on deep learning technology, especially powerful model architectures such as convolutional neural networks (CNNs), which can automatically identify various defect types by learning from a large amount of labeled data.

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

[0130] This process relies on the powerful capabilities of deep learning models, and the neural network is trained through the back-propagation algorithm, so that the model can efficiently identify various defects in different detection scenarios. Specifically, the model learns the specific pattern and location distribution of defects by analyzing the spectral information and image features of the defect area, and can maintain high accuracy and recognition capabilities when encountering new types of defects.

[0131] In addition, in order to improve the accuracy and efficiency of defect type identification, the present invention also uses data enhancement technology to expand the training data set by generating virtual defect image samples, thereby enhancing the generalization ability of the model. This enables the large model to adapt to a wider range of defect types and their changes, providing more reliable technical support for the quality inspection of automotive parts.

[0132] By performing type recognition on optimized abnormal component clusters, the present invention achieves high-precision, multi-category recognition of surface defects of automotive parts and components, and can significantly improve the efficiency and accuracy of defect detection in practical applications.

[0133] Step 6: Adaptive precision adjustment method

[0134] Based on the evaluation of defect complexity, the present invention adopts an adaptive precision adjustment method to dynamically adjust the detection accuracy and the allocation of computing resources. In the present invention, the system can dynamically adjust the detection accuracy according to the complexity of the defect so as to reasonably allocate computing resources according to actual needs, thereby ensuring the detection accuracy while improving the overall processing efficiency and reducing the computing cost.

[0135] In order to achieve adaptive precision adjustment, the complexity of the defects to be detected must first be evaluated. This process analyzes the characteristics of the input data to determine the type and complexity of the defects. The evaluation of defect complexity is based on multiple factors, including the geometry of the defect, texture characteristics, and its appearance in the spectral image.

[0136] Defect type identification: The system first determines which type of defect in the current image belongs to (for example, surface scratches, bubbles, cracks, etc.) through preliminary spectral data analysis. Different types of defects have different detection complexities. For example, cracks may be more difficult to accurately identify due to their nonlinear structure, while surface scratches are usually simpler and easier 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 a crack may be irregular linear or branched, and the calculation complexity is high. Bubbles may have a more regular circular or elliptical shape, which is easier to identify.

[0138] Texture feature analysis: Through texture analysis techniques (such as grayscale co-occurrence matrix, local binary pattern, etc.), the system can quantify the texture features of the defect area. Defects with complex textures (such as surface cracks, microcracks caused by internal stress, etc.) usually appear as more complex texture patterns and are more difficult to detect. The system can adjust the detection accuracy according to the complexity of the texture.

[0139] Spectral data wavelength response: Different types of defects have different reflective properties for different spectral wavelengths. Complex defects (such as cracks under multi-layer coatings) may produce more complex patterns of changes in the spectral response, while common defects (such as surface scratches) usually show simpler reflection patterns.

[0140] According to the complexity evaluation results of the defects, the system uses an adaptive precision adjustment algorithm to dynamically adjust the detection accuracy and computing resources. The core idea of ​​this algorithm is to decide whether the detection accuracy needs to be improved based on the complexity and importance of the defects.

[0141] Simple defect detection (low-precision mode): For simple defects detected (such as surface scratches, relatively regular bubbles, etc.), the system will select a lower-precision mode for rapid detection. In this mode, the system reduces the amount of calculation and quickly identifies defects by reducing pixel sampling accuracy or reducing the analysis of spectral bands. This mode is suitable for detecting common defects and can improve detection efficiency in large-scale production.

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

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

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

[0145] in:

[0146] E adjusted is the adjusted accuracy parameter;

[0147] E 0 is the basic accuracy parameter;

[0148] k complexity is the complexity adjustment coefficient, which controls the impact of complexity on accuracy;

[0149] C complexity Score the complexity of the defect, with more complex defects receiving higher scores.

[0150] Computing resource allocation mechanism: Based on the accuracy adjustment factor, the system will dynamically allocate computing resources. If the detection accuracy 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 when computing resources are tight through resource scheduling mechanisms (such as a hybrid mode based on cloud computing and local computing), so as to ensure accuracy while not exceeding the limitations of hardware resources.

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

[0152] Computing resource scheduling and optimization: The system needs to use a dynamic scheduling algorithm to combine cloud computing and local computing resources to allocate computing resources. When the detection accuracy requirement is high, the system can transfer computing tasks 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 rapid 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 assessment and decision-making system: The system needs to be able to assess defect complexity in real time and quickly adjust accuracy and computing resources based on the complexity assessment results. In actual operation, the decision-making process of complexity assessment and accuracy adjustment needs to be completed within a few milliseconds so as not to affect the real-time performance of the overall inspection process.

[0154] Automatic adjustment and feedback mechanism: The system can not only adjust the accuracy based on the initial complexity assessment, but also adjust the accuracy based on real-time feedback during the inspection process. For example, if the system detects that the initial accuracy is too low and fails to identify certain minor defects, the system will automatically increase the accuracy to re-inspect.

[0155] The adaptive precision adjustment method can effectively balance the contradiction between detection accuracy and computing resource usage, and improve the performance of the overall system. By dynamically adjusting accuracy and resource allocation, the system can be efficient and fast when dealing with common defects, and can maintain high accuracy when facing complex defects.

[0156] In addition, by combining the system with a machine learning model, 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 to further improve recognition accuracy and reduce computational overhead.

[0157] Step 7: Output defect type and location

[0158] After completing all the above steps, the big model can automatically identify defects and accurately output the type and location of defects through in-depth analysis of the optimized grouping results. At this time, the system relies on the deep learning ability of the big model and combines all the test results, including spectral data, pixel clustering information, defect complexity assessment, etc., to perform comprehensive defect identification.

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

[0160] Each defect identified is not only classified into a specific type, but also 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 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 to ensure the accuracy of defect location.

[0161] When generating the final inspection report, the system will present the defect type and its location in clear graphics and text. 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 parts (such as coordinate position or relative position to other reference points). This information is of great guiding significance for subsequent repairs, maintenance or quality inspections.

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

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

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

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

[0166] Through this series of automated defect identification and report generation, defect detection of automotive parts is not only highly accurate and efficient, but also covers more complex and diverse defect types. This technology not only improves the ability of automakers to detect defects during the production process, but also greatly optimizes the maintenance and quality control processes, ensuring high-quality production and use of parts.

[0167] In general, the defect detection method of the present invention provides an efficient, accurate and comprehensive defect detection solution through the deep learning capability of a large model, combined with adaptive precision adjustment and efficient resource scheduling mechanism, which greatly improves the level of product quality control and production efficiency.

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

[0169] Through the method of the present invention, various defects on the surface of automobile parts can be efficiently and accurately identified, and the ability to dynamically adjust accuracy and computing resources is possessed. This makes the present invention highly adaptable and flexible in practical applications, and can automatically adjust according to needs in different detection scenarios, thereby improving the overall detection efficiency and recognition accuracy. The present invention has a wide range of application prospects, and is particularly suitable for use in automated quality inspection systems, and can significantly improve the production quality and inspection speed of automobile parts.

[0170] The above description is only a preferred embodiment of the present invention, so all equivalent changes or modifications made according to the structure, characteristics and principles described in the scope of the patent application of the present invention are included in the scope of the patent application of the present invention.

Claims

1. A method for detecting the surface of automobile parts based on a large model, characterized in that: The method comprises the following steps: Step 1: Acquire characteristic data of the target surface based on a multi-dimensional imaging device; Step 2: Use the large model to perform feature extraction, cluster analysis and abnormal pattern recognition on the acquired feature data; Step 3: According to the distribution difference of the target surface feature data, the abnormal area is extracted and a statistical model is generated; Step 4: Determine the specific location of the abnormal area based on the comparison between the statistical model and the standard sample data; Step 5: Use the large model algorithm to classify the identified abnormal areas and identify the defect types; 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 inspection target.

2. A method for detecting the surface of automobile parts based on a large model as claimed in claim 1, characterized in that: The step 1 further includes obtaining a high-resolution magnified image of a unit area for identifying defects by irradiating the surface of the automobile part with white incident light.

3. The method for detecting the surface of automobile parts based on a large model as claimed in claim 1, characterized in that: The step 2 further includes acquiring spectral data of the target surface through a spectral imager; inputting the acquired spectral data into a large model, and using the large model to perform feature extraction, cluster analysis and abnormal pattern recognition to identify the location and type of defects on the target surface.

4. The method for detecting the surface of automobile parts based on a large model as claimed in claim 1, characterized in that: The step 3 further includes grouping the spectral data to generate a frequency distribution histogram for 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.

5. A method for detecting the surface of automobile parts based on a large model as claimed in claim 4, characterized in that: The calculation of the frequency distribution difference is specifically performed by calculating the histogram frequency distribution P of the current image = {f1, f2, ..., f N } and the normal histogram frequency distribution Q = {g1,g2,...,g N The difference between the two quantifies the degree of difference between the two, where the degree of difference D KL (P||Q) is calculated by the following formula: in, f i represents the frequency of the i-th group in the current image, i=1,…,N; g i represents the frequency of the i-th group 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 the preset threshold, it is determined that there is an abnormal area in the current image. By further analyzing the changing trend of the frequency distribution in the abnormal area, the potential defect area that does not conform to the normal surface features is identified and its location is determined.

6. The method for detecting the surface of automobile parts based on a large model as claimed in claim 1, characterized in that: The step 4 further comprises: 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; Locate pixels with frequency distribution differences and calculate their coordinates in the image (x i ,y i ); The coordinates of the frequency distribution difference pixel are compared with the corresponding coordinates (x j ,y j ) to compare, calculate the difference distance d, and determine whether it exceeds a preset threshold; The comparison results show that the area where the pixels whose distance d exceeds the threshold are located is a potential defect area; By aggregating pixel coordinates with frequency distribution differences, the center position (x c ,y c ), where (x c ,y c ) is calculated by weighted average method: in: x c ,y c : The calculated horizontal and vertical coordinates of the defect area center; k: index variable representing each pixel with frequency distribution difference; w k : The weight value of pixel k, which indicates the degree of difference in the frequency distribution of the pixel. The larger the weight, the more important the pixel is for defect location. x k ,y k : The horizontal and vertical coordinates of pixel k, respectively representing the specific position of the pixel in the image; ∑ k w k x k : The weighted sum of the horizontal coordinates of all frequency distribution difference pixels and their weights; ∑ k w k y k : The weighted sum of the vertical coordinates of all frequency distribution difference pixels and their weights; ∑ k w k : The sum of all weight values, used to normalize the weighted summation result.

7. The method for detecting the surface of automobile parts based on a large model as claimed in claim 1, characterized in that: The step 5 further includes re-clustering and optimizing the pixels identified as defects, optimizing the grouping results based on the spectral characteristics, spatial distribution and texture characteristics of the pixels; inputting the optimized abnormal component clusters into the large model, and extracting features from them through the large model; Based on the extracted features, the large model is used to identify the defect type and output the type information of each defect area.

8. The method for detecting the surface of automobile parts based on a large model as claimed in claim 1, characterized in that: The step 6 further comprises: Based on the defect geometry, texture features and spectral response pattern, 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 using the adaptive accuracy adjustment algorithm. The adjusted accuracy parameter E adjusted According to formula E adjusted =E0×(1+k complexity ×C complexity ), where E0 is the basic precision parameter, k complexity is the complexity adjustment factor; When detecting simple defects, a low-precision mode is used to quickly complete the detection; when detecting complex defects, the detection accuracy is improved and computing resources are dynamically allocated.

9. The method for detecting the surface of automobile parts based on a large model as claimed in claim 1, characterized in that: The step 7 further includes analyzing the optimized abnormal component clusters through a large model based on spectral data, pixel clustering information and defect complexity assessment results to identify the type of each defect; comparing the pixel coordinates of the defect area with the coordinate data of the standard pattern layer structure to accurately locate the position of each defect; and outputting the detection results including the defect type and its specific position on the target surface.

Citation Information

Patent Citations

  • Visual detection method for mechanical component defect

    CN109580630A

  • Infrared thermal imaging defect detection method for cultural heritage based on numerical simulation

    CN118112052A

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

    CN118469996A

  • Defect detection system based on visual identification technology

    CN118470005A

  • Part surface quality detection method and system based on machine vision

    CN118608504A

Cited By

  • Automobile quality risk assessment system and method based on novel data fusion technology

    CN120181592A

  • Automatic visual inspection method and system for appearance defects of automotive upholstery

    CN120927678A

  • Non-setting adhesive product detection device and method

    CN121437391A

  • Automobile part production quality detection method and system

    CN121582225A

  • Automobile part production quality detection method and system

    CN121582225B