An artificial intelligence-based vehicle surface defect identification method and system

By using polarization-filtered multi-angle imaging and HSV color space conversion, combined with parallax analysis and convolutional neural networks, the problems of low efficiency and accuracy in vehicle surface defect detection are solved. This enables the identification and quantification of minute defects under complex lighting and color differences, improving the automation and accuracy of detection.

CN120411910BActive Publication Date: 2026-04-21贵州装备制造职业学院
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
贵州装备制造职业学院
Filing Date
2025-04-21
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing technologies are inefficient and subjective in detecting surface defects on vehicles. They are unable to cope with complex lighting and color differences, and cannot accurately identify and quantify the severity of defects, especially for black and metallic paint surfaces.

Method used

A polarization-filtered multi-angle imaging system is used to eliminate glare on metallic paint surfaces. Combined with HSV color space conversion and texture equalization processing, three-dimensional microscopic deformation features are constructed. A convolutional neural network is used for defect identification to generate a heat map of defect severity distribution.

Benefits of technology

It enables the identification of minute defects on the surface of vehicles of various colors and materials under complex lighting conditions, accurately locates and quantifies the severity of defects in three dimensions, improves the accuracy and automation of detection, and provides support for visualizing the distribution and severity of defects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120411910B_ABST
    Figure CN120411910B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of image processing, and discloses a vehicle surface defect identification method and system based on artificial intelligence. The method comprises the following steps: acquiring a vehicle surface image through polarization filtering multi-angle imaging; applying HSV color conversion and texture equalization processing to standardize the image; combining parallax analysis to construct a three-dimensional deformation feature and extract a defect feature vector; and utilizing a position perception convolutional neural network to identify the defect and output a severity heat map. According to the application, in a complex light environment, the tiny defects on the surface of vehicles with various colors and materials can be accurately identified and evaluated, and the accurate three-dimensional positioning and severity quantification of the defects can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and in particular to a method and system for identifying vehicle surface defects based on artificial intelligence. Background Technology

[0002] In the current automotive manufacturing and quality control field, vehicle surface defect detection typically relies on manual visual inspection or traditional machine vision technology. Manual inspection methods primarily involve quality inspectors visually and physically examining the vehicle surface to look for defects such as scratches, dents, and paint bubbles. Traditional machine vision inspection uses fixed light sources and camera settings, employing basic image processing techniques such as edge detection and threshold segmentation to identify surface anomalies. In the used car appraisal and insurance claims fields, defect detection and assessment rely heavily on the experience and judgment of inspectors, lacking objective and unified standards and automated assessment processes.

[0003] However, these existing technologies have significant shortcomings. Manual inspection methods are inefficient, subjective, and ill-suited for large-scale vehicle inspection needs, and cannot guarantee consistent results. Traditional machine vision technologies suffer from low accuracy and high false alarm rates when dealing with complex factors such as variations in vehicle surface lighting, color differences, and curved surface reflections. Especially for special paint surfaces like black and metallic paint, traditional methods struggle to achieve stable inspection results. Furthermore, existing technologies typically only detect the presence of defects, failing to quantify their severity and precise location. This results in a lack of effective data support for repair and evaluation processes, leading to low repair quality and inefficient resource allocation. Summary of the Invention

[0004] This application provides an artificial intelligence-based method and system for identifying vehicle surface defects, which can accurately identify and evaluate minute defects on the surface of vehicles of various colors and materials under complex lighting conditions, while achieving precise three-dimensional localization and severity measurement of defects.

[0005] Firstly, this application provides an artificial intelligence-based method for identifying vehicle surface defects. The method includes: acquiring images of the vehicle surface using a polarization-filtered multi-angle imaging system to eliminate glare interference from metallic paint and obtain original image data of the vehicle surface; applying HSV color space conversion and texture equalization processing to adaptively process different colored paint areas based on the original image data to obtain a standardized vehicle surface image; constructing three-dimensional micro-deformation features of the vehicle surface based on the standardized vehicle surface image, combined with parallax analysis, and extracting features such as micro-scratches, orange peel defects, and paint bubble features to generate a multi-dimensional defect feature vector; using the multi-dimensional defect feature vector as input, performing hierarchical identification of vehicle surface defects through a convolutional neural network with position awareness capabilities, and outputting a heatmap of defect severity distribution.

[0006] Secondly, this application provides an artificial intelligence-based vehicle surface defect recognition system, the artificial intelligence-based vehicle surface defect recognition system comprising:

[0007] The acquisition module is used to acquire images of the vehicle surface through a polarization filter multi-angle imaging system, eliminate glare interference from metallic paint, and obtain the original image data of the vehicle surface.

[0008] The processing module is used to apply HSV color space conversion and texture equalization processing to adaptively process different colored paint areas based on the original image data of the vehicle surface, so as to obtain a standardized vehicle surface image.

[0009] The extraction module is used to construct three-dimensional micro-deformation features of the vehicle surface based on the standardized vehicle surface image and combine parallax analysis, extract micro-scratches, orange peel defects and paint bubble features, and generate multi-dimensional defect feature vectors.

[0010] The identification module is used to use the multidimensional defect feature vector as input, and to perform hierarchical identification of vehicle surface defects through a convolutional neural network with position awareness, and output a heat map of defect severity distribution.

[0011] Thirdly, an artificial intelligence-based vehicle surface defect recognition device is provided, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor invokes the instructions in the memory to cause the artificial intelligence-based vehicle surface defect recognition device to execute the aforementioned artificial intelligence-based vehicle surface defect recognition method.

[0012] Fourthly, a computer-readable storage medium is provided, wherein instructions are stored therein, which, when executed on a computer, cause the computer to perform the aforementioned artificial intelligence-based vehicle surface defect identification method.

[0013] The technical solution provided in this application acquires images of the vehicle surface using a polarization-filtered multi-angle imaging system, effectively eliminating glare interference from metallic paint and solving the problem of missed detections caused by light reflection in traditional visual inspection, ensuring high-quality original image data acquisition. HSV color space conversion and texture equalization processing techniques are applied to adaptively process different colored paint areas, overcoming the limitations of traditional detection methods in adapting to various vehicle body colors, especially achieving significant results on dark and highly reflective paints. By combining parallax analysis to construct three-dimensional micro-deformation features of the vehicle surface, accurate extraction of minute scratches, orange peel defects, and paint bubble features is achieved. Compared to two-dimensional analysis methods, three-dimensional feature extraction can more comprehensively capture minute surface changes, significantly improving the defect detection rate. The generated multi-dimensional defect feature vector, by fusing different types of defect information, provides rich feature representation for subsequent deep learning analysis. A position-aware convolutional neural network is used for hierarchical identification of vehicle surface defects, deeply integrating artificial intelligence algorithms with knowledge in the field of vehicle surface defect detection. This not only achieves accurate identification of defect types but also provides differentiated processing based on the importance of defect location, greatly improving the practicality of the detection. The output heatmap of defect severity distribution visually displays the distribution and severity of defects, providing visual support for maintenance decisions. The overall solution integrates multidisciplinary technologies such as optical imaging, image processing, 3D reconstruction, and deep learning. Through artificial intelligence algorithms' ability to automatically learn and extract vehicle surface defect features, it effectively overcomes the subjectivity of traditional methods that rely on human experience, achieving standardization and automation of defect detection. The spatial attention mechanism and positional coding design in the solution fully consider the domain characteristics of defect detection, enabling the algorithm to focus on key visible areas of the vehicle like a professional inspector and provide reasonable assessments based on defect characteristics, significantly improving the practicality and professionalism of the solution. Attached Figure Description

[0014] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0015] Figure 1 This is a schematic diagram of one embodiment of the vehicle surface defect recognition method based on artificial intelligence in this application.

[0016] Figure 2 This is a schematic diagram of one embodiment of the vehicle surface defect recognition system based on artificial intelligence in this application.

[0017] Figure 3This is a schematic block diagram of the structure of an artificial intelligence-based vehicle surface defect recognition device in an embodiment of the present invention. Detailed Implementation

[0018] This application provides an artificial intelligence-based method and system for identifying vehicle surface defects. The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein. Furthermore, the terms "comprising" or "having" and any variations thereof are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.

[0019] For ease of understanding, the specific process of the embodiments of this application is described below. Please refer to [link / reference]. Figure 1 One embodiment of the vehicle surface defect identification method based on artificial intelligence in this application includes:

[0020] Step S101: The vehicle surface is imaged using a polarization filter multi-angle imaging system to eliminate glare interference from metallic paint and obtain the original image data of the vehicle surface.

[0021] Step S102: Based on the original image data of the vehicle surface, apply HSV color space conversion and texture equalization processing to adaptively process the different colored paint areas to obtain a standardized vehicle surface image.

[0022] Step S103: Based on standardized vehicle surface images, construct three-dimensional micro-deformation features of the vehicle surface by combining parallax analysis, extract features of micro-scratches, orange peel defects and paint bubbles, and generate multi-dimensional defect feature vectors.

[0023] Step S104: Using multidimensional defect feature vectors as input, a convolutional neural network with position awareness is used to classify and identify vehicle surface defects, and output a heat map of defect severity distribution.

