Training method and device of target detection model, electronic equipment and storage medium

By optimizing hyperparameters, an optimal target detection model is generated, which solves the problem of overfitting in neural network models in industry applications and improves detection accuracy and training efficiency.

CN115035380BActive Publication Date: 2026-02-03GLOBAL ENERGY INTERCONNECTION RES INST CO LTD +3
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210643217.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-07
Publication Date
2026-02-03
Estimated Expiration
2042-06-07

AI Technical Summary

Technical Problem

In existing technologies, neural network models for industry-oriented target detection tasks are prone to overfitting when the number of samples is small and the classes are imbalanced, resulting in poor detection performance.

Method used

By obtaining multiple sets of target detection models corresponding to the current hyperparameters, optimizing the hyperparameters based on the model accuracy, generating candidate hyperparameters through multiple mutation and crossover processes, and finally determining the optimal target detection model.

Benefits of technology

This improves the accuracy and training efficiency of the target detection model, ensuring higher detection accuracy in industry applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115035380B_ABST
    Figure CN115035380B_ABST
Patent Text Reader

Abstract

The application discloses a target detection model training method and device, electronic equipment and a storage medium, and relates to the field of target detection. The method comprises the following steps: acquiring at least two groups of current hyperparameters and current target detection models corresponding to the groups of current hyperparameters; wherein each current target detection model is obtained by training an initial target detection model based on each group of current hyperparameters; optimizing each group of current hyperparameters based on the accuracy of each current target detection model, obtaining at least two groups of candidate hyperparameters, and obtaining candidate target detection models corresponding to each group of candidate hyperparameters; and obtaining an optimal target detection model based on each candidate target detection model. The method can ensure that the accuracy of the determined optimal target detection model is high, so that the result obtained by using the optimal target detection model to detect a target is more accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of target detection, and more specifically to a method, apparatus, electronic device, and storage medium for training a target detection model. Background Technology

[0002] Deep learning technology has achieved high technical maturity in image object detection tasks, leading to the widespread adoption of object detection neural networks in various industries such as energy and transportation. However, the samples used in industry-specific object detection tasks differ significantly from general datasets, exhibiting characteristics such as smaller sample sizes and pronounced class imbalance. Therefore, neural network hyperparameter values ​​effective for general datasets may not yield optimal results for industry-specific object detection neural networks.

[0003] In existing technologies, current research on automated machine learning in various industries focuses more on optimizing network structure-related parameters such as neural network sub-modules, number of network layers, and number of neurons, while research on optimizer parameters, loss function form, and scale as the main optimization objects is relatively rare.

[0004] Therefore, although the automated machine learning paradigm commonly used in academia can yield a more universal neural network structure, directly applying such methods to optimize using training datasets from industry applications often leads to overfitting of the neural network model, resulting in poor performance. Summary of the Invention

[0005] In view of this, embodiments of the present invention provide a training method, apparatus, electronic device and storage medium for a target detection model, aiming to solve the problem of inaccurate training of detection models in the prior art.

[0006] According to a first aspect, embodiments of the present invention provide a method for training an object detection model, comprising:

[0007] Obtain at least two sets of current hyperparameters and the current object detection model corresponding to each set of current hyperparameters; wherein each current object detection model is obtained by training an initial object detection model based on each set of current hyperparameters;

[0008] Based on the accuracy of each current target detection model, optimize each set of current hyperparameters to obtain at least two sets of candidate hyperparameters, and obtain the candidate target detection model corresponding to each set of candidate hyperparameters;

[0009] Based on the candidate target detection models, the optimal target detection model is obtained.

[0010] The object detection model training method provided in this invention obtains at least two sets of current hyperparameters and the corresponding current object detection model for each set of current hyperparameters. Then, based on the accuracy of each current object detection model, the current hyperparameters are optimized to obtain at least two sets of candidate hyperparameters and corresponding candidate object detection models. Based on the accuracy of each current object detection model, the current hyperparameters are used as a baseline for optimization, avoiding hyperparameter overfitting caused by a lack of comparison between different stages, thus ensuring the accuracy of the obtained candidate hyperparameters and consequently the accuracy of the corresponding candidate object detection models. Based on each candidate object detection model, an optimal object detection model is obtained. This ensures that the determined optimal object detection model has high accuracy. Therefore, using the optimal object detection model for object detection yields more accurate results. The above method, by optimizing the hyperparameters corresponding to the optimal object detection model, ensures the accuracy of the finally trained optimal object detection model.

[0011] In conjunction with the first aspect, in the first embodiment of the first aspect, based on the accuracy of each current target detection model, the current hyperparameters of each group are optimized to obtain at least two sets of candidate hyperparameters, including:

[0012] Based on the accuracy of each current target detection model, multiple mutations and / or cross-processing are performed on each group of current hyperparameters to obtain multiple groups of undetermined hyperparameters;

[0013] Obtain the accuracy of each group of undetermined hyperparameters;

[0014] Based on the accuracy of each set of undetermined hyperparameters, at least two sets of candidate hyperparameters are obtained.

[0015] The target detection model training method provided in this embodiment of the invention performs multiple mutations and / or cross-processing on each group of current hyperparameters based on the accuracy of each current target detection model, thereby obtaining multiple groups of undetermined hyperparameters and thus optimizing each group of current hyperparameters. Then, the accuracy of each group of undetermined hyperparameters is obtained, and based on the accuracy of each group of undetermined hyperparameters, at least two groups of candidate hyperparameters are obtained, thereby ensuring that the accuracy of the obtained at least two groups of candidate hyperparameters is high.

[0016] In conjunction with the first embodiment of the first aspect, in the second embodiment of the first aspect, multiple mutations and / or crossovers are performed on each group of current hyperparameters to obtain multiple groups of undetermined hyperparameters, including: each time the mutations and / or crossovers are performed on each group of current hyperparameters to obtain the candidate hyperparameters corresponding to each group of current hyperparameters;

[0017] The initial target detection model is trained for a preset number of rounds based on each set of candidate hyperparameters to determine the accuracy of each set of candidate hyperparameters; the preset number of rounds is positively correlated with the number of optimizations corresponding to the current hyperparameters in each set;

[0018] Based on the accuracy of each group of candidate hyperparameters, the undetermined hyperparameters for each group are determined.

