Machine learning based method and system for quality detection of automotive parts
Patent Information
- Application Number
- CN202511654301.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-12
- Publication Date
- 2026-08-18
- Estimated Expiration
- 2045-11-12
AI Technical Summary
[0006]为了解决现有技术存在的由于金属型汽车零部件产生的反射导致对金属型汽车零部件表面质量检测准确率低的技术问题,本发明实施例提供了基于机器学习的汽车零部件质量检测方法及系统
1、通过对当前批次的汽车零部件进行扫描得到对应的零部件表面质量检测图像,以进行汽车零部件缺陷识别,同时对环境光照条件进行评估以量化环境光照条件对汽车零部件缺陷识别的影响,填补了传统检测系统未考虑环境光照条件变化对检测性能的影响的空缺,并且通过光照评估有助于判断是否需要补光、曝光校正或调整偏振滤光片,进而确保了图像输入条件稳定,接着对零部件表面质量检测图像进行高光区域划分并基于指定机器学习模型进行汽车零部件质量缺陷判断,以输出对应的汽车零部件质量检测结果,弥补了传统算法(阈值分割、边缘检测)对高光不鲁棒,难以区分反光与真实缺陷的不足,并且使用机器学习模型在处理去高光图像后,能更准确识别裂纹、气孔、划伤等表面缺陷,然后在进行下一批次的汽车零部件表面质量检测时,获取上一批次的汽车零部件表面质量检测的反馈结果,以决定是否进行图像处理参数优化,从而提高对高光区域缺陷识别的准确性,进而通过动态调整,保持模型在长期运行中的高准确度与稳定性,解决了传统检测系统在批量检测中参数固定,不随检测效果改进的技术问题,最后基于相邻质量检测周期的环境光照条件的评估结果进行环境光照变化分析,以确定是否进行图像处理参数微调,从而确保了图像处理参数随环境光照条件变化进行自适应调整,进而有助于提高对金属型汽车零部件表面质量缺陷识别的准确性,也解决了现有检测系统感知环境光的动态变化慢,更没有自适应地调整处理参数的问题,同时有助于提高检测系统的鲁棒性与泛化能力。
Smart Images