[0024] It is understood that the executing entity of this application can be an AI-based vehicle surface defect recognition system, or it can be a terminal or a server; no specific limitation is made here. This application's embodiments use a server as an example for illustration.

[0025] Specifically, the vehicle surface defect identification process requires preliminary processing of the raw image data acquired from a polarization-filtered multi-angle imaging system. In practical applications, the defect features of vehicle surfaces are often difficult to extract directly from two-dimensional images due to their complex three-dimensional shapes. The raw images of the vehicle surface typically contain a collection of images from multiple perspectives, which contain information about the microscopic features of the vehicle surface and need to be reconstructed into feature maps suitable for neural network processing. After the vehicle surface defect information is extracted, it needs to be reconstructed into a two-dimensional feature map of a specific shape. This step integrates three-dimensional microscopic deformation features, micro-scratches, orange peel defects, and paint bubble features into a multi-channel two-dimensional representation. In this process, different types of defect features are placed into different channels, forming a feature map with multiple channels, where each channel represents a specific type of defect information. The number of channels is determined by the type of defect being identified; typically, scratches, dents, orange peel, and bubbles each occupy one channel, with additional channels used to represent additional attributes of the defect such as depth and width.

[0026] After the feature maps are constructed, this information is fed into a position-aware convolutional neural network for processing. The network's initial convolutional layers use large kernels (e.g., 7×7) to extract basic features, capturing image texture and edge information over a wide range, making them ideal for identifying macroscopic defect patterns on vehicle paint surfaces. When there are obvious scratches on the vehicle surface, the initial convolutional layers strongly activate the corresponding feature map regions. The network uses residual blocks with a spatial attention mechanism for deep feature extraction. The introduction of residual structures solves the gradient vanishing problem in deep network training, enabling the network to learn deeper features. Simultaneously, the spatial attention mechanism gives the network the ability to focus on different areas of the vehicle surface; when defects appear in key visible areas such as the hood, the network automatically increases its attention to these areas.

[0027] When processing vehicle surface defects, the network compresses feature maps into channel descriptors using global average pooling, and then calculates the importance weights of each channel through a two-layer fully connected network. This process allows the network to learn the importance of different types of defects; for example, obvious scratches that significantly affect the vehicle's appearance receive higher weights. During this process, the network automatically adjusts its sensitivity to different defect types through training, giving more attention to defects that significantly impact the vehicle's appearance. After multi-level feature extraction, the network outputs defect classification results and severity scores. This information is used to construct a heatmap of defect severity distribution, visually displaying the location and extent of vehicle surface defects. In practical applications, such as inspecting a silver sedan, the system uses polarization filtering technology to eliminate reflective interference from the paint surface, then identifies multiple minor scratches on the front bumper and a dent on the door. The system uses a convolutional neural network to analyze the location, size, and depth of these defects, marking deep scratches on the front bumper in red and minor dents on the door in yellow on the heatmap. This allows repair personnel to visually understand the defect distribution and severity, thereby developing appropriate repair plans.

[0028] In one specific embodiment, the process of performing step S101 may specifically include the following steps:

[0029] The system uses an array of 12 high-precision industrial cameras arranged in a ring and two wide-angle cameras at the top to perform a 360° scan of the vehicle surface, capturing a set of original images of each surface of the vehicle.

[0030] The matching degree between the original image group and the preset vehicle model outline template is calculated to determine the type of the currently scanned vehicle, and the corresponding imaging parameter configuration is selected based on the determination result.

[0031] Based on the current ambient light intensity sensor data, the optimal polarization filter angle is calculated, and an adjustable polarization filter of 45°-135° is applied to the metallic paint area to eliminate surface specular reflection points.

[0032] A laser depth sensor was used to measure the distance between the camera and 24 key points on the vehicle surface in real time, constructing a vehicle surface depth map. The camera focal length was then adjusted based on the vehicle surface depth map to obtain surface detail images with a resolution of 0.1mm.

[0033] Based on the reflectivity data of the vehicle surface material, the collection area was divided into high reflectivity, medium reflectivity and low reflectivity areas, and different exposure parameters were applied to each area to balance the imaging effect.

[0034] The vehicle's A-pillar, hood, roof, and side doors are scanned at 200% resolution, and features are fused with regular scan images to form a multi-scale image pyramid.

[0035] Image data acquired from different angles are used to calculate spatial location using a feature point matching algorithm, constructing a system accurate to 1cm. 2 Image mapping of vehicle surface at grid density;

[0036] Three repeated acquisitions were performed on potential abnormal regions detected in the vehicle surface image mapping, and pixel-level comparison analysis was conducted to remove the influence of random noise and illumination changes during the acquisition process, resulting in the original vehicle surface image dataset.

[0037] Specifically, 12 high-precision industrial cameras are arranged in a ring around the vehicle, while two wide-angle cameras are installed on top, forming a complete imaging array system. This layout design enables omnidirectional, blind-spot-free scanning of the vehicle from different angles, ensuring that every part of the vehicle body is captured simultaneously by at least three cameras, thereby generating a set of raw images containing details of each surface of the vehicle. These raw images contain all the information of the vehicle surface. After acquiring the raw images, vehicle type recognition is required, and corresponding parameters need to be adjusted. Specifically, the acquired raw image set is compared with preset vehicle type contour templates in the database to calculate the matching degree. The system extracts vehicle contour features from the raw images, including key point information such as body size, proportion, and feature lines, and then compares the similarity with various vehicle type templates stored in the vehicle type database. The similarity calculation uses a contour matching algorithm, which calculates the matching score by calculating the correspondence between contour point sets. When the matching score of a certain vehicle type template exceeds a preset threshold, the system determines the current vehicle type and calls the corresponding camera parameter configuration, including exposure time, focal length range, and imaging resolution, from the parameter library.

[0038] Because vehicle surfaces, especially metallic paint, are prone to specular reflection, severely impacting image quality, the system incorporates polarization filtering technology. The system collects ambient light data using an ambient light intensity sensor and then calculates the optimal polarization filter angle based on the light intensity and incident angle. The calculation process considers the polarization characteristics of light and the reflectivity of the vehicle paint surface, determining the angle range that minimizes specular reflection. For metallic paint areas, the system adjusts the polarization filter to an optimal angle within an adjustable range of 45°-135°. This range has been experimentally verified to effectively eliminate most metallic paint reflections.

[0039] To obtain high-precision images, the system needs to precisely control the distance between the camera and the vehicle surface. A laser depth sensor measures the distance at 24 pre-defined key points on the vehicle surface, distributed across various major parts including the front bumper, hood, roof, side doors, and trunk. These measurements construct a depth map of the vehicle surface, reflecting its three-dimensional spatial distribution. Based on the depth map data, the system automatically calculates the optimal focal length parameters for each camera and adjusts the lens position using precision motors to align the focal plane with the vehicle surface. This precise focal length control enables the imaging system to achieve a resolution of 0.1mm, sufficient to capture minute surface defect details. Considering the diverse materials and significant differences in reflectivity of vehicle surfaces, the system divides the acquisition area into different reflectivity zones based on the reflectivity data of the vehicle surface materials. High-reflectivity zones mainly include chrome-plated parts and high-gloss metallic paint surfaces, medium-reflectivity zones include ordinary paint surfaces, and low-reflectivity zones include plastic parts and matte surfaces. The system sets differentiated exposure parameters for different reflective areas: shorter exposure times and smaller apertures are used for high-reflectivity areas to avoid overexposure; standard exposure parameters are used for medium-reflectivity areas; and longer exposure times and larger apertures are used for low-reflectivity areas to capture sufficient detail. This area-adaptive exposure strategy ensures a balance in imaging effects across different material areas of the entire vehicle.

[0040] After completing the basic scan of the entire vehicle, the system focuses on scanning key areas. The A-pillar, hood, roof, and side doors are the most prone to defects and have the most significant impact on aesthetics; therefore, these areas are scanned at 200% resolution, meaning the camera spends more time in these areas, acquiring higher-resolution images. These high-resolution images are then fused with regular scan images, constructing a multi-scale image pyramid using downsampling and upsampling methods. This structure contains detailed information at all levels, from global to local, enabling the system to simultaneously detect large-area deformation defects and minute scratches. To integrate 2D images from different cameras into a complete vehicle surface model, the system uses a feature point matching algorithm for spatial location calculation. This algorithm extracts feature points such as SIFT or SURF from each image, then compares feature descriptors to find corresponding points between images, establishing a correspondence. Based on these correspondences, the three-dimensional spatial coordinates of the feature points are calculated using triangulation principles, thus mapping the 2D image information into 3D space. This process constructs a model accurate to 1cm. 2 Vehicle surface image mapping at grid density.

[0041] To ensure data quality, the system repeatedly captures images of potentially abnormal areas. Specifically, suspicious areas initially detected in the vehicle surface image mapping are marked, and then the camera parameters are readjusted to specifically target these areas for three repeated image captures. Pixel-level comparison and analysis are performed on these three images. By calculating the variance of pixel values, stable image features are identified, while artifacts caused by random noise or lighting variations are distinguished, thus eliminating interfering factors and obtaining a stable and reliable dataset of original vehicle surface images.

