Color calibration method, device, processor and electronic equipment for appearance parts in vehicle
By combining the segmentation model and the color calibration module, the problem of low accuracy in color calibration of vehicle exterior parts is solved, and high-precision color calibration and consistency analysis are achieved, especially in the case of high reflectivity and adjacent parts of the same color.
Patent Information
- Application Number
- CN202611298642.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-25
- Publication Date
- 2026-11-24
Smart Images

Figure CN123160686A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of vehicle technology, and more specifically, to a method, apparatus, processor, and electronic device for color calibration of exterior components in a vehicle. Background Technology
[0002] Currently, for adjacent exterior components of the same color on a vehicle (such as a door and fender when closed), semantic segmentation networks in related technologies rely excessively on color and texture differences for color calibration. However, due to the lack of boundary features, the segmentation is severely stuck, making it impossible to independently separate the exterior components and thus impossible to perform accurate color calibration of the exterior components subsequently.
[0003] Furthermore, for highly reflective automotive paint materials, the relevant technologies cannot effectively distinguish between the paint's intrinsic color and ambient reflected light, leading to distorted color feature extraction and a very high misjudgment rate. Therefore, the technical problem of low accuracy in color calibration of exterior components in vehicles still exists.
[0004] There is currently no good solution to the above problems. Summary of the Invention
[0005] This application provides a method, apparatus, processor, and electronic device for color calibration of exterior components in a vehicle, to at least solve the technical problem of low accuracy in color calibration of exterior components in a vehicle.
[0006] According to one aspect of the embodiments of this application, a color calibration method for exterior components in a vehicle is provided, comprising: calling a segmentation model to segment image data of the vehicle to obtain a segmented image, wherein the segmentation model is obtained by training a neural network model using image data samples and annotation information samples, the image data is used to represent images of exterior components of the vehicle, the annotation information samples are used to represent different label samples of the exterior components, and the segmented image satisfies the spatial adjacency relationship of the exterior components; based on the segmented image, cropping the component regions of the exterior components to obtain cropped component regions; and calibrating the color of the segmented image based on the cropped component regions to obtain a calibration result.
[0007] Furthermore, the segmentation model is invoked to segment the vehicle image data to obtain a segmented image, including: extracting features from the image data to obtain a multi-level visual feature representation; and invoking the segmentation model to segment the visual feature representation to obtain a segmented image.
[0008] Furthermore, the segmentation model includes a decoupling module, which comprises a first branch and a second branch. The decoupling module calls the segmentation model to perform segmentation processing on the visual feature representation to obtain a segmented image. This includes: calling the first branch to extract edge information with frequencies higher than a frequency threshold, where the first branch enhances the responsiveness to edge information; calling the second branch to extract region semantic information from the visual feature representation, where the second branch is used to construct multi-scale semantic information; and determining the segmented image based on the edge information and the region semantic information.
[0009] Furthermore, the first branch uses a gated convolutional structure to extract visual feature representations, and the second branch uses a pyramid pooling structure to extract visual feature representations. The gated convolutional structure is used to extract boundary information between appearance components, and the pyramid pooling structure is used to perform multi-scale pooling operations on the features.
[0010] Furthermore, based on edge information and regional semantic information, the segmented image is determined, including: using edge information as a constraint to correct the boundary of the semantic region where the regional semantic information is located, and obtaining the fusion result of edge information and regional semantic information; and using the fusion result as the segmented image.
[0011] Furthermore, based on the cropped component region, the color of the segmented image is calibrated to obtain the calibration result, including: inputting the cropped component region into the color calibration module to extract the color feature representation of the component region; and calibrating the color of the segmented image based on the color feature representation to obtain the calibration result.
[0012] Furthermore, in the process of inputting the cropped component region into the color calibration module and extracting the color feature representation of the component region, the method also includes: determining the highlight region of the segmented image in the cropped component region; and performing masking processing on the color feature representation of the highlight region to obtain the masked color feature representation.
[0013] Furthermore, based on the color feature representation, the color of the segmented image is calibrated to obtain the calibration result, including: matching the masked color feature representation with a color dictionary set to obtain the matching result, wherein the color dictionary set consists of a discrete set of color vectors; and calibrating the color of the segmented image based on the matching result to obtain the calibration result.
[0014] Furthermore, based on the matching results, the colors of the segmented image are calibrated to obtain calibration results, including: based on the matching results, quantizing the color feature representation after masking to obtain a color feature vector; and based on the color feature vector, calibrating the colors of the segmented image to obtain calibration results.
[0015] Furthermore, based on the color feature vector, the colors of the segmented image are calibrated to obtain calibration results, including: based on the color feature vector, performing a color consistency analysis between different appearance components to obtain analysis results; and based on the analysis results, determining the calibration results.
[0016] Furthermore, based on color feature vectors, a consistency analysis of colors among different appearance components is performed to obtain analysis results, including: determining the similarity between multiple color feature vectors; and determining the relationship between the similarity and the similarity threshold as the analysis result.
[0017] Furthermore, based on the analysis results, the calibration results are determined, including: in response to the similarity between multiple color feature vectors being greater than a similarity threshold, the calibration result is determined to be that the colors of adjacent appearance components are consistent; in response to the similarity being less than or equal to a similarity threshold, the calibration result is determined to be that the colors of adjacent appearance components are inconsistent.
[0018] Furthermore, before calling the segmentation model to segment the vehicle image data and obtain the segmented image, the method also includes: training the neural network model using a loss function to obtain the segmentation model, wherein the loss function is used to minimize the distance difference between adjacent appearance parts in the feature space.
[0019] Furthermore, the neural network model is trained using the loss function to obtain a segmentation model, including: constructing a loss function based on the adjacency matrix and visual feature representation of different appearance parts, wherein the visual features are obtained by feature extraction from image data; and training the neural network model using the loss function to obtain a segmentation model.
[0020] Furthermore, the method also includes: determining annotation information for the image data, wherein the annotation information includes semantic labels, edge labels, and color labels, the semantic labels being used to represent the category region of the appearance component, the edge labels being used to represent the physical seam boundary between appearance components, and the color labels being used to indicate whether there is a color difference between adjacent appearance components or related appearance components.
[0021] Furthermore, the annotation information of the image data is determined, including: semantic segmentation and annotation of the appearance components in the image data to obtain semantic labels.
[0022] Furthermore, the annotation information of the image data is determined, including: boundary annotation of the physical seams between adjacent appearance components in the image data to obtain edge labels.
[0023] Furthermore, the annotation information of the image data is determined, including: annotating the color consistency between adjacent appearance components in the image data to obtain color labels.
[0024] According to another aspect of the embodiments of this application, a color calibration device for exterior components in a vehicle is also provided, comprising: a segmentation unit, configured to invoke a segmentation model to segment image data of the vehicle to obtain a segmented image, wherein the segmentation model is obtained by training a neural network model using image data samples and annotation information samples, the image data being used to represent images of exterior components of the vehicle, the annotation information samples being used to represent different label samples of the exterior components, and the segmented image satisfying the spatial adjacency relationship of the exterior components; a cropping unit, configured to crop the component regions of the exterior components based on the segmented image to obtain cropped component regions; and a calibration unit, configured to calibrate the color of the segmented image based on the cropped component regions to obtain a calibration result.
[0025] According to another aspect of the embodiments of this application, a vehicle is also provided, including: a memory storing an executable program; and a processor for running the program, wherein the program executes the methods in various embodiments of this application when it runs.
[0026] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored executable program, wherein, when the executable program is running, it controls the device where the computer-readable storage medium is located to perform the methods of various embodiments of this application.
[0027] According to another aspect of the embodiments of this application, a computer program product is also provided, including a computer program that, when executed by a processor, implements the methods of various embodiments of this application.
[0028] According to another aspect of the embodiments of this application, a computer program product is also provided, including a non-volatile computer-readable storage medium storing a computer program that, when executed by a processor, implements the methods in various embodiments of this application.
[0029] According to another aspect of the embodiments of this application, a computer program is also provided, which, when executed by a processor, implements the methods of the various embodiments of this application.
[0030] In this embodiment, a trained segmentation model is used to segment vehicle image data, generating segmented images that satisfy spatial adjacency relationships. Based on these segmented images, component regions of exterior parts can be cropped, and independent segmented images corresponding to these component regions can be extracted. Since vehicle paint is highly reflective and easily affected by ambient light, color calibration of the segmented images based on the cropped component regions can obtain true colors free from the influence of ambient light. This solves the technical problem of low accuracy in color calibration of exterior parts in vehicles, achieving the technical effect of improving the accuracy of color calibration for exterior parts in vehicles. Attached Figure Description
[0031] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0032] Figure 1 This is a flowchart of a color calibration method for exterior components in a vehicle according to an embodiment of this application;
[0033] Figure 2 This is a flowchart of a method for segmenting and color calibration of vehicle exterior components based on topological edge decoupling and intrinsic colorimetric dictionary according to an embodiment of this application;
[0034] Figure 3 This is a schematic diagram of a training process and network structure according to an embodiment of this application;
[0035] Figure 4 This is a flowchart of a specific method for segmenting and color calibration of vehicle exterior components based on topological edge decoupling and intrinsic colorimetric dictionary according to an embodiment of this application;
[0036] Figure 5 This is a schematic diagram of a color calibration device for exterior components in a vehicle according to an embodiment of this application;
[0037] Figure 6 This is a schematic diagram of an electronic device according to an embodiment of this application. Detailed Implementation
[0038] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0039] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application 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 of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises 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 apparatus.
[0040] According to an embodiment of this application, an embodiment of a color calibration method for exterior components in a vehicle is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0041] This embodiment provides a method for color calibration of exterior components in a vehicle. Figure 1 This is a flowchart of a color calibration method for exterior components in a vehicle according to an embodiment of this application, such as... Figure 1 As shown, the process includes the following steps.
[0042] Step S102: Call the segmentation model to segment the vehicle image data and obtain a segmented image.
[0043] In the technical solution provided in step S102 of this application, the segmentation model is obtained by training a neural network model using image data samples and annotation information samples. The image data is used to represent images of the exterior parts of the vehicle, and the annotation information samples can be used to represent different label samples of the exterior parts. The segmented image satisfies the spatial adjacency relationship of the exterior parts.
[0044] In this embodiment, a segmentation model can be used to accurately separate individual component regions from image data, thereby obtaining a segmented image. Here, exterior components can be simply referred to as components. Optionally, the aforementioned annotation information samples may include not only semantic labels (for labeling areas of vehicle components such as the front bumper, doors, and fenders), but also edge labels (for labeling the physical seam boundaries between components) and color labels (for labeling whether there are color differences between adjacent or related exterior components). This is merely an illustrative example and no specific limitations are imposed here.
[0045] Optionally, during the inference phase of the segmentation model, when the model is invoked to segment the input image data, a decoupling module can be used internally to segment the input image data. Specifically, the segmentation model extracts edge information (e.g., high-frequency edge information) from the image data through a first branch (e.g., the edge flow branch) to accurately capture subtle physical seams between multiple components; simultaneously, it extracts multi-scale regional semantic information (e.g., contextual semantic information) through a second branch (e.g., the semantic flow branch) to understand the overall regional structure of the components. Subsequently, the segmentation model uses the edge information as a constraint to guide the semantic region boundary correction and introduces topological prior constraints (e.g., the adjacency matrix between components) to ensure that the segmented image conforms to the actual physical connection logic of the appearance components. This mechanism effectively solves the problem of traditional semantic segmentation easily sticking together and failing to segment when processing adjacent appearance components of the same color (e.g., a car door and fender in a closed state, both of the same color and with extremely narrow gaps).
[0046] Optionally, after the above processing, the final output segmented image (also called the segmentation result) is not just a pixel-level mask image, but also satisfies the spatial adjacency relationships of the exterior components. This means that the segmented image is topologically sound. For example, the door segmentation region and the fender segmentation region are spatially adjacent and do not overlap, consistent with the actual vehicle structure. This structurally consistent segmentation result provides a reliable regional basis for subsequent precise color cropping and analysis of each individual component.
[0047] To overcome the limitations of related technologies when dealing with highly reflective, adjacent vehicle components of the same color, this application introduces a decoupling module and topological prior constraints to decompose complex image data into individual component regions (e.g., the left front door region, the right rear door region, etc.) with independent semantics and clear boundaries. This provides an accurate mask for the subsequent extraction of color features of each component individually, avoiding color region confusion caused by component adhesion and color sampling deviation caused by blurred boundaries, thereby ensuring the accuracy of subsequent color calibration and color analysis.
[0048] Step S104: Based on the segmented image, the component region of the appearance component is cropped to obtain the cropped component region.
[0049] In the technical solution provided in step S104 of this application, after calling the segmentation model to segment the image data of the vehicle and obtaining the segmented image, the component area of the exterior component can be cropped based on the segmented image to obtain the cropped component area.
[0050] In this embodiment, the segmented image can be used as a mask to perform pixel-by-pixel logical operations or index mapping with the original input image data. For component regions (e.g., pixel positions) in the segmented image that are marked as specific component categories (e.g., "left front door", "right rear fender"), the corresponding (Red Green Blue, RGB) color information and texture features are retained in the image data; for pixel positions of background or other non-target appearance components, they are removed or left blank.
[0051] Optionally, through the above cropping operation, individual images containing a single exterior component (e.g., a single door or hood) can be separated from image data containing a complex background from the perspective of the entire vehicle, thus obtaining the cropped component regions. These cropped component regions have had their surrounding irrelevant background (e.g., ground, sky, other vehicles) and interference from adjacent components removed.
[0052] Optionally, the image of the cropped component region can be used as independent input data for the subsequent color calibration module. Since each component region can correspond to an independent appearance component, the subsequent extraction of color feature representation, highlight suppression, and colorimetric matching operations can be performed separately for each appearance component without interference.
[0053] In this embodiment of the application, the above cropping operation reduces the interference of complex shooting environment (such as cluttered background, multiple cars side by side) on color analysis, and ensures that the subsequent color calibration is processed for the paint color of the appearance component itself.
[0054] Step S106: Based on the cropped component region, the color of the segmented image is calibrated to obtain the calibration result.
[0055] In the technical solution provided by step S106 of this application, the color calibration of the segmented image based on the cropped component region is essentially a process of removing environmental interference and quantizing intrinsic colors.
[0056] In this embodiment, color feature extraction and highlight suppression can be performed. Because vehicle paint typically has high gloss characteristics, it easily reflects the surrounding environment (e.g., sky, grass, buildings), causing RGB mean or histogram statistics to fail. The image of the cropped component area can be converted to the Hue Saturation Value (HSV) color space, and a highlight region mask can be generated based on the luminance (V) and saturation (S) channels. Subsequently, during the color feature extraction process, this mask is used to suppress the weights of highlight regions (i.e., strongly reflective areas) in the image (e.g., setting the weights at corresponding positions to zero or reducing them), thereby eliminating noise from ambient light reflection at the feature level and preserving the color features of the vehicle paint itself.
[0057] Optionally, by pre-constructing a colorimetric set (e.g., a standard colorimetric set), the region color feature vectors after specular suppression are matched with this colorimetric set to obtain the matching result. For example, by calculating the similarity (e.g., Euclidean distance) between the feature vectors and each colorimetric vector, continuous and disturbed color feature representations (e.g., region features) are mapped to a discrete standard color space. This process achieves the standardization and discretization of color representation, enabling colors under different lighting conditions to correspond to the closest standard color number. Here, the colorimetric set is represented as discrete color vectors by various standard automotive paint colors.
[0058] Optionally, based on the matching results, the color feature representation after masking can be quantized to obtain a color feature vector. This color feature vector can then be used to calibrate the color of the segmented image, yielding a calibration result. This calibration result is no longer an RGB pixel value, but a physically meaningful intrinsic color feature vector that has removed the influence of ambient light. This vector reflects the actual color attributes of the vehicle paint, providing a reliable data foundation for subsequent color consistency analysis.
[0059] In this embodiment, by introducing specular suppression and standard colorimetric quantization, complex visual color information is transformed into a standardized color feature vector with strong anti-interference capabilities, ensuring that the subsequent comparison is of the paint color of the component itself, rather than the ambient color reflected from the component surface.
[0060] Through steps S102 to S106, the vehicle image data is segmented using a trained segmentation model to generate segmented images that satisfy spatial adjacency relationships. Based on these segmented images, the component regions of exterior parts can be cropped, and independent segmented images corresponding to these component regions can be extracted. Since the paint surface of a vehicle is highly reflective and easily affected by ambient light, color calibration of the segmented images based on the cropped component regions can obtain true colors free from the influence of ambient light. This solves the technical problem of low accuracy in color calibration of exterior parts in vehicles, achieving the technical effect of improving the accuracy of color calibration for exterior parts in vehicles.
[0061] The above-mentioned method of this application will be further described below.
[0062] As an optional implementation, step S102 involves calling a segmentation model to segment the vehicle image data to obtain a segmented image, including: extracting features from the image data to obtain a multi-level visual feature representation; and calling a segmentation model to segment the visual feature representation to obtain a segmented image.
[0063] In this embodiment, feature extraction and segmentation can be performed, aiming to achieve high-precision component separation through deep semantic understanding.
[0064] Optionally, the image data can be input into a backbone network, such as a Residual Network-50 (ResNet-50), to perform multi-layer convolution operations. This progressively reduces the spatial resolution of the image data and increases the number of channels, thereby extracting multi-level visual feature representations from low-level edge textures to high-level semantic concepts (i.e., multi-level visual feature representations). These multi-level visual feature representations not only contain detailed information about the image (e.g., component edges and textures) but also global contextual information (e.g., the overall shape and relative position of the component), providing a feature foundation for subsequent accurate segmentation.
[0065] Optionally, after obtaining multi-level visual feature representations, a segmentation model can be invoked to segment the visual feature representations and obtain segmented images.
[0066] In the embodiments of this application, the above steps can achieve a structured segmentation that conforms to physical reality.
[0067] As an optional implementation, the segmentation model includes a decoupling module, which comprises a first branch and a second branch. The decoupling module invokes the segmentation model to segment the visual feature representation to obtain a segmented image. This includes: invoking the first branch to extract edge information from the visual feature representation, whereby the first branch enhances the responsiveness to edge information; invoking the second branch to extract region semantic information from the visual feature representation, whereby the second branch constructs multi-scale semantic information; and determining the segmented image based on the edge information and the region semantic information.
[0068] In this embodiment, the decoupling module in the segmentation model can separate the two tasks of boundary localization and region semantics, and then achieve high-precision segmentation through fusion.
[0069] Optionally, the first branch can be an edge flow branch (corresponding to edge flow), and the second branch can be a semantic flow branch (corresponding to semantic flow). The first branch (edge flow branch) in the decoupling module can be invoked to process the visual feature representation output by the backbone network. This first branch can employ a gated convolutional layer structure, specifically designed to extract edge information in the image with frequencies higher than a frequency threshold, i.e., high-frequency edge information. The second branch (semantic flow branch) in the decoupling module can be invoked to process the same visual feature representation. This second branch employs a pyramid pooling structure, performing pooling operations on the features with different receptive fields. This structure can capture contextual information at different scales in the image, including both local details and global structure, thereby constructing complete regional semantic information, i.e., clearly identifying which pixels in the image belong to the overall region of specific components such as "car door" or "fender," rather than just the boundaries.
[0070] Optionally, after acquiring high-frequency edge information and complete regional semantic information separately, the two can be fused. Specifically, the high-frequency edge information output from the first branch is used as a guide or constraint to correct the regional semantic information output from the second branch. For example, within the semantic region, the high-frequency edge information is used to accurately locate the boundaries of components; in areas with blurred edges, the regional semantic information is used to fill in the areas, ultimately generating a segmented image that meets the topological consistency requirements.
[0071] Traditional semantic segmentation networks often focus only on the semantic category of a region, easily misidentifying two adjacent parts of the same color (e.g., a closed car door and a fender) as a connected region. This application's embodiments introduce a decoupling module to independently extract "edge" and "semantic" information, aiming to enable the segmentation model to simultaneously "see boundaries" and "understand regions." The edge flow branch focuses on finding subtle physical gaps, while the semantic branch focuses on understanding the overall shape of the parts; these two complement each other, thereby achieving accurate separation of parts of the same color.
[0072] As an optional implementation, the first branch uses a gated convolutional structure to extract visual feature representations, and the second branch uses a pyramid pooling structure to extract visual feature representations. The gated convolutional structure is used to extract boundary information between appearance components, and the pyramid pooling structure is used to perform multi-scale pooling operations on the features.
[0073] In this embodiment, the decoupling module includes a network structure with two parallel branches, which can extract edge details and global semantics respectively through different neural operation characteristics.
[0074] Optionally, the first branch employs a gated convolutional structure to process the visual feature representation. Unlike ordinary convolution, gated convolution introduces a gating mechanism (it can consist of two convolutional branches, one responsible for generating features and the other for generating a gating signal, which are multiplied element-wise). This structure can dynamically and selectively preserve or suppress information in the feature map. In vehicle exterior component segmentation tasks, the physical seams between components (e.g., the gap between a door and a fender) represent high-frequency details and subtle gradient changes in the image. Gated convolution accurately extracts feature maps representing the boundary information between components by adaptively enhancing the response to high-frequency edge information while suppressing low-frequency background noise or smooth regions. This mechanism enables the segmentation model to capture subtle gaps that are the same color but physically separated.
[0075] Optionally, the second branch employs a pyramid pooling structure to process the visual feature representation. This pyramid pooling structure divides the feature map into grids of different sizes for pooling operations, then upsamples the pooled features and concatenates them back into the original feature map. This multi-scale processing approach allows the segmentation model to observe image content within different receptive fields. For vehicle exterior components, shape, size, and spatial relationships between them exhibit multi-scale characteristics. The pyramid pooling structure can capture multi-scale contextual information from local texture to global structure, thereby constructing complete regional semantic information.
[0076] In this embodiment of the application, in the overall architecture, the high-frequency edge information extracted by the first branch can be used as guidance or constraint and passed to the second branch to correct the boundary position of the regional semantic information output by the second branch, thereby achieving the complementarity of edge and semantics.
[0077] As an optional implementation, determining the segmented image based on edge information and region semantic information includes: using edge information as a constraint to correct the boundary of the semantic region where the region semantic information is located, and obtaining the fusion result of edge information and region semantic information; and using the fusion result as the segmented image.
[0078] In this embodiment, the edge information output by the first branch can be used as a strong constraint or guiding signal. In traditional semantic segmentation, region semantic information is often ambiguous or inaccurate at object boundaries, especially when processing adjacent parts of the same color, where the semantic flow branch may incorrectly classify the two parts as belonging to the same category. In this case, the edge information can be mapped onto the region semantic information output by the second branch to correct the boundaries of the semantic region.
[0079] Optionally, edge information provides high-precision pixel-level boundary coordinates. The segmentation model can use these coordinates to trim or adjust the extent of the semantic region, ensuring that the boundary of the semantic region strictly fits the physical seam, thereby reducing boundary drift or adhesion errors that may occur in semantic flow branches.
[0080] Optionally, after boundary correction, the edge information and the corrected regional semantic information can be fused (e.g., through weighted summation, attention mechanisms, or convolution after concatenation). This fusion not only preserves the sharpness of the edge information but also the regional integrity of the semantic information. Finally, the fused feature map is output as a segmentation image through a classification layer. Each pixel in this segmentation image is assigned a clear part category label, and the boundary positions are calibrated with edge information, resulting in high geometric accuracy.
[0081] In this embodiment, the high spatial resolution of edge information is used to compensate for the shortcomings of semantic information in boundary localization. At the same time, the contextual advantages of regional semantic information are used to prevent fragmentation noise that edge information may bring, thereby improving the accuracy of image segmentation.
[0082] As an optional implementation, step S106, based on the cropped component region, calibrates the color of the segmented image to obtain a calibration result, including: inputting the cropped component region into the color calibration module to extract the color feature representation of the component region; and calibrating the color of the segmented image based on the color feature representation to obtain a calibration result.
[0083] In this embodiment, the color calibration module can be a color calibration network, which can extract pure, interference-resistant color feature representations from the image corresponding to the cropped component region.
[0084] Optionally, the image of the cropped part region is input into the color calibration module. This color calibration module may contain a lightweight convolutional neural network (CNN), or simply a convolutional network. The CNN performs multiple convolution, activation, and pooling operations on the input image to extract high-dimensional color feature representations. These color feature representations include not only statistical information about the color (e.g., mean, variance), but also the texture and spatial distribution patterns of the color.
[0085] Optionally, after obtaining the color feature representation, specular suppression can be introduced to address the high reflectivity of vehicle paint. The specular-suppressed color feature representation can be mapped to a pre-constructed standard colorimetric space. The standard colorimetric space contains a set of discrete vectors for various standard vehicle paint colors. The similarity (BiTu, Euclidean distance, or cosine similarity) between region features and each colorimetric vector can be calculated to find matching standard colorimetric vectors. Through this projection matching and quantization operation, the original color feature representation, which is continuous and affected by ambient light, is transformed into discrete, standardized color feature vectors, such as intrinsic color feature vectors. These color feature vectors represent the true color attributes of the vehicle paint after reducing ambient reflection. Finally, the quantized color feature vectors are output as the calibration result.
[0086] In the embodiments of this application, by introducing specular suppression and standard colorimetric quantization, complex and disturbed visual color information can be transformed into pure, standardized digital features that can be used for accurate comparison, ensuring that subsequent color analysis is based on the true properties of the paint rather than surface reflection.
[0087] As an optional implementation, in the process of inputting the cropped component region into the color calibration module and extracting the color feature representation of the component region, the method further includes: determining the highlight region of the segmented image in the cropped component region; and performing masking processing on the color feature representation of the highlight region to obtain the masked color feature representation.
[0088] In this embodiment, during the process of inputting the cropped component area into the color calibration module and extracting the color feature representation of the component area, the contamination of color features by environmental reflection can be eliminated at the pixel level.
[0089] Optionally, the image of the cropped component area (i.e., the input data) is converted from the RGB color space to the HSV color space. The characteristics of the luminance (V) and saturation (S) channels in the HSV color space are used to distinguish between the original paint color and the ambient highlights. The highlight areas can be represented as high brightness and low saturation.
[0090] Optionally, a highlight region mask can be generated by setting brightness and saturation thresholds. After the color calibration module extracts the original color feature representation of the component region through a convolutional neural network, it does not directly perform subsequent processing, but instead combines the generated highlight region mask for weighted suppression. For example, the original features are multiplied element-wise by the inverse process of the mask to obtain the color feature representation after mask processing. This means that for pixels identified as highlight regions, the weights of the corresponding color feature vectors are forced to zero or significantly reduced. For non-highlight regions (e.g., the original paint color region), the color feature vector remains unchanged. In this way, noise features caused by environmental reflection are effectively eliminated at the mathematical level, thereby preserving features that reflect the true properties of the paint.
[0091] Vehicle paint is a typical high-gloss medium that easily reflects the surrounding environment. If the highlight areas containing the highlights are directly input into the color calibration module, the extracted color feature representation will be mixed with the colors of ambient light (such as reflected blue sky or green trees), resulting in color distortion. This embodiment of the application, by identifying the highlight areas and performing masking processing, can cut off the interference of ambient light on the extraction of color feature representation from the data source.
[0092] As an optional implementation, the color of the segmented image is calibrated based on the color feature representation to obtain a calibration result, including: matching the masked color feature representation with a color dictionary set to obtain a matching result, wherein the color dictionary set consists of a discrete set of color vectors; and calibrating the color of the segmented image based on the matching result to obtain a calibration result.
[0093] In this embodiment, through projection matching and colorimetric quantization, continuous, disturbed color feature representations can be transformed into discrete, standardized intrinsic color identifiers.
[0094] Optionally, the color code set can be a standard color codebook, used to represent standard vehicle paint colors as a set of discrete vectors and map regional features to the color codebook space. Matching results can be obtained by matching the masked color feature representation with the color code set. Specifically, let the regional color feature be f, and the color code set be... The matching process can be represented as follows:
[0095]
[0096] Here, q can be used to represent the colorimetric vector obtained from the matching.
[0097] As an optional implementation, the color of the segmented image is calibrated based on the matching result to obtain a calibration result, including: quantizing the color feature representation after masking based on the matching result to obtain a color feature vector; and calibrating the color of the segmented image based on the color feature vector to obtain a calibration result.
[0098] In this embodiment, the color feature representation after masking can be quantized based on the matching result. Specifically, instead of using the original continuous color feature vector, the matched colorimetric vector is directly used as the color feature representation of the component region. The final output calibration result is this standardized color feature vector (or the corresponding index ID). The calibration result represents the closest standard vehicle paint color to the component after eliminating ambient light reflection.
[0099] Optionally, the calibration result described above is not just a color value, but also includes two key pieces of information: intrinsic color attributes and a standard color code identifier. The intrinsic color attribute is obtained by quantization, removing the effects of highlights and environmental reflections, and retaining the true color of the paint. The standard color code identifier corresponds to a specific standard color code (e.g., "Pearl White A94").
[0100] As an optional implementation, the colors of the segmented image are calibrated based on the color feature vector to obtain calibration results, including: performing a color consistency analysis between different appearance components based on the color feature vector to obtain analysis results; and determining the calibration results based on the analysis results.
[0101] In this embodiment, the color recognition of a single component can be extended to the analysis of relative color consistency between components, and the results of this analysis can be used as part of the final calibration results or as a basis for verification.
[0102] Optionally, based on color feature vectors, a color consistency analysis is performed between different exterior components. This analysis can be based on the results of adjacent components (e.g., doors and fenders) or key related components (e.g., symmetrical components). By calculating the similarity between the color feature vectors of these components (e.g., calculating the Euclidean distance or cosine similarity between vectors) and combining it with a preset similarity threshold, it is determined whether there are color differences between different exterior components.
[0103] Optionally, based on the analysis results of the above consistency analysis, the final calibration result of the segmented image can be output.
[0104] In this embodiment of the application, by introducing consistency analysis, the prior knowledge of symmetry and color homogeneity inherent in the vehicle design itself (i.e., multiple parts of the same vehicle should generally be the same color) can be used to cross-validate the color results of a single part, thereby improving the accuracy and reliability of the color calibration results, and finally outputting calibration results that include both color attributes and quality verification information.
[0105] As an optional implementation, based on color feature vectors, a color consistency analysis is performed on different appearance components to obtain analysis results, including: determining the similarity between multiple color feature vectors; and determining the relationship between the similarity and the similarity threshold as the analysis result.
[0106] In this embodiment, the component pairs to be compared (e.g., adjacent components or symmetrical components) can be selected, and for each pair of components, the similarity between their respective color feature vectors can be calculated.
[0107] Optionally, after obtaining the similarity score, the relationship between the similarity score and the similarity threshold can be used as the analysis result. This similarity threshold can be derived from training on a large amount of standard vehicle data and is used to distinguish between normal color differences (e.g., minor fluctuations in lighting, slight oxidation of the paint surface) and abnormal color differences (e.g., localized paint repair).
[0108] In this embodiment of the application, by setting a similarity threshold, minor color fluctuations caused by shooting angle, lighting conditions or paint aging can be automatically filtered out, focusing on detecting those significant color differences, which can provide a reliable automated basis for used car condition assessment and insurance damage assessment.
[0109] As an optional implementation, the calibration result is determined based on the analysis results, including: in response to the similarity between multiple color feature vectors being greater than a similarity threshold, determining the calibration result as color consistency between adjacent appearance components; and in response to the similarity being less than or equal to a similarity threshold, determining the calibration result as color inconsistency between adjacent appearance components.
[0110] In this embodiment, during the process of determining the calibration result based on the analysis results, the color consistency between adjacent appearance components can be determined according to the relationship between similarity and similarity threshold.
[0111] Optionally, when the similarity is greater than a similarity threshold (or less than a distance threshold if a distance metric is used), it can be determined that the two adjacent exterior parts (e.g., the left front door and the left rear door, or the door and the fender) are identical in color. This means that the color feature vectors of the two adjacent exterior parts are close enough in space that the differences are within an acceptable error range (e.g., minor changes in lighting, normal aging of the paint).
[0112] Optionally, when the similarity value is less than or equal to a similarity threshold (or greater than or equal to a distance threshold if a distance metric is used), a color inconsistency between the two adjacent appearance components can be determined. This means that there is a significant difference in the color feature vectors of the two adjacent appearance components, exceeding the normal error range, suggesting possible local painting, repair, or modification.
[0113] Optionally, based on the above comparison results, the calibration results can be determined. For component pairs with the same color, the calibration results confirm that the color attributes are the same and can be considered as belonging to the same color gamut. For component pairs with inconsistent colors, the calibration results mark the location as having a color anomaly. In practical applications, the calibration results can be further converted into specific labels (e.g., "suspected paint touch-up," "color difference anomaly"), or visualized on the segmented image through highlighting, different color encoding, etc.
[0114] In this embodiment of the application, the above steps can be used to determine whether the vehicle has non-original paint repair marks. This binarization (or ternaryization, such as consistent / slightly different / significantly different) determination allows for the output of conclusions meaningful to business personnel, rather than just raw data.
[0115] As an optional implementation, before calling the segmentation model to segment the vehicle image data and obtain the segmented image, the method further includes: training a neural network model using a loss function to obtain the segmentation model, wherein the loss function is used to minimize the distance difference between adjacent appearance parts in the feature space.
[0116] In this embodiment, a loss function, such as topological consistency loss, can be introduced to constrain the learning process of the neural network model and ensure that the segmented image conforms to the physical adjacency relationship of the vehicle parts.
[0117] Optionally, during the training of the neural network model, a loss function can be used to minimize the distance difference between adjacent appearance parts in the feature space to train the neural network model and thus obtain a segmentation model.
[0118] In this embodiment, by minimizing the distance between adjacent components in the feature space (for physically connected components with the same color), the segmentation model is guided to focus on the spatial continuity and semantic consistency between components. This injection of prior knowledge enables the segmentation model to more accurately determine component boundaries during inference by incorporating edge information. Especially when dealing with components of the same color and with extremely narrow gaps, topological constraints prevent the segmentation model from incorrectly merging components that should be separated or incorrectly severing components that should be connected.
[0119] As an optional implementation method, a segmentation model is obtained by training a neural network model using a loss function, including: constructing a loss function based on the adjacency matrix and visual feature representation of different appearance parts, wherein the visual features are obtained by feature extraction from image data; and training a neural network model using the loss function to obtain a segmentation model.
[0120] In this embodiment, the adjacency matrix A of different appearance components can be used as a basis. ij and visual feature representation Construct a loss function. For example, constrain the segmented image (e.g., the segmentation result) by constructing a topological consistency loss function:
[0121]
[0122] Among them, A ij This matrix is used to represent the adjacency relationship between component i and component j. This is used to represent the feature representation of the i-th region, that is, the visual feature representation.
[0123] In this embodiment, by introducing an adjacency matrix, the segmentation model is guided to learn which components are physically connected. This helps the segmentation model make more reasonable judgments when faced with complex situations involving adjacent components of the same color with blurred edges, by incorporating structural priors, thus avoiding the erroneous merging of components that should be separated or the disruption of the internal connectivity of components.
[0124] As an optional implementation, the method further includes: determining annotation information for the image data, wherein the annotation information includes semantic labels, edge labels, and color labels, the semantic labels being used to represent the category region of the appearance component, the edge labels being used to represent the physical seam boundary between appearance components, and the color labels being used to indicate whether there is a color difference between adjacent appearance components or related appearance components.
[0125] In this embodiment, the image data of the vehicle can be labeled with annotation information, such as multiple types of annotation information.
[0126] Optionally, semantic tags are used to represent category areas of exterior components, such as marking different vehicle exterior component areas. Edge tags are used to represent physical seam boundaries between exterior components, such as marking physical seam boundaries between components. Color tags are used to indicate whether there are color differences between adjacent or related exterior components, such as describing whether there are color differences between components.
[0127] In this embodiment, by determining the annotation information of image data, a comprehensive and multi-dimensional supervisory signal system can be constructed to support the integrated training of multi-task neural network models. The annotation information samples of image data can provide training input data for the segmentation model.
[0128] As an optional implementation, determining the annotation information of the image data includes: performing semantic segmentation annotation on the appearance components in the image data to obtain semantic labels.
[0129] In this embodiment, the exterior components may include the vehicle's main body panels, such as the front bumper, rear bumper, hood, roof, left front door, right front door, left rear door, right rear door, left fender, and right fender. In some high-precision scenarios, it may also include smaller components such as side skirts and rear spoilers; these are merely illustrative examples and are not specifically limited here.
[0130] Optionally, the annotator processes each input image in the image data, for example, assigning a category label to each pixel in the image. Pixels belonging to the "left front door" region can be assigned a specific category identifier (ID), for example, ID=1. Pixels belonging to the "left fender" region are assigned a different category ID (for example, ID=2).
[0131] Optionally, for background regions of parts that do not belong to vehicles (e.g., ground, sky, other vehicles), a background category ID (e.g., ID=0 or -1) is assigned. This semantic segmentation annotation method generates a semantic mask of the same size as the input image, where the value of each pixel represents the part category to which the appearance part belongs (corresponding to a semantic label).
[0132] As an optional implementation, determining the annotation information of the image data includes: marking the boundaries of the physical seams between adjacent appearance components in the image data to obtain edge labels.
[0133] In this embodiment, narrow physical gaps, chamfers, or structural seams exist between different exterior components (e.g., the front bumper and left front fender, the left front door and the left rear door) in the image data. Although these exterior components may be painted the same color, they are geometrically independent. Annotators need to carefully identify these subtle structural boundaries. Therefore, boundary annotations can be performed on the physical seams between adjacent exterior components in the image data to obtain edge labels.
[0134] Optionally, boundary annotation can be a pixel-level marking of the identified physical seams. For example, a binary mask or thin line annotation can be used to mark the seam location as foreground (value 1) and the non-seam area as background (value 0).
[0135] Alternatively, because the gaps between exterior components are extremely narrow (e.g., a few millimeters), high precision is required when labeling to ensure that the edge labels accurately reflect the true physical boundaries between exterior components, avoiding labels that are too wide or too narrow.
[0136] Traditional semantic segmentation relies primarily on color and texture differences. When two adjacent components are identical in color, it often fails to distinguish their boundaries, leading to the segmentation result merging the two components into a single connected region. This application's embodiments, by specifically annotating physical seam boundaries, enable the segmentation model to learn high-frequency edge information and utilize geometric cues to separate components with the same color.
[0137] As an optional implementation, determining the annotation information of the image data includes: annotating the color consistency between adjacent appearance components in the image data to obtain color labels.
[0138] In this embodiment, adjacent appearance components in the image data can be marked with a state of color consistency.
[0139] Optionally, based on the vehicle's structural logic, the pairs of components that need to be compared in color can be identified. These pairs can be adjacent components, such as the left front door and left front fender, the left front door and left rear door, the front bumper and left front fender, etc. The labeling personnel can determine the color consistency of each pair of adjacent exterior components based on the actual condition of the vehicle and generate corresponding color labels.
[0140] Optionally, the component pair can also be symmetrical components, such as the left front door and the right front door, the left front fender and the right front fender, etc. The color consistency between symmetrical components can be marked to obtain color labels, which are used to verify the consistency of the paint surface of the whole vehicle.
[0141] Optionally, if the colors of two exterior components visually and spectrally belong to the same color code and there is no obvious color difference (e.g., original factory paint, non-destructive repair), they are labeled as having the same color; for example, the color label value is 0 or True. If there is a significant color difference between two exterior components, meaning that one of the exterior components has been repainted, touched up, or replaced, they are labeled as having inconsistent colors; for example, the color label value is 1 or False. This difference may manifest as a shift in hue, different saturation, or differences in brightness.
[0142] Optionally, color labels can exist as paired labels or as masks for anomalous components. Paired labels can be a list or matrix recording the relationship labels of each pair of components. Anomaly masks can be a binary mask that marks specific component regions whose colors are inconsistent with adjacent normal components.
[0143] In this embodiment of the application, by using color labels, the segmentation model will pay attention to the color difference features between parts during the training process, so that it can automatically detect which parts have colors that deviate from the overall consistency during the inference stage.
[0144] The color calibration method for exterior components in a vehicle according to this application segmentes the vehicle's image data using a trained segmentation model to generate segmented images that satisfy spatial adjacency relationships. Based on these segmented images, the component regions of the exterior components can be cropped, and independent segmented images corresponding to these component regions can be extracted. Since the paint surface of a vehicle is highly reflective and easily affected by ambient light, color calibration of the segmented images based on the cropped component regions can obtain true colors free from the influence of ambient light. This solves the technical problem of low accuracy in color calibration of exterior components in vehicles and achieves the technical effect of improving the accuracy of color calibration for exterior components in vehicles.
[0145] The above technical solutions of the embodiments of this application will be further illustrated below with reference to preferred embodiments.
[0146] Currently, with the increase in vehicle ownership, the demand for used car transactions and insurance claims has surged. In these scenarios, accurately identifying individual vehicle parts (such as front bumpers, fenders, and doors) and determining whether the colors are consistent (identifying bodywork and repainting marks) are key pain points.
[0147] The following defects and shortcomings exist in the relevant technologies.
[0148] Segmentation challenges: Vehicle exterior parts are often painted the same color, and the gaps between parts are extremely narrow. Traditional semantic segmentation networks mainly rely on color and texture differences for segmentation. When processing adjacent objects of the same color (such as a closed car door and a fender), they are prone to identifying two parts as a single connected region, leading to segmentation failure.
[0149] Color matching challenges: Vehicle paint is typically a high-gloss material, making it extremely prone to reflecting the surrounding environment (e.g., buildings, light sources). On the side of the same car, the front door might reflect grass and appear green, while the rear door might reflect the sky and appear blue. Traditional histogram matching or RGB mean methods cannot distinguish between "car paint color" and "ambient reflected color," resulting in a very high misjudgment rate.
[0150] To address the issues of severe adhesion and distorted color feature extraction in vehicle exterior component segmentation under complex lighting and high reflectivity environments, this application provides a vehicle exterior component segmentation and color calibration method based on topological edge decoupling and intrinsic colorimetric dictionary guidance. The method mainly includes four stages: data input, topological edge decoupling segmentation processing, intrinsic colorimetric dictionary-guided color calibration processing, and color matching analysis.
[0151] Figure 2 This is a flowchart of a method for segmenting and color calibration of vehicle exterior components based on topological edge decoupling and intrinsic colorimetric dictionary according to an embodiment of this application, as follows: Figure 2 As shown, the method may include the following steps.
[0152] Step S201: Perform topological edge decoupling and segmentation.
[0153] In this embodiment, a segmentation structure based on the backbone network and decoupling modules can be constructed to perform topological edge decoupling segmentation and achieve the separation of adjacent components of the same color.
[0154] Optionally, the process of topological edge decoupling segmentation includes feature extraction (high-frequency information for edge flow recognition, component regions for semantic flow recognition), decoupling module processing, feature fusion, topological prior fusion, and segmentation result output.
[0155] Feature extraction: Input images are fed into the backbone network (ResNet-50) for feature extraction to obtain multi-level visual feature representations.
[0156] Decoupling Module Processing: Based on the backbone features, a decoupling module is introduced, comprising an edge flow branch and a semantic flow branch. The edge flow branch uses gated convolutional layers to perform fine-grained processing on the input features, extracting high-frequency edge information to characterize the physical seams between components. The semantic flow branch employs a pyramid pooling structure to perform multi-scale contextual modeling on the features, obtaining complete semantic information of the component regions.
[0157] Feature fusion: The feature fusion module fuses the boundary information output by the edge stream with the region information output by the semantic stream. The edge features serve as constraints or guiding information to correct the boundaries of the semantic region, thereby separating adjacent parts of the same color.
[0158] Topological Prior Fusion: During the fusion process, topological prior constraints are further introduced to impose structural consistency constraints on the segmentation results, ensuring that the segmentation results satisfy predefined component spatial adjacency relationships. Furthermore, a topological consistency loss function is constructed to constrain the segmentation results.
[0159]
[0160] Among them, A ij Let represent the adjacency matrix between component i and component j. This represents the feature representation of the i-th region, that is, the visual feature representation.
[0161] Segmentation output: After the above processing, a refined component segmentation image (Mask) is output, providing a regional basis for subsequent color processing.
[0162] Step S202: Perform intrinsic color calibration guided by the colorimeter.
[0163] In this embodiment, after obtaining the segmentation results, color feature calibration processing can be performed on each component region.
[0164] Optionally, intrinsic colorimeter-guided color calibration includes region feature extraction, specular suppression processing, colorimeter construction, projection matching, and colorimeter quantization.
[0165] Region feature extraction: Based on the segmentation results, each component region is cropped and input into the convolutional network (corresponding to a convolutional neural network) in the color calibration module to extract the region color feature representation.
[0166] Spectrum suppression processing: During feature extraction, a spectrum suppression mask is introduced to process the highlight regions in the image: a highlight region mask is generated based on image features. During feature aggregation, the weights of the corresponding positions in the highlight regions are reset to zero or reduced. This reduces the interference of reflections and strong light on color features.
[0167] Color code construction: Construct a standard color code (i.e., a set of standard color codes) to represent multiple standard car paint colors as a set of discrete color vectors, forming a color codebook.
[0168] Projection matching: Matching the region features after specular suppression with the colorimeter: Calculate the similarity between the region features and each colorimeter vector; map the region features to the colorimeter space to achieve a discretized representation of color expression.
[0169] Color quantization: Based on the matching results and the principle of removing illumination, the regional features are quantized to obtain the corresponding color feature vector, thereby obtaining the intrinsic color features that have removed the influence of ambient light.
[0170] Step S203: Perform color matching and analysis.
[0171] In this embodiment, based on the segmentation results and corresponding intrinsic color features, color consistency analysis is performed between different components, including: extracting color feature vectors of adjacent or related components; calculating the similarity between features; determining whether color differences exist based on a preset threshold; and finally outputting the color matching and analysis results for subsequent applications.
[0172] Figure 3 This is a schematic diagram of a training process and network structure according to an embodiment of this application, such as... Figure 3 As shown, it includes a backbone network 301, a decoupling module 302, and a color calibration module 303.
[0173] Semantic labels, edge labels, and color labels are determined from vehicle image data and input into the backbone network 301. Then, they are processed in the decoupling module 302 to obtain a segmented image. The decoupling module 302 includes gated convolutional layers, pyramid pooling, and a feature fusion module. Next, the image is processed in the color calibration module 303. For example, the color feature representation processed by specular suppression masking is input into the convolutional network, followed by zeroing of the specular region weights and chromaticity quantization to obtain a feature vector, i.e., a color feature vector. Finally, color matching and analysis are performed.
[0174] The following section uses a specific scenario as an example to further illustrate the method for segmenting and color calibration of vehicle exterior components based on topological edge decoupling and intrinsic colorimetric dictionary guidance.
[0175] Figure 4 This is a flowchart illustrating a specific method for segmenting and color calibration of vehicle exterior components based on topological edge decoupling and intrinsic colorimetric dictionary according to an embodiment of this application. Figure 4 As shown, the method may include the following steps.
[0176] Step S401, Data preparation and enhancement.
[0177] In this embodiment, a vehicle exterior image dataset is first constructed for model training and validation. This dataset contains vehicle images of different models, different shooting angles, and different ambient lighting conditions, including but not limited to scenes such as sunny days, cloudy days, and underground parking garages, while also covering vehicle samples with different degrees of damage.
[0178] Optionally, the image is annotated, specifically including semantic labeling, edge labeling, and color labeling. Semantic labeling categorizes vehicle exterior components, including areas such as the front bumper, rear bumper, hood, roof, front doors, rear doors, and fenders. Edge labeling annotates the physical seams between components, marked with thin lines to represent the boundary between adjacent components. Color labeling identifies color differences between adjacent or related components for training the subsequent color consistency analysis module.
[0179] Optionally, data augmentation processing can be performed on the original image, including scaling, brightness adjustment, and contrast adjustment, to improve the model's adaptability to different environmental conditions.
[0180] Step S402, Network architecture design.
[0181] In this embodiment, a network structure for segmenting and color calibration of vehicle exterior components can be constructed, which consists of two parts: a segmentation sub-network and a color calibration network.
[0182] Optionally, the segmentation subnetwork can perform backbone feature extraction, decoupling modules, feature fusion, and segmentation result output.
[0183] Backbone feature extraction involves inputting the input image into the backbone network for feature extraction. In this embodiment, ResNet-50 is used as the feature extractor to obtain multi-scale feature representations.
[0184] The decoupling module, built upon the output features of the backbone network, includes edge branches and semantic branches. The edge branches employ gated convolutional structures to process features, enhancing the response to high-frequency information and extracting fine-grained boundary information between components. The semantic branches utilize pyramid pooling structures to perform multi-scale contextual modeling of features, obtaining complete semantic information about component regions.
[0185] Feature fusion combines the boundary features output by the edge branch with the region features output by the semantic branch. The boundary features serve as guiding information to weight the semantic features, thereby improving the accuracy of the segmentation result at the boundary locations. During feature fusion, the semantic features are denoted as... Edge features are denoted as The features after fusion are represented as:
[0186]
[0187] in, The edge-guided weight coefficient is used to adjust the degree of influence of boundary information on semantic features.
[0188] The segmentation results are output, and after fusion processing, the segmentation results of the vehicle exterior components are output for subsequent color analysis.
[0189] Optionally, the color calibration network can perform input construction, feature extraction, specular suppression, and colorimetric quantization.
[0190] The input construction can extract the corresponding region images of each component based on the segmentation results, and use them as input for the color calibration module.
[0191] Feature extraction can be achieved by processing a region image using a convolutional network to obtain a representation of the region's color features.
[0192] Specular suppression processing can introduce a specular suppression mechanism during feature extraction, which specifically includes the following.
[0193] Convert the input image to the HSV color space.
[0194] A highlight region mask is generated by setting thresholds for the S and V channels. Specifically, the highlight region mask can be represented as:
[0195]
[0196] Where V(x, y) and S(x, y) represent the luminance and saturation components of a pixel in the HSV color space, respectively. and This is the threshold parameter.
[0197] During feature aggregation, weight suppression is applied to the corresponding positions in the highlight regions to reduce their contribution to the final features. The feature representation after highlight suppression can be expressed as:
[0198]
[0199] Where F(x, y) is the original feature representation and M(x, y) is the specular mask.
[0200] Color code quantization can construct a standard color codebook, representing standard car paint colors as a set of discrete vectors, and mapping regional features to the color codebook space. The corresponding color feature vectors are obtained through matching and quantization. Specifically, let the regional color features be f, and the color codebook set be f. The matching process can be represented as follows:
[0201]
[0202] Where q represents the colorimetric vector obtained from the matching.
[0203] Optionally, after the above processing, the color feature representation quantized by the colorimeter can be output for subsequent color consistency analysis.
[0204] Step S403: Proceed to the reasoning process.
[0205] In this embodiment, the inference process can be as follows: input a single vehicle image; obtain the segmentation results of vehicle exterior components through a segmentation sub-network; extract the region images corresponding to each component based on the segmentation results; input the region images of each component into a color calibration network to obtain the corresponding color feature vectors; select adjacent or comparable components, input their color feature vectors into a comparison module, and calculate the similarity score; judge the similarity according to a preset threshold, and when the similarity is lower than the preset threshold, determine that there is a color difference between the corresponding components.
[0206] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0207] According to an embodiment of this application, a color calibration device for exterior components in a vehicle is provided. It should be noted that the color calibration device for exterior components in a vehicle can be used to perform the above-described color calibration method for exterior components in a vehicle.
[0208] Figure 5 This is a schematic diagram of a color calibration device for exterior components in a vehicle according to an embodiment of this application, such as... Figure 5 As shown, the color calibration device 500 for exterior components in the vehicle may include: a segmentation unit 502, a cutting unit 504, and a calibration unit 506.
[0209] The segmentation unit 502 is used to call the segmentation model to segment the vehicle image data to obtain a segmented image. The segmentation model is trained on a neural network model using image data samples and labeled information samples. The image data represents the images of the vehicle's exterior components, and the labeled information samples represent different label samples of the exterior components. The segmented image satisfies the spatial adjacency relationship of the exterior components. The cropping unit 504 is used to crop the component regions of the exterior components based on the segmented image to obtain cropped component regions. The calibration unit 506 is used to calibrate the color of the segmented image based on the cropped component regions to obtain a calibration result.
[0210] In the color calibration device for exterior components of a vehicle in this embodiment, the segmentation unit 502 calls a segmentation model to segment the image data of the vehicle to obtain a segmented image. The segmentation model is obtained by training a neural network model using image data samples and annotation information samples. The image data represents the image of the exterior components of the vehicle, and the annotation information samples represent different label samples of the exterior components. The segmented image satisfies the spatial adjacency relationship of the exterior components. The cropping unit 504 crops the component regions of the exterior components based on the segmented image to obtain the cropped component regions. The calibration unit 506 calibrates the color of the segmented image based on the cropped component regions to obtain the calibration result. This solves the technical problem of low accuracy in color calibration of exterior components in vehicles and achieves the technical effect of improving the accuracy of color calibration of exterior components in vehicles.
[0211] This application also provides an electronic device 60, please refer to... Figure 6 , Figure 6 This is a schematic diagram of an electronic device according to an embodiment of the present application, including a processor 610 and a memory 620, wherein the memory 620 is used to store computer programs; the processor 610 is used to execute the programs stored in the memory 620 to implement the methods described in any embodiment of the present application.
[0212] Embodiments of this application also provide a vehicle, including: a memory storing an executable program; and a processor for running the program, wherein the program executes the methods described in various embodiments of this application when it runs.
[0213] Embodiments of this application also provide a computer-readable storage medium including a stored executable program, wherein, when the executable program is running, it controls the device where the computer-readable storage medium is located to perform the methods of various embodiments of this application.
[0214] Embodiments of this application also provide a computer program product, including a computer program that, when executed by a processor, implements the methods of various embodiments of this application.
[0215] Embodiments of this application also provide a computer program product, including a non-volatile computer-readable storage medium for storing a computer program that, when executed by a processor, implements the methods in various embodiments of this application.
[0216] Embodiments of this application also provide a computer program that, when executed by a processor, implements the methods described in the various embodiments of this application.
[0217] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0218] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0219] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0220] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0221] 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 this application, 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 a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0222] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method for color calibration of exterior components in a vehicle, characterized in that, include: The segmentation model is invoked to segment the image data of the vehicle to obtain a segmented image. The segmentation model is obtained by training a neural network model using image data samples and labeled information samples. The image data is used to represent images of the exterior components of the vehicle, and the labeled information samples are used to represent different label samples of the exterior components. The segmented image satisfies the spatial adjacency relationship of the exterior components. Based on the segmented image, the component region of the appearance component is cropped to obtain the cropped component region; Based on the cropped component region, the color of the segmented image is calibrated to obtain a calibration result.
2. The method according to claim 1, characterized in that, The segmentation model is invoked to segment the image data of the vehicle, resulting in a segmented image, including: Feature extraction is performed on the image data to obtain a multi-level visual feature representation; The segmentation model is invoked to segment the visual feature representation, thereby obtaining the segmented image.
3. The method according to claim 2, characterized in that, The segmentation model includes a decoupling module, which comprises a first branch and a second branch. The decoupling module calls the segmentation model to perform segmentation processing on the visual feature representation to obtain the segmented image, including: The first branch is invoked to extract the visual feature representation and obtain edge information with a frequency higher than the frequency threshold. The first branch is used to enhance the responsiveness to the edge information. The second branch is invoked to extract the visual feature representation and obtain region semantic information, wherein the second branch is used to construct multi-scale semantic information; The segmented image is determined based on the edge information and the region semantic information.
4. The method according to claim 3, characterized in that, The first branch uses a gated convolutional structure to extract the visual feature representation, and the second branch uses a pyramid pooling structure to extract the visual feature representation. The gated convolutional structure is used to extract the boundary information between the appearance components, and the pyramid pooling structure is used to perform multi-scale pooling operations on the features.
5. The method according to claim 3, characterized in that, Determining the segmented image based on the edge information and the region semantic information includes: Using the edge information as a constraint, the semantic region where the region semantic information is located is corrected to obtain the fusion result of the edge information and the region semantic information; The fusion result is used as the segmented image.
6. The method according to claim 1, characterized in that, Based on the cropped component region, the color of the segmented image is calibrated to obtain a calibration result, including: The cropped component area is input into the color calibration module to extract the color feature representation of the component area; Based on the color feature representation, the colors of the segmented image are calibrated to obtain the calibration result.
7. The method according to claim 6, characterized in that, In the process of inputting the cropped component region into the color calibration module and extracting the color feature representation of the component region, the method further includes: Determine the highlight region of the segmented image in the cropped component region; The color feature representation of the highlight region is masked to obtain the masked color feature representation.
8. The method according to claim 6, characterized in that, Based on the color feature representation, the colors of the segmented image are calibrated to obtain the calibration result, including: The color feature representation after masking is matched with a color dictionary set to obtain a matching result, wherein the color dictionary set consists of a discrete set of color vectors; Based on the matching result, the color of the segmented image is calibrated to obtain the calibration result.
9. The method according to claim 8, characterized in that, Based on the matching result, the color of the segmented image is calibrated to obtain the calibration result, including: Based on the matching result, the color feature representation after masking is quantized to obtain a color feature vector; Based on the color feature vector, the colors of the segmented image are calibrated to obtain the calibration result.
10. The method according to claim 9, characterized in that, Based on the color feature vector, the colors of the segmented image are calibrated to obtain the calibration result, including: Based on the color feature vector, a color consistency analysis is performed on the different appearance components to obtain the analysis results; Based on the analysis results, the calibration result is determined.
11. The method according to claim 10, characterized in that, Based on the color feature vector, a color consistency analysis is performed on the different appearance components to obtain the analysis results, including: Determine the similarity between multiple color feature vectors; The relationship between the similarity and the similarity threshold is determined as the analysis result.
12. The method according to claim 10, characterized in that, Based on the analysis results, the calibration results are determined, including: In response to a similarity greater than a similarity threshold among multiple color feature vectors, the calibration result is determined to be that the colors of adjacent appearance components are consistent; In response to the similarity being less than or equal to the similarity threshold, the calibration result is determined to be a color inconsistency between adjacent appearance components.
13. The method according to claim 1, characterized in that, Before calling the segmentation model to segment the image data of the vehicle and obtain a segmented image, the method further includes: The neural network model is trained using a loss function to obtain the segmentation model, wherein the loss function is used to minimize the distance difference between adjacent appearance components in the feature space.
14. The method according to claim 13, characterized in that, The neural network model is trained using a loss function to obtain the segmentation model, including: The loss function is constructed based on the adjacency matrix and visual feature representation of different appearance components, wherein the visual features are obtained by feature extraction from the image data; The neural network model is trained using the loss function to obtain the segmentation model.
15. The method according to claim 1, characterized in that, The method further includes: The annotation information of the image data is determined, wherein the annotation information includes semantic labels, edge labels and color labels, the semantic labels are used to represent the category region of the appearance component, the edge labels are used to represent the physical seam boundary between the appearance components, and the color labels are used to indicate whether there is a color difference between adjacent appearance components or related appearance components.
16. The method according to claim 15, characterized in that, Determining the annotation information of the image data includes: The semantic tags are obtained by semantic segmentation and annotation of the appearance components in the image data.
17. The method according to claim 15, characterized in that, Determining the annotation information of the image data includes: The physical seams between adjacent appearance components in the image data are marked to obtain the edge labels.
18. The method according to claim 15, characterized in that, Determining the annotation information of the image data includes: The color consistency between adjacent appearance components in the image data is marked to obtain the color label.
19. A color calibration device for exterior components in a vehicle, characterized in that, include: The segmentation unit is used to call the segmentation model to segment the image data of the vehicle to obtain a segmented image. The segmentation model is obtained by training a neural network model using image data samples and annotation information samples. The image data is used to represent images of the exterior components of the vehicle, and the annotation information samples are used to represent different label samples of the exterior components. The segmented image satisfies the spatial adjacency relationship of the exterior components. The cropping unit is used to crop the component region of the appearance component based on the segmented image to obtain the cropped component region; A calibration unit is used to calibrate the color of the segmented image based on the cropped component region to obtain a calibration result.
20. A processor, characterized in that, The processor is used to run a program, wherein the program, when running, performs the method according to any one of claims 1 to 18.
21. An electronic device, characterized in that, include: Memory, which stores executable programs; A processor for running the program, wherein the program, when running, performs the method according to any one of claims 1 to 18.
22. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored executable program, wherein, when the executable program is executed, it controls the device on which the storage medium is located to perform the method according to any one of claims 1 to 18.
23. A vehicle, characterized in that, include: Memory, which stores executable programs; A processor for running the program, wherein the program, when running, performs the method according to any one of claims 1 to 18.
