Hyperparameter processing method and related device in deep learning of driving recorder images

By automatically adjusting the hyperparameters in deep learning of dash recorders, the problem of low manual adjustment efficiency is solved, the image recognition effect is improved, and the model is continuously optimized.

CN114283309BActive Publication Date: 2024-11-22MUSHROOM CHELIAN INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011031819.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-27
Publication Date
2024-11-22
Estimated Expiration
2040-09-27

AI Technical Summary

Technical Problem

In the prior art, the selection of hyperparameters in the deep learning of dash recorders mainly relies on manual adjustment, resulting in strong subjectivity, low operational efficiency, and difficulty in adjusting the optimal hyperparameters, resulting in poor recognition effect.

Method used

By obtaining the training image set and test image set collected by the dash recorder, the hyperparameters after the previous model training are optimized, and the hyperparameters are automatically adjusted to improve the recognition effect of the model. The specific steps include reading historical hyperparameters, training the model, performing calibration and identification, calculating evaluation value, comparing and adjusting hyperparameters, and realizing dynamic optimization of hyperparameters.

Benefits of technology

The automation of hyperparameter adjustment is realized, the operation efficiency is improved, and through directional optimization, the recognition effect of driving recorder images is improved, ensuring continuous improvement of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114283309B_ABST
    Figure CN114283309B_ABST
Patent Text Reader

Abstract

The present application discloses a method for processing hyperparameters in deep learning of dashcam images and a related device, wherein the method includes: obtaining a training image set and a test image set collected by a dashcam; reading a first historical hyperparameter configured for this model training; training the training image set according to the first historical hyperparameter to obtain a sample model; calibrating and identifying the test image set using the sample model to obtain an evaluation value of the test image set; comparing the evaluation value of the test image set with the historical evaluation value, and adjusting the first historical hyperparameter according to the comparison result and the second historical hyperparameter to obtain an optimized hyperparameter. The embodiment of the present application can automatically optimize the hyperparameter in a direction, thereby facilitating the training of a better model next time, and further helping to improve the recognition effect of dashcam images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a method and related device for processing hyperparameters in deep learning of driving recorder images. Background Art

[0002] Real-time road video images can be collected through camera tools such as dashcams, including information such as pedestrians, vehicles, and traffic signs. After processing and analyzing dashcam images, some parameters can be obtained for reference. Deep learning is a type of machine learning. By learning the inherent laws and representation levels of sample data, machines can have analytical learning capabilities like humans, so it is widely used in the field of data recognition. It is mainly manifested in building models and using data for learning. Hyperparameters are parameters that set values ​​before starting the learning process, rather than parameter data obtained through training. In addition, the selection of hyperparameters has a direct impact on the parameters obtained through training, that is, the selection of hyperparameters directly affects the time spent in the machine learning process and the quality of learning results. At present, for deep learning of dashcam images, most of them are manually input and adjusted for hyperparameters, which is not only highly subjective and inefficient, but also likely to fail to adjust to the optimal hyperparameters, often resulting in poor optimization of the training model, resulting in low dashcam image recognition rate. Summary of the invention

[0003] The embodiments of the present application provide a method and related device for processing hyperparameters in deep learning of dash cam images, which can automatically optimize hyperparameters in a direction, thereby facilitating training of a better model next time, and further helping to improve the recognition effect of dash cam images.

[0004] A first aspect of an embodiment of the present application provides a method for processing hyperparameters in deep learning of driving recorder images, which is applied to a deep learning training server. The method includes:

[0005] Obtain a training image set and a test image set collected by a driving recorder;

[0006] Reading a first historical hyperparameter configured for the current model training, where the first historical hyperparameter is a hyperparameter configured after the training of the training image set is completed last time;

[0007] Training the training image set according to the first historical hyperparameter to obtain a sample model;

[0008] Using the sample model to calibrate and identify each test image in the test image set to obtain a model calibration parameter for each test image;

[0009] Get the preset calibration parameters for each test image;

[0010] Determining evaluation parameters of each test image according to the model calibration parameters of each test image and the preset calibration parameters of each test image;

[0011] Calculating the evaluation value of the test image set according to the evaluation parameters of each test image;

[0012] The evaluation value of the test image set is compared with the stored historical evaluation value, and the first historical hyperparameter is adjusted according to the comparison result and the second historical hyperparameter to obtain the optimized hyperparameter, wherein the second historical hyperparameter is the hyperparameter used when training the historical sample model corresponding to the historical evaluation value.

[0013] As an optional implementation, in the first aspect of the embodiment of the present application, when any test image in the test image set contains at least two calibration objects, the sample model is used to calibrate and identify the at least two calibration objects in the any test image to obtain model calibration parameters of each calibration object respectively;

[0014] Obtaining preset calibration parameters of each calibration object in any one of the test images;

[0015] Determine the evaluation parameters of each calibration object according to the model calibration parameters of each calibration object and the preset calibration parameters of each calibration object;

[0016] Taking an average of the evaluation parameters of all calibration objects in any one of the test images, obtaining the evaluation parameters of any one of the test images. When any one of the test images in the test image set contains at least two calibration objects, using the sample model to calibrate and identify the at least two calibration objects in any one of the test images, so as to obtain the model calibration parameters of each calibration object respectively;