[0019] The training method for the target detection model provided in this invention involves mutating and / or cross-processing each group of current hyperparameters to obtain candidate hyperparameters corresponding to each group of current hyperparameters, ensuring the diversity of the obtained candidate hyperparameters. Then, the initial target detection model is trained for a preset number of rounds based on each group of candidate hyperparameters to determine the accuracy of each group of candidate hyperparameters, thereby ensuring the accuracy of the determined candidate hyperparameters. Furthermore, since the preset number of rounds is positively correlated with the number of optimizations corresponding to each group of current hyperparameters, when the number of optimizations corresponding to the current hyperparameters is low, the accuracy of the current hyperparameters is also low. To save training time, the number of training rounds for the candidate hyperparameters corresponding to each group of current hyperparameters is reduced. Conversely, when the number of optimizations corresponding to the current hyperparameters is high, the accuracy of the current hyperparameters is also high. To maintain the accuracy of the current hyperparameters, the number of training rounds for the candidate hyperparameters corresponding to each group of current hyperparameters is increased. Finally, based on the accuracy of each group of candidate hyperparameters, each group of undetermined hyperparameters is determined. This ensures the accuracy of the obtained sets of undetermined hyperparameters while saving training time and improving training efficiency.

[0020] In conjunction with the first embodiment of the first aspect, in the third embodiment of the first aspect, based on the accuracy of each set of undetermined hyperparameters, at least two sets of candidate hyperparameters are obtained, including:

[0021] Based on the accuracy of each group of undetermined hyperparameters, the undetermined hyperparameter with the highest accuracy is determined as the target candidate hyperparameter;

[0022] Obtain at least two final sets of undetermined hyperparameters by performing the last mutation and / or crossover on each group of current hyperparameters.

[0023] Based on the target candidate hyperparameters and at least two sets of undetermined hyperparameters, generate at least two sets of candidate hyperparameters.

[0024] The target detection model training method provided in this invention determines the candidate hyperparameters with the highest accuracy based on the accuracy of each group of undetermined hyperparameters, ensuring that the determined candidate hyperparameters have high accuracy. Then, it obtains at least two final groups of undetermined hyperparameters by performing a final mutation and / or crossover on each group of current hyperparameters, ensuring that these final two groups are optimized and mutated hyperparameters. Finally, based on the candidate hyperparameters and the final two groups of undetermined hyperparameters, at least two groups of candidate hyperparameters are generated, ensuring the accuracy of the generated at least two groups of candidate hyperparameters.

[0025] In conjunction with the third embodiment of the first aspect, in the fourth embodiment of the first aspect, at least two or more sets of candidate hyperparameters are generated based on the target candidate hyperparameters and the last at least two sets of undetermined hyperparameters, including:

[0026] Duplicate the target candidate hyperparameters to generate at least two sets of target candidate hyperparameters;

[0027] For the last two sets of undetermined hyperparameters, perform mutation and / or crossover processing to generate at least one set of alternative candidate hyperparameters;

[0028] Combine at least two sets of target candidate hyperparameters and at least one set of backup candidate hyperparameters to generate at least three sets of candidate hyperparameters.

[0029] The target detection model training method provided in this invention replicates the target candidate hyperparameters to generate at least two sets of target candidate hyperparameters, reducing the possibility of abnormal target candidate hyperparameters leading to inaccurate model training. Then, the last at least two sets of undetermined hyperparameters are mutated and / or cross-processed to generate at least one set of backup candidate hyperparameters. The at least two sets of target candidate hyperparameters and the at least one set of backup candidate hyperparameters are combined to generate at least three sets of candidate hyperparameters. This ensures the accuracy of the generated at least three sets of candidate hyperparameters and also optimizes the current hyperparameters, thereby guaranteeing the accuracy of the optimal target detection model determined based on the candidate target detection models corresponding to each set of candidate hyperparameters.

[0030] In conjunction with the first aspect, in the fifth embodiment of the first aspect, based on each candidate target detection model, an optimal target detection model is obtained, including:

[0031] Obtain the model accuracy of each candidate target detection model;

[0032] The candidate target detection model with the highest model accuracy is determined as the optimal target detection model.

[0033] The target detection model training method provided in this embodiment of the invention obtains the model accuracy of each candidate target detection model; and determines the candidate target detection model with the highest model accuracy as the optimal target detection model. This ensures that the determined optimal target detection model has the highest accuracy.

[0034] In conjunction with the fifth embodiment of the first aspect, in the sixth embodiment of the first aspect, obtaining the accuracy of each candidate target detection model includes:

[0035] Obtain the test dataset;

[0036] Based on the test dataset, each candidate object detection model is tested to obtain the model accuracy of each candidate object detection model.

[0037] The target detection model training method provided in this embodiment of the invention obtains a test dataset; based on the test dataset, each candidate target detection model is tested to obtain the model accuracy of each candidate target detection model, thus ensuring the accuracy of the obtained model accuracy of each candidate target detection model.

[0038] According to a second aspect, embodiments of the present invention also provide a training apparatus for a detection model, comprising:

[0039] The first acquisition module is used to acquire at least two sets of current hyperparameters and the current object detection model corresponding to each set of current hyperparameters; wherein, each current object detection model is obtained by training an initial object detection model based on each set of current hyperparameters;

[0040] The optimization module is used to optimize each set of current hyperparameters based on the accuracy of each current target detection model, to obtain at least two sets of candidate hyperparameters, and to obtain the candidate target detection model corresponding to each set of candidate hyperparameters;

[0041] The determination module is used to obtain the optimal target detection model based on each candidate target detection model.

[0042] The training apparatus for the detection model provided in this embodiment of the invention acquires at least two sets of current hyperparameters and the current target detection model corresponding to each set of current hyperparameters. Then, based on the accuracy of each current target detection model, the current hyperparameters are optimized to obtain at least two sets of candidate hyperparameters and candidate target detection models corresponding to each set of candidate hyperparameters. Based on the accuracy of each current target detection model, the current hyperparameters are used as a baseline for optimization, avoiding hyperparameter overfitting caused by a lack of comparison between hyperparameters at different stages, thereby ensuring the accuracy of the obtained candidate hyperparameters, and consequently ensuring the accuracy of the candidate target detection models corresponding to each set of candidate hyperparameters. Based on each candidate target detection model, an optimal target detection model is obtained. This ensures that the determined optimal target detection model has high accuracy. Therefore, using the optimal target detection model for target detection yields more accurate results. The above method, by optimizing the hyperparameters corresponding to the target detection model, ensures the accuracy of the finally trained optimal target detection model.

