Rim weight prediction method, training method and device of rim weight prediction model
Patent Information
- Application Number
- CN202611102256.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-23
- Publication Date
- 2026-10-23
AI Technical Summary
然而,上述汽车轮辋重量预测方法中,重量预测误差相对较大,轮辋重量预测精度较低
[0033]上述轮辋重量预测方法、轮辋重量预测模型的训练方法、装置、计算机设备、计算机可读存储介质和计算机程序产品,通过获取目标轮辋对应的轮辋图像,以及目标轮辋对应的物理属性参数;根据轮辋图像,获取目标轮辋对应的灰度边缘图,并根据物理属性参数,获取目标轮辋对应的第一物理属性特征;将灰度边缘图以及第一物理属性特征输入预先训练的轮辋重量预测模型进行分析推理,得到轮辋重量预测模型输出的目标轮辋的预测重量;其中,分析推理的过程包括:轮辋重量预测模型得到灰度边缘图的图像特征、与第一物理属性特征对应的第二物理属性特征,并融合图像特征以及第二物理属性特征,得到融合特征,以及根据融合特征确定目标轮辋的预测重量。本申请可通过采集轮辋图像以及相应的物理属性参数,来得到灰度边缘图以及第一物理属性特征,之后可将灰度边缘图以及第一物理属性特征输入预先训练的轮辋重量预测模型,由轮辋重量预测模型进行分析推理,先得到灰度边缘图对应的图像特征,以及第一物理属性特征对应的第二物理属性特征,从而融合图像特征与第二物理属性特征,来预测目标轮辋的重量并输出,该方式可结合轮辋图像中提取的灰度边缘图,以及物理属性参数,通过轮辋重量预测模型完成轮辋重量预测,相较于仅利用轮辋图像通过图像回归方法完成轮辋重量预测,可减少轮辋重量的预测误差,因此可提高轮辋重量预测精度。
Smart Images