[0042] For example, when the vehicle enters the detection area, the ring camera array begins operation. The system identifies the vehicle type as a mid-size sedan through contour matching and selects the appropriate parameter configuration. Then, the ambient light intensity is measured at 8000 lux, and the optimal polarization angle is calculated to be 78°, effectively eliminating strong reflections on the hood. The depth sensor measures the distance values ​​of 24 key points on the vehicle body, constructing a complete depth map. Based on this, the system adjusts the focal length of each camera to achieve a clear image. The system identifies the hood as a high-reflection area and uses a short exposure time of 1 / 2000 second; while the black plastic bumper is identified as a low-reflection area and uses a longer exposure time of 1 / 500 second. During a focused scan of the A-pillar and side doors at 200% resolution, a suspicious slight dent is detected on the side door. The system immediately performs three repeated scans of this area, and pixel comparison analysis confirms that this is indeed a slight dent defect rather than an illusion caused by changes in lighting. The system integrates all the acquired image data into a complete vehicle surface image map using a feature point matching algorithm, clearly displaying the detailed condition of each part of the vehicle.

[0043] In one specific embodiment, the process of performing step S102 may specifically include the following steps:

[0044] Color analysis is performed on the original image data of the vehicle surface to identify the main and secondary color regions of the vehicle body in the image and construct a color distribution map of the vehicle surface; the original image data of the vehicle surface is converted from the RGB color space to the HSV color space, and the three channels of hue, saturation and brightness are separated to improve the independent processing capability of color and brightness.

[0045] Histogram processing is performed on the luminance channel in the HSV color space to enhance the detail information in the dark areas of the image, forming an enhanced luminance channel.

[0046] Based on the color distribution map of the vehicle surface, different saturation adjustment parameters are set for different colored paint areas, and targeted processing is carried out for red, black and metallic paint areas to construct a color correction matrix.

[0047] The enhanced luminance channel is combined with the saturation parameter in the color correction matrix to reconstruct the HSV image and eliminate the interference of different paint colors on defect identification.

[0048] Texture features of the vehicle surface are extracted by local region processing, texture complexity map is calculated, and texture equalization is performed on high texture areas to suppress normal texture fluctuations.

[0049] The processed image is segmented to identify shadow and highlight areas, and the impact of uneven lighting on image quality is eliminated through compensation methods.

[0050] The processed HSV image is converted back to the RGB color space, and smoothing is applied to eliminate noise generated during processing, resulting in a standardized vehicle surface image.

[0051] Specifically, color analysis is performed on the raw image data of the vehicle surface to identify the primary and secondary color regions of the vehicle body. This process is achieved through cluster analysis of the pixel color values ​​in the image. Specifically, all pixels in the image are grouped according to color similarity, and the color group with the largest proportion is identified as the primary color, and the second largest color group as the secondary color. The cluster analysis uses the K-means algorithm, using the pixel values ​​of the RGB three channels as features for clustering. Once the cluster centers are stable, the primary and secondary colors are determined based on the proportion of pixels in each cluster. After determining the color attributes of each region, this information is mapped back to the original image space to form a color distribution map of the vehicle surface, which marks which color category each part of the vehicle body belongs to. The raw image data of the vehicle surface is then converted from the RGB color space to the HSV color space. In the RGB color space, color and brightness information are coupled, making it difficult to process color or brightness separately. The HSV space separates color and brightness information, facilitating targeted processing. The specific conversion process involves mathematically transforming the R, G, and B component values ​​of each pixel to obtain the corresponding H (hue), S (saturation), and V (brightness) component values. Hue (H) represents the basic attributes of color, such as red or blue; saturation (S) represents the purity of color; and brightness (V) represents the lightness or darkness of color. Through this conversion, the color and brightness information of the vehicle surface are separated into different channels.

[0052] After HSV space conversion, histogram processing is performed on the luminance channel to enhance details in dark areas. Histogram processing calculates the pixel value distribution histogram of the luminance channel, analyzes the distribution of luminance values, and then remaps the luminance values ​​to enhance details in dark areas. Specifically, the original luminance histogram is widened, especially the luminance values ​​in dark areas (low luminance value areas) are stretched, increasing the difference between luminance values ​​in dark areas, thereby enhancing the contrast of dark areas and highlighting details. This enhanced luminance channel makes defect features in dark areas of the vehicle surface more obvious. Based on the previously constructed vehicle surface color distribution map, differentiated saturation adjustment parameters are set for different color areas. Different paint colors have different display effects on defects; defects in red areas are easily masked by high saturation, while defects in black areas are difficult to identify due to low saturation, and metallic paint areas are interfered with defect identification due to reflective effects. To address these issues, different saturation adjustment parameters were set: saturation was appropriately reduced in red areas to improve the contrast between defects and the background; saturation was slightly increased in black areas to enhance surface texture variations; and a special saturation adjustment curve was applied to metallic paint areas to suppress reflective effects. These adjustment parameters form a color correction matrix, which corresponds one-to-one with the vehicle's surface areas.

[0053] The enhanced luminance channel is combined with the saturation parameters in the color correction matrix to reconstruct the HSV image. Specifically, the original hue (H) channel is kept unchanged, the original saturation (S) channel is modified using the saturation adjustment parameters in the color correction matrix, and the enhanced luminance channel replaces the original luminance (V) channel. These three channels are then recombined into an HSV image. This process eliminates the interference of different paint colors on defect identification, making defect features in various color regions appear visually similar. Texture features of the vehicle surface are extracted through local region processing, and a texture complexity map is calculated. Texture feature extraction uses local region operations to calculate texture descriptors, such as local gradient direction histograms or local binary patterns, for each small region (e.g., an 8×8 or 16×16 pixel window) in the image. These descriptors reflect the complexity and directionality of the texture within the region. The texture complexity values ​​of all regions are organized to form a texture complexity map, which shows the complexity of the texture in different parts of the vehicle surface. For high-texture areas (such as carbon fiber trim or special textured paint), texture equalization is applied to reduce the interference of normal texture fluctuations on defect identification. Texture equalization highlights abnormal texture changes and suppresses normal texture fluctuations by applying adaptive thresholding or texture normalization operations to high-texture regions.

[0054] The processed image is segmented to identify shadow and highlight regions. The segmentation process, based on brightness thresholds and gradient features, divides the image into normal, shadow, and highlight regions. Shadow regions are characterized by abnormally low brightness but normal gradient changes, while highlight regions are characterized by abnormally high brightness and smooth gradient changes. Compensation methods are applied to the identified shadow and highlight regions to eliminate the effects of uneven illumination. Local brightness enhancement is performed on shadow regions while preserving texture details; brightness compression is performed on highlight regions to restore details obscured by highlights. This process results in more consistent image quality of the vehicle surface under different lighting conditions.

[0055] The processed HSV image is converted back to the RGB color space. The HSV to RGB conversion involves mathematically transforming the H, S, and V components of each pixel to obtain the corresponding R, G, and B components. The converted image is then smoothed to eliminate noise generated during processing. Gaussian filtering or bilateral filtering is used for smoothing, which removes noise while preserving edge details. After this series of processing steps, a standardized vehicle surface image is obtained, characterized by balanced color, clear details, and consistent lighting.

[0056] For example, in the original image, the car body appears dark blue with localized shadows caused by uneven lighting. Color analysis identifies the dominant color as dark blue and the secondary color as black (mainly distributed around and below the windows). After converting the image to HSV space, the blue areas show values ​​concentrated around 220 in the H channel, higher S channel values ​​indicating high blue saturation, and significantly lower V channel values ​​in the shadow areas. Histogram equalization of the V channel enhances the brightness of the shadow areas, revealing previously inconspicuous minor dents. Based on the color distribution map, the saturation parameter for the dark blue areas is adjusted by a factor of 0.85, slightly reducing saturation to enhance surface texture visibility. After reconstructing the HSV image, the minor scratches in the blue areas become more pronounced. Through local region processing, a texture complexity map is calculated, revealing an abnormal texture change in the hood area, characterized by a sudden change in texture direction. After segmentation, a shadow area near the A-pillar is identified, and after applying brightness compensation, a small dent in this area is clearly displayed. Converting back to RGB space and smoothing it yields a standardized image of the vehicle's surface. On this image, various defects, including minor scratches on the hood and dents near the A-pillar, are clearly visible.

[0057] In one specific embodiment, the process of executing step S103 may specifically include the following steps:

[0058] Parallax calculation is performed on adjacent multi-angle image pairs in a standardized vehicle surface image to obtain the depth information of the vehicle surface, construct a micro height map of the vehicle surface, and identify the edge and contour regions of the vehicle surface based on the depth change gradient in the micro height map to form an edge feature map.

[0059] Apply height threshold segmentation to the micro-height map to extract protrusions and depressions on the vehicle surface and obtain a deformation area map of the vehicle surface.

[0060] Linear features are extracted from the deformation area map to determine the length, width, and direction parameters of the scratches, and a scratch feature matrix is ​​constructed.