[0043] In conjunction with the second aspect, in the first embodiment of the second aspect, the optimization module is used to perform multiple mutations and / or cross-processing on each group of current hyperparameters based on the accuracy of each current target detection model to obtain multiple groups of undetermined hyperparameters; obtain the accuracy of each group of undetermined hyperparameters; and obtain at least two groups of candidate hyperparameters based on the accuracy of each group of undetermined hyperparameters.

[0044] The target detection model training device provided in this embodiment of the invention performs multiple mutations and / or cross-processing on each group of current hyperparameters based on the accuracy of each current target detection model, thereby obtaining multiple groups of undetermined hyperparameters and thus optimizing each group of current hyperparameters. Then, the accuracy of each group of undetermined hyperparameters is obtained, and based on the accuracy of each group of undetermined hyperparameters, at least two groups of candidate hyperparameters are obtained, thereby ensuring that the accuracy of the obtained at least two groups of candidate hyperparameters is high.

[0045] In conjunction with the first implementation method of the second aspect, in the second implementation method of the second aspect, the optimization module is used to perform mutation and / or cross-processing on each group of current hyperparameters to obtain candidate hyperparameters corresponding to each group of current hyperparameters; to train the initial target detection model for a preset number of rounds based on each group of candidate hyperparameters to determine the accuracy of each group of candidate hyperparameters; the preset number of rounds is positively correlated with the number of optimizations corresponding to each group of current hyperparameters; and to determine the undetermined hyperparameters of each group based on the accuracy of each group of candidate hyperparameters.

[0046] The training device for the target detection model provided in this embodiment of the invention performs mutation and / or cross-processing on each group of current hyperparameters to obtain candidate hyperparameters corresponding to each group of current hyperparameters, ensuring the diversity of the obtained candidate hyperparameters. Then, based on each group of candidate hyperparameters, the initial target detection model is trained for a preset number of rounds to determine the accuracy of each group of candidate hyperparameters, thereby ensuring the accuracy of the determined candidate hyperparameters. Furthermore, since the preset number of rounds is positively correlated with the number of optimizations corresponding to each group of current hyperparameters, when the number of optimizations corresponding to the current hyperparameters is small, the accuracy of the current hyperparameters is also low. To save training time, the number of training rounds for each group of candidate hyperparameters is reduced. Conversely, when the number of optimizations corresponding to the current hyperparameters is large, the accuracy of the current hyperparameters is also high. To maintain the accuracy of the current hyperparameters, the number of training rounds for each group of candidate hyperparameters is increased. Finally, based on the accuracy of each group of candidate hyperparameters, each group of undetermined hyperparameters is determined. This ensures the accuracy of the obtained sets of undetermined hyperparameters while saving training time and improving training efficiency.

[0047] In conjunction with the first implementation of the second aspect, in the third implementation of the second aspect, the optimization module is used to determine the candidate hyperparameter with the highest accuracy as the target candidate hyperparameter based on the accuracy of each group of candidate hyperparameters; obtain the last at least two groups of candidate hyperparameters obtained by performing the last mutation and / or crossover on each group of current hyperparameters; and generate at least two groups of candidate hyperparameters based on the target candidate hyperparameters and the last at least two groups of candidate hyperparameters.

[0048] The training device for the target detection model provided in this embodiment of the invention determines the candidate hyperparameters with the highest accuracy based on the accuracy of each group of candidate hyperparameters, ensuring that the determined candidate hyperparameters have high accuracy. Then, it obtains at least two final groups of candidate hyperparameters by performing a final mutation and / or crossover process on each group of current hyperparameters, ensuring that these final at least two groups of candidate hyperparameters are optimized and mutated multiple times. Finally, based on the candidate hyperparameters and the final at least two groups of candidate hyperparameters, it generates at least two groups of candidate hyperparameters, ensuring the accuracy of the generated at least two groups of candidate hyperparameters.

[0049] In conjunction with the third implementation of the second aspect, in the fourth implementation of the second aspect, at least two or more sets of optimization modules are used to copy the target candidate hyperparameters to generate at least two sets of target candidate hyperparameters; to perform mutation and / or crossover processing on the last at least two sets of undetermined hyperparameters to generate at least one set of backup candidate hyperparameters; and to combine the at least two sets of target candidate hyperparameters and the at least one set of backup candidate hyperparameters to generate at least three sets of candidate hyperparameters.

[0050] The target detection model training device provided in this embodiment of the invention replicates the target candidate hyperparameters to generate at least two sets of target candidate hyperparameters, reducing the possibility of abnormal target candidate hyperparameters leading to inaccurate model training. Then, it performs mutation and / or crossover processing on the last at least two sets of undetermined hyperparameters to generate at least one set of backup candidate hyperparameters. Combining the at least two sets of target candidate hyperparameters and the at least one set of backup candidate hyperparameters generates at least three sets of candidate hyperparameters. This ensures the accuracy of the generated at least three sets of candidate hyperparameters and also optimizes the current hyperparameters, thereby guaranteeing the accuracy of the optimal target detection model determined based on the candidate target detection models corresponding to each set of candidate hyperparameters.

[0051] In conjunction with the second aspect, in the fifth embodiment of the second aspect, a determining module is used to obtain the model accuracy of each candidate target detection model; and to determine the candidate target detection model with the highest model accuracy as the optimal target detection model.

[0052] The target detection model training device provided in this embodiment of the invention obtains the model accuracy of each candidate target detection model; and determines the candidate target detection model with the highest model accuracy as the optimal target detection model. This ensures that the determined optimal target detection model has the highest accuracy.

[0053] In conjunction with the fifth implementation of the second aspect, in the sixth implementation of the second aspect, a determining module is used to acquire a test dataset; based on the test dataset, each candidate target detection model is tested to obtain the model accuracy of each candidate target detection model.