[0017] Obtaining preset calibration parameters of each calibration object in any one of the test images;

[0018] Determine the evaluation parameters of each calibration object according to the model calibration parameters of each calibration object and the preset calibration parameters of each calibration object;

[0019] An average value is taken for the evaluation parameters of all calibration objects in any one of the test images to obtain the evaluation parameters of any one of the test images.

[0020] As an optional implementation manner, in the first aspect of the embodiment of the present application, the method further includes:

[0021] When the evaluation value of the test data set is greater than or equal to the historical evaluation value, deleting the historical evaluation value and the historical sample model corresponding to the historical evaluation value;

[0022] Save the evaluation value of the test data set and the sample model obtained in this training.

[0023] As an optional implementation manner, in the first aspect of the embodiment of the present application, the method further includes:

[0024] When the evaluation value of the test data set is less than the historical evaluation value, the evaluation value of the test data set and the sample model obtained in this training are deleted.

[0025] As an optional implementation, in the first aspect of the embodiment of the present application, the hyperparameters include at least one of a learning rate, batch_size, a gradient descent algorithm, the number of neurons, and the number of iterations.

[0026] A second aspect of an embodiment of the present application discloses a deep learning training server, comprising:

[0027] A first acquisition unit, used to acquire a training image set and a test image set collected by a driving recorder;

[0028] A reading unit, used for reading a first historical hyperparameter configured for the current model training, where the first historical hyperparameter is a hyperparameter configured after the training of the training image set is completed last time;

[0029] A training unit, configured to train the training image set according to the first historical hyperparameter to obtain a sample model;

[0030] an identification unit, configured to use the sample model to perform calibration and identification on each test image in the test image set to obtain a model calibration parameter of each test image;

[0031] A second acquisition unit, used to acquire preset calibration parameters of each test image;

[0032] A determination unit, configured to determine an evaluation parameter of each test image according to a model calibration parameter of each test image and a preset calibration parameter of each test image;

[0033] A calculation unit, used to calculate the evaluation value of the test image set according to the evaluation parameters of each test image;

[0034] An adjustment unit is used to compare the evaluation value of the test image set with the stored historical evaluation value, and adjust the first historical hyperparameter according to the comparison result and the second historical hyperparameter to obtain an optimized hyperparameter, wherein the second historical hyperparameter is the hyperparameter used when training the historical sample model corresponding to the historical evaluation value.

[0035] As an optional implementation, in the second aspect of the embodiment of the present application, when any test image in the test image set contains at least two calibration objects, the recognition unit is specifically used to calibrate and recognize the at least two calibration objects in any test image using the sample model to obtain model calibration parameters of each calibration object respectively;

[0036] The second acquisition unit is specifically used to acquire preset calibration parameters of each calibration object in any one of the test images;

[0037] The determination unit is specifically used to determine the evaluation parameters of each calibration object according to the model calibration parameters of each calibration object and the preset calibration parameters of each calibration object; and to average the evaluation parameters of all calibration objects in any test image to obtain the evaluation parameters of any test image.

[0038] As an optional implementation, in the second aspect of the embodiment of the present application, the deep learning training server further includes:

[0039] A first processing unit, configured to delete the historical evaluation value and the historical sample model corresponding to the historical evaluation value when the evaluation value of the test data set is greater than or equal to the historical evaluation value;

[0040] The storage unit is used to store the evaluation value of the test data set and the sample model obtained in this training.

[0041] As an optional implementation, in the second aspect of the embodiment of the present application, the deep learning training server further includes:

[0042] The second processing unit is used to delete the evaluation value of the test data set and the sample model obtained by this training when the evaluation value of the test data set is less than the historical evaluation value.

[0043] As an optional implementation, in the second aspect of the embodiment of the present application, the hyperparameters include at least one of a learning rate, batch_size, a gradient descent algorithm, the number of neurons, and the number of iterations.

[0044] A third aspect of an embodiment of the present application discloses an electronic device, comprising: a processor and a memory, wherein the memory stores executable code, and when the executable code is executed by the processor, the processor executes the method disclosed in the first aspect of the embodiment of the present application.

[0045] The fourth aspect of the embodiments of the present application provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores a computer program for electronic data exchange, and the computer program specifically includes an executable code, and the executable code is used to execute the method disclosed in the first aspect of the embodiments of the present application.

[0046] A fifth aspect of an embodiment of the present application provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute the method disclosed in the first aspect of the embodiment of the present application.