Figure CN121544540B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image recognition technology, and in particular to a method and system for quality inspection of automotive parts based on machine learning. Background Technology
[0002] To improve the production efficiency and product quality of automotive parts and promote the intelligentization of automotive parts manufacturing, a quality inspection method for automotive parts has been designed, encompassing several stages including data acquisition, data preprocessing, feature extraction and selection, model training, evaluation and optimization, deployment, and real-time detection. This method incorporates machine learning to adapt to different types of automotive parts inspection. Through model retraining and transfer learning, quality inspection of new parts and different production batches can be completed quickly without completely rebuilding the inspection system. Data preprocessing improves model training efficiency and reduces noise by inputting the processed image dataset into the machine learning model. Feature extraction and selection utilize traditional computer vision techniques to extract image features, such as edge features (Sobel, Canny), texture features (e.g., LBP, Local Binary Pattern), and shape features (Hu moments, Hough transform). A deep neural network then automatically learns these features from the images, eliminating the need for manual feature design. Finally, an algorithm selects the features most relevant to defect detection to reduce redundancy and improve model training efficiency. For example, PCA (Principal Component Analysis) can be used. Principal component analysis (PCA) is used for dimensionality reduction, or L1 regularization is used to select the most important features. After feature extraction and selection, a feature set for model training is obtained.
[0003] For example, Chinese invention patent application CN120563446A discloses a visual inspection method and system for automotive parts quality, which includes: acquiring multiple original images of the target object; preprocessing each original image to obtain multiple target images; extracting edges from each target image to obtain all edges of each target image; screening and confirming the crack growth characteristics of each edge to obtain the crack corresponding to each target image, wherein the crack growth characteristics include curvature change and gradient change; evaluating each crack to obtain a feature score for each crack; and color-marking the image at the location of each crack according to the feature score of each crack to obtain a marked image with color marking.
[0004] For example, Chinese invention patent CN116912231B discloses a method for quality inspection of new energy vehicle parts, which includes: collecting image information of the parts to be inspected, preprocessing the image information to construct a three-dimensional model of the parts, dividing the parts into welding areas, painting areas and remaining areas according to the application direction of the parts, arranging multiple data points on the surface of each divided area, analyzing the vertical distance between each data point and the reference surface to obtain the flatness value of each divided area, integrating the flatness values of each divided area to obtain the qualification value of the inspected part, and the obtained qualification value can reflect the quality degree of the parts.
[0005] The above-mentioned technology has at least the following technical problems: When machine learning models address the issue of poor image quality caused by reflections from metal surfaces, the specular reflective properties of metal automotive parts, especially under strong light and at suitable angles, can create intense highlight areas. Pixel brightness in these reflective areas can fluctuate drastically, potentially leading the machine learning model to incorrectly identify these highlight areas as defects. Furthermore, some genuine shallow scratches or corrosion defects may be masked by reflection interference, resulting in missed detections. Additionally, the intense reflected light appears very prominently in the image, which could resemble the characteristics of defects (such as scratches or dents), leading to misjudgments. Therefore, even with high overall model accuracy, the rate of false positives and false negatives remains significant. Summary of the Invention
[0006] To address the low accuracy of surface quality inspection of metal automotive parts due to reflections generated by these parts in existing technologies, this invention provides a machine learning-based method and system for automotive part quality inspection. The technical solution is as follows: On the one hand, a machine learning-based method for automotive parts quality inspection is provided. This method includes: scanning the current batch of automotive parts to obtain corresponding surface quality inspection images for defect identification, while simultaneously evaluating ambient lighting conditions to quantify their impact on defect identification; segmenting the surface quality inspection images into highlight regions and judging defects based on a specified machine learning model to output corresponding quality inspection results; when inspecting the next batch of automotive parts, obtaining feedback results from the previous batch to determine whether to optimize image processing parameters, thereby improving the accuracy of highlight region defect identification; and performing ambient lighting change analysis based on the evaluation results of ambient lighting conditions in adjacent quality inspection cycles to determine whether to fine-tune image processing parameters, thus ensuring that image processing parameters are adaptively adjusted according to changes in ambient lighting conditions.
[0007] On the other hand, a machine learning-based automotive parts quality inspection system is provided. This system applies machine learning-based automotive parts quality inspection methods and includes: a quality inspection preparation module, a quality defect judgment module, a quality feedback optimization module, and an image parameter adaptive optimization module. The quality inspection preparation module scans the current batch of automotive parts to obtain corresponding surface quality inspection images for defect identification, and simultaneously evaluates ambient lighting conditions to quantify their impact on defect identification. The quality defect judgment module divides the surface quality inspection images into highlight areas and judges automotive parts quality defects based on a specified machine learning model, outputting corresponding quality inspection results. The quality feedback optimization module obtains feedback results from the previous batch of automotive parts surface quality inspections to determine whether image processing parameters should be optimized, thereby improving the accuracy of highlight area defect identification. The image parameter adaptive optimization module analyzes ambient lighting changes based on the evaluation results of ambient lighting conditions in adjacent quality inspection cycles to determine whether image processing parameters should be fine-tuned, ensuring that image processing parameters adaptively adjust with changes in ambient lighting conditions.
[0008] The beneficial effects of the technical solutions provided in the embodiments of the present invention include at least the following: 1. By scanning the current batch of automotive parts, corresponding surface quality inspection images are obtained for defect identification. Simultaneously, ambient lighting conditions are evaluated to quantify their impact on defect identification, filling the gap in traditional inspection systems that do not consider the influence of varying ambient lighting conditions on inspection performance. Furthermore, lighting evaluation helps determine whether supplementary lighting, exposure correction, or polarization filter adjustment is needed, thus ensuring stable image input conditions. Next, highlight regions are segmented in the surface quality inspection images, and a specified machine learning model is used to determine automotive part quality defects, outputting corresponding quality inspection results. This overcomes the shortcomings of traditional algorithms (threshold segmentation, edge detection) in handling highlights and distinguishing between reflections and real defects. Moreover, after processing the de-highlighted images using the machine learning model, surface defects such as cracks, pores, and scratches can be more accurately identified. Subsequently, when conducting the next batch of automotive parts surface quality inspection, feedback results from the previous batch are obtained to determine whether image processing parameters should be optimized. This improves the accuracy of defect identification in highlight areas. Furthermore, through dynamic adjustment, the model maintains high accuracy and stability during long-term operation, solving the technical problem of fixed parameters in traditional inspection systems during batch inspections, which do not improve with the inspection results. Finally, based on the evaluation results of ambient lighting conditions in adjacent quality inspection cycles, ambient lighting change analysis is performed to determine whether image processing parameters should be fine-tuned. This ensures that image processing parameters are adaptively adjusted according to changes in ambient lighting conditions, thereby helping to improve the accuracy of identifying surface quality defects in metallic automotive parts. It also solves the problem that existing inspection systems are slow to sense dynamic changes in ambient light and do not adaptively adjust processing parameters. At the same time, it helps to improve the robustness and generalization ability of the inspection system.
[0009] 2. To quantify the impact of ambient lighting conditions on the formation of reflective highlight areas and more accurately identify surface quality defects in automotive parts, reflection influence parameters within a set detection period are first obtained. This compensates for the shortcomings of traditional methods that fail to fully consider the interference of these environmental factors on the detection effect. Furthermore, it enables real-time monitoring and identification of lighting changes, ensuring that image processing parameters are dynamically adjusted according to environmental changes. Next, data processing and quantification based on the reflection influence parameters yield a highlight area formation influence index. This helps machine learning models better identify and block highlight areas, and improves the accuracy of identifying surface quality defects in parts. Finally, the highlight area formation influence index is mapped onto a trained highlight area formation probability mapping set to obtain the corresponding highlight area formation probability. This solves the problem that traditional systems mostly rely on rigid rules (such as threshold segmentation) for highlight area processing, failing to flexibly adjust according to different ambient lighting conditions. Simultaneously, by mapping the influence index to the probability space, the probability of highlight area formation can be dynamically predicted based on ambient lighting conditions. By preprocessing or ignoring highlight areas before defect identification, the accuracy of identification is improved, thus facilitating more precise identification and processing of highlight areas by machine learning models.
[0010] 3. During the inspection process, obtaining the false positive rate of the rework line and the false negative rate of the production line for the corresponding batch of automotive parts helps prevent the problem that traditional quality inspection systems, relying solely on the model's internal confidence level or test set accuracy, cannot reflect real production errors in real time. It also provides key input parameters for subsequent error quantification and optimization decisions, giving optimization a data-driven basis. Next, the obtained data is combined with the probability of highlight areas in the corresponding batch of automotive parts to obtain the machine learning model error quantification value, which is then compared with the extracted error tolerance threshold. This helps avoid errors caused by environmental factors and errors caused by model performance degradation that are difficult to distinguish. If the machine learning model error quantification value is less than the error tolerance threshold, the absolute value between the machine learning model error quantification value and the error tolerance threshold is obtained and recorded as the error proximity value. If the error proximity value is lower than the set prevention proximity value... If the image preprocessing optimization measures are taken, it helps to reduce the impact of the image preprocessing layer on the machine learning model error. Otherwise, the quality inspection of automotive parts continues. This makes up for the shortcomings of the traditional system, which only adjusts parameters when the error is serious, resulting in the accumulation of minor errors that are only exposed in the later stage, affecting the stability of the inspection. Moreover, when the error is small, only the image preprocessing layer is optimized, rather than retraining the model, achieving a balance between performance and cost. If the quantified value of the machine learning model error is not less than the error allowable threshold, the machine learning image processing parameters are optimized. This not only helps to reduce the impact of the machine learning model image processing layer on the identification of surface defects of metal automotive parts, but also realizes the self-repair of the model, improves the intelligence level of the quality inspection line, and solves the problem that the traditional system requires manual intervention to adjust when the model performance degrades significantly (such as an increase in the false detection rate and the false negative rate), resulting in low inspection efficiency. Attached Figure Description
[0011] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1 This is a flowchart illustrating the machine learning-based quality inspection method for automotive parts provided in an embodiment of the present invention. Figure 2 This is a schematic diagram of the process for judging the quality defects of automotive parts provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the architecture of a specified machine learning model provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the image processing parameter optimization determination process provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of the structure of the machine learning-based automotive parts quality inspection system provided in an embodiment of the present invention. Detailed Implementation
[0013] The technical solution of the present invention will now be described with reference to the accompanying drawings.
[0014] In embodiments of the present invention, words such as "exemplarily," "for example," etc., are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplary" in the present invention should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of the word "exemplary" is intended to present the concept in a concrete manner. Furthermore, in embodiments of the present invention, the meaning expressed by "and / or" can be both, or either one.
[0015] In the embodiments of this invention, the terms "image" and "picture" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, they convey the same meaning. Similarly, the terms "of," "corresponding (relevant)," and "corresponding" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, they convey the same meaning.
[0016] In this embodiment of the invention, sometimes a subscript such as W1 may be written in a non-subscript form such as W1. When the difference is not emphasized, the meaning they express is the same.
[0017] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.
[0018] This invention provides a machine learning-based method and system for quality inspection of automotive parts. For example... Figure 1 The diagram shown is a flowchart of a machine learning-based quality inspection method for automotive parts provided in an embodiment of the present invention. The processing flow of this method may include the following steps: Machine vision is used to scan the current batch of automotive parts to obtain corresponding surface quality inspection images of the parts, so as to identify defects in the automotive parts. At the same time, the ambient lighting conditions are evaluated to quantify the impact of ambient lighting conditions on the identification of defects in automotive parts.
[0019] It should be explained that machine vision generally refers to vision sensors (such as cameras, laser scanners, etc.) used to collect image data of the surface of metal automotive parts.
[0020] It should be added that image preprocessing is also included before identifying defects in metal automotive parts. Image preprocessing is used to output standardized surface quality inspection images of the parts, mainly including grayscale conversion, denoising, contrast enhancement, illumination equalization, background removal, and size standardization. Grayscale conversion converts color images into single-channel grayscale images, improving image processing efficiency, reducing interference from color information, and allowing the specified machine learning model to focus more on brightness and texture features (surface scratches, dents, cracks, etc.). Denoising eliminates noise generated during the imaging process, such as illumination noise and sensor noise, thereby reducing false positives and false negatives. Common methods include median filtering, bilateral filtering, and Gaussian filtering. Contrast enhancement enhances the brightness difference between normal surfaces and defect areas, making defects more obvious and improving detection sensitivity. Typical methods include histogram equalization and CLAHE (Contrast Limited Adaptive Histogram). Equalization (including contrast-limited adaptive histogram equalization) adaptively enhances local details; illumination equalization eliminates uneven lighting (shadows, local overexposure, highlights) to prevent the model from misjudging lighting as defects; common methods include Retinex, adaptive illumination correction, and multi-exposure fusion; background removal extracts the effective area of metal automotive parts, shielding background interference such as fixtures, conveyor belts, and marking lines, allowing the model to focus only on the product surface itself, thereby improving detection accuracy and processing speed; size standardization unifies the size, angle, and position of all input images, achieving data consistency and enabling specified machine learning models to be trained and inferred under fixed input conditions, thereby improving generalization ability and stability.
[0021] The system performs highlight region segmentation on the surface quality inspection images of automotive parts and judges the quality defects of automotive parts based on a specified machine learning model, so as to output the corresponding quality inspection results of automotive parts. The specified machine learning model includes, but is not limited to, convolutional neural networks, U-Net, YOLO (You Only Look Once, object detection) and support vector machines.
[0022] When conducting surface quality inspection of the next batch of automotive parts, the feedback results from the previous batch of automotive parts surface quality inspection are obtained to determine whether image processing parameters should be optimized, thereby improving the accuracy of defect identification in highlight areas.
[0023] Based on the evaluation results of ambient lighting conditions in adjacent quality inspection cycles, an analysis of ambient lighting changes is conducted to determine whether image processing parameters need to be fine-tuned. This ensures that the image processing parameters are adaptively adjusted according to changes in ambient lighting conditions, thereby helping to improve the accuracy of identifying surface quality defects in metal automotive parts.
[0024] In this embodiment, by quantifying the interference of ambient light on the detection results and ensuring stable image input conditions through illumination evaluation, a more objective environmental input is provided for the subsequent automatic parameter tuning of the specified machine learning model, forming a detection system that can be optimized in a closed loop. Furthermore, the specified machine learning model (such as U-Net, ResNet, Transformer, etc.) can more accurately identify surface defects such as cracks, pores, and scratches after processing the de-highlighted image, achieving stable detection results for parts with different lighting environments and materials. In addition, the system automatically adjusts its detection parameters based on the accuracy rate, false detection rate, or feedback from manual review of the previous batch of detections. The system dynamically adjusts parameters (such as exposure, threshold, and filter kernel size) and continuously optimizes detection performance. This dynamic adjustment helps maintain the high accuracy and stability of the specified machine learning model over long-term operation. When light intensity characteristics change, the system automatically fine-tunes image processing parameters, maintaining consistency in feature extraction. Detection accuracy is no longer constrained by fixed lighting conditions, adapting to different workshops and time periods, which helps improve the system's robustness and generalization ability. Furthermore, it helps maintain stable detection results even in complex industrial environments, ensuring the accuracy of surface quality inspection for metallic automotive parts.
[0025] As a further embodiment, the specific procedure for evaluating ambient lighting conditions is as follows: The sensor system acquires reflection influence parameters within the set detection period, including light intensity, light angle, surface smoothness of parts, and environmental contrast.
[0026] Specifically, the light intensity is directly measured by a photometer, the light angle is measured by an tilt sensor to measure the attitude angle of the camera or light source, and the micron-level surface height map is measured by a confocal microscope to obtain the corresponding roughness index, i.e., the surface smoothness of the component. The environmental contrast is assessed to evaluate the brightness / color difference between the target and the background, which affects the visibility of defects and segmentation performance. It is represented by the mean or standard deviation of the histogram using existing technology. The mean and standard deviation of the brightness of the image or ROI (Return On Investment) can characterize the overall comparison. It also indicates that the sensor system includes, but is not limited to, a photometer, a tilt sensor, and a confocal microscope.
[0027] Data processing and quantification are performed based on reflection influence parameters to obtain the highlight region formation influence index. The highlight region formation influence index is used to quantify the degree of influence of ambient lighting conditions on the generation of reflective highlight regions.
[0028] It needs to be explained that the specific method for obtaining the highlight area formation impact index is as follows: Each reflection impact index is normalized to obtain the corresponding reflection impact environmental indicators, namely, light intensity index, light angle index, component surface smoothness index, and environmental contrast index. The highlight area formation impact index is obtained by weighted fusion calculation of the reflection impact environmental indicators with the environmental indicator weights extracted from a preset database. Specifically, each reflection impact environmental indicator is multiplied by its corresponding environmental indicator weight, and then the results are summed. The environmental indicator weights include light intensity weight, light angle weight, component surface smoothness weight, and environmental contrast weight. These environmental indicator weights are preset weights, meaning they are pre-set and stored in a preset database by professional technicians based on historical data and empirical rules, ready for retrieval.
[0029] The highlight region formation influence index is mapped onto the trained highlight region formation probability mapping set to obtain the corresponding highlight region formation probability.
[0030] It should be added that the highlight region formation influence index is input into the trained highlight region formation probability mapping set, and the corresponding highlight region formation probability is output. The highlight region formation probability mapping set represents a dataset that reflects the mapping relationship between the highlight region formation influence index and the highlight region formation probability. It is constructed based on the linear regression algorithm and relies on the least squares criterion. The training process is completed through the statsmodels framework and is trained based on the highlight region formation training data. The highlight region formation training data includes the highlight region formation influence index in historical time periods and the highlight region formation probability set by professional technicians based on empirical rules.
[0031] In this embodiment, by quantifying the ambient lighting conditions, the system can better understand and adapt to different ambient lighting changes, thereby avoiding the influence of highlights on the detection results. Simultaneously, it can monitor and identify lighting changes in real time, ensuring that image processing parameters are dynamically adjusted according to environmental changes. By calculating the highlight region influence index, the system more accurately quantifies the degree of influence of ambient lighting on highlight regions, helping to take timely measures to reduce the impact of highlight interference on defect identification. Furthermore, this index can be used as a quantitative parameter as a feature input during the training of a specified machine learning model, helping the model to better identify and mask highlight regions, thus improving the accuracy of defect identification. In addition, through… By mapping the influence index to the probability space, the likelihood of highlight region formation can be dynamically predicted based on ambient lighting conditions, thereby improving the accuracy of recognition. Furthermore, the highlight region formation influence index is transformed into the probability of highlight region formation. This probability can be used as an input feature along with other image features to input into a subsequent designated machine learning model, helping the designated machine learning model to more accurately identify and process highlight regions. Through this mapping result, the image processing algorithm can be adjusted in real time to reduce the influence of highlights and improve detection accuracy. The system can dynamically adjust according to the real-time highlight region formation probability to ensure that it can maintain high detection accuracy even under complex and changing ambient lighting conditions.
[0032] like Figure 2 The diagram illustrates the process for judging quality defects in automotive parts according to an embodiment of the present invention. The specific logic is as follows: A specified machine learning model is used to identify and segment the reflective highlight areas of the surface quality inspection image of the parts to obtain highlight area blocks to be analyzed. These blocks are then read to determine whether the corresponding highlight area represents a quality defect in the automotive part, and the corresponding surface quality inspection result is output. If the surface quality inspection result is unqualified, the quality inspection result is verified. If the surface quality inspection result is qualified, the corresponding automotive part is transported to the production line used to transport qualified automotive parts to the production packaging and quality inspection stage. This process not only ensures the accuracy of defect identification but also improves the accuracy of surface quality inspection results for metal automotive parts.
[0033] Furthermore, based on a specified machine learning model, the quality defects of automotive parts are determined to output the corresponding quality inspection results for the automotive parts. The specific steps are as follows: The first step involves identifying and segmenting the reflective highlight areas of the component surface quality inspection image using a specified machine learning model to obtain highlight area blocks to be analyzed. Then, the obtained highlight area blocks are read to determine whether the corresponding highlight areas are quality defects of automotive components, and the corresponding automotive component surface quality inspection results are output.
[0034] like Figure 3 The diagram shown is an architectural schematic of a specified machine learning model provided in an embodiment of the present invention. The specified machine learning model is the U-Net model, which is a classic model for image segmentation, particularly suitable for detecting defect areas on the surface of parts. This model segments defect areas through pixel-level prediction. It is mainly used for defect area segmentation to identify and segment defect areas on the surface of parts, such as scratches, cracks, bubbles, etc., as well as highlight area detection. When highlight reflection areas may be misjudged as defects, U-Net can help to segment these highlight areas more accurately.
[0035] exist Figure 3 This paper demonstrates a quality inspection method for metal automotive parts based on the U-Net architecture, particularly suitable for accurately segmenting surface defect regions of parts. The input is a surface image of a metal automotive part with a size of 1×64×64. First, the image is processed through a 3×3+ReLU (Conv3×3, ReLU) convolution operation. In the encoder (downsampling) part, image features are extracted, and the spatial resolution is progressively reduced while increasing the number of channels in the feature map, from 64 to 128, then to 256, and finally to 512 and 1024. After each convolutional operation, a 2×2 max pooling operation is applied to reduce the spatial size of the feature map while extracting more features.
[0036] Next, we move to the bottleneck layer, where the deepest features of the image are extracted. The output feature map of the bottleneck layer has a dimension of 1024, representing the most abstract features of the image.
[0037] Then, the image undergoes spatial resolution restoration processing in the decoder (upsampling) section. The decoder uses upconvolution 2×2 operations to progressively restore the spatial dimensions of the image, and uses skip connections (copy and crop) to copy and crop the feature maps from the encoder and then stitch them into the decoder, preserving the image's detailed information and ensuring segmentation accuracy.
[0038] Finally, U-Net generates a binary segmented image through a 1×1 convolutional (Conv1×1) layer, where each pixel has a value of 1 (representing a defective area, such as a crack or scratch) or 0 (representing a normal area).
[0039] The second step is to verify the quality inspection results of the automotive parts if the surface quality inspection results are unqualified. This means that the specified machine learning model has detected quality defects in the high-gloss area of the automotive parts. In this step, the quality inspection results are verified to perform secondary verification of the quality inspection results of the specified machine learning model, thereby improving the reliability of the surface quality inspection results of the automotive parts.
[0040] The third step is to ensure that the surface quality inspection result of the automotive parts is qualified, which means that the specified machine learning model did not detect any quality defects in the high-gloss area of the automotive parts to be analyzed. Then, the corresponding automotive parts are transported to the production line used to transport qualified automotive parts to the production packaging and quality inspection stage.
[0041] In this embodiment, segmenting the highlight area using a designated machine learning model helps to more accurately identify reflective highlight areas, avoiding interference from highlights in defect identification. Cutting the highlight area into analysis blocks helps to decompose the complex highlight area into smaller, easier-to-analyze parts, thus providing more granular detection results. Furthermore, by effectively processing the highlight area, the probability of false detection is reduced, improving the accuracy and stability of detection. At the same time, by reading and analyzing the highlight area blocks, the designated machine learning model can determine whether it is a defect, thereby ensuring the accuracy of defect identification. When processing the highlight area, the designated machine learning model can eliminate lighting interference and focus more on the defects on the surface of the metal automotive parts themselves, improving the reliability of quality inspection. In addition, through the analysis of the highlight area blocks, the designated machine learning model can learn more about the relationship between the highlight reflective surface and defects, which helps to gradually improve accuracy. Moreover, the secondary verification mechanism avoids model misjudgment or incorrect output, which also improves the reliability of the quality inspection results for the surface of metal automotive parts.
[0042] Furthermore, the specific process for verifying the quality inspection results is as follows: The probability of highlight formation is matched with the defined interval for highlight formation based on representative ambient lighting conditions. The interval for highlight formation is extracted from a preset database and is generally set in advance by professional technicians based on experience rules and historical data.
[0043] If the probability of highlight formation falls within the highlight formation determination range, the corresponding automotive parts are sent to the rework line for repairing automotive parts; otherwise, the corresponding automotive parts are sent to the re-inspection line for re-inspecting the surface quality of the automotive parts.
[0044] When a car part in the re-inspection line is again determined to be sent to the re-inspection line, the corresponding car part is then sent to the manual verification line for manually checking the surface quality of the car parts.
[0045] In this embodiment, by matching the probability of highlight formation with the judgment interval, the influence of ambient light on highlight formation can be quantitatively assessed. This also provides a quantitative decision standard for subsequent automated workflow (rework or re-inspection), freeing the system from reliance on human experience. Furthermore, probability matching filters out false defects caused by lighting conditions, helping to improve the accuracy of the specified machine learning model's judgment. When the probability of highlight formation is high, it indicates that the image of the metal automotive part is significantly affected by reflection interference, allowing it to directly enter the rework stage for surface polishing or cleaning, thus saving re-inspection resources. Parts severely affected by highlights are directly reworked instead of repeatedly inspected, improving inspection and production efficiency. Rework processing effectively prevents erroneous data caused by high-gloss reflection areas from entering subsequent detection or model learning stages, ensuring the purity of system data. By judging whether the probability of high gloss exceeds the judgment range and performing secondary inspection on metal automotive parts with uncertain detection, the robustness of quality inspection is improved. In addition, the re-inspection mechanism can reconfirm potential defects after eliminating one-time errors, thereby reducing missed detections. Moreover, by re-inspecting slightly interfering samples instead of reworking, unnecessary processing losses are avoided. The re-inspection results can be fed back to the designated machine learning model, further optimizing the model's ability to distinguish between boundary samples (i.e., areas where high gloss and defects are difficult to distinguish).
[0046] like Figure 4 The diagram illustrates the process for image processing parameter optimization and determination provided in this embodiment of the invention. The specific logic is as follows: During the inspection process, the false detection rate of the rework line and the false detection rate of the production line for the corresponding batch of automotive parts are obtained; the obtained data is combined with the probability of highlight area formation of the corresponding batch of automotive parts to obtain a specified machine learning model error quantization value, which is then compared with an extracted error allowable threshold; if the specified machine learning model error quantization value is less than the error allowable threshold, the absolute value between the specified machine learning model error quantization value and the error allowable threshold is obtained and recorded as the error proximity value; if the error proximity value is lower than a set prevention proximity value, image preprocessing optimization measures are taken; otherwise, automotive part quality inspection continues; if the specified machine learning model error quantization value is not less than the preset error allowable threshold, machine learning image processing parameter optimization is performed; through the above process, not only is it helpful to dynamically evaluate the stability and reliability of the specified machine learning model, but it is also beneficial to ensure the accuracy and efficiency of surface quality inspection of metal automotive parts.
[0047] Furthermore, the process for deciding whether to optimize image processing parameters is as follows: During the testing process, the false detection rate of the rework line and the missed detection rate of the production line are obtained for the corresponding batch of automotive parts.
[0048] It should be added that the false detection rate of the rework line and the missed detection rate of the production line are obtained through a manual terminal. Generally, the preset staff will sample the quality inspection results of the automotive parts on each line to verify the corresponding quality inspection results. The preset staff will then input the verification result data obtained from the sampling inspection into the manual terminal. The verification result data includes the false detection rate of the rework line and the missed detection rate of the production line.
[0049] The acquired data is combined with the probability of highlight areas of corresponding batches of automotive parts to obtain the error quantification value of the specified machine learning model. This value is then compared with the extracted error tolerance threshold, which represents the maximum tolerance value for errors in the specified machine learning model. It is generally a preset value read from a preset database, i.e., a value preset by professional technicians based on historical data and experience.
[0050] It should be explained that the specified machine learning model error quantification value is obtained by averaging the false detection rate of the rework production line for automotive parts, the false detection rate of the production line, and the probability of the formation of highlight areas in the corresponding batch of automotive parts.
[0051] If the specified machine learning model error quantization value is less than the error allowable threshold, the absolute value between the specified machine learning model error quantization value and the error allowable threshold is obtained and recorded as the error approach amount. If the error approach amount is lower than the set preventive approach amount, image preprocessing optimization measures are taken to reduce the impact of image preprocessing on the specified machine learning model error; otherwise, the quality inspection of automotive parts continues. Similarly, the preventive approach amount is generally a preset value read from a preset database, that is, a value preset by professional technicians based on historical data and experience.
[0052] If the specified machine learning model error quantization value is not less than the preset error allowable threshold, then the machine learning image processing parameters are optimized to reduce the impact of the specified machine learning model image processing level on the identification of surface defects of automotive parts.
[0053] In this embodiment, by introducing the false detection rate of the rework production line and the false detection rate of the production line into the system, the actual performance of the specified machine learning model in a real environment is obtained. Based on the production line data, it is beneficial to dynamically evaluate the stability and reliability of the model. This step also provides key input parameters for subsequent error quantification and optimization decisions, making optimization data-driven. Furthermore, the system can determine whether the error is caused by external environmental factors such as light reflection or by insufficient model capabilities, thus enabling more precise corresponding measures. Moreover, by comparing with the error allowable threshold, a dynamic judgment mechanism is formed, realizing the self-calibration capability of the specified machine learning model in different batches and under different environments. By calculating the error proximity (the absolute difference between the model error and the threshold), it is beneficial to identify the model performance approaching the critical state in advance. When the error proximity is lower than the set prevention threshold, the system automatically triggers the optimization of the image preprocessing layer (such as brightness correction and highlight enhancement) to prevent small errors from gradually amplifying. At the same time, through lightweight preprocessing optimization, adjustments are made before the error exceeds the threshold, which helps to ensure the stable and continuous inspection of the surface quality of metal automotive parts.
[0054] Furthermore, the specific steps for implementing image preprocessing optimization measures are as follows: Step 1: Reduce specular reflections and minimize specular interference by using polarized light. The specific process is as follows: First, illuminate the component to be tested with a linearly polarized light source so that the incident light has a fixed polarization direction (e.g., horizontal direction). Then, install an adjustable polarizing filter in front of the camera lens. By rotating the filter, make its polarization direction perpendicular to the polarization direction of the reflected light, thereby weakening the specular reflection component. When the transmission axis of the polarizer is perpendicular to the polarization direction of the specular reflection, the specular reflection light is blocked, while the diffuse reflection light (usually with weaker polarization) can still form an image.
[0055] Step 2: Enable the specular removal algorithm to restore the reflection pattern of the specular region to the surface texture, and project the influence index formed by the specular region into the specular removal projection sequence after training to obtain the corresponding brightness statistical threshold influence factor. At the same time, introduce the brightness statistical threshold influence factor into the specular removal algorithm to improve the accuracy of the identification of the reflection region.
[0056] Specifically, a specular removal algorithm is enabled to restore the reflection pattern of the specular region to the surface texture. Taking the Retinex-type algorithm as an example, the image is first logarithmically transformed, then low-pass filtering is used to estimate the illumination; then the reflection component (i.e. the real surface texture) is calculated; and finally the enhanced image is restored.
[0057] It should be noted that the reflective areas are identified using the following formula when performing the highlight removal algorithm: Where T represents the brightness statistical threshold, any pixel with a brightness higher than this value will be judged as a reflective area; μ represents the brightness mean, which is the average brightness value of all pixels in the image (or specified area); σ represents the brightness standard deviation, which represents the dispersion or fluctuation of pixel brightness values in the image (or specified area). The larger the standard deviation, the more dispersed the brightness distribution; κ represents the empirical coefficient, which is an adjustable parameter, usually set according to the actual application scenario and experience. It is recommended to take a value range of 1.5 to 2 in the image. It determines the "distance" between the threshold and the average brightness, that is, how many times the standard deviation is outside the brightness to be considered reflective; λ represents the brightness statistical threshold influence factor, which represents the degree of influence of ambient lighting conditions on the identification of reflective areas.
[0058] It should be added that the highlight region formation influence index is input into the trained highlight removal projection sequence, and the corresponding brightness statistical threshold influence factor is output. The highlight removal projection sequence represents the projection sequence reflecting the mapping relationship between the highlight region formation influence index and the brightness statistical threshold influence factor. It is constructed based on the logistic regression algorithm and relies on the least squares criterion. The training process is completed through the statsmodels framework and is based on highlight removal training data. The highlight removal training data includes the highlight region formation influence index in the historical time period and the brightness statistical threshold influence factor set by professional technicians based on empirical rules.
[0059] Step 3: Perform brightness normalization processing on the surface quality inspection images of the parts to reduce the interference of different brightness areas on the specified machine learning model.
[0060] In this embodiment, polarized light helps filter out specular reflections in the reflection direction, retaining only the diffuse reflection component of the object's surface, thereby reducing interference from highlight areas. After polarized light filtering out reflections, the surface texture details of the components are preserved, providing more realistic surface information for subsequent defect identification. Simultaneously, it reduces the input of false highlight features, helping to avoid the machine learning model misjudging reflective areas as defect areas. Furthermore, polarized light imaging can work stably under different lighting conditions, making the quality inspection system more robust. The highlight removal algorithm can reconstruct the surface structure covered by highlights based on the reflection pattern, restoring the defect information originally hidden by reflection. The "highlight area formation influence index" is projected onto the trained highlight removal projection sequence to obtain a brightness threshold illumination value, enabling the highlight removal process to adaptively match the actual lighting conditions. Introducing a brightness threshold illumination value into the highlight removal algorithm allows the algorithm to dynamically adjust the highlight removal parameters according to different lighting intensities, thereby improving the accuracy of reflection area identification and segmentation. Additionally, brightness normalization makes the overall brightness distribution of the image more balanced, thereby reducing false detections and missed detections caused by differences in lighting conditions.
[0061] Furthermore, the specific details of optimizing machine learning image processing parameters are as follows: K1 is the offset between the specified machine learning model error quantization value and the error allowable threshold. It is the machine learning error correction magnitude value. It is input into the fitted machine learning error correction mapping dataset and outputs the corresponding optimized data sequence of the specified machine learning model.
[0062] It should be explained that the machine learning error correction mapping dataset represents a dataset that fits the mapping relationship between machine learning error correction magnitude values and the optimized data sequence of a specified machine learning model. It is constructed based on the linear regression algorithm, uses the cross-entropy loss function as the optimization criterion, and is trained using the scikit-learn framework. It is trained based on error correction training data, which includes machine learning error correction magnitude values over historical time periods, as well as the optimized data sequence of a specified machine learning model set by professional technicians based on empirical rules.
[0063] K2 optimizes the network depth and low-level channel number of a specified machine learning model using the output sequence. It means that the optimized data sequence of the specified machine learning model is multiplied by the corresponding network depth and low-level channel number to obtain optimized image processing parameters. The quality inspection of automotive parts is then carried out based on the optimized image processing parameters. The optimized data sequence of the specified machine learning model includes the network depth adjustment and the low-level channel optimization.
[0064] In this embodiment, by calculating the machine learning error correction magnitude, the model can be corrected more promptly based on actual detection results, which helps improve the accuracy and stability of the specified machine learning model. Furthermore, by inputting the error correction magnitude into the fitted mapping dataset and continuously optimizing the specified machine learning model based on real-time detection feedback, it helps ensure that the model maintains high accuracy under various production conditions. Moreover, through refined error calibration, the long-term accumulation of errors is avoided, reducing the negative impact on subsequent detection results and improving overall detection accuracy. The model error correction magnitude can be automatically adjusted to cope with environmental changes such as different lighting and surface conditions, making the specified machine learning model more robust. In addition, the network depth and the number of low-level channels are automatically adjusted based on the optimized data sequence, enabling the model to better handle surface defects of varying complexity, improving the diversity and accuracy of defect detection. Furthermore, optimizing the network depth and the number of channels helps improve the specified machine learning model's learning ability for defects of different scales and types, enhancing the performance of the quality inspection system in the face of diverse defects. Simultaneously, automated parameter adjustment not only reduces manual intervention and shortens optimization time but also improves the overall detection efficiency of the system.
[0065] Furthermore, based on the evaluation results of ambient lighting conditions in adjacent quality inspection cycles, an analysis of ambient lighting changes is performed to determine whether fine-tuning of image processing parameters is necessary. The specific process is as follows: The ratio of the probability of highlight formation in the current batch to the probability of highlight formation in the previous batch is quantified. That is, the ratio of the probability of highlight formation in the current batch to the probability of highlight formation in the previous batch is calculated to obtain the corresponding rate of change in highlight formation, thereby obtaining the actual degree of change value. This means that the absolute value of the difference between the rate of change in highlight formation and the value 1 is used to obtain the actual degree of change value. If the actual degree of change exceeds the tolerance value, the image processing parameters are fine-tuned; otherwise, no additional processing is performed. The tolerance value is the maximum tolerable fluctuation of ambient lighting conditions when adjacent batches of automotive parts undergo surface quality inspection. This value is generally preset by professional technicians based on historical data and empirical rules and stored in a preset database.
[0066] In this embodiment, quantifying the ratio of the probability of highlight area formation between the current batch and the previous batch helps to more clearly quantify and evaluate the impact of factors such as illumination and surface condition on the quality inspection results of parts during the production process. Furthermore, automated change rate calculation provides a reliable basis for subsequent image processing parameter fine-tuning, enabling the detection system to respond quickly to batch-to-batch fluctuations and avoid misjudgments or omissions. Simultaneously, by quantifying the change rate and monitoring it in real time, the consistency of inspection results for each batch can be ensured amidst production fluctuations, which helps reduce fluctuations in detection accuracy caused by changes in external conditions. This method provides a dynamic response to quality changes in production batches, adapting to changes in environmental illumination, surface conditions, and other external factors, thus ensuring the stability of the detection system under different production conditions. Moreover, when the actual degree of change exceeds the preset tolerance value, the system automatically fine-tunes the image processing parameters, thereby more accurately optimizing the detection process. This adaptive adjustment mechanism effectively improves detection accuracy.
[0067] Furthermore, the specific process for fine-tuning the image processing parameters is as follows: The corresponding change in illumination conditions is obtained by performing a difference quantification process on the difference between the actual change value and the change tolerance value. The difference quantification process specifically involves performing an absolute value calculation on the difference between the actual change value and the change tolerance value.
[0068] The machine learning adaptive adjustment value is obtained by comparing the changes in illumination conditions with the adaptive adjustment map set after the fitting is completed. The optimized image processing parameters are then adaptively fine-tuned using the machine learning adaptive adjustment value, which involves multiplying the optimized image processing parameters with the machine learning adaptive adjustment value.
[0069] It should be added that the adaptive adjustment mapping set represents a data table that fits the mapping relationship between changes in lighting conditions and machine learning adaptive adjustment values. It is constructed based on the linear regression algorithm, uses the cross-entropy loss function as the optimization criterion, and is trained using the scikit-learn framework. It is trained based on adaptive adjustment training data, which includes changes in lighting conditions over historical time periods and machine learning adaptive adjustment values set by professional technicians based on empirical rules.
[0070] The adaptive adjustment mapping set represents the dataset used to fit the mapping relationship between changes in illumination conditions and machine learning adaptive adjustment values. The machine learning adaptive adjustment values are pre-set by professionals based on empirical rules.
[0071] Machine learning adaptive adjustments include network depth adaptive fine-tuning and low-level channel adaptive fine-tuning.
[0072] In this embodiment, by quantifying the difference between the actual degree of change and the tolerance value, the changes in illumination conditions can be measured more accurately, helping the detection system to more clearly identify the impact of illumination changes on image quality. Furthermore, based on the amount of illumination condition change, the system can dynamically sense environmental changes, thereby optimizing image processing parameters and model parameters, improving the system's adaptability. By quantifying and feeding back illumination changes, error accumulation caused by illumination fluctuations is avoided, ensuring the stability of the detection system under various environmental conditions. Moreover, by comparing the amount of illumination condition change with the adaptive adjustment mapping set, a customized optimization adjustment amount can be provided for each illumination change scenario, allowing for more precise fine-tuning of image processing parameters and the specified machine learning model. Simultaneously, using the fitted adaptive adjustment mapping set can reduce human error setting, improve the flexibility of the specified machine learning model and its adaptability to illumination fluctuations, and automatically fine-tune image processing parameters (such as network depth, number of low-level channels, etc.), enabling the model to self-optimize according to different illumination environments, thereby improving the accuracy and stability of surface quality detection for metal automotive parts.
[0073] Figure 5 This is a schematic diagram of the structure of an automotive parts quality inspection system based on machine learning provided in an embodiment of the present invention. This system applies methods such as those based on machine learning for automotive parts quality inspection. (Refer to...) Figure 5 The system includes a quality inspection preparation module, a quality defect judgment module, a quality feedback optimization module, and an image parameter adaptive optimization module.
[0074] The quality inspection preparation module is used to scan the current batch of automotive parts using machine vision to obtain corresponding surface quality inspection images of the parts, so as to identify defects in the automotive parts. At the same time, it evaluates the ambient lighting conditions to quantify the impact of ambient lighting conditions on the identification of defects in automotive parts.
[0075] The quality defect judgment module is used to divide the highlight areas of the surface quality inspection images of parts and judge the quality defects of automotive parts based on a specified machine learning model, so as to output the corresponding quality inspection results of automotive parts.
[0076] The quality feedback optimization module is used to obtain the feedback results of the previous batch of automotive parts surface quality inspection when conducting the next batch of automotive parts surface quality inspection to determine whether to optimize the image processing parameters, thereby improving the accuracy of defect identification in highlight areas.
[0077] The image parameter adaptive optimization module is used to analyze the changes in ambient light based on the evaluation results of ambient light conditions in adjacent quality inspection cycles, in order to determine whether to fine-tune the image processing parameters. This ensures that the image processing parameters are adaptively adjusted according to changes in ambient light conditions, thereby helping to improve the accuracy of identifying surface quality defects in automotive parts.
[0078] The above embodiments can be implemented, in whole or in part, by software, hardware (such as circuits), firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the flow or function according to the embodiments of the present invention is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. Computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., infrared, wireless, microwave, etc.) means. A computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. Available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media. Semiconductor media can be solid-state drives.
[0079] It should be understood that the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. A and B can be singular or plural. Additionally, the character " / " in this article generally indicates an "or" relationship between the preceding and following related objects, but it can also represent an "and / or" relationship. Please refer to the context for a more accurate understanding.
[0080] In this invention, "at least one" means one or more, and "more than one" means two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of a single item or a plurality of items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be a single item or multiple items.
[0081] It should be understood that, in various embodiments of the present invention, the order of the above-mentioned process numbers does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0082] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0083] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the devices, apparatuses, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0084] In the embodiments provided by this invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0085] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0086] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0087] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0088] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A machine learning-based method for quality inspection of automotive parts, characterized in that, The method includes: The current batch of automotive parts is scanned to obtain corresponding surface quality inspection images of the parts for defect identification. At the same time, the ambient lighting conditions are evaluated to quantify the impact of ambient lighting conditions on defect identification of automotive parts. The process involves segmenting highlight regions in the surface quality inspection images of automotive parts and determining quality defects based on a specified machine learning model to output corresponding automotive part quality inspection results. The specific steps for determining automotive part quality defects based on the specified machine learning model and outputting corresponding automotive part quality inspection results are as follows: By using a specified machine learning model, the reflective highlight areas of the surface quality inspection image of the parts are identified and segmented to obtain highlight area blocks to be analyzed. The obtained highlight area blocks to be analyzed are read to determine whether the corresponding highlight area is a quality defect of the automotive parts, and then the corresponding automotive parts surface quality inspection results are output. If the surface quality inspection result of the automotive parts is unqualified, it means that the specified machine learning model has detected a quality defect in the high-gloss area of the automotive parts to be analyzed. Then, the quality inspection result is verified to perform a secondary verification of the quality inspection result of the specified machine learning model, thereby improving the reliability of the surface quality inspection result of the automotive parts. If the surface quality inspection result of the automotive parts is qualified, it means that the specified machine learning model did not detect any quality defects in the high-gloss area of the automotive parts to be analyzed. Then the corresponding automotive parts will be transported to the production line used to transport qualified automotive parts to the production packaging and quality inspection stage. When conducting the next batch of automotive parts surface quality inspection, the feedback results of the previous batch of automotive parts surface quality inspection are obtained to determine whether to optimize image processing parameters, thereby improving the accuracy of defect identification in highlight areas. Based on the evaluation results of ambient lighting conditions in adjacent quality inspection cycles, an analysis of ambient lighting changes is performed to determine whether image processing parameters need to be fine-tuned, thereby ensuring that the image processing parameters are adaptively adjusted according to changes in ambient lighting conditions.
2. The machine learning-based automotive parts quality inspection method according to claim 1, characterized in that, The specific process for assessing ambient lighting conditions is as follows: Acquire reflection influence parameters within the set detection period, including light intensity, light angle, component surface smoothness, and environmental contrast. Data processing and quantification are performed based on reflection influence parameters to obtain the highlight region formation influence index. The highlight region formation influence index is used to quantify the degree of influence of ambient lighting conditions on the generation of reflective highlight regions. The highlight region formation influence index is mapped onto the trained highlight region formation probability mapping set to obtain the corresponding highlight region formation probability.
3. The machine learning-based automotive parts quality inspection method according to claim 1, characterized in that, The specific process for verifying the quality inspection results is as follows: The probability of highlight area formation is matched with the defined interval for highlight area formation based on representative ambient lighting conditions: If the probability of highlight area formation falls within the highlight area formation determination range, the corresponding automotive parts will be sent to the rework production line for repairing automotive parts; otherwise, the corresponding automotive parts will be sent to the re-inspection production line for re-inspecting the surface quality of automotive parts. When a car part in the re-inspection line is again determined to be sent to the re-inspection line, the corresponding car part is then sent to the manual verification line for manually checking the surface quality of the car parts.
4. The machine learning-based automotive parts quality inspection method according to claim 1, characterized in that, The process for determining whether to optimize image processing parameters is as follows: During the testing process, the false detection rate of the rework line and the missed detection rate of the production line are obtained for the corresponding batch of automotive parts. The acquired data is combined with the probability of highlight areas of corresponding batch of automotive parts to obtain the machine learning model error quantification value, which is then compared with the extracted error allowable threshold, which represents the maximum tolerance value for errors in the machine learning model. If the machine learning model error quantization value is less than the error allowable threshold, the absolute value between the machine learning model error quantization value and the error allowable threshold is obtained and recorded as the error approach amount. If the error approach amount is lower than the set prevention approach amount, image preprocessing optimization measures are taken to reduce the impact of image preprocessing on the model error; otherwise, the quality inspection of automotive parts continues. If the machine learning model error quantization value is not less than the preset error allowable threshold, then the machine learning image processing parameters are optimized to reduce the impact of the machine learning model image processing level on the identification of surface defects of automotive parts.
5. The machine learning-based automotive parts quality inspection method according to claim 4, characterized in that, The specific steps for implementing image preprocessing optimization measures are as follows: Step 1: Reduce specular reflections by using polarized light to minimize specular interference; Step 2: Enable the specular removal algorithm to restore the reflection pattern of the specular region to the surface texture, and project the influence index formed by the specular region into the specular removal projection sequence after training to obtain the corresponding brightness statistical threshold influence factor. At the same time, introduce the brightness statistical threshold influence factor into the specular removal algorithm to improve the accuracy of the reflection region identification. Step 3: Perform brightness normalization processing on the surface quality inspection images of the parts to reduce the interference of different brightness areas on the specified machine learning model.
6. The machine learning-based automotive parts quality inspection method according to claim 4, characterized in that, The specific details of optimizing machine learning image processing parameters are as follows: The offset between the machine learning model error quantization value and the error allowable threshold is recorded as the machine learning error correction amplitude value. It is input into the fitted machine learning error correction mapping dataset and the corresponding machine learning model optimized data sequence is output. The output sequence is used to optimize the network depth and the number of low-level channels of the machine learning model to obtain optimized image processing parameters. The quality inspection of automotive parts is then carried out based on the optimized image processing parameters. The machine learning model optimizes the data sequence, including adjusting the network depth and optimizing the low-level channels.
7. The machine learning-based automotive parts quality inspection method according to claim 1, characterized in that, The ambient lighting conditions are evaluated based on adjacent quality detection cycles. An analysis of ambient lighting changes is then performed to determine whether image processing parameters need fine-tuning. The specific process is as follows: The probability of highlight formation in the current batch is quantified by comparing it with the probability of highlight formation in the previous batch, and the corresponding rate of change in highlight formation is obtained, thus yielding the actual degree of change. If the actual degree of change exceeds the tolerance value, the image processing parameters are fine-tuned; otherwise, no additional processing is performed. The variation tolerance value is the maximum tolerable fluctuation amount of the corresponding ambient light conditions when the surface quality inspection of adjacent batches of automotive parts is carried out.
8. The machine learning-based automotive parts quality inspection method according to claim 7, characterized in that, The specific process for fine-tuning the image processing parameters is as follows: The corresponding change in illumination conditions is obtained by quantifying the difference between the actual degree of change and the tolerance value. The machine learning adaptive adjustment amount is obtained by comparing the changes in illumination conditions with the adaptive adjustment map set after the fitting is completed. The machine learning adaptive adjustment amount is then used to adaptively fine-tune the optimized image processing parameters. The adaptive adjustment mapping set represents a dataset used to fit the mapping relationship between changes in illumination conditions and machine learning adaptive adjustment values; The machine learning adaptive adjustment includes network depth adaptive fine-tuning and low-level channel adaptive fine-tuning.
9. A machine learning-based automotive parts quality inspection system, employing the machine learning-based automotive parts quality inspection method as described in any one of claims 1-8, characterized in that, include: The module includes a quality inspection preparation module, a quality defect judgment module, a quality feedback optimization module, and an image parameter adaptive optimization module. The quality inspection preparation module is used to scan the current batch of automotive parts to obtain the corresponding surface quality inspection images of the parts, so as to identify defects in the automotive parts. At the same time, it evaluates the ambient lighting conditions to quantify the impact of ambient lighting conditions on the identification of defects in automotive parts. The quality defect judgment module is used to divide the highlight area of the surface quality inspection image of the parts and judge the quality defects of the automotive parts based on a specified machine learning model, so as to output the corresponding quality inspection results of the automotive parts. The quality feedback optimization module is used to obtain the feedback results of the previous batch of automotive parts surface quality inspection when conducting the next batch of automotive parts surface quality inspection to determine whether to optimize the image processing parameters, thereby improving the accuracy of defect identification in highlight areas. The image parameter adaptive optimization module is used to analyze changes in ambient light based on the evaluation results of ambient light conditions in adjacent quality detection cycles, in order to determine whether to fine-tune the image processing parameters, thereby ensuring that the image processing parameters are adaptively adjusted as ambient light conditions change.
Citation Information
Patent Citations
A quality inspection method for new energy vehicle parts
CN116912231B
Visual inspection method and system for quality of automobile parts
CN120563446A
Automatic image adjusting method based on ambient light
CN116757971A
Automobile part defect detection method and detection system
CN119863459A
Batch image data processing method and system for intelligent manufacturing production line
CN120198858A