Figure CN122966561A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of automotive technology, and in particular to a method for predicting wheel rim weight, a training method for a wheel rim weight prediction model, and an apparatus. Background Technology
[0002] With the development of automotive technology, a method for predicting the weight of automotive wheel rims has emerged. The weight of automotive wheel rims, i.e., aluminum alloy wheel hubs, is a key parameter in automotive design and cost accounting, directly affecting the vehicle's fuel economy, handling performance, and manufacturing costs. Therefore, an efficient prediction method is needed to estimate wheel rim weight in advance, thereby quickly determining the impact of wheel rim weight on overall vehicle performance and cost.
[0003] Currently, the prediction of car wheel rim weight is typically accomplished using image regression methods, which utilize convolutional neural networks (CNNs) to directly regress weight values from wheel rim images. However, these methods suffer from relatively large prediction errors and low accuracy. Summary of the Invention
[0004] Based on this, this application addresses the aforementioned technical problems by providing a wheel rim weight prediction method, a wheel rim weight prediction model training method, an apparatus, a computer device, a computer-readable storage medium, and a computer program product that can improve the accuracy of wheel rim weight prediction.
[0005] In a first aspect, this application provides a method for predicting wheel rim weight, including:
[0006] Obtain the image of the target wheel rim and the physical property parameters of the target wheel rim;
[0007] Based on the rim image, obtain the grayscale edge map corresponding to the target rim, and based on the physical attribute parameters, obtain the first physical attribute feature corresponding to the target rim;
[0008] The grayscale edge image and the first physical attribute feature are input into a pre-trained rim weight prediction model for analysis and reasoning to obtain the predicted weight of the target rim output by the rim weight prediction model. The analysis and reasoning process includes: the rim weight prediction model obtains the image features of the grayscale edge image and the second physical attribute feature corresponding to the first physical attribute feature, and fuses the image features and the second physical attribute feature to obtain a fused feature, and determines the predicted weight of the target rim based on the fused feature.
[0009] In one embodiment, the rim weight prediction model includes an image feature extraction module and a numerical feature encoding module. The rim weight prediction model obtains the image features of the grayscale edge map and the second physical attribute features corresponding to the first physical attribute features, including: the image feature extraction module determining the image features based on the grayscale edge map; and the multilayer perceptron structure of the numerical feature encoding module performing high-dimensional encoding processing on the first physical attribute features to obtain the second physical attribute features.
[0010] In one embodiment, the image feature extraction module includes an encoder and a decoder; the encoder includes multiple downsampling layers and a bottleneck layer, and the decoder includes multiple upsampling layers, the number of downsampling layers being the same as the number of upsampling layers; the image feature extraction module determines the image features based on the grayscale edge map, including: inputting the grayscale edge map into the encoder of the image feature extraction module, obtaining image coding features corresponding to each downsampling layer of the grayscale edge map through each downsampling layer of the encoder, and inputting the image coding features output by the last downsampling layer among the multiple downsampling layers into the bottleneck layer to obtain the latent image features output by the bottleneck layer; inputting the latent image features into the decoder of the image feature extraction module, obtaining image decoding features corresponding to each upsampling layer through each upsampling layer of the decoder and the image coding features of each downsampling layer corresponding to each upsampling layer; and performing image feature compression processing on the image decoding features output by the last upsampling layer among the multiple upsampling layers to obtain the image features.
[0011] In one embodiment, the step of inputting the latent image features into the decoder of the image feature extraction module, and obtaining image decoding features corresponding to each upsampling layer through the image coding features of each upsampling layer and each downsampling layer corresponding to each upsampling layer, includes: taking the first upsampling layer of the decoder as the current upsampling layer, and taking the latent image features as the input image features of the current upsampling layer; obtaining the current image coding features of the downsampling layer corresponding to the current upsampling layer from the image coding features of each downsampling layer; and inputting the input image features and the current image coding features into the current upsampling layer to obtain the image decoding features of the current upsampling layer. Image decoding features; if the current upsampling layer is not the last upsampling layer, the next upsampling layer of the current upsampling layer is taken as the new current upsampling layer, and the image decoding features of the current upsampling layer are taken as the input image features of the new current upsampling layer. The process returns to the step of obtaining the current image coding features of the downsampling layer corresponding to the current upsampling layer from the image coding features of each downsampling layer, until the current upsampling layer is the last upsampling layer; if the current upsampling layer is the last upsampling layer, the process proceeds to the step of performing image feature compression processing on the image decoding features output by the last upsampling layer among the multiple upsampling layers to obtain the image features.
[0012] In one embodiment, obtaining the grayscale edge map corresponding to the target rim based on the rim image includes: scaling the rim image to a preset image size and converting the scaled rim image into a grayscale image; obtaining the binarized edge map corresponding to the grayscale image and the gradient magnitude map corresponding to the grayscale image; and performing weighted processing on the binarized edge map and the gradient magnitude map according to preset weights to obtain the grayscale edge map.
[0013] In one embodiment, the physical attribute parameters include: the size parameters corresponding to the target rim, and the material category information corresponding to the target rim; obtaining the first physical attribute feature corresponding to the target rim based on the physical attribute parameters includes: performing parameter standardization processing on the size parameters to obtain standardized size parameters; performing string preprocessing on the material category information, and performing integer encoding on the preprocessed material category information to obtain a material code; concatenating the standardized size parameters and the material code to obtain the first physical attribute feature.
[0014] Secondly, this application also provides a training method for a wheel rim weight prediction model, including:
[0015] Obtain the first sample wheel rim image corresponding to the first sample wheel rim, the first physical attribute parameter corresponding to the first sample wheel rim, and the actual weight corresponding to the first sample wheel rim;
[0016] Based on the first sample wheel rim image, obtain the first sample grayscale edge map corresponding to the first sample wheel rim, and based on the first physical attribute parameters, obtain the first sample physical attribute features corresponding to the first sample wheel rim.
[0017] The grayscale edge image of the first sample and the physical attribute features of the first sample are input into the prediction model, and the prediction model outputs the predicted weight corresponding to the rim of the first sample.
[0018] Based on the first deviation between the predicted weight corresponding to the first sample rim and the actual weight corresponding to the first sample rim, the prediction model is trained to obtain the rim weight prediction model.
[0019] In one embodiment, training the prediction model based on a first deviation between the predicted weight corresponding to the first sample rim and the actual weight corresponding to the first sample rim to obtain a rim weight prediction model includes: fine-tuning the prediction model based on the first deviation to complete one round of training and obtain the prediction model after this round of training; checking whether the total number of rounds after this round of training reaches a preset number of rounds threshold; and if the total number of rounds reaches the number of rounds threshold, using the prediction model after this round of training as the rim weight prediction model.
[0020] In one embodiment, after verifying whether the total number of rounds after completing this training round reaches a preset round threshold, the method further includes: if the total number of rounds does not reach the round threshold, acquiring a second sample rim image, a second physical attribute parameter, and the actual weight of the second sample rim; acquiring a second sample grayscale edge map based on the second sample rim image, and acquiring a second sample physical attribute feature based on the second physical attribute parameter; and inputting the second sample grayscale edge map and the second sample physical attribute feature into the training round. The prediction model outputs the predicted weight corresponding to the second sample rim through the prediction model trained in the current round; if the second deviation between the predicted weight corresponding to the second sample rim and the actual weight corresponding to the second sample rim does not meet the preset condition, the prediction model trained in the current round is used as the new prediction model, and the steps of obtaining the first sample rim image, the first physical attribute parameters, and the actual weight corresponding to the first sample rim are returned; if the second deviation meets the preset condition, the prediction model with the smallest second deviation among the prediction models trained in each round is used as the rim weight prediction model.
[0021] Thirdly, this application also provides a rim weight prediction device, comprising:
[0022] The rim information acquisition module is used to acquire the rim image corresponding to the target rim, as well as the physical attribute parameters corresponding to the target rim;
[0023] The rim information processing module is used to obtain a grayscale edge map corresponding to the target rim based on the rim image, and to obtain a first physical attribute feature corresponding to the target rim based on the physical attribute parameters.
[0024] The rim weight prediction module is used to input the grayscale edge image and the first physical attribute feature into a pre-trained rim weight prediction model for analysis and reasoning, and to obtain the predicted weight of the target rim output by the rim weight prediction model; wherein, the analysis and reasoning process includes: the rim weight prediction model obtains the image features of the grayscale edge image and the second physical attribute feature corresponding to the first physical attribute feature, and fuses the image features and the second physical attribute feature to obtain a fused feature, and determines the predicted weight of the target rim based on the fused feature.
[0025] Fourthly, this application also provides a training device for a wheel rim weight prediction model, comprising:
[0026] The sample data acquisition module is used to acquire the first sample wheel rim image corresponding to the first sample wheel rim, the first physical attribute parameter corresponding to the first sample wheel rim, and the actual weight corresponding to the first sample wheel rim.
[0027] The sample information processing module is used to obtain a first sample grayscale edge map corresponding to the first sample rim image based on the first sample rim image, and to obtain a first sample physical attribute feature corresponding to the first sample rim based on the first physical attribute parameter.
[0028] The predicted weight output module is used to input the grayscale edge image of the first sample and the physical attribute features of the first sample into the prediction model, and output the predicted weight corresponding to the rim of the first sample through the prediction model.
[0029] The prediction model training module is used to train the prediction model based on the first deviation between the predicted weight corresponding to the first sample rim and the actual weight corresponding to the first sample rim, so as to obtain the rim weight prediction model.
[0030] Fifthly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method described above.
[0031] Sixthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in any of the above aspects.
[0032] In a seventh aspect, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the method described in any of the above aspects.
[0033] The aforementioned wheel rim weight prediction method, wheel rim weight prediction model training method, apparatus, computer equipment, computer-readable storage medium, and computer program product acquire a wheel rim image corresponding to the target wheel rim and physical attribute parameters corresponding to the target wheel rim; based on the wheel rim image, acquire a grayscale edge map corresponding to the target wheel rim, and based on the physical attribute parameters, acquire a first physical attribute feature corresponding to the target wheel rim; input the grayscale edge map and the first physical attribute feature into a pre-trained wheel rim weight prediction model for analysis and reasoning to obtain the predicted weight of the target wheel rim output by the wheel rim weight prediction model; wherein, the analysis and reasoning process includes: the wheel rim weight prediction model obtains the image features of the grayscale edge map and the second physical attribute feature corresponding to the first physical attribute feature, and fuses the image features and the second physical attribute feature to obtain a fused feature, and determines the predicted weight of the target wheel rim based on the fused feature. This application obtains a grayscale edge map and a first physical attribute feature by acquiring a wheel rim image and corresponding physical attribute parameters. The grayscale edge map and the first physical attribute feature are then input into a pre-trained wheel rim weight prediction model. The wheel rim weight prediction model analyzes and infers to obtain the image features corresponding to the grayscale edge map and the second physical attribute feature corresponding to the first physical attribute feature. The image features and the second physical attribute feature are then fused to predict and output the weight of the target wheel rim. This method combines the grayscale edge map extracted from the wheel rim image with the physical attribute parameters to complete the wheel rim weight prediction through the wheel rim weight prediction model. Compared to using only the wheel rim image and image regression methods to predict the wheel rim weight, this method reduces the prediction error and thus improves the accuracy of wheel rim weight prediction. Attached Figure Description
[0034] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0035] Figure 1 This is a schematic diagram of an optional process for predicting wheel rim weight in one embodiment;
[0036] Figure 2 This is a schematic diagram of an optional process for obtaining rim image features in one embodiment;
[0037] Figure 3 This is a schematic diagram of an optional process for obtaining a grayscale edge image in one embodiment;
[0038] Figure 4This is a schematic diagram of an optional process for training a rim weight prediction model in one embodiment;
[0039] Figure 5 This is a schematic diagram of an optional process for training a rim weight prediction model in another embodiment;
[0040] Figure 6 This is a schematic diagram of an optional process for training a rim weight prediction model in yet another embodiment;
[0041] Figure 7 This is a schematic diagram of an optional process for predicting wheel rim weight based on multimodal fusion in one embodiment;
[0042] Figure 8 This is a schematic diagram of an optional edge blending preprocessing flow in one embodiment;
[0043] Figure 9 This is a schematic diagram of an optional architecture for a multimodal fusion neural network in one embodiment;
[0044] Figure 10 This is a schematic diagram of an optional structure of the rim weight prediction device in one embodiment;
[0045] Figure 11 This is a schematic diagram of an optional structure for a training device for a wheel rim weight prediction model in one embodiment;
[0046] Figure 12 This is a schematic diagram of an optional internal structure of a computer device in one embodiment. Detailed Implementation
[0047] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of this application.
[0048] The terms "first," "second," etc., used in this application may be used to describe various elements, but these elements are not limited by these terms. These terms are used only to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.
[0049] In one embodiment, such as Figure 1As shown, a method for predicting wheel rim weight is provided. This embodiment illustrates the application of this method to a terminal. It is understood that this method can also be applied to a server, and to a system including both a terminal and a server, and implemented through interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0050] Step S101: Obtain the rim image corresponding to the target rim, as well as the physical property parameters corresponding to the target rim.
[0051] The target rim refers to the car rim for which weight prediction is required, the rim image refers to the original RGB image of the car rim, and the physical property parameters are parameters used to characterize the different physical properties of the target rim, such as the size of the target rim and the materials used. Specifically, when predicting the weight of the target rim, the terminal can first acquire the original RGB image corresponding to the target rim as the rim image, and then acquire the corresponding physical property parameters of the target rim.
[0052] Step S102: Based on the rim image, obtain the grayscale edge image corresponding to the target rim, and based on the physical attribute parameters, obtain the first physical attribute feature corresponding to the target rim.
[0053] A grayscale edge map refers to an image obtained by edge extraction from an original grayscale image. This grayscale edge map can retain edge grayscale information of different intensities, while the first physical attribute feature refers to the physical attribute parameter feature obtained after standardization of the physical attribute parameters.
[0054] Specifically, after obtaining the rim image and physical attribute parameters, the terminal can first obtain the corresponding grayscale edge map based on the rim image, and then standardize the physical attribute parameters to obtain the first physical attribute feature corresponding to the target rim.
[0055] Step S103: Input the grayscale edge image and the first physical attribute feature into the pre-trained rim weight prediction model for analysis and reasoning to obtain the predicted weight of the target rim output by the rim weight prediction model; wherein, the analysis and reasoning process includes: the rim weight prediction model obtains the image features of the grayscale edge image and the second physical attribute feature corresponding to the first physical attribute feature, and fuses the image features and the second physical attribute feature to obtain the fused feature, and determines the predicted weight of the target rim based on the fused feature.
[0056] The rim weight prediction model is a pre-trained neural network model used to predict rim weight. The image features are image features extracted from grayscale edge maps by the rim weight prediction model, while the second physical attribute features are numerical features obtained by processing the first physical attribute features by the rim weight prediction model.
[0057] Specifically, after obtaining the grayscale edge image and the first physical attribute features, these can be used as inputs to the rim weight prediction model. The model then performs an analysis and inference process, first processing the grayscale edge image and the first physical attribute features separately. Image features are extracted from the grayscale edge image, and numerical features are processed from the first physical attribute features to obtain the corresponding second physical attribute features. The rim weight prediction model can then fuse the image features and the second physical attribute features. This fusion can be achieved by concatenating the image features and the second physical attribute features to obtain a fused feature, or by using multi-head cross-attention for attention-weighted fusion. Finally, the rim weight prediction model uses the fused features to obtain and output the predicted weight of the target rim.
[0058] In the aforementioned rim weight prediction method, the following steps are taken: First, the rim image corresponding to the target rim and the physical attribute parameters corresponding to the target rim are acquired. Then, based on the rim image, a grayscale edge map corresponding to the target rim is obtained, and based on the physical attribute parameters, a first physical attribute feature corresponding to the target rim is obtained. Finally, the grayscale edge map and the first physical attribute feature are input into a pre-trained rim weight prediction model for analysis and reasoning to obtain the predicted weight of the target rim output by the rim weight prediction model. The analysis and reasoning process includes: the rim weight prediction model obtains the image features of the grayscale edge map and the second physical attribute feature corresponding to the first physical attribute feature; the image features and the second physical attribute feature are fused to obtain a fused feature; and the predicted weight of the target rim is determined based on the fused feature. This application obtains a grayscale edge map and a first physical attribute feature by acquiring a wheel rim image and corresponding physical attribute parameters. The grayscale edge map and the first physical attribute feature are then input into a pre-trained wheel rim weight prediction model. The wheel rim weight prediction model analyzes and infers to obtain the image features corresponding to the grayscale edge map and the second physical attribute feature corresponding to the first physical attribute feature. The image features and the second physical attribute feature are then fused to predict and output the weight of the target wheel rim. This method combines the grayscale edge map extracted from the wheel rim image with the physical attribute parameters to complete the wheel rim weight prediction through the wheel rim weight prediction model. Compared to using only the wheel rim image and image regression methods to predict the wheel rim weight, this method reduces the prediction error and thus improves the accuracy of wheel rim weight prediction.
[0059] In one embodiment, the rim weight prediction model includes an image feature extraction module and a numerical feature encoding module. The rim weight prediction model obtains image features of a grayscale edge map and second physical attribute features corresponding to the first physical attribute features. It may further include: the image feature extraction module determining image features based on the grayscale edge map; and the multilayer perceptron structure of the numerical feature encoding module performing high-dimensional encoding processing on the first physical attribute features to obtain the second physical attribute features.
[0060] In this embodiment, the rim weight prediction model may include an image feature extraction module and a numerical feature encoding module. The image feature extraction module is mainly used to extract image features, while the numerical feature encoding module is mainly used to process physical attribute features. The numerical feature encoding module can be implemented through a multilayer perceptron structure, i.e., an MLP structure.
[0061] Specifically, the terminal can first input the grayscale edge image into the image feature extraction module of the rim weight prediction model, and the image feature extraction module outputs the image features corresponding to the grayscale edge image. The terminal can also input the first physical attribute feature into the numerical feature encoding module. The original numerical feature, i.e. the first physical attribute feature, is processed by high-dimensional encoding through the multilayer perceptron structure of the numerical feature encoding module to obtain a high-dimensional numerical feature vector, i.e. the second physical attribute feature.
[0062] In this embodiment, the image feature extraction module of the rim weight prediction model can be used to extract the image features corresponding to the grayscale edge map, and the second physical attribute features can be obtained by using the numerical feature encoding module. The numerical feature encoding module can adopt a multilayer perceptron structure to complete high-dimensional encoding processing, which can improve the efficiency of multimodal feature processing.
[0063] Furthermore, the image feature extraction module includes an encoder and a decoder; the encoder contains multiple downsampling layers and a bottleneck layer, and the decoder contains multiple upsampling layers, with the number of downsampling layers being the same as the number of upsampling layers; for example... Figure 2 As shown, the image feature extraction module, which determines image features based on the grayscale edge map, may further include:
[0064] Step S201: Input the grayscale edge map into the encoder of the image feature extraction module. Through each downsampling layer of the encoder, obtain the image coding features of the grayscale edge map corresponding to each downsampling layer. Then, input the image coding features output by the last downsampling layer into the bottleneck layer to obtain the latent features of the image.
[0065] In this embodiment, the image feature extraction module can be implemented using an encoder + decoder structure, specifically a U-Net encoder-decoder architecture. The encoder can contain multiple downsampling layers, such as five downsampling layers and a bottleneck layer. The image encoded features are the image features output by each downsampling layer, while the latent image features are the image features output by the bottleneck layer.
[0066] Specifically, the terminal can input the grayscale edge image into the encoder of the image feature extraction module. First, the encoder outputs the image coding features corresponding to each downsampling layer of the grayscale edge image. Then, the image coding features output by the last downsampling layer are input into the bottleneck layer of the encoder to obtain the latent features of the image.
[0067] Step S202: Input the latent features of the image into the decoder of the image feature extraction module, and obtain the image decoding features corresponding to each upsampling layer through the image coding features of each upsampling layer and each downsampling layer corresponding to each upsampling layer.
[0068] After obtaining the latent features of the image, these features can be input into the decoder of the image feature extraction module. This decoder can contain multiple upsampling layers, the same number as the downsampling layers, to combine the image coding features of the downsampling layer corresponding to each upsampling layer. For example, the image coding features of the corresponding downsampling layer can be concatenated to the corresponding upsampling layer of the decoder through skip connections to output the image decoding features of each upsampling layer.
[0069] For example, there can be five downsampling layers: downsampling layer 1, downsampling layer 2, downsampling layer 3, downsampling layer 4, and downsampling layer 5. Similarly, there can be five upsampling layers: upsampling layer 1, upsampling layer 2, upsampling layer 3, upsampling layer 4, and upsampling layer 5. Each upsampling layer corresponds to one downsampling layer; for example, upsampling layer 1 corresponds to downsampling layer 5, upsampling layer 2 corresponds to downsampling layer 4, upsampling layer 3 corresponds to downsampling layer 3, upsampling layer 4 corresponds to downsampling layer 2, and upsampling layer 5 corresponds to downsampling layer 1. The image decoding features output by each upsampling layer are obtained by combining the image encoding features of the corresponding downsampling layer. For instance, the image decoding features of upsampling layer 1 are obtained by concatenating the image encoding features output by downsampling layer 5, and so on.
[0070] Step S203: Perform image feature compression processing on the image decoding features output by the last upsampling layer to obtain the image features corresponding to the grayscale edge map.
[0071] After obtaining the image decoding features output by the last upsampling layer, image feature compression processing can be performed on the image decoding features. For example, the image decoding features output by the last upsampling layer can be compressed by 1×1 convolution and global adaptive average pooling to obtain the image features corresponding to the grayscale edge map.
[0072] In this embodiment, multiple image coding features and image latent features can be output through multiple downsampling layers and bottleneck layers of the encoder, respectively. Then, the image latent features can be input into the decoder. Each upsampling layer of the decoder can also output decoding features by combining the image coding features output by the corresponding downsampling layer through skip connections. The image decoding features are then compressed to obtain the final image features. This method can effectively improve the accuracy of image feature processing.
[0073] Further, step S202 may further include: taking the first upsampling layer of the decoder as the current upsampling layer, and taking the latent image features as the input image features of the current upsampling layer; obtaining the current image coding features of the downsampling layer corresponding to the current upsampling layer from the image coding features of each downsampling layer; inputting the input image features and the current image coding features into the current upsampling layer to obtain the image decoding features of the current upsampling layer; if the current upsampling layer is not the last upsampling layer, taking the next upsampling layer of the current upsampling layer as the new current upsampling layer, and taking the image decoding features of the current upsampling layer as the input image features of the new current upsampling layer, and returning to execute the step of obtaining the current image coding features of the downsampling layer corresponding to the current upsampling layer from the image coding features of each downsampling layer, until the current upsampling layer is the last upsampling layer, to obtain the image decoding features of each upsampling layer.
[0074] The current upsampling layer can refer to any one of the multiple upsampling layers included in the decoder. In this embodiment, the image decoding features corresponding to each upsampling layer can be obtained through the following process: First, the latent image features output by the bottleneck layer are used as the input image features of the current upsampling layer. Then, the input image features of the current upsampling layer and the current image coding features of the downsampling layer corresponding to the current upsampling layer can be combined to output the image decoding features of the current upsampling layer. Since the current upsampling layer is upsampling layer 1 at this time, the image coding features output by downsampling layer 5 can be used as the current image coding features. That is, by combining the latent image features and the image coding features output by downsampling layer 5, the image decoding features of upsampling layer 1 can be obtained.
[0075] Next, it can be determined whether the current upsampling layer is the last upsampling layer of the decoder. If not, the next upsampling layer of the current upsampling layer can be taken as the new current upsampling layer, that is, upsampling layer 2 can be taken as the new current upsampling layer. At the same time, the image decoding features output by upsampling layer 1 can be used as the input image features of upsampling layer 2, and combined with the image encoding features output by downsampling layer 4, the image decoding features of upsampling layer 2 can be obtained. The above process is repeated until the current upsampling layer is the last upsampling layer of the decoder. At this time, the image decoding features of all upsampling layers can be obtained.
[0076] In this embodiment, the image decoding features of the current upsampling layer can be obtained by combining the input image features of the current upsampling layer and the current image encoding features of the corresponding downsampling layer. These image decoding features can be used as the input image features of the next upsampling layer. In this way, the image decoding features of all upsampling layers can be obtained. Since the image encoding features of each downsampling layer of the encoder are concatenated to the corresponding layer of the decoder, multi-scale spatial information can be preserved, enabling the network to simultaneously perceive the overall shape (low-level features) and fine structure (high-level features) of the rim.
[0077] In one embodiment, such as Figure 3 As shown, step S102 may further include:
[0078] Step S301: Scale the rim image to a preset image size and convert the scaled rim image into a grayscale image.
[0079] The preset image size can be a pre-set standard image size. After receiving the rim image, the rim image can be scaled to the preset size, for example, scaled proportionally to 512×512 pixels. Then, the scaled rim image can be converted to grayscale to remove color interference and retain structural information.
[0080] Step S302: Obtain the binarized edge map corresponding to the grayscale image and the gradient magnitude map corresponding to the grayscale image.
[0081] Binary edge map refers to a binary image containing only edge and non-edge pixel values. This binary edge map can be obtained by performing Canny edge detection on a grayscale image. Gradient magnitude map, on the other hand, refers to a grayscale image that retains the original gradient intensity information. This gradient magnitude map can be obtained by performing Sobel gradient detection on a grayscale image.
[0082] Specifically, the terminal can execute the Canny algorithm with a low threshold of 50 and a high threshold of 150 to extract the precise edge contours of the rim (spoke edges, flange contours, etc.), output a binary edge map, and calculate the Sobel gradients in the horizontal and vertical directions of the grayscale image respectively, then perform normalization processing, and finally merge them into a gradient magnitude map.
[0083] Step S303: The binarized edge map and gradient magnitude map are weighted according to preset weights to obtain a grayscale edge map.
[0084] After obtaining the binarized edge map and gradient magnitude map, the binarized edge map and gradient magnitude map can be weighted and fused according to preset weights to obtain a grayscale edge map. The fused grayscale edge map retains both Canny's accurate edge localization and Sobel's continuous gradient information, thus providing a more comprehensive representation of the rim structure features.
[0085] In this embodiment, after obtaining the rim image, it can first be scaled to a preset size and converted into a grayscale image. Then, a binarized edge map can be obtained through Canny edge detection, and a gradient magnitude map can be output through Sobel gradient detection. Finally, the binarized edge map and the gradient magnitude map can be weighted and fused to obtain a grayscale edge map. This method allows the fused grayscale edge map to retain both the accurate edge localization of Canny and the continuous gradient information of Sobel, thus providing a more comprehensive representation of the rim structural features.
[0086] In one embodiment, the physical attribute parameters include: the size parameters corresponding to the target rim and the material category information corresponding to the target rim; step S101 may further include: performing parameter standardization processing on the size parameters to obtain standardized size parameters; performing string preprocessing on the material category information and performing integer encoding on the preprocessed material category information to obtain a material code; and concatenating the standardized size parameters and the material code to obtain the first physical attribute feature.
[0087] In this embodiment, the physical property parameters of the target rim may include two parts: the size parameters of the target rim, such as the width, height and depth of the target rim, and the material category information of the target rim, that is, the material category used in the target rim.
[0088] Standardized dimensional parameters refer to the parameters obtained by standardizing dimensional parameters. For any dimensional parameter, its mean and standard deviation can be obtained first, and then used to standardize the parameter. For example, based on the width of each sample wheel rim, the mean and standard deviation of the width can be obtained. Then, the width of the target wheel rim can be standardized using the mean and standard deviation to obtain the standardized width of the target wheel rim. Similarly, the height and width of the target wheel rim can also be standardized using the above process to obtain standardized dimensional parameters.
[0089] As for the material category information, since it is a string, it needs to be converted into a numerical representation first. Specifically, the material category information can be preprocessed first, for example, by converting the string to uppercase and removing leading and trailing spaces. Then, the preprocessed material category information can be encoded into an integer to obtain the material code. For example, the material string can be encoded into an integer using LabelEncoder to obtain the material code.
[0090] Finally, the terminal can stitch together the standardized dimensional parameters, namely the standardized width, height and depth, and the material code, to obtain a 4-dimensional numerical feature vector, which serves as the first physical attribute feature.
[0091] In this embodiment, the size parameters in the physical property parameters can also be standardized, and the material category information in the physical property parameters can be encoded into integers to obtain the first physical property feature. This method can eliminate the dimension and format problems of the original data and adapt to the structural requirements of subsequent physical property feature processing, thus improving the accuracy of model prediction.
[0092] In one embodiment, such as Figure 4 As shown, a training method for a wheel rim weight prediction model is also provided. This embodiment illustrates the application of this method to a server. In this embodiment, the method includes the following steps:
[0093] Step S401: Obtain the first sample wheel rim image, the first physical attribute parameter, and the actual weight of the first sample wheel rim.
[0094] The first sample rim refers to the training sample rim used in the training set for training the rim weight prediction model. The first sample rim image refers to the rim image corresponding to the first sample rim. The first physical attribute parameter refers to the physical attribute parameter corresponding to the first sample rim. The true weight refers to the actual weight of the first sample rim.
[0095] In this embodiment, the training set can pre-store the rim image, physical attribute parameters and real weight corresponding to each first sample rim. When training the model, the above-mentioned rim image, physical attribute parameters and real weight can be obtained.
[0096] Step S402: Based on the first sample rim image, obtain the first sample grayscale edge image corresponding to the first sample rim, and based on the first physical attribute parameters, obtain the first sample physical attribute features corresponding to the first sample rim.
[0097] The first sample grayscale edge image refers to the grayscale edge image corresponding to the first sample rim, and the first sample physical attribute feature refers to the physical attribute feature corresponding to the first sample rim. For example, the size parameter part in the first physical attribute parameter can be standardized, and the material category can be numerically encoded and then spliced together.
[0098] After obtaining the first sample wheel rim image, a corresponding grayscale edge map can be generated as the first sample grayscale edge map, and the first sample physical attribute features corresponding to the first sample wheel rim can be obtained according to the first physical attribute parameters.
[0099] Step S403: Input the grayscale edge image of the first sample and the physical attribute features of the first sample into the prediction model, and output the predicted weight corresponding to the rim of the first sample through the prediction model.
[0100] Step S404: Based on the first deviation between the predicted weight of the first sample rim and the actual weight of the first sample rim, train the prediction model to obtain the rim weight prediction model.
[0101] The prediction model refers to the neural network model that needs to be trained. The predicted weight refers to the weight of the first sample rim output by the prediction model. The first deviation refers to the deviation between the predicted weight and the actual weight of the first sample rim. After obtaining the grayscale edge image and physical attribute features of the first sample, these can be input into the prediction model that needs to be trained, and then the prediction model can output the predicted weight.
[0102] Then, the deviation between the predicted weight output by the prediction model and the actual weight can be calculated, and the prediction model can be trained using the first deviation to obtain the final rim weight prediction model used to predict the rim weight.
[0103] In the training method of the above-mentioned wheel rim weight prediction model, the first sample wheel rim image, the first physical attribute parameter, and the actual weight of the first sample wheel rim are obtained. Based on the first sample wheel rim image, the first sample grayscale edge map is obtained, and based on the first physical attribute parameter, the first sample physical attribute feature is obtained. The first sample grayscale edge map and the first sample physical attribute feature are input into the prediction model, and the prediction model outputs the predicted weight of the first sample wheel rim. Based on the first deviation between the predicted weight and the actual weight of the first sample wheel rim, the prediction model is trained to obtain the wheel rim weight prediction model. This embodiment utilizes the rim image and physical attribute parameters of the first sample rim to obtain the grayscale edge map of the first sample and the corresponding physical attribute features of the first sample rim. Then, the grayscale edge map and the corresponding physical attribute features of the first sample rim can be input into the prediction model to obtain the predicted weight. The model training is completed by using the deviation between the predicted weight and the actual weight corresponding to the first sample rim. The rim weight prediction model trained in this way can combine the grayscale edge map extracted from the rim image and the physical attribute parameters to complete the rim weight prediction. Compared with using only the rim image to complete the rim weight prediction, this rim weight prediction model can reduce the prediction error of the rim weight, thus improving the accuracy of rim weight prediction.
[0104] In one embodiment, such as Figure 5 As shown, step S404 may further include:
[0105] Step S501: Based on the first deviation, fine-tune the prediction model to complete one round of training and obtain the prediction model after this round of training.
[0106] Specifically, after obtaining the first bias, the model parameters of the prediction model can be fine-tuned using the first bias to complete the model training for one training round, at which point the prediction model after completing this training round can be obtained.
[0107] Step S502: Check whether the total number of rounds after completing this round of training has reached the preset number of rounds threshold;
[0108] Step S503: When the total number of rounds reaches the round number threshold, the prediction model trained in this round is used as the rim weight prediction model.
[0109] The total number of training rounds refers to the total number of training rounds, while the maximum number of training rounds is a pre-set maximum. For example, the maximum number of training rounds could be 100, meaning that training the prediction model will end after 100 rounds. Specifically, after completing a round of training, it can be determined whether the total number of training rounds has reached the set maximum number of training rounds. If it has, the prediction model after this round of training is used as the rim weight prediction model.
[0110] In this embodiment, the model parameters can be fine-tuned through the first deviation to complete one round of training, and the total number of rounds after this round of training can be counted to see if it reaches the round number threshold. If it does, the prediction model after this round of training can be used as the rim weight prediction model. This method can improve the resource utilization rate of training the rim weight prediction model.
[0111] Furthermore, such as Figure 6 As shown, after step S502, the following may also be included:
[0112] Step S601: If the total number of rounds does not reach the number of rounds threshold, obtain the second sample wheel rim image, the second physical attribute parameter, and the actual weight of the second sample wheel rim.
[0113] The second sample rim refers to the training sample rims in the validation set used to test the model performance of the prediction model after this round of training. The second sample rim image refers to the rim image corresponding to the second sample rim. The second physical attribute parameter refers to the physical attribute parameter corresponding to the second sample rim. The true weight refers to the actual weight of the second sample rim.
[0114] In this embodiment, the validation set can pre-store the rim image, physical attribute parameters and real weight of each second sample rim. After completing this round of training, the performance of the prediction model after this round of training can also be verified. Therefore, the rim image, physical attribute parameters and real weight of the second sample rim can be obtained from the validation set.
[0115] Step S602: Based on the second sample rim image, obtain the second sample grayscale edge map corresponding to the second sample rim, and based on the second physical attribute parameters, obtain the second sample physical attribute features corresponding to the target rim;
[0116] Step S603: Input the grayscale edge image of the second sample and the physical attribute features of the second sample into the candidate rim weight prediction model, and output the predicted weight corresponding to the second sample rim through the candidate rim weight prediction model.
[0117] The second sample grayscale edge image refers to the grayscale edge image corresponding to the second sample rim, and the second sample physical property feature refers to the physical property feature corresponding to the second sample rim. For example, the size parameter part in the second physical property parameter can be standardized, and the material category can be numerically encoded and then spliced together.
[0118] After obtaining the second sample rim image, a corresponding grayscale edge map can be generated as the second sample grayscale edge map. Based on the second physical attribute parameters, the second sample physical attribute features corresponding to the second sample rim can be obtained. Then, the second sample grayscale edge map and the second sample physical attribute features can be input into the prediction model trained in this round, thereby outputting the predicted weight corresponding to the second sample rim.
[0119] Step S604: If the second deviation between the predicted weight of the second sample rim and the actual weight of the second sample rim does not meet the preset condition, the candidate rim weight prediction model is used as the rim weight prediction model to be trained, and the process returns to step S501.
[0120] Step S605: If the second deviation meets the preset conditions, the prediction model with the smallest second deviation among the prediction models trained in each round is taken as the rim weight prediction model.
[0121] The second deviation refers to the difference between the predicted weight of the second sample rim and the actual weight of the second sample rim. If the second deviation does not meet the preset conditions, such as the second deviation not meeting the preset training stop condition, the training stop condition can be that the second deviation does not decrease for a preset number of consecutive rounds, such as not decreasing the second deviation for 10 consecutive rounds. Then the prediction model trained in this round can be used as the new prediction model, and the prediction model can be trained again. That is, return to step S501 to train the model until the second deviation meets the preset conditions. The prediction model with the smallest second deviation is then used as the rim weight prediction model.
[0122] In this embodiment, the quality of the candidate rim weight prediction model can also be verified by using the second sample rim. Furthermore, the model training can be terminated early when the second deviation of the second sample rim meets the preset condition. This method can further improve the training efficiency of the rim weight prediction model while ensuring the prediction accuracy of the rim weight prediction model.
[0123] In one embodiment, a method for predicting rim weight based on multimodal fusion is also provided. This method establishes a supervised regression model from image information and physical parameters to rim weight by uniformly encoding and fusing structural features reflecting the rim flange, spokes, and opening boundaries with numerical features such as the rim's width, height, depth, and material type. Figure 7As shown, the overall method flow is as follows:
[0124] This embodiment can be further written as .in, This is the edge map of the single-channel structure obtained by fusing Canny and Sobel. For numerical eigenvectors, For U-Net image branches, For numerical MLP branch, For fusion regression MLP.
[0125] Step 1: Image preprocessing, fusing Canny and Sobel edge detection.
[0126] like Figure 8 As shown, the input color image of the wheel rim (at any resolution) is processed as follows:
[0127] Image preprocessing is performed sequentially in the code. Grayscale conversion Canny edge detection and Sobel gradient calculation. This can be written as... , , , , 50 and 150 correspond to CANNY_THRESHOLD1 and CANNY_THRESHOLD2 in ModelConfig, and 0.5:0.5 corresponds to the fusion weights of cv2.addWeighted.
[0128] 1. Uniform size: The image is scaled proportionally to 512×512 pixels.
[0129] 2. Grayscale conversion: Converts RGB images to grayscale images, removing color interference while preserving structural information.
[0130] 3. Canny Edge Detection: The Canny algorithm is executed with a low threshold of 50 and a high threshold of 150 to extract the precise edge contours of the wheel rim (spoke edges, flange contours, etc.) and output a binarized edge map. .
[0131] 4. Sobel gradient edge detection: Calculate the horizontal direction (…) ) and vertical direction ( The Sobel gradients of the data are merged into a gradient magnitude map. Normalized to 0~255.
[0132] 5. Weighted Fusion: The Canny edge map and the Sobel gradient map are weighted and fused with a ratio of 0.5:0.5.
[0133]
[0134] The final result is a 512×512 grayscale edge map, which serves as the image input for the neural network. The fused edge map retains both Canny's precise edge localization and Sobel's continuous gradient information, providing a more comprehensive representation of the rim's structural features.
[0135] Step 2: Numerical feature standardization and coding.
[0136] The four physical parameters of the wheel rim are standardized and used as numerical modal inputs:
[0137] The numerical branches are constructed strictly according to the training statistics in the code: , , , .in This indicates that special characters, leading and trailing whitespace, and capitalization should be applied to the material string; if the material is empty, it should be recorded as "Unknown". Finally... Inputting a numerical MLP composed of Linear(4→128) and Linear(128→256) results in a 256-dimensional MLP. .
[0138] 1. Geometric parameter standardization (Z-score):
[0139] Outer diameter width w: (Mean: 503.37 mm, Standard deviation: 48.10 mm)
[0140] Outer diameter height h:
[0141] Rim depth d: (Mean 221.0 mm, standard deviation 24.51 mm)
[0142] The statistical parameters are derived from the full sample statistics of the training dataset to ensure standardized consistency.
[0143] 2. Material Category Encoding: LabelEncoder is used to encode material strings (such as "AlSi7Mg", "AlSi12Cu", "A356", etc.) using integers. Before encoding, the strings are uniformly converted to uppercase and leading and trailing spaces are removed to ensure encoding stability. The material code is concatenated with geometric parameters to form a 4-dimensional numerical feature vector. .
[0144] Step 3: Multimodal fusion neural network (PartsWeightUNet).
[0145] like Figure 9As shown, a multimodal fusion neural network (named PartsWeightUNet) is designed, consisting of three sub-modules:
[0146] 1. Image Feature Extraction Submodule – UNet Encoder / Decoder:
[0147] The U-Net encoder for the image branch downsamples layer by layer in the code at 64, 128, 256, 512, and 1024 channels, and expands to 2048 channels at the bottleneck layer; the decoder upsamples through ConvTranspose2d and forms a Skip Connection with the corresponding encoding layer by executing torch.cat(skip,x). At the decoding end, the base_channels are mapped to 512 channels through a 1×1 convolution, and then obtained by AdaptiveAvgPool2d(1). This structure allows the rim profile, spoke edges, and opening boundaries to be preserved in multi-scale spatial features.
[0148] The U-Net encoder-decoder architecture is used to extract multi-scale spatial features of the wheel rim structure:
[0149] (1) Encoder (5-layer downsampling):
[0150] Layer 1: DoubleConv (1-64 channels, two layers of 3×3 convolution + BatchNorm + ReLU);
[0151] Layer 2: MaxPool(2) + DoubleConv (64-128 channels);
[0152] Layer 3: MaxPool(2) + DoubleConv (128-256 channels);
[0153] Layer 4: MaxPool(2) + DoubleConv (256-512 channels);
[0154] Layer 5: MaxPool(2) + DoubleConv (512-1024 channels);
[0155] Bottleneck layer: DoubleConv (1024-2048 channels).
[0156] (2) Decoder (5-layer upsampling, including Skip Connection):
[0157] Layer 1: ConvTranspose2d(2)+Concat(Skip from layer 5)+DoubleConv(2048-1024);
[0158] Layer 2: ConvTranspose2d(2)+Concat(Skip from layer 4)+DoubleConv(1536-512);
[0159] Layer 3: ConvTranspose2d(2)+Concat(Skip from layer 3)+DoubleConv(768-256);
[0160] Layer 4: ConvTranspose2d(2)+Concat(Skip from layer 2)+DoubleConv(384-128);
[0161] Layer 5: ConvTranspose2d(2)+Concat(Skip from layer 1)+DoubleConv(192-64).
[0162] Skip Connection directly concatenates features from each layer of the encoder to the corresponding layer of the decoder, preserving multi-scale spatial information and enabling the network to simultaneously perceive the overall shape of the rim (low-level features) and its fine structure (high-level features).
[0163] (3) Image feature compression: The spatial features of the 64-channel output (512×512×64) of the last layer of the decoder are compressed into a 512-dimensional image feature vector by 1×1 convolution (64-512 channels) + global adaptive average pooling (AdaptiveAvgPool2d). .
[0164] 2. Numerical Feature Coding Submodule (MLP):
[0165] High-dimensional encoding of 4-dimensional numerical feature vectors using a multilayer perceptron (MLP):
[0166]
[0167] Specific structure: Linear(4-128) + ReLU + Dropout(0.2) + Linear(128-256), outputting a 256-dimensional numerical feature vector. .
[0168] 3. Multimodal feature fusion submodule, fusing MLP:
[0169] The image feature vector and the numerical feature vector are concatenated to form a 768-dimensional fused feature, which is then used by the fused MLP to output the weight prediction value.
[0170] The fusion phase is executed by code. ,in , Therefore, dim(F) = 768. The fused MLP can be written as:
[0171]
[0172] Its actual hierarchy is 768-512-256-128-1, and Dropout(0.3) and Dropout(0.2) are used in the first two hidden layers. Final output The baseline weight prediction is in kg units.
[0173]
[0174] The MLP structure is fused as follows: Linear(768-512) + ReLU + Dropout(0.3) + Linear(512-256) + ReLU + Dropout(0.2) + Linear(256-128) + ReLU + Linear(128-1), and the final output is a 1-dimensional scalar, which is the predicted weight (unit: kg).
[0175] Step 4: Supervised training and model parameter determination.
[0176] To enable those skilled in the art to reproduce this solution, the following training and parameter determination process is performed before the model is put into inference:
[0177] The training configuration can be consistent with the code configuration: input image size 512×512, training set to validation set ratio 0.8:0.2, batch size=16, learning rate=0.001, maximum number of training epochs 100, early stopping patience value 10. The training objective is to minimize... ,in Output the weight for the model. The actual weight of the sample is used; after training, the model weights, material encoder and geometric parameter standardized statistics are fixed to ensure that the construction of X and E in the inference stage is consistent with that in the training stage.
[0178] 1. Training Sample Composition: Each sample includes at least a front view image of the rim, its width, height, depth, material type, and a label indicating the measured weight of the rim. The measured weight label can be obtained through sample weighing or production inspection records.
[0179] 2. Data preprocessing consistency: The images in the training samples undergo the preprocessing described in step one, and the numerical parameters undergo the standardization and encoding described in step two, so that the training phase and the inference phase use the same data representation method.
[0180] 3. Dataset Partitioning: The samples are divided into training and validation sets according to a preset ratio. In one implementation, a partitioning ratio of 0.8:0.2 is used; the data is fed into the network in batches during the training phase.
[0181] 4. Supervised regression training: to predict weight Compared with the measured weight The regression error between the two values is used as the optimization objective. The mean squared error loss function can be used:
[0182]
[0183] 5. Example of training parameters: In one implementation, the image input size is 512×512, the batch size is 16, the learning rate is 0.001, the maximum number of training rounds is 100, and the early stopping patience value is set to 10 to avoid overfitting.
[0184] 6. Model selection: The regression error on the validation set is used as the basis for model selection. The model parameters and material coding mapping table with the smallest validation error are retained as the fixed model for subsequent inference.
[0185] Step 5: Reasoning Process.
[0186] The complete reasoning process is as follows:
[0187] 1. Input the rim image (any format, RGB color image) and 4 physical parameters (width, height, depth, material).
[0188] 2. Perform image preprocessing in step one to obtain a 512×512 grayscale edge image, normalize it to [0,1], and reshape it into a tensor of [1,1,512,512].
[0189] 3. Perform the numerical feature processing in step two to obtain a 4-dimensional numerical feature tensor.
[0190] 4. Call the PartsWeightUNet model that has been trained and whose parameters have been fixed, feed the image tensor and numerical feature tensor into the image submodule and numerical submodule respectively, extract the features and fuse them, and output the predicted weight value.
[0191] 5. The inference phase uses standardized parameters and material encoding mappings consistent with those used in the training phase to avoid prediction bias caused by inconsistent data representation.
[0192] This embodiment allows image structural features, geometric dimensions, and material categories to be input into the model. Compared to regression methods that rely solely on image pixels, this approach is more effective in reducing prediction bias across different specifications and material samples. Edge fusion preprocessing highlights spoke contours, rim boundaries, and opening structures from the original color image, making it easier for the model to learn visual features related to weight distribution. Through material encoding and a unified numerical feature channel, a single model can handle rim samples of various material types, reducing the workload of modeling each material separately. This embodiment clearly outlines the image preprocessing, numerical standardization, encoding mapping, and model selection processes, ensuring data consistency between the training and inference phases and reducing post-deployment drift. The image modality primarily reflects the rim's structural appearance, while the numerical modality mainly carries dimensions and material properties. Encoding these two modalities separately and then fusing them facilitates error analysis and subsequent model iterations. The image encoder, numerical encoder, and fusion module are independent of each other, allowing for the replacement of any sub-module without altering the overall methodology.
[0193] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.
[0194] Based on the same inventive concept, this application also provides a rim weight prediction device for implementing the rim weight prediction method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations of one or more rim weight prediction device embodiments provided below can be found in the limitations of the rim weight prediction method described above, and will not be repeated here.
[0195] In one embodiment, such as Figure 10 As shown, a wheel rim weight prediction device is provided, comprising: a wheel rim information acquisition module 1001, a wheel rim information processing module 1002, and a wheel rim weight prediction module 1003, wherein:
[0196] The rim information acquisition module 1001 is used to acquire the rim image corresponding to the target rim, as well as the physical attribute parameters corresponding to the target rim;
[0197] The rim information processing module 1002 is used to obtain a grayscale edge map corresponding to the target rim based on the rim image, and to obtain a first physical attribute feature corresponding to the target rim based on the physical attribute parameters.
[0198] The rim weight prediction module 1003 is used to input the grayscale edge image and the first physical attribute feature into a pre-trained rim weight prediction model for analysis and reasoning, and obtain the predicted weight of the target rim output by the rim weight prediction model; wherein, the analysis and reasoning process includes: the rim weight prediction model obtains the image features of the grayscale edge image and the second physical attribute feature corresponding to the first physical attribute feature, and fuses the image features and the second physical attribute feature to obtain a fused feature, and determines the predicted weight of the target rim based on the fused feature.
[0199] In one embodiment, the rim weight prediction model includes: an image feature extraction module and a numerical feature encoding module; the rim weight prediction module 1003 is further used for the image feature extraction module to determine the image features based on the grayscale edge map; and the multilayer perceptron structure of the numerical feature encoding module performs high-dimensional encoding processing on the first physical attribute features to obtain the second physical attribute features.
[0200] In one embodiment, the image feature extraction module includes an encoder and a decoder; the encoder includes multiple downsampling layers and a bottleneck layer, and the decoder includes multiple upsampling layers, the number of downsampling layers being the same as the number of upsampling layers; the rim weight prediction module 1003 is further configured to input the grayscale edge map into the encoder of the image feature extraction module, obtain image coding features corresponding to each downsampling layer of the grayscale edge map through each downsampling layer of the encoder, and input the image coding features output by the last downsampling layer into the bottleneck layer to obtain latent image features; input the latent image features into the decoder of the image feature extraction module, obtain image decoding features corresponding to each upsampling layer through each upsampling layer of the decoder and the image coding features of each downsampling layer corresponding to each upsampling layer; and perform image feature compression processing on the image decoding features output by the last upsampling layer to obtain the image features corresponding to the grayscale edge map.
[0201] In one embodiment, the rim weight prediction module 1003 is further configured to: use the first upsampling layer of the decoder as the current upsampling layer, and use the latent image features as the input image features of the current upsampling layer; obtain the current image coding features of the downsampling layer corresponding to the current upsampling layer from the image coding features of each downsampling layer; input the input image features and the current image coding features into the current upsampling layer to obtain the image decoding features of the current upsampling layer; if the current upsampling layer is not the last upsampling layer, use the next upsampling layer of the current upsampling layer as the new current upsampling layer, and use the image decoding features of the current upsampling layer as the input image features of the new current upsampling layer, and return to execute the step of obtaining the current image coding features of the downsampling layer corresponding to the current upsampling layer from the image coding features of each downsampling layer, until the current upsampling layer is the last upsampling layer, to obtain the image decoding features of each upsampling layer.
[0202] In one embodiment, the rim information processing module 1002 is further configured to scale the rim image to a preset image size and convert the scaled rim image into a grayscale image; obtain the binarized edge map corresponding to the grayscale image and the gradient magnitude map corresponding to the grayscale image; and perform weighted processing on the binarized edge map and the gradient magnitude map according to preset weights to obtain the grayscale edge map.
[0203] In one embodiment, the physical attribute parameters include: the size parameters corresponding to the target rim, and the material category information corresponding to the target rim; the rim information processing module 1002 is further configured to perform parameter standardization processing on the size parameters to obtain standardized size parameters; perform string preprocessing on the material category information, and perform integer encoding on the preprocessed material category information to obtain a material code; and concatenate the standardized size parameters and the material code to obtain the first physical attribute feature.
[0204] In one embodiment, such as Figure 11 As shown, a training device for a wheel rim weight prediction model is also provided, including: a sample data acquisition module 1101, a sample information processing module 1102, a predicted weight output module 1103, and a prediction model training module 1104, wherein:
[0205] The sample data acquisition module 1101 is used to acquire the first sample wheel rim image corresponding to the first sample wheel rim, the first physical attribute parameter corresponding to the first sample wheel rim, and the actual weight corresponding to the first sample wheel rim.
[0206] The sample information processing module 1102 is used to obtain a first sample grayscale edge map corresponding to the first sample rim image based on the first sample rim image, and to obtain a first sample physical attribute feature corresponding to the first sample rim based on the first physical attribute parameter.
[0207] The predicted weight output module 1103 is used to input the grayscale edge image of the first sample and the physical attribute features of the first sample into the prediction model, and output the predicted weight corresponding to the rim of the first sample through the prediction model.
[0208] The prediction model training module 1104 is used to train the prediction model based on the first deviation between the predicted weight corresponding to the first sample rim and the actual weight corresponding to the first sample rim, so as to obtain the rim weight prediction model.
[0209] In one embodiment, the prediction model training module 1104 is further configured to fine-tune the prediction model according to the first deviation, complete one round of training, and obtain the prediction model after this round of training; check whether the total number of rounds after completing this round of training reaches a preset number of rounds threshold; if the total number of rounds reaches the number of rounds threshold, use the prediction model after this round of training as the rim weight prediction model.
[0210] In one embodiment, the prediction model training module 1104 is further configured to: acquire a second sample rim image, a second physical attribute parameter, and a true weight corresponding to the second sample rim when the total number of rounds does not reach the rounds threshold; acquire a second sample grayscale edge map corresponding to the second sample rim based on the second sample rim image, and acquire a second sample physical attribute feature based on the second physical attribute parameter; input the second sample grayscale edge map and the second sample physical attribute feature into the prediction model trained in the current round, and output the predicted weight corresponding to the second sample rim through the prediction model trained in the current round; if the second deviation between the predicted weight and the true weight of the second sample rim does not meet a preset condition, use the prediction model trained in the current round as a new prediction model, and return to execute the steps of acquiring the first sample rim image, the first physical attribute parameter, and the true weight of the first sample rim; if the second deviation meets a preset condition, use the prediction model with the smallest second deviation among the prediction models trained in each round as the rim weight prediction model.
[0211] Each module in the aforementioned rim weight prediction device and the training device for the rim weight prediction model can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0212] In one embodiment, a computer device is provided. Its internal structure diagram can be as follows: Figure 12 As shown, the computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores wheel rim image data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network. When the computer program is executed by the processor, it implements a wheel rim weight prediction method and a training method for a wheel rim weight prediction model.
[0213] Those skilled in the art will understand that Figure 12 The structure shown is a block diagram of a partial structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.
[0214] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0215] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.
[0216] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0217] 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, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0218] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program mentioned can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0219] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0220] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for predicting wheel rim weight, characterized in that, The method includes: Obtain the image of the target wheel rim and the physical property parameters of the target wheel rim; Based on the rim image, obtain the grayscale edge map corresponding to the target rim, and based on the physical attribute parameters, obtain the first physical attribute feature corresponding to the target rim; The grayscale edge image and the first physical attribute feature are input into a pre-trained rim weight prediction model for analysis and reasoning to obtain the predicted weight of the target rim output by the rim weight prediction model. The analysis and reasoning process includes: the rim weight prediction model obtains the image features of the grayscale edge image and the second physical attribute feature corresponding to the first physical attribute feature, and fuses the image features and the second physical attribute feature to obtain a fused feature, and determines the predicted weight of the target rim based on the fused feature.
2. The method according to claim 1, characterized in that, The wheel rim weight prediction model includes: an image feature extraction module and a numerical feature encoding module; The rim weight prediction model obtains the image features of the grayscale edge map and the second physical attribute features corresponding to the first physical attribute features, including: The image feature extraction module determines the image features based on the grayscale edge map; and the multilayer perceptron structure of the numerical feature encoding module performs high-dimensional encoding processing on the first physical attribute features to obtain the second physical attribute features.
3. The method according to claim 2, characterized in that, The image feature extraction module includes an encoder and a decoder; the encoder contains multiple downsampling layers and a bottleneck layer, and the decoder contains multiple upsampling layers, the number of which is the same as the number of downsampling layers; the image feature extraction module determines the image features based on the grayscale edge map, including: The grayscale edge map is input into the encoder of the image feature extraction module. Through each downsampling layer of the encoder, the image coding features of the grayscale edge map corresponding to each downsampling layer are obtained. The image coding features output by the last downsampling layer among the multiple downsampling layers are input into the bottleneck layer to obtain the latent image features output by the bottleneck layer. The latent features of the image are input into the decoder of the image feature extraction module. Through each upsampling layer of the decoder and the image coding features of each downsampling layer corresponding to each upsampling layer, the image decoding features corresponding to each upsampling layer are obtained. The image features are obtained by performing image feature compression processing on the image decoding features output by the last upsampling layer among the multiple upsampling layers.
4. The method according to claim 3, characterized in that, The step of inputting the latent features of the image into the decoder of the image feature extraction module, and obtaining the image decoding features corresponding to each of the upsampling layers of the decoder, and the image coding features of each of the downsampling layers corresponding to each of the upsampling layers, includes: The first upsampling layer of the decoder is used as the current upsampling layer, and the latent image features are used as the input image features of the current upsampling layer. From the image coding features of each downsampling layer, obtain the current image coding features of the downsampling layer corresponding to the current upsampling layer; The input image features and the current image encoding features are input into the current upsampling layer to obtain the image decoding features of the current upsampling layer; If the current upsampling layer is not the last upsampling layer, the next upsampling layer of the current upsampling layer is taken as the new current upsampling layer, and the image decoding features of the current upsampling layer are taken as the input image features of the new current upsampling layer. Then, the step of obtaining the current image coding features of the downsampling layer corresponding to the current upsampling layer from the image coding features of each downsampling layer is returned until the current upsampling layer is the last upsampling layer. If the current upsampling layer is the last upsampling layer, proceed to the step of performing image feature compression processing on the image decoding features output by the last upsampling layer among the plurality of upsampling layers to obtain the image features.
5. The method according to claim 1, characterized in that, The step of obtaining the grayscale edge image corresponding to the target wheel rim based on the wheel rim image includes: The wheel rim image is scaled to a preset image size, and the scaled wheel rim image is converted into a grayscale image; Obtain the binarized edge map corresponding to the grayscale image, and the gradient magnitude map corresponding to the grayscale image; The binarized edge map and the gradient magnitude map are weighted according to preset weights to obtain the grayscale edge map.
6. The method according to claim 1, characterized in that, The physical property parameters include: the size parameters corresponding to the target rim, and the material category information corresponding to the target rim; obtaining the first physical property feature corresponding to the target rim based on the physical property parameters includes: The dimensional parameters are standardized to obtain standardized dimensional parameters; The material category information is preprocessed into a string, and the preprocessed material category information is then encoded into an integer to obtain a material code. By combining the standardized dimensional parameters and the material code, the first physical property feature is obtained.
7. A training method for a wheel rim weight prediction model, characterized in that, include: Obtain the first sample wheel rim image corresponding to the first sample wheel rim, the first physical attribute parameter corresponding to the first sample wheel rim, and the actual weight corresponding to the first sample wheel rim; Based on the first sample wheel rim image, obtain the first sample grayscale edge map corresponding to the first sample wheel rim, and based on the first physical attribute parameters, obtain the first sample physical attribute features corresponding to the first sample wheel rim. The grayscale edge image of the first sample and the physical attribute features of the first sample are input into the prediction model, and the prediction model outputs the predicted weight corresponding to the rim of the first sample. Based on the first deviation between the predicted weight corresponding to the first sample rim and the actual weight corresponding to the first sample rim, the prediction model is trained to obtain the rim weight prediction model.
8. The method according to claim 7, characterized in that, The step of training the prediction model based on the first deviation between the predicted weight corresponding to the first sample rim and the actual weight corresponding to the first sample rim, to obtain the rim weight prediction model, includes: Based on the first deviation, the prediction model is fine-tuned to complete one round of training and obtain the prediction model after this round of training. Verify whether the total number of rounds after completing this round of training has reached the preset round number threshold; If the total number of rounds reaches the threshold number of rounds, the prediction model trained in this round will be used as the rim weight prediction model.
9. The method according to claim 8, characterized in that, After verifying whether the total number of rounds after completing this training round has reached the preset round number threshold, the method further includes: If the total number of rounds does not reach the number of rounds threshold, obtain the second sample wheel rim image, the second physical attribute parameter, and the actual weight of the second sample wheel rim. Based on the second sample rim image, obtain the second sample grayscale edge map corresponding to the second sample rim, and based on the second physical attribute parameters, obtain the second sample physical attribute features corresponding to the second sample rim; The grayscale edge image of the second sample and the physical attribute features of the second sample are input into the prediction model trained in this round, and the prediction model trained in this round outputs the predicted weight corresponding to the rim of the second sample. If the second deviation between the predicted weight corresponding to the second sample rim and the actual weight corresponding to the second sample rim does not meet the preset condition, the prediction model trained in this round is used as the new prediction model, and the steps of obtaining the first sample rim image, the first physical attribute parameter, and the actual weight corresponding to the first sample rim are returned to be executed. If the second deviation meets the preset conditions, the prediction model with the smallest second deviation among the prediction models after each training round is taken as the rim weight prediction model.
10. A rim weight prediction device, characterized in that, The device includes: The rim information acquisition module is used to acquire the rim image corresponding to the target rim, as well as the physical attribute parameters corresponding to the target rim; The rim information processing module is used to obtain a grayscale edge map corresponding to the target rim based on the rim image, and to obtain a first physical attribute feature corresponding to the target rim based on the physical attribute parameters. The rim weight prediction module is used to input the grayscale edge image and the first physical attribute feature into a pre-trained rim weight prediction model for analysis and reasoning, and obtain the predicted weight of the target rim output by the rim weight prediction model; wherein, the analysis and reasoning process includes: the rim weight prediction model obtains the image features of the grayscale edge image and the second physical attribute feature corresponding to the first physical attribute feature, and fuses the image features and the second physical attribute feature to obtain a fused feature, and determines the predicted weight of the target rim based on the fused feature.
11. A training device for a wheel rim weight prediction model, characterized in that, include: The sample data acquisition module is used to acquire the first sample wheel rim image corresponding to the first sample wheel rim, the first physical attribute parameter corresponding to the first sample wheel rim, and the actual weight corresponding to the first sample wheel rim. The sample information processing module is used to obtain a first sample grayscale edge map corresponding to the first sample rim image based on the first sample rim image, and to obtain a first sample physical attribute feature corresponding to the first sample rim based on the first physical attribute parameter. The predicted weight output module is used to input the grayscale edge image of the first sample and the physical attribute features of the first sample into the prediction model, and output the predicted weight corresponding to the rim of the first sample through the prediction model. The prediction model training module is used to train the prediction model based on the first deviation between the predicted weight corresponding to the first sample rim and the actual weight corresponding to the first sample rim, so as to obtain the rim weight prediction model.
12. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 9.
13. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 9.
14. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 9.