[0047] In order to improve the recognition effect of dashcam images, the embodiment of the present application can optimize the hyperparameters required for image deep learning, so as to train a good sample model. After obtaining the training image set and the test image set collected by the dashcam, before starting the current model training, the first historical hyperparameter configured after the training of the training image set is completed in the previous training can be retrieved, and the training image set is trained according to the first historical hyperparameter to obtain a trained sample model; the sample model is then used to calibrate and identify the test image set to obtain the model calibration parameters of each test image, and then the model calibration parameters are compared with the preset calibration parameters to obtain the evaluation parameters of each test image. By taking the average of the evaluation parameters of all test images, the evaluation value of the test image set can be obtained, and the evaluation value of the test image set is compared with the stored historical evaluation value. According to the comparison result and the second historical hyperparameter used when training the historical sample model corresponding to the historical evaluation value, the first historical hyperparameter is dynamically adjusted to optimize the hyperparameter. The technical solution of the embodiment of the present application utilizes the hyperparameters configured after the previous model training to complete the current model training, and automatically adjusts the hyperparameters by comparing the current recognition results with the historical recognition results, thereby realizing that the hyperparameter adjustment is replaced by automatic instead of manual, without the need for human intervention, thereby improving the operational efficiency of the hyperparameter adjustment, and the adjustment of the hyperparameters is not blind, but rather a directional and continuous optimization, which is conducive to training a better model next time, and thus helps to improve the recognition effect of the dash cam image. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0049] Figure 1It is a flowchart of a method for processing hyperparameters in deep learning of driving recorder images provided in an embodiment of the present application;

[0050] Figure 2 is a schematic diagram of image calibration provided in an embodiment of the present application;

[0051] Figure 3 It is a structural diagram of a deep learning training server provided in an embodiment of the present application;

[0052] Figure 4 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0053] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0054] It should be noted that the terms "including" and "having" in the embodiments of the present application and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices. In addition, the terms "first" and "second" are used to distinguish different objects, rather than to describe a specific order.

[0055] As a machine learning method, deep learning has been widely used in the field of data recognition. Deep learning can learn data such as images, voices and texts, so that machines can have analytical learning capabilities like humans, so that they can recognize data such as images, voices and texts well. However, in deep learning, the quality of hyperparameter selection will be directly related to the quality of the trained model, which will ultimately affect the recognition effect of the data. Therefore, how to select hyperparameters will be a crucial link. The purpose of the technical solution of this application is to realize the dynamic adjustment of hyperparameters to optimize the model and thus improve the recognition effect of driving recorder images. The following will be described in detail with reference to the accompanying drawings.

[0056] See also Figure 1 , the embodiment of the present application provides a method for processing hyperparameters in deep learning of driving recorder images, which can be applied to a deep learning training server (hereinafter referred to as the "server"). Figure 1 As shown, the method may include the following steps:

[0057] 110. Obtain a training image set and a test image set collected by a driving recorder.

[0058] In the embodiment of the present application, the sample data collected by the data acquisition device can be divided into a training data set for training the model and a test data set for testing the model. Among them, the sample data can be an image, voice or text, etc. When the sample data is an image, the data acquisition device can be an image acquisition device such as a driving recorder, a camera device, etc. When the sample data is a voice, the data acquisition device can be a voice acquisition device such as a recorder, a microphone, etc. When the sample data is text, the data acquisition device is a text acquisition device such as a keyboard, a display screen, etc. In the embodiment of the present application, the data acquisition device is a driving recorder, and the sample data collected is an image. The sample images collected by the driving recorder can be divided into a training image set for training the model and a test image set for testing the model. Among them, the images in the training image set and the test image set have been calibrated. The server can actively obtain sample images from the driving recorder, or the driving recorder can actively send sample images to the server, which is not limited here.

[0059] 120. Read the first historical hyperparameters configured for this model training.

[0060] In an embodiment of the present application, before performing the current model training operation, the first historical hyperparameter required for the current model training can be read first. Specifically, when the current model training is the first training of the training image set, before the training operation begins, the first historical hyperparameter read can be manually configured, or it can be a default hyperparameter loaded from the network, etc., which is not limited here. When the current model training is not the first training of the training image set, before the training operation begins, the first historical hyperparameter read is the hyperparameter automatically configured by the server after the previous (i.e., the most recent one to the current training) model training of the training image set is completed. Specifically, after each model training and recognition, the server can reconfigure the hyperparameters, and the configured hyperparameters can be used for the next model training.

[0061] Among them, the hyperparameters may include but are not limited to at least one of the learning rate, batch_size, gradient descent algorithm, number of neurons, number of iterations, optimizer, loss function, activation function, etc. The size of the hyperparameters directly affects the results of model training. For example, different learning rates or different batch_sizes or different gradient descent algorithms correspond to different training times and convergence effects during model training. A good set of hyperparameters can shorten the training time required for model training and make the final trained model better.

[0062] 130. Train the training image set according to the first historical hyperparameter to obtain a sample model.

[0063] Specifically, the implementation process of training the training image set can be to first build a model, and then input the training image set into the model in batches or as a whole for training. Among them, the constructed model can refer to several existing common models, such as Convolutional Neural Network (CNN), Deep Belief Network (DBN), Stacked Auto-Encoder Network (SAEN) model, etc., and its specific implementation method is not described here. For the same set of training image sets, the models obtained by training with the same training method under different hyperparameters are different.

[0064] 140. Use the sample model to calibrate and identify each test image in the test image set to obtain the model calibration parameters of each test image.

[0065] 150. Obtain preset calibration parameters for each test image.

[0066] 160. Determine the evaluation parameters of each test image according to the model calibration parameters of each test image and the preset calibration parameters of each test image.

[0067] 170. According to the evaluation parameters of each test image, the evaluation value of the test image set is calculated.