[0054] The target detection model training device provided in this embodiment of the invention acquires a test dataset; based on the test dataset, it tests each candidate target detection model to obtain the model accuracy of each candidate target detection model, thus ensuring the accuracy of the obtained model accuracy of each candidate target detection model.

[0055] According to a third aspect, embodiments of the present invention provide an electronic device, including a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to perform a training method for a target detection model in the first aspect or any embodiment of the first aspect.

[0056] According to a fourth aspect, embodiments of the present invention provide a computer-readable storage medium storing computer instructions for causing a computer to execute a training method for a target detection model in the first aspect or any embodiment of the first aspect. Attached Figure Description

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

[0058] Figure 1 This is a flowchart of the training method for the target detection model provided in the embodiments of the present invention;

[0059] Figure 2 This is a flowchart of a training method for an object detection model provided by another embodiment of the present invention;

[0060] Figure 3 This is a flowchart of a training method for an object detection model provided by another embodiment of the present invention;

[0061] Figure 4 This is a functional block diagram of a training device that applies the detection model provided in the embodiments of the present invention;

[0062] Figure 5 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of the present invention. Detailed Implementation

[0063] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0064] It should be noted that the training method for the target detection model provided in this application embodiment can be executed by a training device for the detection model. This training device can be implemented as part or all of an electronic device through software, hardware, or a combination of both. The electronic device can be a server or a terminal. In this application embodiment, the server can be a single server or a server cluster composed of multiple servers. The terminal in this application embodiment can be a smartphone, personal computer, tablet computer, wearable device, or other intelligent hardware device such as an intelligent robot. The following method embodiments will use an electronic device as an example for explanation.

[0065] In one embodiment of this application, such as Figure 1As shown, a training method for an object detection model is provided. Taking the application of this method to an electronic device as an example, the method includes the following steps:

[0066] S11. Obtain at least two sets of current hyperparameters and the current target detection model corresponding to each set of current hyperparameters.

[0067] Each current object detection model is obtained by training the initial object detection model based on each set of current hyperparameters.

[0068] Specifically, the electronic device can receive an initial object detection model input by the user, or it can receive an initial object detection model sent by other devices. The initial object detection model can be a model based on handcrafted features, such as DPM (Deformable Parts Model), or it can be a model based on convolutional neural networks, such as the YOLO (You Only Look Once) detector, R-CNN (Region-based Convolutional Neural Networks), SSD (Single Shot MultiBox) detector, and Mask R-CNN (Mask Region-based Convolutional Neural Networks), Faster RCNN, Cascade RCNN, etc. This application does not specifically limit the initial object detection model. When the initial object detection model is Faster R-CNN, its backbone network can be ResNet-101.

[0069] In one optional embodiment of this application, the electronic device can receive at least two sets of current hyperparameters input by a user, and can also receive at least two sets of current hyperparameters sent by other devices. Furthermore, it can generate at least two sets of initial hyperparameters, optimize the initial hyperparameters, and generate at least two sets of current hyperparameters. Then, an initial object detection model is trained based on the at least two sets of current hyperparameters to obtain the current object detection model corresponding to the current hyperparameters.

[0070] The hyperparameters can include continuous hyperparameters such as learning rate, momentum, and scale of each loss function term, as well as discrete hyperparameters such as the type of optimizer used and whether focal loss is used; the loss function terms include RPN classification loss, RPN regression loss, RCNN classification loss, RCNN regression loss, YOLO classification loss or YOLO regression loss, etc.; the optimizer types include SGD, Adam, AdaGrad, RMSProp, AdaDelta, etc.

[0071] The optimizer type, whether RPN loss uses focal loss, and whether RCNN loss uses focal loss are discrete quantities, and their values ​​can be discretely encoded. The learning rate, momentum, RPN classification loss scale, RPN regression loss scale, RCNN classification loss scale, and RCNN regression loss scale are continuous quantities, and their values ​​can be continuously encoded using floating-point encoding. Among them, the learning rate and momentum have a value range of (0,1], and the RPN classification loss scale, RPN regression loss scale, RCNN classification loss scale, and RCNN regression loss scale have a value range of (0,4).

[0072] In one alternative implementation, the electronic device generates at least two sets of initial hyperparameters, optimizes the initial hyperparameters, and the process of generating at least two sets of current hyperparameters may include the following:

[0073] Specifically, the electronic device can randomly generate at least two sets of initial hyperparameters based on the parameters included in the hyperparameters, and then perform phased optimization on these at least two sets of initial hyperparameters to obtain at least two sets of current hyperparameters corresponding to the current stage. During each stage of optimization, the at least two sets of current hyperparameters corresponding to the current stage can be optimized multiple times. For example, the electronic device can perform five stages of hyperparameter optimization, with 20 evolutions in each stage.

[0074] For example, suppose an electronic device can randomly generate 10 sets of initial hyperparameters based on the parameters included in the hyperparameters. Then, the electronic device trains an initial object detection model based on these 10 sets of initial hyperparameters, obtaining current object detection models corresponding to the 10 sets of initial hyperparameters. Based on the accuracy of each current object detection model, the accuracy of the 10 sets of initial hyperparameters is determined, and the hyperparameter with the highest accuracy is selected from the 10 sets. This highest-accuracy hyperparameter is then copied 3 times. The 3 sets of hyperparameters with the highest accuracy are then substituted into the next evolution to adjust the initial hyperparameters. At least one of the multiple parameters included in the initial hyperparameters can be adjusted. Then, 7 new sets of hyperparameters are generated, and combined with the 3 sets of hyperparameters with the highest accuracy obtained in the previous optimization, resulting in 10 sets of hyperparameters. The 10 sets of hyperparameters are then tested again based on the initial object detection model to determine their accuracy once more. The hyperparameter with the highest accuracy is selected for the next optimization, and this process continues until 20 optimizations are completed, completing one stage of optimization. Then, the hyperparameter with the highest accuracy is determined as the current hyperparameter, and the current object detection model is obtained by training the initial object detection model based on the current hyperparameter.

[0075] S12. Based on the accuracy of each current target detection model, optimize each group of current hyperparameters to obtain at least two groups of candidate hyperparameters, and obtain the candidate target detection model corresponding to each group of candidate hyperparameters.