[0061] Based on the local fluctuations of the micro height map, the surface roughness distribution is calculated, orange peel-like defect regions are identified, and a texture feature map is generated.

[0062] Shape analysis is performed on the circular protrusions and depressions in the microscopic height map to extract the size and distribution characteristics of paint bubbles and form a bubble distribution map.

[0063] The scratch feature matrix, texture feature map, and bubble distribution map are combined to construct a hierarchical structure of vehicle surface defect features. The scratch features, orange peel-like defect features, and bubble features in the defect feature hierarchy are fused according to their importance weights to generate a multidimensional defect feature vector.

[0064] Specifically, color analysis is performed on the original image data of the vehicle surface. Cluster analysis of image pixels is used to identify the primary and secondary colors of the vehicle body. This process uses the K-means clustering algorithm, grouping all pixels according to their RGB three-channel values, calculating the cluster center and its pixel proportion, and assigning the cluster with the largest proportion as the primary color and the second largest as the secondary color. Mapping this color information back to the image space creates a color distribution map of the vehicle surface, marking the color category of each part. The original image is then converted from the RGB color space to the HSV color space. In the RGB space, color and brightness information are coupled together, while the HSV space separates them for easier processing. The conversion process involves mathematically transforming the R, G, and B components of each pixel to obtain H (hue), S (saturation), and V (brightness). Hue represents the basic attribute of color, saturation represents color purity, and brightness represents lightness or darkness. This conversion separates color and brightness information into different channels for separate processing.

[0065] After HSV conversion, histogram processing is applied to the luminance channel V to enhance details in dark areas. The pixel value distribution histogram of the luminance channel is calculated, the luminance distribution is analyzed, and then remapping is performed, especially stretching the dark areas (low luminance values) to increase the difference between luminance values ​​in dark areas, enhance contrast, and highlight details in dark areas. This process results in an enhanced luminance channel, making defect features in dark areas of the vehicle surface more apparent. Based on the vehicle surface color distribution map, differentiated saturation adjustment parameters are set for different color regions. Different paint colors have different defect display effects: defects in red areas are easily masked by high saturation, defects in black areas are difficult to identify due to low saturation, and metallic paint areas have reflective interference. Therefore, targeted parameters are set: saturation is reduced in red areas, increased in black areas, and a special adjustment curve is applied to metallic paint areas. These parameters form a color correction matrix, corresponding one-to-one with the vehicle surface areas.

[0066] Then, the enhanced luminance channel is combined with the saturation parameter in the color correction matrix to reconstruct the HSV image. Specifically, the original hue (H) channel is kept unchanged, the saturation (S) channel is modified using the color correction matrix, the enhanced luminance (V) channel is replaced with the enhanced luminance, and the three channels are then recombined into an HSV image. This process eliminates the interference of different paint colors on defect identification, making defect features in various color regions visually similar. Extracting texture features from the vehicle surface through local region processing and calculating the texture complexity map are key steps. Texture feature extraction uses the Local Binary Pattern (LBP) algorithm, which compares each pixel in the image with its neighboring pixels to generate a binary code. The texture complexity calculation can be expressed as:

[0067]

[0068] Where TC(x,y) represents the texture complexity value at position (x,y), P represents the number of neighboring pixels, usually 8, and g c g represents the grayscale value of the center pixel. p Let g represent the grayscale value of the p-th neighboring pixel, and δ be the comparison function. p ≥g c The value is 1 if the texture complexity is high, and 0 otherwise. After calculating the texture complexity of the entire image, high-texture regions are subjected to equalization. High-texture regions are those where the TC value exceeds the threshold θ. T In the region, the equalization process is achieved through texture normalization:

[0069]

[0070] Where T eq (x,y) are the equalized texture values, μ T It is the mean of the texture complexity of the local region, α TIt is the standard deviation, α T and β T This involves adjusting parameters to control the degree of equalization. This process suppresses normal texture fluctuations, highlights abnormal texture changes, and makes defect features more obvious.

[0071] The processed image is segmented to identify shadow and highlight regions. Segmentation is based on brightness thresholds and gradient features, dividing the image into normal, shadow, and highlight regions. Shadow regions are areas with low brightness but normal gradient changes, while highlight regions are areas with high brightness and smooth gradient changes. Compensation methods are applied to the identified special regions: local brightness enhancement is performed on shadow regions, and brightness compression is performed on highlight regions, resulting in more uniform image quality of the vehicle surface under different lighting conditions.

[0072] The processed HSV image is converted back to the RGB color space. The HSV to RGB conversion performs a mathematical transformation on the H, S, V values ​​of each pixel to obtain the R, G, B values. The converted image is then smoothed using Gaussian filtering or bilateral filtering to remove noise while preserving edge details, resulting in a standardized vehicle surface image.

[0073] For example, in the original image, the car body appears bright red, with some areas showing shadows due to uneven lighting. Color analysis identifies red as the dominant color and black as the secondary color (mainly at the bottom and around the wheel arches). After converting the image to HSV space, the H channel values ​​in the red areas are approximately 0-10 or 350-360, while high S channel values ​​indicate high red saturation. The V channel values ​​are lower in the shadow areas. Histogram processing of the V channel increases the brightness of the shadow areas, revealing previously inconspicuous scratches. The saturation parameter for the red areas is adjusted by a factor of 0.75 to reduce saturation and enhance surface texture visibility. Calculating the texture complexity map using local binary mode reveals an abnormal texture in the door area, characterized by abrupt changes in texture direction. After segmentation, a shadow area above the wheel arch is identified, and after applying brightness compensation, a small bubble defect in this area is clearly displayed. After a series of processing steps, a standardized vehicle surface image is obtained, where various defect features, including scratches on the door and bubbles on the wheel arches, are clearly visible.

[0074] In one specific embodiment, the process of applying a height threshold segmentation step to the micro-height map may specifically include the following steps:

[0075] The micro height map is smoothed to eliminate random noise during the acquisition and construction process, resulting in a denoised micro height map;

[0076] Based on the standard surface height reference value in the vehicle model database, calculate the height difference between the noise reduction micro height map and the standard surface, and generate a height deviation map;

[0077] Histogram analysis was performed on the height deviation map to determine the statistical distribution of positive and negative deviations and to calculate the dynamic thresholds for bulges and depressions.

[0078] The height deviation map is segmented based on a dynamic threshold. When the height deviation value is greater than the protrusion threshold, the area is marked as a protrusion area, and when the height deviation value is less than the depression threshold, the area is marked as a depression area, thus forming a preliminary deformation area marking map.

[0079] Morphological processing is applied to the initial deformation region map to merge adjacent small regions, remove isolated noise points, and enhance regional coherence, resulting in an optimized deformation region map.

[0080] Based on the curvature distribution of the vehicle surface, the curvature of the optimized deformation area map is corrected. When the area is located on a high curvature surface, an additional correction coefficient is applied to eliminate misjudgments caused by the natural curvature of the vehicle surface, thus obtaining a curvature-corrected deformation area map.

[0081] For each deformation region in the curvature correction deformation region map, calculate the area, depth and volume characteristic parameters. When the volume parameter exceeds the preset threshold, mark the region as a critical defect and construct a deformation region feature table.

[0082] Based on the parameter values ​​in the deformation area feature table, the deformation area is classified into severity levels. When the deformation area meets both the conditions of large area and deep depth, it is judged as a serious defect. The deformation area map of the vehicle surface is obtained by associating the location information with the vehicle surface coordinate system.

[0083] Specifically, the microscopic height map is a 3D surface model constructed through parallax analysis, recording the height information of each point on the vehicle surface and directly reflecting the minute unevenness variations of the vehicle surface. The microscopic height map needs to be smoothed to eliminate random noise generated during the acquisition and construction process. The smoothing process uses a Gaussian filter to perform a weighted average of the original height data. The filter kernel size is typically set to 5×5 or 7×7 pixels, and the kernel weights are set according to a two-dimensional Gaussian distribution, with the highest weight at the center point and decreasing towards the edges. This processing method effectively suppresses high-frequency noise while preserving the main surface contour features, resulting in a denoised microscopic height map. The data in the denoised microscopic height map is smoother and more continuous. After noise reduction, it is necessary to determine the defect areas on the vehicle surface. This step calculates the height difference between the denoised microscopic height map and the standard surface based on the standard surface height reference values ​​in the vehicle model database. The vehicle model database stores standard 3D models of various vehicle surfaces, including standard height values ​​for each part. By comparing the actually measured denoised microscopic height map with the standard model of the corresponding vehicle model, the height difference at each point is calculated, generating a height deviation map. Positive values ​​in the height deviation diagram indicate surface bulges, while negative values ​​indicate surface depressions. The absolute magnitude of the deviation value reflects the severity of the defect.