[0068] 180. Compare the evaluation value of the test image set with the stored historical evaluation value, and adjust the first historical hyperparameter according to the comparison result and the second historical hyperparameter to obtain an optimized hyperparameter, wherein the second historical hyperparameter is the hyperparameter used when training the historical sample model corresponding to the historical evaluation value.

[0069] In the embodiment of the present application, after the model training is completed, the effect of the sample model obtained by training can be verified. Specifically, the test image set obtained from the driving recorder can be input into the sample model for test recognition, so as to obtain the recognition result, that is, the evaluation value of the test image set, and the recognition result can be compared with the historical recognition result to optimize and adjust the hyperparameter in a direction, so as to facilitate the training of a better model next time and improve the recognition effect of the driving recorder image. Among them, the historical recognition result can be the historical evaluation value obtained after the historical sample model is tested and recognized using the test image set. The historical sample model can be the sample model obtained by the previous model training of the training image set. At this time, the second historical hyperparameter is the hyperparameter used in the previous model training of the training image set. The historical sample model can also be the optimal set of sample models obtained by all previous model trainings of the training image set. At this time, the second historical hyperparameter is the hyperparameter used when training the optimal sample model. The historical sample model can also be a plurality of groups of better sample models obtained from all previous model trainings on the training image set. In this case, the second historical hyperparameter can be the hyperparameters used respectively in training these multiple groups of sample models, or the hyperparameters used in training the optimal group of sample models.

[0070] For example, the training image set and test image set collected by the driving recorder are calibrated images. Assuming that the car in the image needs to be identified, the car is the calibration object. Before training, the cars in all the images in the training image set and the test image set can be calibrated; assuming that the pedestrians in the image need to be identified, the pedestrians are the calibration objects. Before training, the people in all the images in the training image set and the test image set can be calibrated. Using the sample model to calibrate each test image can be regarded as calibrating the algorithm of the test image through the sample model, and the model calibration parameters obtained by calibration and identification can be regarded as the location information of the calibration object obtained through model calibration. Figure 2As shown in the example, when the calibration object is a car, and there is only one car in the test image, a rectangular frame can be used to calibrate the car. Among them, the solid-line frame is a pre-calibrated rectangular frame, which can be manually calibrated, and the preset calibration parameters of the test image can be the position information of the pre-calibrated calibration object, and the position information can be the coordinate values ​​of the four vertices of the solid-line rectangular frame. The dashed-line frame is a model-calibrated rectangular frame, and the dashed-line rectangular frame is algorithmically calibrated through a sample model. The model calibration parameters of the test image can be the coordinate values ​​of the four vertices of the dashed-line rectangular frame. Furthermore, the overlap between the solid-line rectangular frame and the dashed-line rectangular frame can be calculated based on the coordinate values ​​of the four vertices of the solid-line rectangular frame and the coordinate values ​​of the four vertices of the dashed-line rectangular frame. When the two completely overlap, the overlap is 1; when the two do not overlap at all, the overlap is 0. The overlap can be regarded as an evaluation parameter of the test image. After obtaining the evaluation parameters of each test image using the above method, the average value is taken to obtain the evaluation value of the entire test image set.

[0071] Among them, the evaluation value of the test image set can be the F1 value (also known as the F1 score), which is an indicator used to measure the precision and recall of the model. The F1 value is between 0 and 1. The closer the F1 value is to 1, the higher the precision and recall of the model, and thus the better the recognition effect of the model. It can be understood that according to the requirements of the weight between the precision and recall, the evaluation value of the test image set can also be the F2 score, F0.5 score, G score and other parameters that can measure the precision and recall of the model, which are not limited here.

[0072] Specifically, the evaluation value of the obtained test image set can be compared with the historical evaluation value obtained by the previous training operation to adaptively adjust the hyperparameters, thereby obtaining better hyperparameters. For example, assuming that only the learning rate in the hyperparameters is adjusted, when the learning rate used in this training is larger than the learning rate used in the previous training, and the evaluation value corresponding to the model trained this time is higher than the evaluation value corresponding to the model trained last time, then the learning rate can be appropriately increased when adjusting the hyperparameters so as to train a better model next time. When the learning rate used in this training is larger than the learning rate used in the previous training, but the evaluation value corresponding to the model trained this time is lower than the evaluation value corresponding to the model trained last time, then the learning rate can be appropriately reduced on the basis of the learning rate used in the previous training when adjusting the hyperparameters. In this way, the optimal model can be trained as much as possible through the continuous optimization of the hyperparameters in a directional manner, thereby improving the recognition rate of the dashcam image.