[0076] Specifically, the electronic device can optimize the current hyperparameters based on the accuracy of each current target detection model using an evolutionary algorithm to obtain at least two sets of candidate hyperparameters. The evolutionary algorithm can be a genetic algorithm, particle swarm optimization, evolutionary programming, evolutionary strategy, etc., and this application does not specifically limit the evolutionary algorithm used.

[0077] Then, the electronic device determines various parameters such as learning rate, momentum, scale of each loss function term, optimizer type, and whether focal loss is used based on each group of candidate hyperparameters. Then, it trains the initial object detection model based on the determined parameters to obtain the candidate object detection model corresponding to each group of candidate hyperparameters.

[0078] This step will be explained in detail below.

[0079] S13. Based on each candidate target detection model, the optimal target detection model is obtained.

[0080] In one alternative implementation, the electronic device can compare the model accuracy of each candidate target detection model and then determine the candidate target detection model with the highest accuracy as the optimal target detection model.

[0081] In another optional embodiment of this application, after the electronic device obtains the accuracy of each candidate target detection model, it can optimize the hyperparameters of each group of candidates based on the accuracy of each candidate target detection model, and finally obtain the target hyperparameters. Based on the target hyperparameters, the optimal target detection model is determined.

[0082] The object detection model training method provided in this invention obtains at least two sets of current hyperparameters and the corresponding current object detection model for each set of current hyperparameters. Then, based on the accuracy of each current object detection model, the current hyperparameters are optimized to obtain at least two sets of candidate hyperparameters and candidate object detection models corresponding to each set of candidate hyperparameters. Based on the accuracy of each current object detection model, the current hyperparameters are used as a baseline for optimization, avoiding hyperparameter overfitting caused by a lack of comparison between hyperparameters at different stages, thus ensuring the accuracy of the obtained candidate hyperparameters, and consequently ensuring the accuracy of the candidate object detection models corresponding to each set of candidate hyperparameters. Based on each candidate object detection model, an optimal object detection model is obtained. This ensures that the determined optimal object detection model has high accuracy. Therefore, using the optimal object detection model for object detection yields more accurate results. The above method, by optimizing the hyperparameters corresponding to the object detection model, ensures the accuracy of the finally trained optimal object detection model.

[0083] In one embodiment of this application, such as Figure 2 As shown, a training method for an object detection model is provided. Taking the application of this method to an electronic device as an example, the method includes the following steps:

[0084] S21. Obtain at least two sets of current hyperparameters and the current target detection model corresponding to each set of current hyperparameters.

[0085] Each current object detection model is obtained by training the initial object detection model based on each set of current hyperparameters.

[0086] Please see details for this step. Figure 1 Introduction to S11.

[0087] S22. Based on the accuracy of each current target detection model, optimize each group of current hyperparameters to obtain at least two groups of candidate hyperparameters, and obtain the candidate target detection model corresponding to each group of candidate hyperparameters.

[0088] In an optional embodiment of this application, step S22 above, "optimizing each set of current hyperparameters based on the accuracy of each current target detection model to obtain at least two sets of candidate hyperparameters," may include the following steps:

[0089] S221. Based on the accuracy of each current target detection model, perform multiple mutations and / or cross-processing on each group of current hyperparameters to obtain multiple groups of undetermined hyperparameters.

[0090] Specifically, the electronic device can use an evolutionary algorithm to perform multiple mutations and / or crossovers on each set of current hyperparameters based on the accuracy of each current target detection model, thereby obtaining multiple sets of undetermined hyperparameters. The evolutionary algorithm can be a genetic algorithm, particle swarm optimization algorithm, evolutionary programming, evolutionary strategy, etc., and this application does not specifically limit the evolutionary algorithm used.

[0091] Optionally, the electronic device can use an evolutionary algorithm to adjust the parameters included in each group of current hyperparameters, or cross-process the parameters of some items in one group of current hyperparameters with the parameters of some items in other groups of hyperparameters, thereby obtaining multiple groups of undetermined hyperparameters.

[0092] For example, the electronic device can change the value corresponding to the learning rate included in the current hyperparameters, and can also cross-transform the last 5 parameters in one set of current hyperparameters with the last 5 parameters in other sets of hyperparameters to obtain multiple sets of undetermined hyperparameters.

[0093] Specifically, the above-mentioned S221, "based on the accuracy of each current target detection model, performing multiple mutations and / or cross-processing on each group of current hyperparameters to obtain multiple groups of undetermined hyperparameters," may include the following steps:

[0094] (1) Each time, the current hyperparameters of each group are mutated and / or cross-processed to obtain the candidate hyperparameters corresponding to the current hyperparameters of each group.

[0095] (2) The initial target detection model is trained for a preset number of rounds based on each set of candidate hyperparameters to determine the accuracy of each set of candidate hyperparameters.

[0096] Among them, the preset number of rounds is positively correlated with the number of optimizations corresponding to the current hyperparameters of each group.

[0097] (3) Based on the accuracy of each group of candidate hyperparameters, determine the undetermined hyperparameters for each group.

[0098] Specifically, each time the electronic device performs mutation and / or cross-processing on each group of current hyperparameters, it can use an optimization algorithm to perform multiple mutation and / or cross-processing on each group of current hyperparameters to obtain the alternative hyperparameters corresponding to each group of current hyperparameters.

[0099] Then, the electronic device trains the initial target detection model for a preset number of rounds based on each set of candidate hyperparameters to determine the accuracy of each set of candidate hyperparameters.

[0100] For example, suppose an electronic device optimizes hyperparameters in five stages, with each stage performed three times. The preset number of rounds for stages 1, 2, 3, 4, and 5 are 10, 15, 20, 25, and 30, respectively. That is, when the current hyperparameter corresponds to stage 3, each of the three optimization rounds in stage 3 can train the initial object detection model for 20 rounds, determining the accuracy of each set of candidate hyperparameters.

[0101] After determining the accuracy of each set of candidate hyperparameters, the electronic device can select the candidate hyperparameter with the highest accuracy from each set of candidate hyperparameters as the undetermined hyperparameter for each set.

[0102] S222. Obtain the accuracy of each group of undetermined hyperparameters.

[0103] Specifically, the electronic device can train an initial target detection model based on each set of undetermined hyperparameters to obtain undetermined detection models corresponding to the undetermined hyperparameters. Then, each undetermined detection model is tested to determine its accuracy. Based on the accuracy of each undetermined detection model, the accuracy of each set of undetermined hyperparameters is determined.

