A vision-based car dial detection training method
By using CNN networks and re -marking training methods in the car dashboard detection algorithm, the problem of artificial marking errors affects detection accuracy, and achieve higher detection accuracy and accuracy.
Patent Information
- Application Number
- CN202111224937.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-21
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2041-10-21
AI Technical Summary
When processing thousands of dashboard images, existing automotive dashboard detection algorithms are susceptible to manual labeling errors, resulting in a decrease in detection accuracy.
The vision-based car dial detection training method is used to train the image data through the CNN network, and the data is divided into high-weighted groups and low-weighted groups according to weights, the loss is calculated, and the labels are re-labeled when looping the Epoch training set to reduce Manual labeling error.
Through the re-annotation training method, the errors during manual annotation can be significantly suppressed, the accuracy of the detection results can be improved, the noise data in the data set can be eliminated, and the detection accuracy can be improved.
Smart Images

Figure CN113920402B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of visual technology, in particular to the field of automobile instrument panel visual detection technology. Background Art
[0002] As the human-machine interface between the car and the driver, the automobile instrument is an important part of the car. The response accuracy of the automobile instrument to the signal will directly affect the safety and comfort during driving; the detection of the pointer on the mechanical pointer instrument is one of the most important detection items in the instrument detection. The response accuracy of the instrument pointer to the speed command signal directly determines the quality of the produced instrument. Therefore, the accurate measurement of the pointer response requires the detection algorithm to have high accuracy; in addition, automobile instrument manufacturers will produce different types of batches of instruments, so it is hoped that the detection algorithm has good versatility and adaptability; in order to make the algorithm better detect, it is necessary to train based on the public and self-collected automobile instrument panel data set, so as to identify the instrument pointer readings and prompt symbols on the automobile instrument panel, such as the refueling symbol, turn signal symbol, gear symbol, etc.; however, since there are tens of thousands of data set samples, and each icon position in each picture needs to be manually annotated, it is easy to offset the icon annotation box or the size of the annotation box is not appropriate during the annotation process; therefore, there are some annotation errors in the data set. At this time, if the conventional training strategy is used, the result obtained will have errors, which will lead to errors in the final detection effect, thereby affecting the instrument detection accuracy during use. Summary of the invention
[0003] In order to solve the above problems, the present invention achieves the above objectives through the following technical solutions:
[0004] A vision-based automobile dial detection training method includes the following steps:
[0005] S1, obtain the image data of the car dashboard and form several epoch training sets;
[0006] S2, send the image data in each Epoch training set into the CNN network, and output the weight and prediction value of the group of image data;
[0007] S3, dividing the image data into a high-weight group and a low-weight group according to the weight, and obtaining the mean of each group;
[0008] S4, calculating the loss degree Loss;
[0009] S5, loop the Epoch training set, when looping to the relab_i th epoch, start to re-label the labels.
[0010] As a further optimization scheme of the present invention, the step of sending the image data in each epoch training set into the CNN network also includes dividing the image data in each epoch training set into several groups of samples, and each group of samples includes batchsize samples in the training set (the correct selection of Batch_Size is to find the best balance between memory efficiency and memory capacity).
[0011] As a further optimization scheme of the present invention, the step of dividing the image data into a high-weight group and a low-weight group according to the weight in step S3 specifically includes dividing the weight into a high-weight group and a low-weight group according to the threshold T.
[0012] As a further optimization scheme of the present invention, the steps of calculating the loss degree Loss include:
[0013] Determine l_mean-h_mean+M1>0;
[0014] If l_mean-h_mean+M1>0, then Loss=criterion(targets, outputs)+l_mean-h_mean+M1; otherwise Loss=criterion(targets, outputs);
[0015] Among them, M1 is a fixed hyperparameter, l_mean is the mean of the low-weight group, h_mean is the mean of the high-weight group, targets is the label array corresponding to the image of the current batch, outputs is the predicted value of S2 output, and criterion is the cross entropy loss function:
[0016]
[0017] As a further optimization solution of the present invention, the step of re-labeling the labels in S5 includes:
[0018] S51, traverse the predicted values output by S2, obtain the maximum probability predicted value Pmax corresponding to each car dashboard image data, and let the label probability corresponding to each original image data be Ptarget;
[0019] S52. When Pmax>Ptarget+M2, the original label corresponding to the current index is determined to be a noise label and is relabeled. M2 is the same as M1, which is a fixed hyperparameter and does not need to be calculated. It is a value determined by experience.
[0020] The beneficial effects of the present invention are:
[0021] 1) The present invention can suppress the errors generated during manual labeling to a great extent through the re-labeling training method, making the results more accurate, and can eliminate the noise data in the data set to a certain extent, making the detection results more precise. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 It is a schematic diagram of the steps of the instrument panel visual detection training technology of the present invention;
[0023] Figure 2 It is a schematic diagram of the backbone network of resnet18 in the present invention;
[0024] Figure 3 It is a schematic diagram of the Loss training curve in the present invention; DETAILED DESCRIPTION
[0025] The present application is further described in detail below in conjunction with the accompanying drawings. It is necessary to point out here that the following specific implementation methods are only used to further illustrate the present application and cannot be understood as limiting the scope of protection of the present application. Technical personnel in this field can make some non-essential improvements and adjustments to the present application based on the above application content.
[0026] like Figures 1 to 3 A visual-based automobile dial detection training method is shown, comprising the following steps:
[0027] S1. Pre-acquire image data of a car dashboard and form several Epoch training sets. The image data of the car dashboard can be based on public and self-collected car dashboard datasets;
[0028] S2, send the image data in each Epoch training set into the CNN network, and output the weight and prediction value of the group of image data;
[0029] Specifically, before the step of feeding the image data in each epoch training set into the CNN network, the step also includes dividing the image data in each epoch training set into a plurality of groups of samples, and each group of samples includes batchsize samples in the training set, wherein the selection of Batch_Size is to find the best balance between memory efficiency and memory capacity;
[0030] S3, dividing the image data into a high-weight group and a low-weight group according to the weight, and obtaining the mean of each group; specifically, the standard for dividing the high-weight group and the low-weight group is a preset threshold T, wherein the threshold T is a preset hyperparameter, and the value is 0.7;
[0031] S4, calculate the loss; Loss represents the relationship between the network prediction value and the true value. During the network training, Loss will continue to decrease, so that the network prediction value is getting closer and closer to the true value;
[0032] Specifically, the steps of calculating the loss Loss include judging whether l_mean-h_mean+M1>0;
[0033] Among them, if l_mean-h_mean+M1>0,
[0034] Then Loss=criterion(targets,outputs)+l_mean-h_mean+M1;
[0035] Otherwise Loss = criterion(targets, outputs);
[0036] Among them, M1 is a fixed hyperparameter, and its specific value is determined based on experience. l_mean is the mean of the low-weight group, h_mean is the mean of the high-weight group, targets is the label array corresponding to the image of the current batch, outputs is the predicted value output by S2, and criterion is the cross entropy loss function;
[0037]
[0038] S5, loop the Epoch training set, and start re-labeling the labels after looping to the relab_i epoch; where relab_i is the epoch number where the network starts to re-label. After training to relab_i epochs, the network will have a certain learning ability, so that it can re-label the labels;
[0039] Specifically, the steps of re-labeling the labels include:
[0040] S51, traverse the predicted values output by S2 to obtain the maximum probability predicted value Pmax corresponding to each car dashboard image data, and let the label probability corresponding to each original image data be Ptarget; where Ptarget is the predicted probability of a given label;
[0041] S52. Determine whether the image needs to be relabeled by comparing the maximum probability prediction value Pmax with the predicted probability Ptarget of the original given label; that is, when Pmax>Ptarget+M2, determine that the original label corresponding to the current index is a noise label and relabel it; where M2 is the same as M1, both are fixed hyperparameters that do not need to be calculated and are values determined by experience.
[0042] This training method can be applied to any CNN network. In this method, the resnet18 network is selected as the backbone network. The network structure is as follows: Figure 2 As shown,
[0043] The Resnet18 consists of 5 parts, namely conv1, conv2_x, conv3_x, conv4_x, conv5_x. There are 17 convolutional layers and one fully connected layer in total;
[0044] In this method, the fully connected layer of resnet18 is removed, and the global pooling layer is obtained. The output of the global pooling layer of the resnet18 network is fully connected and a sigmoid activation function is used to obtain the weight of each image; this weight is multiplied by the output of resnet18 to obtain the output out, which is used to calculate the loss of each epoch;
[0045] As attached Figure 3 The Loss curve during training is shown, and the final Loss drops to 0.088;
[0046] Result:
[0047] RMSE ACC Use this method 0.1895 97.2% This method is not used 0.3849 94.6%
[0048] The above data show that the re-labeling training strategy of this method can largely suppress the errors caused by manual labeling, making the results more accurate.
[0049] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention.
Claims
1. A vision-based automobile dial detection training method, characterized by: The following steps are included: S1, obtain the image data of the car dashboard and form several epoch training sets; S2, send the image data in each Epoch training set into the CNN network, and output the weight and prediction value of the group of image data; S3, dividing the image data into a high-weight group and a low-weight group according to the weight, and obtaining the mean of each group; S4, calculate the loss, including judging whether l_mean - h_mean + M1 > 0, If l_mean - h_mean + M1 > 0, Then Loss = criterion(targets, outputs) + l_mean - h_mean + M1; Otherwise Loss = criterion(targets, outputs); Among them, M1 is a fixed hyperparameter, l_mean is the mean of the low-weight group, h_mean is the mean of the high-weight group, targets is the label array corresponding to the image of the current batch, outputs is the predicted value output by step S2, and criterion is the cross entropy loss function: ; Represents the i-th data in the sample; Represents the probability distribution of label data; Represents the probability distribution of the network model's prediction results; Used to measure the difference between two probability distributions, n represents n sample data; S5, loop the Epoch training set, and when it loops to the relab_i epoch, start to relabel the labels; where relab_i is the epoch number of the CNN network for relabeling; The steps to relabel the labels include: S51, traverse the predicted values output by S2, obtain the maximum probability predicted value Pmax corresponding to each car dashboard image data, and let the label probability corresponding to each original image data be Ptarget; where Ptarget is the predicted probability of a given label; S52. When Pmax > Ptarget + M2, the original label corresponding to the current index is determined to be a noise label, and is relabeled, where M2 is a fixed hyperparameter.
2. A visual-based automobile dial detection training method according to claim 1, characterized in that: The step of sending the image data in each epoch training set into the CNN network also includes dividing the image data in each epoch training set into a plurality of groups of samples, and each group of samples includes batchsize samples in the training set.
3. A visual-based automobile dial detection training method according to claim 2, characterized in that: The step of dividing the image data into a high-weight group and a low-weight group according to the weight in step S3 includes dividing the weight into a high-weight group and a low-weight group according to the threshold T.
4. A visual-based automobile dial detection training method according to claim 3, characterized in that: The threshold T is a preset hyperparameter, and its value is 0.7.
Citation Information
Patent Citations
Weight clustering and under-sampling-based unbalanced data classification method
CN106778853A
Medical image segmentation method based on multi-scale fusion U-shaped chain neural network
CN111325750A