[0084] Histogram analysis of the height deviation map to determine the statistical distribution of positive and negative deviations is the foundation for calculating the dynamic threshold. Histogram analysis statistically analyzes the height deviation values ​​according to their range, forming a deviation distribution histogram. By analyzing the shape of the histogram, especially the distribution characteristics of positive and negative deviations, such as the mean, standard deviation, and skewness, a dynamic threshold suitable for the current vehicle surface condition is determined. Specifically, the convexity threshold is usually set to the mean of positive deviation plus 2-3 times the standard deviation, and the concaveity threshold is set to the mean of negative deviation minus 2-3 times the standard deviation. This dynamic threshold setting method can adapt to the differences in the characteristics of different vehicle models and different surface materials, improving the adaptability of defect detection. Based on the calculated dynamic threshold, the height deviation map is segmented to distinguish between convex and concave areas on the vehicle surface. When the height deviation value of a point is greater than the convexity threshold, the point is marked as a convex area; when the height deviation value is less than the concaveness threshold, the point is marked as a concave area; and the area with deviation values ​​between the two thresholds is considered a normal surface area. This threshold-based segmentation method is simple and efficient, quickly identifying potential defect areas and generating a preliminary deformation region marker map. However, the preliminary marker map often contains some noise points and fragmented small regions, requiring further optimization.

[0085] Morphological processing is applied to the initial deformed area marker map to optimize the boundaries and coherence of defect areas. Morphological processing includes operations such as dilation, erosion, opening, and closing. Dilation expands the area and fills small gaps; erosion shrinks the area and eliminates fine noise; opening (erosion followed by dilation) smooths the contours and breaks narrow connections; closing (dilation followed by erosion) fills small holes and connects adjacent areas. By combining these basic operations, the initial deformed area marker map is processed, merging adjacent small areas, removing isolated noise, and enhancing regional coherence to obtain an optimized deformed area map. In the optimized deformed area map, defect area boundaries are smoother, the internal regions are more coherent, and small false detection areas are effectively removed.

[0086] Vehicle surfaces are typically curved, and this natural curvature can be misidentified as a defect. Therefore, curvature correction is needed to optimize the deformation region map based on the curvature distribution of the vehicle surface. Curvature information can be obtained from a vehicle model database or calculated by fitting a microscopic height map. When a detected deformation region is located on a high-curvature surface (such as a body corner or contour line), an additional correction coefficient is applied to adjust the deviation threshold, improving the defect judgment standard. Specifically, the magnitude of the correction coefficient is proportional to the surface curvature; the greater the curvature, the larger the correction coefficient, and the larger the allowable height deviation range. This curvature correction mechanism effectively eliminates misjudgments caused by the natural curvature of the vehicle surface, resulting in a more accurate curvature-corrected deformation region map. For each deformation region identified in the curvature-corrected deformation region map, its characteristic parameters are calculated to assess the severity of the defect. The main characteristic parameters include area (the number of pixels contained in the region), depth (the maximum height deviation value), and volume (the product of height deviation and area). Area reflects the size of the defect, depth reflects the severity of the defect, and volume comprehensively considers both the size and depth of the defect. When the volume parameters exceed a preset threshold, the area is marked as a critical defect that requires close monitoring. These calculated characteristic parameters form a deformation region feature table.

[0087] Based on the parameter values ​​in the deformation region feature table, the severity of the deformation regions is classified. The classification criteria combine multiple feature parameters. When a deformation region simultaneously meets both the conditions of large area (exceeding the area threshold) and deep depth (exceeding the depth threshold), it is classified as a severe defect; when only one condition is met, it is classified as a moderate defect; and when both conditions are close to but do not exceed the threshold, it is classified as a minor defect. After classification, the location information of the deformation regions is associated with the vehicle surface coordinate system to accurately mark the location and extent of each defect, obtaining a vehicle surface deformation region map, which serves as an important result of defect identification.

[0088] For example, the original microscopic height map obtained through parallax analysis showed some irregular fluctuations in the door area. Applying a 7×7 Gaussian filter to smooth the height map effectively reduced high-frequency fluctuations caused by sensor noise and lighting changes. Comparing it with the standard height model of a white SUV side door in the vehicle database, a height deviation map was calculated, revealing a noticeable concave area. Histogram analysis of the height deviation map showed that the deviation values ​​in most areas were within ±0.2mm, while the deviation value in the concave area reached -1.5mm, significantly exceeding the normal fluctuation range. Based on the histogram analysis results, a protrusion threshold of +0.7mm and a concave threshold of -0.6mm were calculated. The deviation map was segmented based on these thresholds, marking suspected defect areas. Applying the closing operation in morphological processing, several small gaps in the middle of the concave area were successfully connected, forming a complete defect contour. Since the concave area is located in the door plane area with a small curvature, the curvature correction coefficient is close to 1, requiring minimal adjustment. The calculated area of ​​the dented area was approximately 12 square centimeters, with a maximum depth of 1.5 mm. The volume index exceeded the threshold for defects on the SUV side door, so it was marked as a moderate defect requiring repair and was marked in yellow on the vehicle surface deformation area map, precisely located in the middle of the driver's side door.

[0089] In one specific embodiment, the process of executing step S104 may specifically include the following steps:

[0090] The multidimensional defect feature vector is input into a convolutional neural network with a spatial attention mechanism. When defect features exist on the vehicle surface, the corresponding feature channels are activated to generate a preliminary defect type response map.

[0091] Add vehicle region location encoding to the input layer of the convolutional neural network to enable the network to have location awareness. When a defect appears in the key visible area of ​​the vehicle, it is given higher weight, forming a location-weighted feature map.

[0092] The location-weighted feature map is used for feature extraction and transformation through three convolutional layers and two fully connected layers. The first convolutional layer uses a 3×3 convolutional kernel to extract local features, the second convolutional layer uses a 5×5 convolutional kernel to expand the receptive field, and the third convolutional layer uses a 1×1 convolutional kernel to integrate features, thus obtaining a multi-scale defect feature representation.

[0093] Based on multi-scale defect feature representation, defect type is determined by a defect classification head, and defects are divided into four basic types: scratch type, dent type, orange peel type and bubble type, generating a defect type distribution map;

[0094] For each defect in the defect type distribution map, a severity scoring function is applied to calculate the score based on its characteristic intensity and spatial distribution range. When the defect area is greater than a preset threshold, the severity coefficient is increased to generate a defect severity scoring matrix.

[0095] Align the defect severity scoring matrix with the three-dimensional coordinate system of the vehicle surface to construct a defect severity mapping that corresponds one-to-one with the actual vehicle surface.

[0096] An adaptive thresholding process is applied to the defect severity mapping. When the severity score exceeds a vehicle-specific threshold, the defect area is marked as needing repair, and a defect repair suggestion map is obtained.

[0097] The defect repair suggestion map is converted into an intuitive color-coded heatmap, using red to represent severe defects, yellow to represent moderate defects, green to represent minor defects, and blue to represent normal areas, outputting a heatmap of defect severity distribution.

[0098] Specifically, the multidimensional defect feature vector is input into a convolutional neural network with a spatial attention mechanism for processing. The multidimensional defect feature vector is a digital representation of the vehicle surface features extracted in the previous steps, containing feature information of various defects such as minor scratches, orange peel defects, and paint bubbles. The spatial attention mechanism is a technique that allows the neural network to focus on important regions in an image. By adding an attention module, the network can automatically learn the importance of different spatial locations. When defect features exist on the vehicle surface, the corresponding feature channels are activated, producing higher response values, thus generating a preliminary defect type response map. This response map is a multi-channel activation map, with each channel corresponding to a specific type of defect response intensity. To improve the network's sensitivity to defects in different areas of the vehicle, vehicle region location encoding is added to the input layer of the convolutional neural network. Location encoding is a technique that integrates spatial location information into the neural network. By assigning different location labels to different regions of the image, the network can perceive spatial location. In vehicle defect detection, defects in key visible areas such as the front bumper, hood, and doors have a greater impact on aesthetics and are therefore given higher weights. In practice, the vehicle surface is divided into multiple regions, and a location encoding vector is assigned to each region. These encodings are then fused with the feature map to form a location-weighted feature map. This process ensures that the network can give different levels of attention to defects based on their location, improving the targeting of detection.

[0099] The location-encoded feature maps require deep feature extraction via a multi-layer convolutional network. This network structure comprises three convolutional layers and two fully connected layers, each performing a different function. The first convolutional layer uses a small 3×3 kernel, focusing on extracting local texture features, such as the edges of fine scratches and texture variations. The second convolutional layer uses a larger 5×5 kernel to expand the receptive field, capturing a wider range of feature patterns, suitable for detecting large defects such as indentations. The third convolutional layer uses a 1×1 kernel, without changing the receptive field size, primarily for inter-channel information integration and dimensionality reduction, extracting cross-channel feature associations. This multi-scale convolutional structure design enables the network to simultaneously process defect features of different sizes and types, resulting in multi-scale defect feature representations.

[0100] Based on multi-scale defect feature representation, a defect classification head is used to determine the defect type. The defect classification head is the output layer of the network, typically composed of a fully connected layer and a softmax activation function, converting deep features into probability distributions for various defect types. In this scheme, defects are classified into four basic types: scratches, dents, orange peel, and bubbles. Scratch defects manifest as linear surface damage; dents manifest as localized depressions; orange peel defects manifest as uneven paint surfaces, similar to the grainy texture of orange peel; and bubble defects manifest as small bubbles or bulges under the paint surface. The classification head determines the type of features at each spatial location, outputting the probability that each location belongs to each defect type, generating a defect type distribution map. This distribution map is a multi-channel image of the same size as the original image, with each channel corresponding to a probability distribution of a defect type.