[0104] S223. Based on the accuracy of each set of undetermined hyperparameters, obtain at least two sets of candidate hyperparameters.

[0105] Specifically, the above-mentioned S223 "obtaining at least two sets of candidate hyperparameters based on the accuracy of each set of undetermined hyperparameters" may include the following steps:

[0106] (1) Based on the accuracy of each group of undetermined hyperparameters, determine the undetermined hyperparameter with the highest accuracy as the target candidate hyperparameter.

[0107] Specifically, after obtaining the accuracy of each set of undetermined hyperparameters, the electronic device can compare the accuracy of each set of undetermined hyperparameters and then determine the undetermined hyperparameter with the highest accuracy as the target candidate hyperparameter.

[0108] (2) Obtain the last two sets of undetermined hyperparameters obtained by performing the last mutation and / or crossover on the current hyperparameters of each group.

[0109] Specifically, after determining the candidate hyperparameter with the highest accuracy as the target candidate hyperparameter, the electronic device can obtain at least two final sets of candidate hyperparameters by performing a final mutation and / or crossover on each group of current hyperparameters.

[0110] For example, suppose the electronic device performs 5 mutations and / or crossovers on each group of current hyperparameters, and then obtains the last at least two groups of undetermined hyperparameters after the 5th mutation and / or crossover.

[0111] (3) Generate at least two sets of candidate hyperparameters based on the target candidate hyperparameters and the last at least two sets of undetermined hyperparameters.

[0112] In one optional embodiment of this application, the electronic device can combine the target candidate hyperparameters and at least two sets of undetermined hyperparameters to generate at least two sets of candidate hyperparameters.

[0113] In another optional embodiment of this application, at least two or more groups are used. The "generating at least two groups of candidate hyperparameters based on the target candidate hyperparameters and the last at least two groups of undetermined hyperparameters" in (3) above may include the following steps:

[0114] (31) Copy the target candidate hyperparameters to generate at least two sets of target candidate hyperparameters;

[0115] (32) Perform mutation and / or crossover on the last at least two sets of undetermined hyperparameters to generate at least one set of backup candidate hyperparameters;

[0116] (33) Combine at least two sets of target candidate hyperparameters and at least one set of backup candidate hyperparameters to generate at least three sets of candidate hyperparameters.

[0117] Specifically, the electronic device can replicate the target candidate hyperparameters to generate at least two sets of target candidate hyperparameters. Then, the electronic device performs mutation and / or crossover processing on the last at least two sets of undetermined hyperparameters to generate at least one set of backup candidate hyperparameters. The electronic device combines the at least two sets of target candidate hyperparameters and the at least one set of backup candidate hyperparameters to generate at least three sets of candidate hyperparameters.

[0118] For example, the electronic device can copy the target candidate hyperparameters three times, and then mutate and / or cross-process the last at least two sets of undetermined hyperparameters to generate seven sets of alternative candidate hyperparameters; the electronic device combines the three sets of target candidate hyperparameters and the seven sets of alternative candidate hyperparameters to generate ten sets of candidate hyperparameters.

[0119] S23. Based on each candidate target detection model, the optimal target detection model is obtained.

[0120] Please see details for this step. Figure 1 Introduction to S13.

[0121] The target detection model training method provided in this invention performs multiple mutations and / or crossovers on each group of current hyperparameters. Each mutation and / or crossover process yields candidate hyperparameters for each group of current hyperparameters, ensuring the diversity of the candidate hyperparameters obtained. Then, the initial target detection model is trained for a preset number of rounds based on each group of candidate hyperparameters to determine the accuracy of each group of candidate hyperparameters, thereby ensuring the accuracy of the determined candidate hyperparameters. Furthermore, since the preset number of rounds is positively correlated with the number of optimizations corresponding to each group of current hyperparameters, when the number of optimizations corresponding to the current hyperparameters is low, the accuracy of the current hyperparameters is also low. To save training time, the number of training rounds for the candidate hyperparameters corresponding to each group of current hyperparameters is reduced. Conversely, when the number of optimizations corresponding to the current hyperparameters is high, the accuracy of the current hyperparameters is also high. To maintain the accuracy of the current hyperparameters, the number of training rounds for the candidate hyperparameters corresponding to each group of current hyperparameters is increased.

[0122] Then, based on the accuracy of each group of candidate hyperparameters, the undetermined hyperparameters for each group are determined. This ensures both the accuracy of the obtained undetermined hyperparameters and saves training time, thus improving training efficiency.

[0123] Based on the accuracy of each group of undetermined hyperparameters, the undetermined hyperparameter with the highest accuracy is determined as the target candidate hyperparameter, ensuring high accuracy of the determined target candidate hyperparameters. Then, the current hyperparameters in each group undergo a final mutation and / or crossover process, resulting in at least two final groups of undetermined hyperparameters, ensuring that these final two groups are optimized and mutated. Next, the target candidate hyperparameters are replicated to generate at least two groups of target candidate hyperparameters, reducing the possibility of abnormal target candidate hyperparameters leading to inaccurate model training. Then, the final at least two groups of undetermined hyperparameters undergo mutation and / or crossover processes to generate at least one set of backup candidate hyperparameters. The at least two groups of target candidate hyperparameters and the at least one set of backup candidate hyperparameters are combined to generate at least three groups of candidate hyperparameters. This ensures the accuracy of the generated at least three groups of candidate hyperparameters and also optimizes the current hyperparameters, thereby guaranteeing the accuracy of the optimal target detection model determined based on the candidate target detection models corresponding to each group of candidate hyperparameters.

[0124] In one embodiment of this application, such as Figure 3 As shown, a training method for an object detection model is provided. Taking the application of this method to an electronic device as an example, the method includes the following steps:

[0125] S31. Obtain at least two sets of current hyperparameters and the current target detection model corresponding to each set of current hyperparameters.

[0126] Each current object detection model is obtained by training the initial object detection model based on each set of current hyperparameters.

[0127] For details on this step, please refer to [link / reference]. Figure 2 The details of S21 will not be repeated here.

[0128] S32. Optimize the current hyperparameters to obtain candidate hyperparameters.

[0129] For details on this step, please refer to [link / reference]. Figure 2 The details of S22 will not be repeated here.