[0073] Another example is given, when the data acquisition device is a text acquisition device, the sample data collected is text. The recognition parameters of the test data can be regarded as the text result of the test text being recognized using the sample model, that is, it can be regarded as a predicted value, and the predicted value can include a positive sample 1 (P) and a negative sample 0 (N). The preset calibration parameters of the test data can be regarded as the true value of the test text, and the true value can include a positive sample 1 (T) and a negative sample 0 (F). For any test text, according to the predicted value and the true value of the test text, the evaluation parameter of the test text can be obtained, wherein the evaluation parameter of the test text can be one of the following four situations: FN (False Negative), which is judged to be a negative sample, but in fact it is a positive sample; FP (False Positive), which is judged to be a positive sample, but in fact it is a negative sample; TN (True Negative), which is judged to be a negative sample, but in fact it is also a negative sample; TP (True Positive), which is judged to be a positive sample, but in fact it is also a positive sample. For example, if the letter A is recognized as the letter A, it is TP, if other letters are recognized as the letter A, it is FP, if the letter A is recognized as other letters, it is FN, and if no text is recognized as empty, it is TN. The evaluation value of the test data set can be calculated by counting the number of test data corresponding to the above different evaluation parameters. The evaluation value of the test data set can be the F1 value, where the calculation formula for the precision rate is Precision = TP / (TP+FP), and the calculation formula for the recall rate is Recall = TP / (TP+FN), where TP, FP and FN respectively represent the number of corresponding test data, then F1 = 2*(Precision*Recall) / (Precision+Recall). It can be understood that the evaluation value of the test data set can also be an F2 score, an F0.5 score or a G score, which is not a unique limitation here. In addition, when the data acquisition device is a speech acquisition device, the collected sample data is speech. The speech recognition process is similar to the text recognition process. For example, if a speech S is recognized as speech S, it is TP, if other speech is recognized as speech S, it is FP, if speech S is recognized as other speech, it is FN, and if no speech is recognized as empty, it is TN. The calculation process of the evaluation value of the test data set can refer to the calculation process corresponding to the text above, which will not be repeated here.

[0074] In an optional embodiment, when any test image in the test image set contains at least two calibration objects, the sample model is used to calibrate and identify the at least two calibration objects in the test image to obtain model calibration parameters of each calibration object respectively;

[0075] Obtaining preset calibration parameters of each calibration object in any of the above test images;

[0076] Determine the evaluation parameters of each calibration object according to the model calibration parameters of each calibration object and the preset calibration parameters of each calibration object;

[0077] The evaluation parameters of all calibration objects in any of the above test images are averaged to obtain the evaluation parameters of any of the above test images.

[0078] For example, when there is more than one vehicle on a test image in the test image set, each vehicle can be pre-calibrated to obtain the coordinate values ​​of the four vertices of the solid rectangular box that calibrates each vehicle (i.e., the preset calibration parameters). Then, a model calibration is performed on each vehicle to obtain the coordinate values ​​of the four vertices of the dotted rectangular box that calibrates each vehicle (i.e., the model calibration parameters). Furthermore, for each vehicle, the overlap between the two can be calculated based on the coordinate values ​​of the four vertices of the solid rectangular box that calibrates the vehicle and the coordinate values ​​of the four vertices of the dotted rectangular box, and the evaluation parameters of the test image can be obtained by taking the average of the calculated overlaps of all vehicles. After obtaining the evaluation parameters of each test image using the above method, the evaluation value of the entire test image set can be obtained by taking the average value.

[0079] In an alternative embodiment, Figure 1 The described method for processing hyperparameters in deep learning of dashcam images may further include the following steps:

[0080] 11) When the evaluation value of the test image set is greater than or equal to the stored historical evaluation value, the stored historical evaluation value and the historical sample model corresponding to the stored historical evaluation value are deleted;

[0081] 12) Save the evaluation value of the test image set and the sample model obtained in this training.

[0082] Among them, the evaluation value of the test image set can intuitively feedback the quality of the sample model. When the evaluation value of the test image set corresponding to the sample model obtained by this model training is greater than or equal to the historical evaluation value stored in the server, it can be considered that the sample model obtained by this model training is better than the historical sample model corresponding to the stored historical evaluation value. At this time, the historical evaluation value stored in the server and the historical sample model corresponding to the historical evaluation value can be deleted, and the evaluation value of the test data set corresponding to this model training and the sample model obtained by this training can be saved. Specifically, the evaluation value of the test image set corresponding to this model training can be associated with the sample model obtained by this training and saved. In this way, the optimal model can always be retained in the server, and a good model helps to improve the recognition effect of the dashcam image.

[0083] Among them, the historical evaluation values ​​and their corresponding historical sample models stored in the server can be the model obtained by training the training image set for the previous time (i.e., the time closest to the current training time), and the evaluation value obtained by testing and identifying the model using the test image set; it can also be the optimal model obtained by previously training the training image set, and the evaluation value obtained by testing the optimal model.

[0084] It is understandable that when there is more than one stored historical evaluation value, when the evaluation value of the test image set corresponding to the sample model obtained by the current model training is greater than at least one of them, the sample model obtained by the current model training and its evaluation value can be used to replace the one with the smallest stored historical evaluation value and its corresponding historical sample model. For example, the server stores five sample models with the top five results obtained by previous training and their corresponding evaluation values. When the evaluation value of the test image set corresponding to the sample model obtained by the current model training is greater than at least one of them, the sample model obtained by the current model training and its evaluation value replace the sample model with the lowest evaluation value and its evaluation value.

[0085] In an alternative embodiment, Figure 1 The described method for processing hyperparameters in deep learning of dashcam images may further include the following steps:

[0086] 13) When the evaluation value of the test image set is less than the stored historical evaluation value, the evaluation value of the test image set and the sample model obtained in this training are deleted.