[0101] Assessing the severity of identified defects is a crucial step in determining remediation priorities. For each defect in the defect type distribution map, a severity scoring function is applied to calculate a score based on its characteristic intensity and spatial distribution. The severity scoring function comprehensively considers factors such as the defect's area, depth, location, and visual impact, and can be expressed as:

[0102] S def (x,y,t)=ω A ·A t (x,y)+ω D ·D t (x,y)+ω L ·L(x,y)+ω V ·V t (x,y)

[0103] Among them, S def (x,y,t) represents the severity score of the defect of type t at position (x,y); A t (x,y) represents the area factor of the defect, which is proportional to the size of the area covered by the defect; D t(x,y) represents the depth or intensity factor of the defect, reflecting the degree of prominence of the defect; L(x,y) represents the location weight factor, with higher weight given to critical visible areas; V t (x,y) represents the visual impact factor, considering the degree of influence of defects on visual aesthetics; ω A ω D ω L ω V These are the weighting coefficients for each factor, used to adjust the importance of different factors in the scoring. When the defect area exceeds a preset threshold A... threshold At that time, the system will further increase the severity score:

[0104]

[0105] Here, γ is the area over-limit gain coefficient, which controls the magnitude of the severity increase when the area exceeds a threshold. In this way, the system generates a defect severity score matrix, accurately quantifying the severity of each defect.

[0106] Aligning the defect severity rating matrix with the vehicle surface's three-dimensional coordinate system is a crucial step in mapping two-dimensional image analysis results to the actual vehicle surface. This process requires transforming the defect location and severity information in the two-dimensional image space into the three-dimensional vehicle surface coordinate system, constructing a one-to-one defect severity mapping corresponding to the actual vehicle surface. In practice, using the vehicle's three-dimensional model data obtained in the previous steps, projection transformation is used to map two-dimensional image points to three-dimensional surface points, ensuring that each defect can be accurately located at its actual position on the vehicle surface.

[0107] An adaptive thresholding process is applied to the defect severity mapping to distinguish defect areas requiring repair. This adaptive threshold is dynamically set based on vehicle characteristics, customer requirements, and quality standards. When the severity score of an area exceeds a vehicle-specific threshold, that area is marked as a defect requiring repair. Different thresholds can be set for different vehicle models and different parts of the vehicle; for example, the threshold for high-end models is typically lower, and the threshold for more visible areas is also lower. This adaptive thresholding process generates a defect repair suggestion map, clearly indicating the areas requiring repair and their priority.

[0108] The defect repair suggestion diagram is converted into an intuitive color-coded heatmap, allowing repair personnel to quickly understand the distribution and severity of defects. The color coding scheme uses red to indicate severe defects requiring immediate repair; yellow to indicate moderate defects requiring repair; green to indicate minor defects that can be considered for repair; and blue to indicate normal areas requiring no action. This intuitive color coding allows non-professionals to easily understand the inspection results, and the output defect severity distribution heatmap becomes an important reference for vehicle repair and quality control.

[0109] For example, a black sedan undergoes quality inspection before leaving the factory, acquiring multi-dimensional defect feature vectors from its surface. These feature vectors are input into a spatial attention convolutional network, which immediately activates feature channels corresponding to scratches and dents, indicating the presence of these two types of defects on the vehicle's surface. The network's positional encoding module assigns higher attention to the front bumper and right-side door, as these are high-visibility areas. After processing by a three-layer convolutional network, the system detects a fine scratch approximately 10cm long in the right-side door area and a small dent on the left side of the front bumper. Applying a severity scoring function to these defects, the scratch is calculated to have a severity of 6.5 points (out of 10), and the dent 8.2 points. The system precisely maps this defect information onto the vehicle's 3D model and uses an adaptive threshold (7 points for this model) to determine that the dent requires immediate repair, while the scratch requires observation but not immediate repair. The generated heatmap marks the dented area of ​​the front bumper in red, the scratched area of ​​the door in yellow, and the remaining areas in blue to indicate normal conditions. This heat map directly guided the repair workers' work, prioritizing the handling of the dented front bumper and ensuring the quality standards were met before vehicle delivery.

[0110] In one specific embodiment, the process of aligning the defect severity rating matrix with the three-dimensional coordinate system of the vehicle surface may specifically include the following steps:

[0111] Based on the vehicle model outline features extracted from the original vehicle surface image data, a three-dimensional mesh model of the vehicle surface is established to form a reference coordinate system for the vehicle surface.

[0112] The two-dimensional image coordinates in the defect severity scoring matrix are transformed to the vehicle surface reference coordinate system. The correspondence between the two-dimensional scoring data and the three-dimensional surface is established through projection transformation, and a preliminary three-dimensional defect mapping is generated.

[0113] Spatial smoothing is applied to the preliminary three-dimensional defect mapping to eliminate discontinuous regions generated during coordinate transformation and form a continuous three-dimensional defect distribution.

[0114] The density of the continuous three-dimensional defect distribution is corrected based on the curvature distribution of the vehicle surface. When the defect is located in a high curvature area, the severity score is compensated and adjusted to avoid scoring deviation caused by surface deformation, thus obtaining the curvature-corrected defect distribution.

[0115] The curvature correction defect distribution is registered with the standard vehicle 3D model, and a precise spatial correspondence is established through feature point matching to construct a standardized defect distribution map.

[0116] The standardized defect distribution map is divided into four main areas according to the vehicle's structural components: the hood area, the roof area, the side door area, and the bumper area. This forms a one-to-one mapping of defect severity to the actual vehicle surface.

[0117] Specifically, a 3D mesh model of the vehicle surface is established based on the vehicle model contour features extracted from the original vehicle surface image data. This process uses edge detection and contour extraction techniques to extract key contour lines of the vehicle from multi-angle images, including the main edge lines, feature lines, and contour lines of the vehicle body. The extracted 2D contours are reconstructed into a 3D point cloud using triangulation principles, and then these discrete points are expanded into a continuous mesh model through spatial interpolation. The mesh model is a digital representation of the vehicle surface shape, composed of a large number of triangular or quadrilateral meshes, with each mesh point containing 3D spatial coordinate information. A vehicle surface reference coordinate system is established based on this mesh model, typically with the vehicle's center as the origin, the vehicle's forward direction as the X-axis, the upward direction as the Z-axis, and the lateral direction as the Y-axis, forming a right-handed coordinate system. The 2D image coordinates in the defect severity scoring matrix are transformed to the vehicle surface reference coordinate system. The defect severity scoring matrix is ​​the 2D data generated in the previous steps, recording the defect type and severity corresponding to each pixel in the image. To map these planar image data onto the 3D vehicle surface, a projection transformation is required. The specific implementation employs a ray casting method, which involves emitting virtual rays from the camera position to each defect point on the image plane, calculating the intersection points of the rays with the 3D mesh model, and assigning the defect information to these intersection points. This mapping process requires knowledge of the camera's intrinsic and extrinsic parameters. Intrinsic parameters include focal length and principal point position, while extrinsic parameters include the camera's position and orientation in the vehicle coordinate system. Through this projection transformation, a correspondence between the 2D scoring data and the 3D surface is established, generating a preliminary 3D defect mapping. However, this initial mapping may contain discontinuous or overlapping areas due to camera viewpoint limitations and projection errors.

[0118] Spatial smoothing is applied to the initial 3D defect mapping to eliminate discontinuous regions generated during coordinate transformation. Spatial smoothing employs 3D Gaussian filtering or distance-weighted averaging, weighting the defect values ​​around each 3D grid point with the weight inversely proportional to the distance. This process fills in the gaps in defect data between different camera viewpoints, smooths boundary transitions, and forms a continuous 3D defect distribution. The smoothed defect distribution exhibits continuously varying severity values ​​across the entire vehicle surface, without abrupt jumps, better reflecting the physical distribution characteristics of actual defects. Density correction of the continuous 3D defect distribution based on the curvature distribution of the vehicle surface is a crucial step in addressing the effects of surface deformation. The vehicle surface has planar areas (such as the roof and the center of the doors) and high-curvature areas (such as wheel arches and body corners). Image projection of high-curvature areas is distorted, causing the defect area to appear inconsistent with the actual 3D surface in the 2D image. Therefore, correction based on surface curvature is necessary. Curvature calculation is based on a 3D mesh model, calculating the principal curvature and Gaussian curvature for each grid point to form a curvature distribution map of the vehicle surface. When a defect is located in a high curvature region, the severity score is adjusted to compensate for it. The adjustment coefficient is proportional to the curvature value; the greater the curvature, the larger the compensation coefficient. This correction eliminates the scoring bias caused by surface deformation, making the curvature-corrected defect distribution closer to the actual situation of the defect in three-dimensional space.