[0130] S33. Based on the candidate hyperparameters, train the initial target detection model to obtain the preset detection model corresponding to the candidate hyperparameters.

[0131] In an optional embodiment of this application, step S33, "obtaining the optimal target detection model based on each candidate target detection model," may include the following steps:

[0132] S331. Obtain the model accuracy of each candidate target detection model.

[0133] S332. Determine the candidate target detection model with the highest model accuracy as the optimal target detection model.

[0134] In an optional embodiment of this application, the step S331 above, "obtaining the model accuracy of each candidate target detection model," may include the following steps:

[0135] (1) Obtain the test dataset.

[0136] Specifically, the electronic device can receive test datasets input by the user or test datasets sent by other devices. This application embodiment does not specifically limit the method by which the electronic device obtains test datasets.

[0137] The test dataset is either the test set of the MSCOCO or OpenImages dataset.

[0138] (2) Based on the test dataset, test each candidate target detection model to obtain the model accuracy of each candidate target detection model.

[0139] Specifically, the electronic device tests each candidate target detection model based on the test dataset to obtain the model accuracy of each candidate target detection model.

[0140] The object detection model training method provided in this embodiment of the invention involves obtaining a test dataset; based on the test dataset, testing each candidate object detection model to obtain the model accuracy of each candidate model, thus ensuring the accuracy of the obtained model accuracy. Then, the candidate object detection model with the highest model accuracy is determined as the optimal object detection model. This ensures that the determined optimal object detection model has the highest accuracy.

[0141] It should be understood that, although Figure 1-3 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 1-3 At least some of the steps in the process may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but may be executed at different times. The execution order of these steps or stages is not necessarily sequential, but may be executed in turn or alternately with other steps or at least some of the steps or stages in other steps.

[0142] like Figure 4 As shown, this embodiment provides a training device for a detection model, including:

[0143] The first acquisition module 41 is used to acquire at least two sets of current hyperparameters and the current target detection model corresponding to each set of current hyperparameters; wherein, each current target detection model is obtained by training an initial target detection model based on each set of current hyperparameters;

[0144] The optimization module 42 is used to optimize each set of current hyperparameters based on the accuracy of each current target detection model, to obtain at least two sets of candidate hyperparameters, and to obtain the candidate target detection model corresponding to each set of candidate hyperparameters;

[0145] The determination module 43 is used to obtain the optimal target detection model based on each candidate target detection model.

[0146] In one embodiment of this application, the optimization module 42 is specifically used to perform multiple mutations and / or cross-processing on each group of current hyperparameters based on the accuracy of each current target detection model to obtain multiple groups of undetermined hyperparameters; obtain the accuracy of each group of undetermined hyperparameters; and obtain at least two groups of candidate hyperparameters based on the accuracy of each group of undetermined hyperparameters.

[0147] In one embodiment of this application, the optimization module 42 is specifically used to mutate and / or cross-process the current hyperparameters of each group each time to obtain the candidate hyperparameters corresponding to the current hyperparameters of each group; to train the initial target detection model for a preset number of rounds based on the candidate hyperparameters of each group to determine the accuracy of the candidate hyperparameters of each group; the preset number of rounds is positively correlated with the number of optimizations corresponding to the current hyperparameters of each group; and to determine the undetermined hyperparameters of each group based on the accuracy of the candidate hyperparameters of each group.

[0148] In one embodiment of this application, the optimization module 42 is specifically used to determine the candidate hyperparameter with the highest accuracy as the target candidate hyperparameter based on the accuracy of each group of candidate hyperparameters; obtain the last at least two groups of candidate hyperparameters obtained by performing the last mutation and / or crossover on each group of current hyperparameters; and generate at least two groups of candidate hyperparameters based on the target candidate hyperparameters and the last at least two groups of candidate hyperparameters.

[0149] In one embodiment of this application, at least two or more sets of optimization modules 42 are used to copy the target candidate hyperparameters to generate at least two sets of target candidate hyperparameters; to perform mutation and / or crossover processing on the last at least two sets of undetermined hyperparameters to generate at least one set of backup candidate hyperparameters; and to combine the at least two sets of target candidate hyperparameters and the at least one set of backup candidate hyperparameters to generate at least three sets of candidate hyperparameters.

[0150] In one embodiment of this application, the determination module 43 is specifically used to obtain the model accuracy of each candidate target detection model and determine the candidate target detection model with the highest model accuracy as the optimal target detection model.

[0151] In one embodiment of this application, the determination module 43 is specifically used to obtain a test dataset; based on the test dataset, to test each candidate target detection model and obtain the model accuracy of each candidate target detection model.

[0152] For specific limitations and beneficial effects regarding the training device for the detection model, please refer to the limitations on the training method for the object detection model above, which will not be repeated here. Each module in the training device for the aforementioned detection model can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in hardware or independently of the processor in the electronic device, or stored in software in the memory of the electronic device, so that the processor can call and execute the corresponding operations of each module.

[0153] This invention also provides an electronic device having the above-described features. Figure 4 The training device for the detection model shown.

[0154] like Figure 5 As shown, Figure 5This is a schematic diagram of the structure of an electronic device provided in an optional embodiment of the present invention, such as... Figure 5 As shown, the electronic device may include: at least one processor 51, such as a CPU (Central Processing Unit), at least one communication interface 53, memory 54, and at least one communication bus 52. The communication bus 52 is used to enable communication between these components. The communication interface 53 may include a display screen or a keyboard; optionally, the communication interface 53 may also include a standard wired interface or a wireless interface. The memory 54 may be high-speed RAM (Random Access Memory) or non-volatile memory, such as at least one disk storage device. Optionally, the memory 54 may also be at least one storage device located remotely from the aforementioned processor 51. The processor 51 may be combined with... Figure 4 The described apparatus has an application program stored in memory 54, and the processor 51 calls the program code stored in memory 54 to perform any of the above method steps.

[0155] The communication bus 52 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The communication bus 52 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0156] The memory 54 may include volatile memory, such as random-access memory (RAM); the memory may also include non-volatile memory, such as flash memory, hard disk drive (HDD) or solid-state drive (SSD); the memory 54 may also include a combination of the above types of memory.