[0087] Specifically, when the evaluation value of the test image set corresponding to the sample model obtained by the current model training is less than all the historical evaluation values ​​stored in the server, it can be considered that the sample model obtained by the current model training is worse than the historical sample model corresponding to the stored historical evaluation values. At this time, the stored historical evaluation values ​​and their corresponding sample models are still retained, while the sample model and its evaluation value obtained by the current model training are discarded.

[0088] In summary, the technical solution of the embodiment of the present application utilizes the hyperparameters configured after the previous model training to complete the current model training, and automatically adjusts the hyperparameters by comparing the current recognition results with the historical recognition results, thereby realizing that the hyperparameter adjustment is automatically replaced by manual, without the need for human intervention, thereby improving the operational efficiency of the hyperparameter adjustment, and the adjustment of the hyperparameters is not blind, but is directional and continuously optimized, which is conducive to training a better model next time, thereby helping to improve the recognition effect of the dashcam image. In addition, the embodiment of the present application can also update the sample model in the server according to the quality of the recognition results, so that the optimal model is always retained in the server, and a good model helps to improve the recognition effect of the dashcam image.

[0089] See also Figure 3 The present application embodiment provides a deep learning training server, which can be used to execute the method for processing hyperparameters in the deep learning of driving recorder images provided in the above embodiment. Figure 3 As shown, the deep learning training server may include:

[0090] An acquisition unit 301 is used to acquire a training image set and a test image set collected by a driving recorder;

[0091] A reading unit 302 is used to read a first historical hyperparameter configured for the current model training, where the first historical hyperparameter is a hyperparameter configured after the training of the training image set is completed last time;

[0092] Among them, the hyperparameter may include but is not limited to at least one of a learning rate, batch_size, gradient descent algorithm, number of neurons, number of iterations, optimizer, loss function, activation function, etc.

[0093] A training unit 303, configured to train the training image set according to the first historical hyperparameter to obtain a sample model;

[0094] The recognition unit 304 is used to calibrate and recognize each test image in the test image set using the sample model to obtain the model calibration parameters of each test image;

[0095] The second acquisition unit 305 is used to acquire the preset calibration parameters of each test image;

[0096] A determination unit 306, configured to determine an evaluation parameter of each test image according to a model calibration parameter of each test image and a preset calibration parameter of each test image;

[0097] A calculation unit 307, configured to calculate an evaluation value of a test image set according to an evaluation parameter of each test image;

[0098] The adjustment unit 308 is used to compare the evaluation value of the test image set with the stored historical evaluation value, and adjust the first historical hyperparameter according to the comparison result and the second historical hyperparameter to obtain the optimized hyperparameter, wherein the second historical hyperparameter is the hyperparameter used when training the historical sample model corresponding to the historical evaluation value.

[0099] Optionally, when any test image in the test image set contains at least two calibration objects, the recognition unit 304 may be specifically configured to perform calibration recognition on the at least two calibration objects in any test image using the sample model to obtain model calibration parameters of each calibration object respectively;

[0100] The second acquisition unit 305 is specifically used to acquire the preset calibration parameters of each calibration object in any of the above test images;

[0101] The determination unit 306 is specifically used to determine the evaluation parameters of each calibration object according to the model calibration parameters of each calibration object and the preset calibration parameters of each calibration object; and to average the evaluation parameters of all calibration objects in any of the above test images to obtain the evaluation parameters of any of the above test images.

[0102] Optional, Figure 3 The deep learning training server shown may also include:

[0103] A first processing unit 309, configured to delete the stored historical evaluation value and the historical sample model corresponding to the stored historical evaluation value when the evaluation value of the test image set is greater than or equal to the stored historical evaluation value;

[0104] The storage unit 310 is used to store the evaluation value of the test image set and the sample model obtained in this training.

[0105] Optional, Figure 3 The deep learning training server shown may also include:

[0106] The second processing unit 311 is used to delete the evaluation value of the test image set and the sample model obtained in this training when the evaluation value of the test image set is less than the stored historical evaluation value.

[0107] Among them, implementation Figure 3 The deep learning training server shown uses the hyperparameters configured after the previous model training to complete this model training, and automatically adjusts the hyperparameters by comparing the current recognition results with the historical recognition results, thereby realizing that the hyperparameter adjustment is automatically replaced by manual, without the need for human intervention, thereby improving the operational efficiency of the hyperparameter adjustment, and the adjustment of the hyperparameters is not blind, but directional and continuous optimization, which is conducive to training a better model next time, thereby helping to improve the recognition effect of the dashcam image. In addition, the embodiment of the present application can also update the sample model in the server according to the quality of the recognition result, so that the optimal model is always retained in the server, and a good model helps to improve the recognition effect of the dashcam image.

[0108] See also Figure 4 , the embodiment of the present application provides an electronic device 400, which can be used to execute the method for processing hyperparameters in deep learning of driving recorder images provided in the embodiment of the present application. The electronic device 400 can be the deep learning training server described in the above embodiment. Figure 4As shown, the electronic device 400 may include: at least one processor 401, such as a CPU (Central Processing Unit), a memory 402, at least one communication interface 403 and other components. These components are connected to each other through one or more communication buses 404. Those skilled in the art will understand that Figure 4 The structure of the electronic device 400 shown in the figure does not constitute a limitation on the embodiments of the present application, and it can be a bus structure or a star structure, and can also include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0109] In the embodiment of the present application, the memory 402 may be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory. The memory 402 may also be at least one storage device located away from the processor 401. Figure 4 As shown, the memory 402 may include one or more executable codes (programs) and data, etc., which is not limited in the embodiment of the present application.