[0119] Registering the curvature correction defect distribution with a standard vehicle 3D model is a crucial step in ensuring accurate defect localization. The standard vehicle 3D model contains vehicle design data, including precise geometric information and component divisions. The registration process uses an iterative nearest-point algorithm, which iteratively optimizes the transformation parameters to minimize the distance between corresponding point sets in the two 3D models. Specifically, it selects a series of feature points on the vehicle surface (such as corners, edges, and iconic structures), calculates the correspondence between these points in the two models, and then solves for the optimal rigid body transformation parameters (including translation and rotation) to minimize the total distance between corresponding point pairs. This feature point matching establishes a precise spatial correspondence, constructs a standardized defect distribution map, and ensures that defect information accurately corresponds to the correct location in the standard vehicle model. The standardized defect distribution map is then partitioned according to vehicle structural components to achieve targeted defect management. The vehicle structural component partitioning is based on component definitions in the standard 3D model, dividing the entire vehicle surface into four main areas: the hood area, the roof area, the side door area, and the bumper area. This partitioning method conforms to the conventional partitioning methods used in automobile manufacturing and repair. During the partitioning process, the region to which each grid point belongs is determined based on the topology and component boundaries of the 3D model. Then, the defect severity information is reorganized by region to form a defect severity mapping that corresponds one-to-one with the actual vehicle surface. This mapping visually displays the defect distribution and severity in each region.

[0120] The above describes the vehicle surface defect recognition method based on artificial intelligence in the embodiments of this application. The following describes the vehicle surface defect recognition system based on artificial intelligence in the embodiments of this application. Please refer to [link / reference]. Figure 2 One embodiment of the vehicle surface defect recognition system based on artificial intelligence in this application includes:

[0121] The acquisition module is used to acquire images of the vehicle surface through a polarization filter multi-angle imaging system, eliminate glare interference from metallic paint, and obtain the original image data of the vehicle surface.

[0122] The processing module is used to apply HSV color space conversion and texture equalization processing to the original image data of the vehicle surface, and to adaptively process the different colored paint areas to obtain a standardized vehicle surface image.

[0123] The extraction module is used to construct three-dimensional micro-deformation features of the vehicle surface based on the standardized vehicle surface image and combine parallax analysis, extract micro-scratches, orange peel defects and paint bubble features, and generate multi-dimensional defect feature vectors.

[0124] The identification module is used to use the multidimensional defect feature vector as input, and to perform hierarchical identification of vehicle surface defects through a convolutional neural network with position awareness, and output a heat map of defect severity distribution.

[0125] Through the collaborative efforts of the aforementioned components, a polarized filter multi-angle imaging system is used to acquire images of the vehicle surface, effectively eliminating glare interference from metallic paint and resolving the issue of missed detections caused by light reflection in traditional visual inspection, ensuring high-quality raw image data acquisition. HSV color space conversion and texture equalization techniques are applied to adaptively process different paint colors, overcoming the limitations of traditional detection methods in adapting to various vehicle body colors, particularly achieving significant results on dark and highly reflective paints. By combining parallax analysis to construct three-dimensional micro-deformation features of the vehicle surface, accurate extraction of minute scratches, orange peel defects, and paint bubble features is achieved. Compared to two-dimensional analysis methods, three-dimensional feature extraction can more comprehensively capture minute surface changes, significantly improving the defect detection rate. The generated multi-dimensional defect feature vector, by fusing different types of defect information, provides rich feature representations for subsequent deep learning analysis. A position-aware convolutional neural network is used for hierarchical identification of vehicle surface defects, deeply integrating artificial intelligence algorithms with knowledge in the field of vehicle surface defect detection. This not only achieves accurate identification of defect types but also allows for differentiated processing based on the importance of defect locations, greatly improving the practicality of the detection. The output heatmap of defect severity distribution visually displays the distribution and severity of defects, providing visual support for maintenance decisions. The overall solution integrates multidisciplinary technologies such as optical imaging, image processing, 3D reconstruction, and deep learning. Through artificial intelligence algorithms' ability to automatically learn and extract vehicle surface defect features, it effectively overcomes the subjectivity of traditional methods that rely on human experience, achieving standardization and automation of defect detection. The spatial attention mechanism and positional coding design in the solution fully consider the domain characteristics of defect detection, enabling the algorithm to focus on key visible areas of the vehicle like a professional inspector and provide reasonable assessments based on defect characteristics, significantly improving the practicality and professionalism of the solution.

[0126] above Figure 2 The AI-based vehicle surface defect recognition system in this embodiment of the invention will be described in detail from the perspective of modular functional entities. The AI-based vehicle surface defect recognition device in this embodiment of the invention will be described in detail from the perspective of hardware processing.

[0127] Figure 3This is a schematic diagram of the structure of an AI-based vehicle surface defect recognition device 300 provided in an embodiment of the present invention. The AI-based vehicle surface defect recognition device 300 can vary significantly due to different configurations or performance. It may include one or more central processing units (CPUs) 310 (e.g., one or more processors) and a memory 320, and one or more storage media 330 (e.g., one or more mass storage devices) for storing application programs 333 or data 332. The memory 320 and storage media 330 can be temporary or persistent storage. The program stored in the storage media 330 may include one or more modules (not shown in the diagram), each module including a series of instruction operations on the AI-based vehicle surface defect recognition device 300. Furthermore, the processor 310 may be configured to communicate with the storage media 330 and execute the series of instruction operations in the storage media 330 on the AI-based vehicle surface defect recognition device 300 to implement the steps of the aforementioned AI-based vehicle surface defect recognition method.

[0128] The AI-based vehicle surface defect recognition device 300 may also include one or more power supplies 340, one or more wired or wireless network interfaces 350, one or more input / output interfaces 360, and / or one or more operating systems 331, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will understand that... Figure 3 The illustrated structure of the AI-based vehicle surface defect recognition device does not constitute a limitation on the AI-based vehicle surface defect recognition device provided by this invention. It may include more or fewer components than illustrated, or combine certain components, or have different component arrangements.

[0129] The present invention also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein the computer-readable storage medium stores instructions that, when the instructions are executed on a computer, cause the computer to perform the steps of the artificial intelligence-based vehicle surface defect identification method.

[0130] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0131] If the integrated unit 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 the present invention, in essence, or the part that contributes to the prior art, or all or 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 an artificial intelligence-based vehicle surface defect identification device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present 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.