[0157] The processor 51 can be a central processing unit (CPU), a network processor (NP), or a combination of CPU and NP.

[0158] The processor 51 may further include a hardware chip. This hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0159] Optionally, memory 54 is also used to store program instructions. Processor 51 can invoke program instructions to implement the functions described in this application. Figures 1 to 3 The training method of the target detection model shown in the embodiment.

[0160] This invention also provides a non-transitory computer storage medium storing computer-executable instructions that can execute the training method of the target detection model in any of the above method embodiments. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk drive (HDD), or solid-state drive (SSD), etc.; the storage medium may also include combinations of the above types of memory.

[0161] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, all of which fall within the scope defined by the appended claims.

Claims

1. A training method for an object detection model, characterized in that, include: Obtain at least two sets of current hyperparameters and the current object detection model corresponding to each set of current hyperparameters; wherein each current object detection model is obtained by training an initial object detection model based on each set of current hyperparameters; the current object detection model is used to perform object detection on the image; Based on the accuracy of each current target detection model, the current hyperparameters of each group are optimized to obtain at least two sets of candidate hyperparameters, and the candidate target detection models corresponding to each set of candidate hyperparameters are obtained. Based on each of the candidate target detection models, the optimal target detection model is obtained; Among them, the optimal target detection model is obtained based on each of the candidate target detection models, including: Obtain the model accuracy of each of the candidate target detection models; The candidate target detection model with the highest model accuracy is determined as the optimal target detection model; The step of obtaining the accuracy of each of the candidate target detection models includes: Obtain the test dataset; Based on the test dataset, each of the candidate target detection models is tested to obtain the model accuracy of each candidate target detection model; Specifically, based on the accuracy of each of the current target detection models, the current hyperparameters of each group are optimized to obtain at least two sets of candidate hyperparameters, including: Based on the accuracy of each current target detection model, the current hyperparameters of each group are subjected to multiple mutations and / or cross-processing to obtain multiple sets of undetermined hyperparameters; Obtain the accuracy of the undetermined hyperparameters for each group; Based on the accuracy of each group of undetermined hyperparameters, at least two groups of candidate hyperparameters are obtained; The process of performing multiple mutations and / or crossovers on the current hyperparameters in each group to obtain multiple sets of undetermined hyperparameters includes: Each time, the current hyperparameters of each group are mutated and / or cross-processed to obtain the candidate hyperparameters corresponding to the current hyperparameters of each group. The initial target detection model is trained for a preset number of rounds based on the candidate hyperparameters in each group to determine the accuracy of the candidate hyperparameters in each group; the preset number of rounds is positively correlated with the number of optimizations corresponding to the current hyperparameters in each group; Based on the accuracy of the candidate hyperparameters in each group, the undetermined hyperparameters in each group are determined.

2. The method according to claim 1, characterized in that, Based on the accuracy of each group of undetermined hyperparameters, at least two groups of candidate hyperparameters are obtained, including: Based on the accuracy of the undetermined hyperparameters described in each group, the undetermined hyperparameter with the highest accuracy is determined as the target candidate hyperparameter. Obtain the last two sets of undetermined hyperparameters by performing the final mutation and / or crossover process on the current hyperparameters of each group; Based on the target candidate hyperparameters and the last at least two sets of undetermined hyperparameters, at least two sets of candidate hyperparameters are generated.

3. The method according to claim 2, characterized in that, The at least two or more groups, and the generation of at least two groups of candidate hyperparameters based on the target candidate hyperparameters and the last at least two groups of undetermined hyperparameters, include: The target candidate hyperparameters are copied to generate at least two sets of the target candidate hyperparameters; For the last at least two sets of undetermined hyperparameters, mutation and / or crossover processing are performed to generate at least one set of alternative candidate hyperparameters; At least two sets of target candidate hyperparameters and at least one set of backup candidate hyperparameters are combined to generate at least three sets of candidate hyperparameters.

4. A training device for a detection model, characterized in that, include: The first acquisition module is used to acquire at least two sets of current hyperparameters and the current target detection model corresponding to each set of current hyperparameters; wherein each current target detection model is obtained by training an initial target detection model based on each set of current hyperparameters; the current target detection model is used to perform target detection on the image; An optimization module is used to optimize each group of current hyperparameters based on the accuracy of each current target detection model, to obtain at least two groups of candidate hyperparameters, and to obtain candidate target detection models corresponding to each group of candidate hyperparameters; wherein, optimizing each group of current hyperparameters based on the accuracy of each current target detection model to obtain at least two groups of candidate hyperparameters includes: performing multiple mutations and / or cross-processing on each group of current hyperparameters based on the accuracy of each current target detection model to obtain multiple groups of undetermined hyperparameters; and obtaining the accuracy of each group of undetermined hyperparameters; Based on the accuracy of each group of undetermined hyperparameters, at least two groups of candidate hyperparameters are obtained; wherein, the step of performing multiple mutations and / or crossovers on each group of current hyperparameters to obtain multiple groups of undetermined hyperparameters includes: performing mutations and / or crossovers on each group of current hyperparameters each time to obtain candidate hyperparameters corresponding to each group of current hyperparameters; training the initial target detection model for a preset number of rounds based on each group of candidate hyperparameters to determine the accuracy of each group of candidate hyperparameters; the preset number of rounds is positively correlated with the number of optimizations corresponding to each group of current hyperparameters; and determining each group of undetermined hyperparameters based on the accuracy of each group of candidate hyperparameters. A determining module is used to obtain an optimal target detection model based on each of the candidate target detection models; wherein obtaining the optimal target detection model based on each of the candidate target detection models includes: acquiring the model accuracy of each of the candidate target detection models; determining the candidate target detection model with the highest model accuracy as the optimal target detection model; wherein acquiring the accuracy of each of the candidate target detection models includes: acquiring a test dataset; testing each of the candidate target detection models based on the test dataset to obtain the model accuracy of each of the candidate target detection models.

5. An electronic device, characterized in that, It includes a memory and a processor, wherein the memory stores computer instructions, and the processor executes the computer instructions to perform the training method of the target detection model according to any one of claims 1-3.

6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing a computer to perform the training method of the target detection model according to any one of claims 1-3.

Citation Information

Patent Citations

  • Hyper-parameter determination method and device, equipment and medium

    CN111027579A