[0110] In the embodiment of the present application, the communication interface 403 may include a wired communication interface, a wireless communication interface, etc., which can be used to communicate and interact with the driving recorder, such as obtaining sample images collected by the driving recorder.

[0111] exist Figure 4 In the electronic device 400 shown, the processor 401 may be used to call one or more executable codes stored in the memory 402 to perform the following operations:

[0112] Obtain a training image set and a test image set collected by a driving recorder;

[0113] Reading a first historical hyperparameter configured for the current model training, where the first historical hyperparameter is a hyperparameter configured after the training of the training image set is completed last time;

[0114] Training the training image set according to the first historical hyperparameter to obtain a sample model;

[0115] Use the sample model to calibrate and identify each test image in the test image set to obtain the model calibration parameters of each test image;

[0116] Get the preset calibration parameters for each test image;

[0117] Determining evaluation parameters of each test image according to the model calibration parameters of each test image and the preset calibration parameters of each test image;

[0118] According to the evaluation parameters of each test image, the evaluation value of the test image set is calculated;

[0119] The evaluation value of the test image set is compared with the stored historical evaluation value, and the first historical hyperparameter is adjusted according to the comparison result and the second historical hyperparameter to obtain the optimized hyperparameter, wherein the second historical hyperparameter is the hyperparameter used when training the historical sample model corresponding to the historical evaluation value.

[0120] Optionally, when any test image in the test image set contains at least two calibration objects, the processor 401 uses the sample model to calibrate and identify the at least two calibration objects in any test image to obtain model calibration parameters of each calibration object respectively;

[0121] Obtaining preset calibration parameters of each calibration object in any of the above test images;

[0122] Determine the evaluation parameters of each calibration object according to the model calibration parameters of each calibration object and the preset calibration parameters of each calibration object;

[0123] The evaluation parameters of all calibration objects in any of the above test images are averaged to obtain the evaluation parameters of any of the above test images.

[0124] Optionally, the processor 401 may also call one or more executable codes stored in the memory 402 to perform the following operations:

[0125] When the evaluation value of the test image set is greater than or equal to the stored historical evaluation value, deleting the stored historical evaluation value and the historical sample model corresponding to the stored historical evaluation value;

[0126] Save the evaluation value of the test data set and the sample model obtained from this training.

[0127] Optionally, the processor 401 may also call one or more executable codes stored in the memory 402 to perform the following operations:

[0128] When the evaluation value of the test image set is less than the stored historical evaluation value, the evaluation value of the test image set and the sample model obtained in this training are deleted.

[0129] Optionally, the hyperparameter may include but is not limited to at least one of a learning rate, batch_size, gradient descent algorithm, number of neurons, number of iterations, optimizer, loss function, activation function, and the like.

[0130] Specifically, the electronic device described in the embodiments of the present application can implement the present application. Figure 1Part or all of the processes in the embodiments of the method for processing hyperparameters in deep learning of driving recorder images are introduced.

[0131] The modules or sub-modules in all the embodiments of the present application may be implemented by a general integrated circuit, such as a CPU, or by an ASIC (Application Specific Integrated Circuit).

[0132] The embodiment of the present application also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores a computer program for electronic data exchange, and the computer program specifically includes an executable code, which can be used to execute some or all of the steps described in the method for processing hyperparameters in deep learning of driving recorder images provided in the embodiment of the present application. The non-transitory computer-readable storage medium can be located in the deep learning training server provided in the aforementioned embodiment.

[0133] The present application also provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute some or all of the steps described in the method for processing hyperparameters in deep learning of driving recorder images provided in the present application. For example, the computer program product may be a software installation package, and the computer may be the deep learning training server provided in the aforementioned embodiment.

[0134] It should be noted that, for the above-mentioned various method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.

[0135] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0136] The steps in the method of the embodiment of the present application can be adjusted in order, combined and deleted according to actual needs.

[0137] The units or modules in the device of the embodiment of the present application can be combined, divided and deleted according to actual needs.

[0138] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable rewritable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.