[0132] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for identifying surface defects of a vehicle based on artificial intelligence, the method comprising: The method includes: The vehicle surface is captured by a polarization-filtered multi-angle imaging system to eliminate glare interference from metallic paint and obtain the original image data of the vehicle surface. Based on the original image data of the vehicle surface, HSV color space conversion and texture equalization are applied to adaptively process different color paint areas to obtain a standardized vehicle surface image. Based on the standardized vehicle surface image, a three-dimensional micro-deformation feature of the vehicle surface is constructed by combining parallax analysis, and features of micro scratches, orange peel defects and paint bubbles are extracted to generate a multi-dimensional defect feature vector. Using the multidimensional defect feature vector as input, a convolutional neural network with position awareness is used to hierarchically identify vehicle surface defects and output a heatmap of defect severity distribution. This includes: inputting the multidimensional defect feature vector into a convolutional neural network with spatial attention; activating the corresponding feature channel when defect features are present on the vehicle surface to generate a preliminary defect type response map; adding vehicle region location encoding to the input layer of the convolutional neural network to enable position awareness, assigning higher weights to defects appearing in key visible areas of the vehicle, forming a position-weighted feature map; extracting and transforming features from the position-weighted feature map using three convolutional layers and two fully connected layers, where the first convolutional layer uses a 3×3 convolutional kernel to extract local features, the second convolutional layer uses a 5×5 convolutional kernel to expand the receptive field, and the third convolutional layer uses a 1×1 convolutional kernel for feature integration to obtain a multi-scale defect feature representation; and then, based on this multi-scale defect feature representation... The system classifies defects into four basic types: scratches, dents, orange peel, and bubbles, using a defect classification head to determine the defect type. A defect type distribution map is generated. For each defect in the distribution map, a severity scoring function is applied based on its characteristic intensity and spatial distribution range. When the defect area exceeds a preset threshold, the severity coefficient is increased, generating a defect severity scoring matrix. This matrix is ​​aligned with the vehicle's three-dimensional coordinate system to construct a one-to-one defect severity mapping corresponding to the actual vehicle surface. Adaptive threshold processing is applied to this severity mapping; when the severity score exceeds the threshold corresponding to the vehicle model, it is marked as a defect area requiring repair, resulting in a defect repair suggestion map. This map is then converted into an intuitive color-coded heatmap, using red for severe defects, yellow for moderate defects, green for minor defects, and blue for normal areas, outputting a defect severity distribution heatmap. 2.The AI-based vehicle surface defect recognition method of claim 1, wherein The process of acquiring images of the vehicle surface using a polarization-filtered multi-angle imaging system to eliminate glare interference from metallic paint and obtain original image data of the vehicle surface includes: The system uses an array of 12 high-precision industrial cameras arranged in a ring and two wide-angle cameras at the top to perform a 360° scan of the vehicle surface, capturing a set of original images of each surface of the vehicle. The matching degree of the original image group is calculated with the preset vehicle model outline template to determine the type of the currently scanned vehicle, and the corresponding imaging parameter configuration is selected according to the determination result; Based on the current ambient light intensity sensor data, the optimal polarization filter angle is calculated, and an adjustable polarization filter of 45°-135° is applied to the metallic paint area to eliminate surface specular reflection points. A laser depth sensor was used to measure the distance between the camera and 24 key points on the vehicle surface in real time, constructing a vehicle surface depth map. The camera focal length was then adjusted based on the vehicle surface depth map to obtain surface detail images with a resolution of 0.1mm. Based on the reflectivity data of the vehicle surface material, the collection area was divided into high reflectivity, medium reflectivity and low reflectivity areas, and different exposure parameters were applied to each area to balance the imaging effect. The vehicle's A-pillar, hood, roof, and side doors are scanned at 200% resolution, and features are fused with regular scan images to form a multi-scale image pyramid. Image data collected from different angles are used to calculate spatial location through a feature point matching algorithm to construct a vehicle surface image mapping accurate to a grid density of 1 cm². The potential abnormal regions detected in the vehicle surface image mapping are repeatedly acquired three times and subjected to pixel-level comparison analysis to remove random noise and the influence of illumination changes during the acquisition process, resulting in the original vehicle surface image dataset. 3.The AI-based vehicle surface defect recognition method of claim 1, wherein The process involves applying HSV color space conversion and texture equalization to the original vehicle surface image data, adaptively processing different colored paint areas to obtain a standardized vehicle surface image, including: Color analysis is performed on the original image data of the vehicle surface to identify the main and secondary color areas of the vehicle body in the image and construct a color distribution map of the vehicle surface; the original image data of the vehicle surface is converted from the RGB color space to the HSV color space, and the three channels of hue, saturation and brightness are separated to improve the independent processing capability of color and brightness; Histogram processing is performed on the luminance channel in the HSV color space to enhance the detail information in the dark areas of the image, forming an enhanced luminance channel. Based on the vehicle surface color distribution map, differentiated saturation adjustment parameters are set for different colored paint areas, and targeted processing is performed on red, black and metallic paint areas to construct a color correction matrix. The enhanced luminance channel is combined with the saturation parameter in the color correction matrix to reconstruct the HSV image and eliminate the interference of different paint colors on defect identification. Texture features of the vehicle surface are extracted by local region processing, texture complexity map is calculated, and texture equalization is performed on high texture areas to suppress normal texture fluctuations. The processed image is segmented to identify shadow and highlight areas, and the impact of uneven lighting on image quality is eliminated through compensation methods. The processed HSV image is converted back to the RGB color space, and smoothing is applied to eliminate noise generated during processing, resulting in a standardized vehicle surface image. 4.The AI-based vehicle surface defect recognition method of claim 1, wherein The process involves constructing three-dimensional microscopic deformation features of the vehicle surface based on the standardized vehicle surface image, combined with parallax analysis, extracting features such as micro-scratches, orange peel defects, and paint bubbles, and generating a multidimensional defect feature vector, including: Parallax calculation is performed on adjacent multi-angle image pairs in a standardized vehicle surface image to obtain the depth information of the vehicle surface, and a micro height map of the vehicle surface is constructed. Based on the depth change gradient in the micro height map, the edge and contour regions of the vehicle surface are identified to form an edge feature map. The microscopic height map is segmented using a height threshold to extract the protruding and recessed areas on the vehicle surface, thus obtaining a deformation area map of the vehicle surface. Linear features are extracted from the deformation region map to determine the length, width, and direction parameters of the scratches, and a scratch feature matrix is ​​constructed. Based on the local fluctuations of the micro height map, the surface roughness distribution is calculated, orange peel-like defect regions are identified, and a texture feature map is generated. Shape analysis is performed on the circular protrusions and depressions in the microscopic height map to extract the size and distribution characteristics of paint bubbles and form a bubble distribution map. The scratch feature matrix, the texture feature map, and the bubble distribution map are combined to construct a hierarchical structure of vehicle surface defects. The scratch features, orange peel-like defect features, and bubble features in the hierarchical structure of defects are fused according to their importance weights to generate a multidimensional defect feature vector. 5.The AI-based vehicle surface defect recognition method of claim 4, wherein, The process of applying a height threshold segmentation method to the microscopic height map to extract protrusions and depressions on the vehicle surface and obtain a deformation region map of the vehicle surface includes: The microscopic height map is smoothed to eliminate random noise during the acquisition and construction process, resulting in a denoised microscopic height map; Based on the standard surface height reference value in the vehicle model database, the height difference between the noise reduction micro height map and the standard surface is calculated, and a height deviation map is generated. Histogram analysis is performed on the height deviation map to determine the statistical distribution of positive and negative deviations, and the dynamic thresholds for bulges and depressions are calculated. The height deviation map is segmented based on the dynamic threshold. When the height deviation value is greater than the protrusion threshold, the area is marked as a protrusion area, and when the height deviation value is less than the depression threshold, the area is marked as a depression area, thus forming a preliminary deformation area marking map. Morphological processing is applied to the preliminary deformation region marker map to merge adjacent small regions, remove isolated noise points, and enhance regional coherence, resulting in an optimized deformation region map. Based on the curvature distribution of the vehicle surface, the optimized deformation region map is subjected to curvature correction. When the region is located on a high curvature surface, an additional correction coefficient is applied to eliminate misjudgments caused by the natural curvature of the vehicle surface, thus obtaining a curvature-corrected deformation region map. For each deformation region in the curvature correction deformation region map, calculate the area, depth and volume characteristic parameters. When the volume parameter exceeds a preset threshold, mark the region as a critical defect and construct a deformation region feature table. Based on the parameter values ​​in the deformation region feature table, the deformation region is classified according to its severity. When the deformation region meets both the conditions of large area and deep depth, it is judged as a serious defect. The deformation region map of the vehicle surface is obtained by associating the location information with the vehicle surface coordinate system. 6.The AI-based vehicle surface defect recognition method of claim 1, wherein Aligning the defect severity scoring matrix with the three-dimensional coordinate system of the vehicle surface to construct a defect severity mapping that corresponds one-to-one with the actual vehicle surface includes: Based on the vehicle model outline features extracted from the original vehicle surface image data, a three-dimensional mesh model of the vehicle surface is established to form a reference coordinate system for the vehicle surface. The two-dimensional image coordinates in the defect severity scoring matrix are transformed to the vehicle surface reference coordinate system. The correspondence between the two-dimensional scoring data and the three-dimensional surface is established through projection transformation to generate a preliminary three-dimensional defect mapping. Spatial smoothing is applied to the preliminary three-dimensional defect mapping to eliminate discontinuous regions generated during coordinate transformation and form a continuous three-dimensional defect distribution; The density of the continuous three-dimensional defect distribution is corrected based on the curvature distribution of the vehicle surface. When the defect is located in a high curvature region, the severity score is compensated and adjusted to avoid scoring deviation caused by surface deformation, thus obtaining a curvature-corrected defect distribution. The curvature correction defect distribution is registered with a standard vehicle 3D model, and a precise spatial correspondence is established through feature point matching to construct a standardized defect distribution map. The standardized defect distribution map is divided into four main areas according to the vehicle structural components: the hood area, the roof area, the side door area, and the bumper area. This forms a defect severity mapping that corresponds one-to-one with the actual vehicle surface.

7. An artificial intelligence-based vehicle surface defect recognition system, characterized by, For implementing the AI-based vehicle surface defect recognition method as described in any one of claims 1-6, the AI-based vehicle surface defect recognition system comprises: The acquisition module is used to acquire images of the vehicle surface through a polarization filter multi-angle imaging system, eliminate glare interference from metallic paint, and obtain the original image data of the vehicle surface. The processing module is used to apply HSV color space conversion and texture equalization processing to adaptively process different colored paint areas based on the original image data of the vehicle surface, so as to obtain a standardized vehicle surface image. The extraction module is used to construct three-dimensional micro-deformation features of the vehicle surface based on the standardized vehicle surface image and combine parallax analysis, extract micro-scratches, orange peel defects and paint bubble features, and generate multi-dimensional defect feature vectors. The identification module is used to use the multidimensional defect feature vector as input, and to perform hierarchical identification of vehicle surface defects through a convolutional neural network with position awareness, and output a heat map of defect severity distribution. 8.A vehicle surface defect recognition device based on artificial intelligence, characterized by, The system includes a memory and a processor, the memory storing a computer program that can run on the processor, and the processor executing the computer program to implement the artificial intelligence-based vehicle surface defect identification method according to any one of claims 1 to 6.

9. A computer-readable storage medium having stored thereon a computer program, characterized in that, When the computer program is run by the processor, it causes the processor to execute the artificial intelligence-based vehicle surface defect identification method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • New energy automobile part surface defect testing method based on computer vision

    CN119091186A

  • Circuit board welding fault identification method and system based on machine vision

    CN119648679A

  • Dynamic defect monitoring and early warning method and system for machine vision rapid image recognition

    CN119784758A