[0139] The above is a detailed introduction to a method for processing hyperparameters in deep learning of driving recorder images and related devices provided in an embodiment of the present application. This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for processing hyperparameters in deep learning of driving recorder images, characterized in that: Applied to a deep learning training server, the method includes: Obtain a training image set and a test image set collected by a driving recorder; Reading a first historical hyperparameter configured for the current model training, where the first historical hyperparameter is a hyperparameter configured after the training of the training image set is completed last time; Training the training image set according to the first historical hyperparameter to obtain a sample model; Using the sample model to calibrate and identify each test image in the test image set, and obtain the model calibration parameters of each test image, wherein the model calibration parameters are the vertex coordinate values ​​of the dotted frame of the calibration object in the test image, and the dotted frame is the rectangular frame calibrated by the sample model; Obtaining preset calibration parameters for each test image, wherein the preset calibration parameters are vertex coordinate values ​​of a solid-line frame of a calibration object in the test image, and the solid-line frame is a pre-calibrated rectangular frame; Determining an evaluation parameter of each test image according to the model calibration parameter of each test image and the preset calibration parameter of each test image, wherein the evaluation parameter is the degree of coincidence between the preset calibration parameter and the model calibration parameter; According to the evaluation parameter of each test image, an evaluation value of the test image set is calculated, wherein the evaluation value is an average value of the evaluation parameter of each test image in the test image set; The evaluation value of the test image set is compared with the stored historical evaluation value, and the first historical hyperparameter is adjusted according to the comparison result and the second historical hyperparameter to obtain the optimized hyperparameter, wherein the second historical hyperparameter is the hyperparameter used when training the historical sample model corresponding to the historical evaluation value.

2. The method for processing hyperparameters in deep learning of driving recorder images according to claim 1, characterized in that: When any test image in the test image set contains at least two calibration objects, calibrate and identify the at least two calibration objects in the test image using the sample model to obtain model calibration parameters of each calibration object respectively; Obtaining preset calibration parameters of each calibration object in any one of the test images; Determine the evaluation parameters of each calibration object according to the model calibration parameters of each calibration object and the preset calibration parameters of each calibration object; An average value is taken for the evaluation parameters of all calibration objects in any one of the test images to obtain the evaluation parameters of any one of the test images.

3. The method for processing hyperparameters in deep learning of driving recorder images according to claim 1 or 2, characterized in that: The method further comprises: When the evaluation value of the test data set is greater than or equal to the historical evaluation value, deleting the historical evaluation value and the historical sample model corresponding to the historical evaluation value; Save the evaluation value of the test data set and the sample model obtained in this training.

4. The method for processing hyperparameters in deep learning of driving recorder images according to claim 1 or 2, characterized in that: The method further comprises: When the evaluation value of the test data set is less than the historical evaluation value, the evaluation value of the test data set and the sample model obtained in this training are deleted.

5. The method for processing hyperparameters in deep learning of driving recorder images according to claim 1, characterized in that: The hyperparameters include at least one of a learning rate, a batch_size, a gradient descent algorithm, a number of neurons, and a number of iterations.

6. A deep learning training server, characterized in that: include: A first acquisition unit, used to acquire a training image set and a test image set collected by a driving recorder; A reading unit, used for reading a first historical hyperparameter configured for the current model training, where the first historical hyperparameter is a hyperparameter configured after the training of the training image set is completed last time; A training unit, configured to train the training image set according to the first historical hyperparameter to obtain a sample model; an identification unit, configured to use the sample model to perform calibration and identification on each test image in the test image set, and obtain a model calibration parameter of each test image, wherein the model calibration parameter is a vertex coordinate value of a dotted frame of a calibration object in the test image, and the dotted frame is a rectangular frame calibrated by the sample model; A second acquisition unit is used to acquire preset calibration parameters of each test image, wherein the preset calibration parameters are vertex coordinate values ​​of a solid line frame of a calibration object in the test image, and the solid line frame is a pre-calibrated rectangular frame; a determination unit, configured to determine an evaluation parameter of each test image according to a model calibration parameter of each test image and a preset calibration parameter of each test image, wherein the evaluation parameter is a degree of coincidence between the preset calibration parameter and the model calibration parameter; A calculation unit, configured to calculate an evaluation value of the test image set according to the evaluation parameter of each test image, wherein the evaluation value is an average value of the evaluation parameter of each test image in the test image set; An adjustment unit is used to compare the evaluation value of the test image set with the stored historical evaluation value, and adjust the first historical hyperparameter according to the comparison result and the second historical hyperparameter to obtain an optimized hyperparameter, wherein the second historical hyperparameter is the hyperparameter used when training the historical sample model corresponding to the historical evaluation value.

7. The deep learning training server according to claim 6, characterized in that: When any test image in the test image set contains at least two calibration objects, the recognition unit is specifically used to perform calibration recognition on the at least two calibration objects in the any test image using the sample model to obtain model calibration parameters of each calibration object respectively; The second acquisition unit is specifically used to acquire preset calibration parameters of each calibration object in any one of the test images; The determination unit is specifically used to determine the evaluation parameters of each calibration object according to the model calibration parameters of each calibration object and the preset calibration parameters of each calibration object; and to average the evaluation parameters of all calibration objects in any test image to obtain the evaluation parameters of any test image.

8. The deep learning training server according to claim 6 or 7, characterized in that: Also includes: A first processing unit, configured to delete the historical evaluation value and the historical sample model corresponding to the historical evaluation value when the evaluation value of the test data set is greater than or equal to the historical evaluation value; The storage unit is used to store the evaluation value of the test data set and the sample model obtained in this training.

9. The deep learning training server according to claim 6 or 7, characterized in that: Also includes: The second processing unit is used to delete the evaluation value of the test data set and the sample model obtained by this training when the evaluation value of the test data set is less than the historical evaluation value.

10. An electronic device, characterized in that: include: processor; as well as A memory having executable codes stored thereon, which, when executed by the processor, causes the processor to execute the method according to any one of claims 1 to 5.