Hyper-parameter adjustment method of target detection model

Through the hyperparameter adjustment method, the hyperparameters of the object detection model are optimized using weighted random sampling and genetic variation operations, solving the problem of slow training of deep learning models and improving the real-time and recognition accuracy of mobile robot object recognition.

CN119107477APending Publication Date: 2024-12-10AMICRO SEMICONDUCTOR CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202310665971.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-07
Publication Date
2024-12-10

AI Technical Summary

Technical Problem

The object detection model in the deep learning model has a large number of hyperparameters and needs to be manually set, resulting in a slow training process, affecting the real-time nature of object recognition by mobile robots.

Method used

A hyperparameter adjustment method is adopted to gradually optimize the hyperparameter vector through weighted random sampling and genetic variation operations until the optimal hyperparameter set is found, which is used to configure the object detection model to improve recognition accuracy and speed.

Benefits of technology

This method speeds up the convergence speed of the hyperparameter optimization process, improves the recognition accuracy and calculation speed of the object detection model, and makes it adapt to the actual task execution scenario in a shorter time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119107477A_ABST
    Figure CN119107477A_ABST
Patent Text Reader

Abstract

The invention discloses a hyper-parameter adjustment method for a target detection model, and the method comprises the steps: carrying out the weighted random sampling of hyper-parameter vectors in a preset parameter library, configuring the selected hyper-parameter vectors as the hyper-parameter vectors of the current generation, carrying out the preset genetic variation operation of the hyper-parameter vectors of the current generation, and carrying out the genetic variation operation of the hyper-parameter vectors of the current generation. Generating a hyper-parameter vector of the next generation; and then when the fitness corresponding to the next generation of hyper-parameter vector is greater than the fitness corresponding to the hyper-parameter vector with the minimum fitness in a preset parameter library, replacing the hyper-parameter vector with the minimum fitness by the next generation of hyper-parameter vector, carrying out iteration in sequence until an iteration termination condition is met, and then, in the preset parameter library, carrying out iteration on the hyper-parameter vector with the minimum fitness in the preset parameter library. Configuring the hyper-parameter vector with the maximum fitness as an optimal hyper-parameter set of the target detection model; wherein after the optimal hyper-parameter set is input into a target detection model, the target detection model uses the optimal hyper-parameter set to train feature data of an object needing to be recognized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of hyperparameter adjustment in deep learning models, and in particular to a hyperparameter adjustment method for a target detection model. Background Art

[0002] At present, deep learning models, especially target detection models, involve a large number of hyperparameters and a large number of uncertain factors. These hyperparameters are different from the parameters (weights) learned during the training process and are usually set manually and adjusted through trial and error; or the initial parameter values ​​are enumerated and the accuracy is tested one by one from the latest generated parameter values, resulting in the hardware device for building the target detection model running relatively slowly. If the target detection model is built on a mobile robot, the real-time performance of the mobile robot in identifying objects will be affected. Summary of the invention

[0003] In order to solve the above technical problems, the present invention discloses a hyperparameter adjustment method for a target detection model, which avoids adjusting all hyperparameter vectors that have appeared and quickly finds hyperparameters that are suitable for actual recognition scenarios. The specific technical solution is as follows: A method for adjusting hyperparameters of a target detection model comprises: firstly weighted random sampling of hyperparameter vectors in a preset parameter library, then configuring the selected hyperparameter vectors as hyperparameter vectors of the current generation, then performing a preset genetic variation operation on the hyperparameter vectors of the current generation to generate hyperparameter vectors of the next generation; then when the fitness corresponding to the hyperparameter vector of the next generation is greater than the fitness corresponding to the hyperparameter vector with the smallest fitness in the preset parameter library, replacing the hyperparameter vector with the next generation with the hyperparameter vector with the smallest fitness, iterating in this way until an iteration termination condition is met, and then configuring a hyperparameter vector with the largest fitness in the preset parameter library as an optimal hyperparameter set of the target detection model; wherein, after the optimal hyperparameter set is input into the target detection model, the target detection model uses the optimal hyperparameter set to train feature data of an object to be identified.

[0004] Furthermore, before starting the first weighted random sampling of hyperparameter vectors in the preset parameter library, the existing hyperparameter vectors are sorted according to the numerical values ​​of the fitness corresponding to the existing hyperparameter vectors, and then a preset sampling number of hyperparameter vectors with the largest fitness are selected in turn, and then the preset sampling number of hyperparameter vectors are stored in the preset parameter library and configured as initial data in the preset parameter library; wherein, before starting the first weighted random sampling of hyperparameter vectors in the preset parameter library, there are no hyperparameter vectors in the preset parameter library, and the maximum number of hyperparameter vectors allowed to be stored in the preset parameter library is the preset sampling number.

[0005] Furthermore, before the first weighted random sampling of the hyperparameter vectors in the preset parameter library is started, when the existing hyperparameter vectors are sorted in order from small to large according to the fitness values, the preset sampling number of hyperparameter vectors with the largest fitness are the preset sampling number of hyperparameter vectors arranged in descending order starting from the hyperparameter vector with the largest ranking; before the first weighted random sampling of the hyperparameter vectors in the preset parameter library is started, when the existing hyperparameter vectors are sorted in order from large to small according to the fitness values, the preset sampling number of hyperparameter vectors with the largest fitness are arranged in ascending order starting from the hyperparameter vector with the smallest ranking.

[0006] Furthermore, before starting the first weighted random sampling of the hyperparameter vectors in the preset parameter library, when it is detected that the number of existing hyperparameter vectors is less than the preset sampling number, all existing hyperparameter vectors are stored in the preset parameter library and configured as initial data in the preset parameter library; wherein, before starting the first weighted random sampling of the hyperparameter vectors in the preset parameter library, there are no hyperparameter vectors in the preset parameter library, and the maximum number of hyperparameter vectors allowed to be stored in the preset parameter library is the preset sampling number.

[0007] Furthermore, before the hyperparameter vector is stored in the preset parameter library for the first time, the hyperparameter adjustment method includes: generating an initialized hyperparameter vector, and saving the initialized hyperparameter vector as a new hyperparameter vector in the existing hyperparameter vectors, and then performing the preset genetic variation operation on the initialized hyperparameter vector to generate a first-generation hyperparameter vector, and saving the first-generation hyperparameter vector as another new hyperparameter vector in the existing hyperparameter vectors.

[0008] Furthermore, the hyperparameter adjustment method also includes: when generating the next generation hyperparameter vector, when the fitness corresponding to the next generation hyperparameter vector is less than or equal to the fitness corresponding to the hyperparameter vector with the smallest fitness in the preset parameter library, the next generation hyperparameter vector is not saved, and the hyperparameter vector existing in the preset parameter library is kept unchanged.

[0009] Furthermore, in the process of weighted random sampling of hyperparameter vectors in the preset parameter library, the probability of each hyperparameter vector being selected is set to be proportional to its corresponding fitness.

[0010] Furthermore, the preset genetic variation operation includes: controlling a hyperparameter vector to be multiplied by a genetic variation ratio, and then configuring the vector obtained by the multiplication as a new hyperparameter vector to achieve evolution from the hyperparameter vector of the current generation to the hyperparameter vector of the next generation; wherein a hyperparameter vector participating in the multiplication operation is configured as a population participating in the current preset genetic variation operation; and the genetic variation ratio belongs to a numerical value.

[0011] Furthermore, the preset genetic variation operation specifically includes: controlling the first random function to generate a first random floating-point number vector, wherein the vector length of the first random floating-point number vector generated by the first random function each time is equal to the number of hyperparameters included in the hyperparameter vector participating in the current preset genetic variation operation; controlling the second random function to generate a second random floating-point number vector, wherein the vector length of the second random floating-point number vector generated by the second random function each time is equal to the number of hyperparameters included in the hyperparameter vector participating in the current preset genetic variation operation; the random floating-point numbers included in the second random floating-point number vector follow a standard normal distribution; comparing the numerical value of each random floating-point number in the first random floating-point number vector with the same mutation probability, and then forming a logical value vector with the comparison results corresponding to each random floating-point number; controlling the first random function to generate a third random floating-point number vector, wherein the vector length of the second random floating-point number vector generated by the first random function each time is equal to the number of hyperparameters included in the hyperparameter vector participating in the current preset genetic variation operation; the random floating-point numbers included in the second random floating-point number vector follow a standard normal distribution; comparing the numerical value of each random floating-point number in the first random floating-point number vector with the same mutation probability, and then forming a logical value vector with the comparison results corresponding to each random floating-point number; controlling the first random function to generate a third random floating-point number vector, wherein the vector length of the third random floating-point number vector generated by the first random function each time is equal to the number of hyperparameters included in the hyperparameter vector participating in the current preset genetic variation operation; The vector length is equal to the value 1; the hyperparameter vector, the logical value vector, the second random floating-point number vector, the third random floating-point number vector and the crossover probability participating in the current preset genetic variation operation are controlled to be multiplied in sequence to obtain a first product; the sum of the first product and the value 1 is then configured as a pre-genetic variation ratio; the pre-genetic variation ratio is then controlled to take a value within a preset numerical range, and the result of taking the pre-genetic variation ratio is then configured as a genetic variation ratio, so that it becomes the genetic variation ratio under the current preset genetic variation operation; then, each hyperparameter in the hyperparameter vector participating in the current preset genetic variation operation is controlled to be multiplied by a genetic variation ratio respectively, and the multiplication results are formed into a vector, and the vector is then configured as a new hyperparameter vector, and it is determined that the preset genetic variation operation is completed once; wherein each hyperparameter contained in the hyperparameter vector belongs to a numerical value; the mutation probability and the crossover probability are both pre-configured probability values.

[0012] Further, the method of controlling the pre-genetic variation ratio to take a value within a preset numerical range includes: when the pre-genetic variation ratio is less than or equal to a second boundary value, the second boundary value is configured as the value result of the pre-genetic variation ratio, and the second boundary value is configured as the genetic variation ratio; when the pre-genetic variation ratio is greater than or equal to a first boundary value, the first boundary value is configured as the value result of the pre-genetic variation ratio, and the first boundary value is configured as the genetic variation ratio; when the pre-genetic variation ratio is greater than the second boundary value and the pre-genetic variation ratio is less than the first boundary value, the pre-genetic variation ratio is within the preset numerical range, the pre-genetic variation ratio is directly configured as the value result of the pre-genetic variation ratio, and the pre-genetic variation ratio is configured as the genetic variation ratio; wherein the maximum value of the preset numerical range is the first boundary value, and the minimum value of the preset numerical range is the second boundary value.

[0013] Furthermore, the method of comparing the numerical value of each random floating point number in the first random floating point number vector with the same mutation probability, and then forming a logical value vector with the comparison results corresponding to each random floating point number includes: when a random floating point number in the first random floating point number vector is less than the mutation probability, configuring the comparison result of the random floating point number with the mutation probability as a numerical value of 1, and then configuring the numerical value of 1 at the corresponding index in the logical value vector to indicate that the mutation probability is allowed to exert an influence on the random floating point number; when a random floating point number in the first random floating point number vector is greater than or equal to the mutation probability, configuring the comparison result of the random floating point number with the mutation probability as a numerical value of 0, and then configuring the numerical value of 0 at the corresponding index in the logical value vector to indicate that the mutation probability is prohibited from exerting an influence on the random floating point number; wherein, each random floating point number in the first random floating point number vector is greater than or equal to the numerical value of 0, but each random floating point number in the first random floating point number vector is less than the numerical value of 1.

[0014] Furthermore, the method for calculating the fitness includes: for each hyperparameter vector, setting a first mean average precision and a second mean average precision; multiplying the first preset ratio by the first mean average precision to obtain a first precision product; multiplying the second preset ratio by the second mean average precision to obtain a second precision product; and then configuring the sum of the first precision product and the second precision product as the fitness; wherein the first mean average precision and the second mean average precision are both evaluation indicators of the target detection model, which are used to represent the average accuracy of the target detection model in identifying various types of objects; wherein the standard measurements of accuracy used by the first mean average precision and the second mean average precision are different.

[0015] Furthermore, the situations in which the iteration termination condition is met include: if the current number of iterations reaches a predetermined maximum number of iterations, it is determined that the iteration termination condition is met; or, when the accuracy of the fitness corresponding to a newly generated hyperparameter vector meets the convergence accuracy, it is determined that the iteration termination condition is met.

[0016] Furthermore, if it is detected that the iteration termination condition is not met, the next iteration is entered, wherein, during each iteration, the fitness corresponding to the newly generated hyperparameter vector is calculated.

[0017] Compared with the prior art, the present invention only adjusts the hyperparameter vectors existing in a preset parameter library in each iteration to speed up the convergence speed; each time a new generation of hyperparameter vectors is generated, it is necessary to calculate the fitness corresponding to the new hyperparameter vector to compare with the fitness corresponding to the original hyperparameter vector in the preset parameter library, and then determine whether the new generation of hyperparameter vectors is stored in the preset parameter library and accepts the next adjustment, so that the hyperparameter vectors are iterated in a more precise optimization direction, making the optimization process more reliable and speeding up the calculation speed. Therefore, the present invention has the advantages of high optimization accuracy and fast calculation speed of the optimization process for the adjustment of hyperparameter vectors or hyperparameters, so that when the feature data labeled by the target detection model training is greatly affected by the environment, the adjustment method of the hyperparameter vector disclosed in the present invention allows the target detection model to quickly adapt to the scene of the actual execution of the task, accelerate the deep learning training process, and obtain more accurate object recognition results in a shorter time. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 A flowchart of a method for adjusting hyperparameters of a target detection model disclosed in an embodiment of the present invention. DETAILED DESCRIPTION

[0019] The technical scheme in the embodiment of the present invention will be described in detail below in conjunction with the accompanying drawings in the embodiment of the present invention. It should be understood that the specific embodiments described below are only used to explain the present invention and are not intended to limit the present invention. In the following description, specific details are given to provide a thorough understanding of the embodiments. However, those of ordinary skill in the art will appreciate that embodiments can be implemented without these specific details.

[0020] As an embodiment, the present invention discloses a hyperparameter adjustment method for a target detection model, which is executed by a chip, which is used to control a mobile robot to perform image recognition, laser scanning modeling or map construction to achieve navigation and positioning. The chip is installed on the system circuit board of the mobile robot in the form of an integrated circuit. The chip controls the mobile robot to perform corresponding hyperparameter optimization functions by cooperating with the transferred software algorithm. The chip, the software algorithm and the driving components of the mobile robot are constructed into a system that supports the aforementioned hyperparameter adjustment method, and the hardware is configured with a corresponding memory and power management system. The target detection model disclosed in the present invention is a deep learning model that can complete many visual tasks, including instance segmentation, pose estimation, feature tracking and object recognition. These computer vision tasks are widely used in monitoring, autonomous driving, obstacle recognition and visual question answering. In the target detection model, each image (training data set) required for training may have different target objects or feature information of different categories.

[0021] In this embodiment, the target detection model is built using a chip inside the mobile robot, so that the training environment faced by the target detection model can be an indoor environment area where the mobile robot has actually moved, and is used to identify furniture in the indoor environment to avoid obstacles during navigation.

[0022] Therefore, the selection, comparison, calculation, crossover and mutation operations based on genetic algorithms, configuration of component vectors or sets, and iterative loops involved in the hyperparameter adjustment method disclosed in the present invention are all dominated and controlled by the chip or mobile robot. The optimized hyperparameters generated thereby are ultimately configured into the target detection model, so that the target detection model is trained according to the configured optimized hyperparameters to adjust the recognition accuracy of the features of the currently identified object.

[0023] The hyperparameter adjustment method includes: firstly weighted random sampling of the hyperparameter vector in the preset parameter library, wherein when the hyperparameter vector is equivalent to a hyperparameter set, it belongs to a set of feature data of a specific type of object or a set of feature data of a type of annotation, and there is at least one hyperparameter in the hyperparameter vector, and the hyperparameter is used as a parameter required for the target detection model to perform data training, and supports determination by empirical values. In the embodiment of deep learning, the hyperparameter may include learning rate, number of iterations, number of layers, number of neurons in each layer, etc. When the target detection model is different, the corresponding hyperparameter is also different, such as the depth, number of leaves, and more conventional learning rate in the tree model. In some embodiments, the hyperparameter is a framework parameter in the target detection model, such as the number of classes in the clustering method, or the number of topics in the topic model, etc. In some embodiments, when weighted random sampling is performed on the hyperparameter vector in the preset parameter library, the preset parameter library is filled with hyperparameter vectors to ensure the richness of the sample.

[0024] In this embodiment, the weighted random sampling is a kind of random sampling, and the result of random sampling of the hyperparameter vectors in the preset parameter library is affected by the weight assigned to each hyperparameter vector. Specifically, in the process of the chip or the mobile robot performing the weighted random sampling, the greater the fitness corresponding to a hyperparameter vector, the greater the probability that the hyperparameter vector is selected.

[0025] Then the chip or the mobile robot configures the hyperparameter vector selected by the weighted random sampling as the hyperparameter vector of the current generation. In the present embodiment, only one hyperparameter vector is selected by the weighted random sampling each time, but the weight corresponding to the selected hyperparameter vector is not necessarily the largest. Then, a preset genetic mutation operation is performed on the hyperparameter vector of the current generation to generate a hyperparameter vector of the next generation, that is, a new hyperparameter vector is generated.

[0026] When the fitness corresponding to the next-generation hyperparameter vector is greater than the fitness corresponding to the hyperparameter vector with the smallest fitness in the preset parameter library, the chip or the mobile robot first removes the hyperparameter vector with the smallest fitness from the preset parameter library, and then stores the next-generation hyperparameter vector in the preset parameter library, which is equivalent to replacing the hyperparameter vector with the smallest fitness in the present embodiment with the next-generation hyperparameter vector; when the fitness corresponding to the next-generation hyperparameter vector is less than or equal to the fitness corresponding to the hyperparameter vector with the smallest fitness in the preset parameter library, the next-generation hyperparameter vector is not saved, and the existing hyperparameter vectors in the preset parameter library are kept unchanged; iterate in this way, cyclically generate a new generation of hyperparameter vectors, until the iteration termination condition is met, and then in the A hyperparameter vector with the largest fitness is selected from the preset parameter library, and the hyperparameter vector with the largest fitness is configured as the optimal hyperparameter set of the target detection model, wherein one hyperparameter vector corresponds to one fitness, and the two are in a one-to-one correspondence, but there is no conversion relationship or function mapping relationship between the numerical values ​​of the two, and each time a new hyperparameter vector is generated, a fitness can be calculated; the fitness is used to evaluate the recognition accuracy of the target detection model under the hyperparameter vector, so as to screen out a suitable hyperparameter vector as the optimal hyperparameter set (the set is represented by a vector in data calculation); after the optimal hyperparameter set is input into the target detection model in this embodiment, the target detection model uses the optimal hyperparameter set to train the feature data of the object to be identified.

[0027] In summary, the present invention has the advantages of high optimization accuracy and fast calculation speed of the optimization process for the adjustment of hyperparameter vectors or hyperparameters. Therefore, when the feature data labeled by the target detection model training is greatly affected by the environment, the adjustment method of the hyperparameter vector disclosed in the present invention allows the target detection model to quickly adapt to the actual task execution scenario, accelerate the deep learning training process, and obtain more accurate object recognition results in a shorter time.

[0028] In this embodiment, the preset genetic mutation operation is an improvement on the crossover and mutation operations in the genetic algorithm, so that the preset genetic mutation operation becomes a genetic algorithm dominated by the mutation operation, that is, an improved genetic algorithm; in this embodiment, the hyperparameter vector corresponds to the population in the genetic algorithm, and each hyperparameter in the hyperparameter vector corresponds to an individual in each population.

[0029] It should be noted that the genetic algorithm simulates the parameter optimization process into a biological evolution process, which is also a computational process that simulates the natural selection process in the biological world and is often used to search for the optimal solution. The next generation of solutions is generated through operations such as replication, crossover, and mutation, and solutions with low fitness function values ​​are gradually eliminated, and solutions with high fitness function values ​​are increased. In this way, after N generations of evolution, it is very likely that individuals with high fitness function values ​​will evolve; among them, the genetic algorithm uses individuals to represent part or all of the solutions to an optimization problem, and defines a fitness function to measure the pros and cons of each individual. The algorithm starts with an initial group consisting of several individuals, and evolves for several generations. In each generation, the three operators of selection, crossover, and mutation are applied to continuously optimize the fitness of individuals and groups, and finally obtain an approximate optimal solution to the problem. The aforementioned fitness is represented by a fitness function in the genetic algorithm. The fitness function is also called an evaluation function, which is a standard for distinguishing the good and bad of individuals in a group; the fitness function is always non-negative, and the fitness is a non-negative number.

[0030] As an example, Figure 1 As shown, the hyperparameter adjustment method specifically includes: Step S101, firstly perform weighted random sampling on the hyperparameter vectors in the preset parameter library, and then configure the selected hyperparameter vector as the hyperparameter vector of the current generation, where the hyperparameter vector of the current generation is a hyperparameter vector obtained by random sampling based on the fitness corresponding to all the existing hyperparameter vectors in the preset parameter library; then perform a preset genetic variation operation on the hyperparameter vector of the current generation to generate a hyperparameter vector of the next generation, and then enter step S102. In step S101, the execution subject of the weighted random sampling of multiple hyperparameter vectors, the configuration of the hyperparameter vector of the current generation (the hyperparameter vector of the parent generation), and the preset genetic variation operation on the hyperparameter vector are all the chip or the mobile robot.

[0031] As an embodiment, before the first execution of step S101, that is, before the first weighted random sampling of the hyperparameter vectors in the preset parameter library is started, the existing hyperparameter vectors are sorted according to the numerical values ​​of the fitness corresponding to the existing hyperparameter vectors, and arranged into a group of hyperparameter vectors arranged from small to large fitness or a group of hyperparameter vectors arranged from small to large fitness, and then the preset sampling number of hyperparameter vectors with the largest fitness are selected in turn, and then the preset sampling number of hyperparameter vectors are stored in the preset parameter library according to the established order, and configured as the initial data in the preset parameter library; wherein, before the first weighted random sampling of the hyperparameter vectors in the preset parameter library is started, there is no hyperparameter vector in the preset parameter library, and the maximum number of hyperparameter vectors allowed to be stored in the preset parameter library is the preset sampling number. wherein, the issuer of the fitness calculation, the sorting of the hyperparameter vectors, the screening of the hyperparameter vectors, the configuration and storage of the hyperparameter vectors is the chip or the mobile robot. Preferably, the preset sampling number is a value of 5. Before executing step S101 for the first time, the five hyperparameter vectors with the largest fitness are selected and stored in the preset parameter library, and the five hyperparameter vectors with the largest fitness can be sorted according to the numerical values ​​before storage and stored in the preset parameter library.

[0032] Specifically, before the first weighted random sampling of the hyperparameter vectors in the preset parameter library is started, when the existing hyperparameter vectors are sorted in order from small to large according to the fitness values, the preset sampling number of hyperparameter vectors with the largest fitness are, starting from the largest hyperparameter vector, and the preset sampling number of hyperparameter vectors are arranged in descending order. After the existing hyperparameter vectors are sorted in order from small to large according to the fitness values, when the preset sampling number is 5, the preset sampling number of hyperparameter vectors with the largest fitness are, in sequence, the penultimate hyperparameter vector, the second to last hyperparameter vector, the third to last hyperparameter vector, the fourth to last hyperparameter vector and the fifth to last hyperparameter vector; in some possible sortings, there are two hyperparameter vectors with equal fitness among the hyperparameter vectors stored in the preset parameter library.

[0033] Specifically, before the first weighted random sampling of the hyperparameter vectors in the preset parameter library is started, when the existing hyperparameter vectors are sorted in descending order according to the fitness values, the preset sampling number of hyperparameter vectors with the largest fitness are, starting from the hyperparameter vector with the smallest sorting, the preset sampling number of hyperparameter vectors arranged in ascending order. After the existing hyperparameter vectors are sorted in descending order according to the fitness values, when the preset sampling number is 5, the preset sampling number of hyperparameter vectors with the largest fitness are, in order, the first hyperparameter vector, the second hyperparameter vector, the third hyperparameter vector, the fourth hyperparameter vector and the fifth hyperparameter vector; in some possible sortings, there are two hyperparameter vectors with equal fitness among the hyperparameter vectors stored in the preset parameter library.

[0034] As an implementation mode, before starting the first weighted random sampling of the hyperparameter vectors in the preset parameter library, when it is detected that the number of existing hyperparameter vectors is less than the preset sampling number, all existing hyperparameter vectors are stored in the preset parameter library and configured as the initial data in the preset parameter library; wherein, before starting the first weighted random sampling of the hyperparameter vectors in the preset parameter library, there are no hyperparameter vectors in the preset parameter library, and the maximum number of hyperparameter vectors allowed to be stored in the preset parameter library is the preset sampling number. It should be noted that the preset parameter library is a storage space that supports receiving newly generated hyperparameter vectors and eliminating existing hyperparameter vectors, and can be a memory inside the chip or a peripheral device of the chip. Preferably, the maximum storage capacity of the storage space for hyperparameter vectors is the preset sampling number of hyperparameter vectors, reducing the number of samples each time.

[0035] Before executing step S101 for the first time, it also includes: generating an initialized hyperparameter vector, and saving the initialized hyperparameter vector as a new hyperparameter vector in the existing hyperparameter vector, wherein the initialized hyperparameter vector is randomly generated by the chip or the mobile robot, and can be based on the principle of generating the initialized population by the genetic algorithm, so as to determine the starting point of the hyperparameter adjustment in the hyperparameter adjustment method; and then performing a preset genetic variation operation on the initialized hyperparameter vector to generate a first-generation hyperparameter vector, and then saving the first-generation hyperparameter vector as the existing hyperparameter vector. It should be noted that each hyperparameter value in the hyperparameter vector has an upper limit and a lower limit, and is pre-set.

[0036] Step S102: When the fitness corresponding to the next generation hyperparameter vector is greater than the fitness corresponding to the hyperparameter vector with the smallest fitness in the preset parameter library, the hyperparameter vector with the smallest fitness is replaced by the next generation hyperparameter vector, and then step S103 is entered. In step S102, when the chip or the mobile robot determines that the fitness corresponding to the next generation hyperparameter vector generated in step S101 is greater than the fitness corresponding to the hyperparameter vector with the smallest fitness in the preset parameter library, the next generation hyperparameter vector generated in step S101 replaces the hyperparameter vector with the smallest fitness in the preset parameter library. In some embodiments, there may be multiple hyperparameter vectors with the smallest fitness in the preset parameter library; then the chip or the mobile robot removes the hyperparameter vector with the smallest fitness from the preset parameter library to free up free memory space, and then stores the next generation hyperparameter vector generated in step S101, so that the optimized hyperparameter vector is framed in the preset parameter library, which can effectively improve the recognition accuracy of the target detection model. At the same time, there is no need to compare the fitness of all generated hyperparameter vectors, but only adjusts the necessary hyperparameter vectors, thereby reducing the repetition rate, reducing the amount of data processing, and improving the overall adjustment speed.

[0037] It should be added that when the fitness corresponding to the next generation hyperparameter vector is less than or equal to the fitness corresponding to the hyperparameter vector with the smallest fitness in the preset parameter library, the hyperparameter vector with the largest fitness does not need to be replaced by the next generation hyperparameter vector, the next generation hyperparameter vector is not saved, and the existing hyperparameter vector in the preset parameter library is kept unchanged; then the process goes to step S103. This reduces the amount of data processing and improves the adjustment speed of the hyperparameter vector.

[0038] Specifically, all the hyperparameter vectors in the preset parameter library are arranged in order of the numerical value of fitness, so that when the fitness corresponding to the next generation of hyperparameter vectors is greater than the fitness corresponding to the hyperparameter vector with the largest fitness in the preset parameter library, a hyperparameter vector with the smallest fitness is eliminated; generally, when the hyperparameter vectors are arranged in the preset parameter library in order of the fitness values ​​from small to large, the hyperparameter vector at the memory address with the smallest sequence number is eliminated; when the hyperparameter vectors are arranged in the preset parameter library in order of the fitness values ​​from large to small, the hyperparameter vector at the memory address with the largest sequence number is eliminated. Then the next generation of hyperparameter vectors generated in step S101 are stored in the memory address corresponding to the sequence number of the hyperparameter vector with the smallest fitness.

[0039] Step S103, judging whether the iteration termination condition is met, if yes, proceeding to step S104, otherwise returning to step S101 to start the next iteration, and determining that one iteration is completed after returning to step S101. The execution subject of step S103 is the chip.

[0040] Step S104: In the preset parameter library, a hyperparameter vector with the largest fitness in the preset parameter library is configured as the optimal hyperparameter set of the target detection model; that is, the chip first calculates the fitness corresponding to the next generation hyperparameter vector generated by step S102, and then selects a hyperparameter vector with the largest fitness in the preset parameter library as the optimal hyperparameter vector, that is, the optimal hyperparameter set of the target detection model.

[0041] In this embodiment, the fitness of the hyperparameter vector that can be stored in the preset parameter library in one iteration is greater than the fitness corresponding to the hyperparameter vector with the smallest fitness in the preset parameter library. Thus, by executing the aforementioned steps S101 to S104, the hyperparameter vector with the smallest fitness among the hyperparameter vectors stored in the preset parameter library is continuously eliminated, so that the hyperparameter vectors in the preset parameter library are updated in a more accurate optimization direction, making the adjustment process more effective and accelerating the calculation speed.

[0042] On the basis of the above embodiment, in the process of weighted random sampling of the hyperparameter vectors in the preset parameter library, the chip or the mobile robot sets the probability of each hyperparameter vector being selected to be proportional to its corresponding fitness, so that it is easier to sample a hyperparameter vector with relatively large fitness from the preset parameter library, but it is not necessarily necessary to sample the hyperparameter vector with the largest fitness from the hyperparameter vectors selected from the preset parameter library every time. Among them, the fitness corresponding to the hyperparameter vector is configured as the sampling weight of the hyperparameter vector in all hyperparameter vectors in the preset parameter library, forming a random sampling strategy selected according to the proportion. It should be noted that all hyperparameter vectors in the preset parameter library can be regarded as a sample set. In this sample set, each sample in the sample set (i.e., each hyperparameter vector) is attached with a weight greater than 0, corresponding to a fitness corresponding to the hyperparameter vector. The probability of each sample being selected is determined by the fitness, so that in the process of weighted random sampling, hyperparameter vectors with relatively large fitness are easily extracted as hyperparameter vectors of the current generation, which can be understood as hyperparameter vectors of the parent generation, thereby using hyperparameter vectors with relatively large fitness to generate hyperparameter vectors of the next generation in the preset genetic variation operation.

[0043] As an embodiment, the fitness calculation method includes: for each hyperparameter vector, the chip or the mobile robot sets a first mean average precision and a second mean average precision, then a hyperparameter vector matches a first mean average precision and a second mean average precision, the first mean average precision and the second mean average precision are both evaluation indicators of the target detection model, used to represent the average accuracy of the target detection model to identify various types of objects, wherein the first mean average precision and the second mean average precision use different standard metrics of accuracy. In this embodiment, in order to calculate the fitness corresponding to a hyperparameter vector, the first preset ratio is multiplied by the first mean average precision to obtain a first precision product; at the same time, the second preset ratio is multiplied by the second mean average precision to obtain a second precision product; then the sum of the first precision product and the second precision product is configured as the fitness, which is used to describe the recognition effect of the target detection model on the object to be recognized under the corresponding hyperparameter vector. Preferably, the first preset ratio is set to 0.1, and the second preset ratio is set to 0.9.

[0044] It should be noted that in each iteration, the changes in the evaluation indicators such as the accuracy, recall rate, first mean average precision, and second mean average precision of the target detection model must also be taken into account. The modified evaluation indicators can be used to determine the convergence effect on the target detection model, so as to select a better hyperparameter vector based on the corresponding evaluation indicators to start the formal training of the target detection model. In this embodiment, in order to use a single numerical value to represent the object recognition accuracy of a target detection model under the hyperparameter vector (a metric to unify them), the average value of the average precision values ​​of all categories of features is taken, that is, the mean average precision, to cope with the different targets of different categories that the target detection model needs to identify, and is used to configure the classification of the objects to be identified and the classification of the framed features. The fitness effectively describes the accuracy of the target detection model in identifying various types of objects and various feature areas in the traversed image. Among them, the accuracy rate indicates the percentage of the number of correctly identified objects that meet the requirements to the total number of identified objects; the recall rate indicates the percentage of the number of correctly identified objects that meet the requirements to the total number of objects in the test set; the effect of the first mean average precision and the second mean average precision on feature recognition is the accuracy of the object recognition box for the specific category labeled in the data set. Specifically, during the training process of the target detection model, the overlap between the predicted box used to identify the target object and the real box surrounding the target object is configured as the box overlap; the first mean average precision is a box overlap with a specific value. The second mean average precision corresponds to the box coincidence degree of the preset average value; wherein the preset average value is an average value including a specific value and multiple values ​​greater than the specific value; the multiple values ​​greater than the specific value are: starting from the specific value, obtained by increasing according to a predetermined increment value until increasing to a preset maximum value, wherein the specific value and the multiple values ​​greater than the specific value constitute an increasing sequence, and a value obtained by each increment constitutes a value in the increasing sequence. For the increasing sequence, if from the second item of the increasing sequence, the value of each item is not less than the value of the previous item.

[0045] As an embodiment, the preset genetic variation operation includes the chip or the mobile robot controlling a hyperparameter vector to multiply a genetic variation ratio, and then configuring the vector obtained by the multiplication as a new hyperparameter vector to achieve the evolution from the hyperparameter vector of the current generation to the hyperparameter vector of the next generation, wherein a hyperparameter vector participating in the multiplication operation is configured as a population participating in the current preset genetic variation operation, and the genetic variation ratio belongs to a numerical value, then the product of a hyperparameter vector and a genetic variation ratio is still a vector, which can be used as a new hyperparameter vector. Specifically, the preset genetic variation operation specifically includes: the chip or the mobile robot controls a first random function to generate a first random floating-point number vector, wherein the vector length of the first random floating-point number vector generated by the first random function each time is equal to the number of hyperparameters contained in the hyperparameter vector participating in the current preset genetic variation operation; each first random floating-point number contained in the first random floating-point number vector is greater than or equal to 0, but less than 1; in this embodiment, the first random floating-point number is configured to be compared with the mutation probability. The random floating point numbers in the first random floating point number vector do not follow any data distribution and are pseudo-random numbers. The chip or the mobile robot controls the second random function to generate a second random floating point number vector, wherein the vector length of the second random floating point number vector generated by the second random function each time is equal to the number of hyperparameters included in the hyperparameter vector participating in the current preset genetic variation operation; the random floating point numbers included in the second random floating point number vector follow a standard normal distribution; in some embodiments, the first random function is executed by a random number generator built into the chip or the mobile robot and generates the first random floating point number vector, and the second random function is executed by a random number generator built into the chip or the mobile robot and generates the second random floating point number vector. The chip or the mobile robot compares the numerical value of each random floating point number in the first random floating point number vector with the same mutation probability to determine whether each random floating point number in the first random floating point number vector needs to mutate. Only after controlling the influence of the mutation probability can the trend of the convergence speed of the hyperparameter vector generated by the subsequent calculation be grasped. On this basis, the comparison results corresponding to each random floating point number are composed into a logical value vector, and the mutation probability is configured to be the dominant position in the preset genetic mutation operation. The chip also controls the first random function to generate a third random floating point number vector, wherein the vector length in the third random floating point number vector generated by the first random function each time is equal to the value 1. Among them, a random floating point number contained in the third random floating point number vector is used to exert an influence on the crossover probability, which is weaker than the role played by the mutation probability in the preset genetic mutation operation.The chip or the mobile robot controls the hyperparameter vector, the logic value vector, the second random floating point vector, the third random floating point vector and the crossover probability that participate in the current preset genetic variation operation to be multiplied in sequence to obtain a first product; and then the sum of the first product and the value 1 is configured as the pre-genetic variation ratio. Then the chip or the mobile robot controls the pre-genetic variation ratio to take a value within a preset numerical range, and then configures the value result of the pre-genetic variation ratio as the genetic variation ratio, so that it becomes the genetic variation ratio under the current preset genetic variation operation. Then, the chip or the mobile robot controls each hyperparameter in the hyperparameter vector that participates in the current preset genetic variation operation to be multiplied by a genetic variation ratio, and then the multiplication result is formed into a vector, and then the vector is configured as a new hyperparameter vector, that is, the hyperparameter vector of the next generation, and then it is determined that the preset genetic variation operation is completed once; wherein, each hyperparameter contained in the hyperparameter vector belongs to a numerical value; the mutation probability and the crossover probability are both pre-configured probability values.

[0046] In the above embodiment, the chip or the mobile robot controls the pre-genetic variation ratio to take a value within a preset numerical range, including: when the pre-genetic variation ratio is less than or equal to the second boundary value, the second boundary value is configured as the value result of the pre-genetic variation ratio, and the second boundary value is configured as the genetic variation ratio; when the pre-genetic variation ratio is greater than or equal to the first boundary value, the first boundary value is configured as the value result of the pre-genetic variation ratio, and the first boundary value is configured as the genetic variation ratio; when the pre-genetic variation ratio is greater than the second boundary value and the pre-genetic variation ratio is less than the first boundary value, the pre-genetic variation ratio is within the preset numerical range, the pre-genetic variation ratio is directly configured as the value result of the pre-genetic variation ratio, and the pre-genetic variation ratio is configured as the genetic variation ratio; wherein the maximum value of the preset numerical range is the first boundary value, and the minimum value of the preset numerical range is the second boundary value; the first boundary value is preferably 0.3, and the second boundary value is preferably 3. This ensures that the pre-genetic variation ratio is kept within the given interval limit in each iteration.

[0047] In an embodiment corresponding to the aforementioned preset genetic mutation operation, the chip or the mobile robot compares the numerical value of each random floating point number in the first random floating point number vector with the same mutation probability, and then composes a logic value vector with the comparison results corresponding to each random floating point number, including: when a random floating point number in the first random floating point number vector is less than the mutation probability, the comparison result of the random floating point number with the mutation probability is configured as a value of 1, and then the value 1 is configured at the corresponding index in the logic value vector to indicate that the mutation probability is allowed to exert an influence on the random floating point number; when a random floating point number in the first random floating point number vector is greater than or equal to the mutation probability, the comparison result of the random floating point number with the mutation probability is configured as a value of 0, and then the value 0 is configured at the corresponding index in the logic value vector to indicate that the mutation probability is prohibited from exerting an influence on the random floating point number; wherein, each random floating point number in the first random floating point number vector is greater than or equal to the value 0, but each random floating point number in the first random floating point number vector is less than the value 1.

[0048] In the aforementioned embodiment, the situation where the iteration termination condition is met includes: if the chip or the mobile robot detects that the current number of iterations reaches a predetermined maximum number of iterations, it is determined that the iteration termination condition is met, wherein the predetermined maximum number of iterations is pre-set and is fixed before the aforementioned optimal hyperparameter set is obtained. Alternatively, when the accuracy of the fitness corresponding to a hyperparameter vector newly generated by the chip satisfies the convergence accuracy, it is determined that the iteration termination condition is met; wherein the accuracy of the fitness can be defined or converted into the accuracy of the mantissa bits and the accuracy of the exponent bits. When the accuracy of the fitness corresponding to a hyperparameter vector satisfies the convergence accuracy, it can be indicated that the fitness corresponding to the hyperparameter vector is equal to a preset threshold; it can also be indicated that the accuracy of the fitness corresponding to the hyperparameter vector is equal to the convergence accuracy for the first time, at which time the fitness is not a fixed value.

[0049] On the basis of the above embodiment, if the chip or the mobile robot detects that the iteration termination condition is not met, it enters the next iteration, which corresponds to returning from step S103 to step S101, and also determines that the current iteration is completed. Among them, one iteration includes: firstly weighted random sampling of the hyperparameter vectors in the preset parameter library, then configuring the selected hyperparameter vectors as the hyperparameter vectors of the current generation, and then performing a preset genetic variation operation on the hyperparameter vectors of the current generation to generate the next generation of hyperparameter vectors, which corresponds to the step S101; then when the fitness corresponding to the next generation of hyperparameter vectors is greater than the fitness corresponding to the hyperparameter vector with the smallest fitness in the preset parameter library, the hyperparameter vector of the next generation is replaced with the hyperparameter vector with the smallest fitness, which corresponds to the step S102. Among them, in each iteration process, the corresponding fitness of the newly generated hyperparameter vector is calculated. Specifically, when the step S103 determines that the iteration termination condition is not met, the fitness corresponding to the newly generated hyperparameter vector can be stored in the preset parameter library, and can provide samples of hyperparameter vectors with greater fitness for the weighted random sampling of step S101 in the next iteration, so as to eliminate hyperparameter vectors with smaller fitness, thereby increasing the probability of sampling hyperparameter vectors with greater fitness; when the step S103 determines that the iteration termination condition is met, the fitness corresponding to the newly generated hyperparameter vector can become the hyperparameter vector with the largest fitness in the preset parameter library, and then be configured as the optimal hyperparameter set of the target detection model, and the hyperparameter adjustment method can be stopped at this point.

[0050] In summary, compared with the prior art, the present invention only adjusts the hyperparameter vectors stored in a preset parameter library in each iteration to speed up the convergence speed; each time a new generation of hyperparameter vectors is generated, it is necessary to calculate the fitness corresponding to the new hyperparameter vector to compare with the fitness corresponding to the original hyperparameter vector in the preset parameter library, and then determine whether the new generation of hyperparameter vectors is stored in the preset parameter library and accepts the next adjustment, so that the hyperparameter vector is iterated in a more precise optimization direction, making the optimization process more reliable and speeding up the calculation speed.

[0051] Those skilled in the art will appreciate that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. These programs can be stored in a computer-readable storage medium (such as ROM, RAM, magnetic disk or optical disk, etc., which can store program codes). When the program is executed, the steps of the above-mentioned method embodiments are executed.

[0052] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for adjusting hyperparameters of a target detection model, characterized in that: The hyperparameter adjustment method includes: First, weighted random sampling is performed on the hyperparameter vectors in the preset parameter library, and then the selected hyperparameter vector is configured as the hyperparameter vector of the current generation, and then the preset genetic mutation operation is performed on the hyperparameter vector of the current generation to generate the hyperparameter vector of the next generation; then, when the fitness corresponding to the hyperparameter vector of the next generation is greater than the fitness corresponding to the hyperparameter vector with the smallest fitness in the preset parameter library, the hyperparameter vector of the next generation is replaced with the hyperparameter vector with the smallest fitness, and iterates in this way until the iteration termination condition is met, and then in the preset parameter library, a hyperparameter vector with the largest fitness is configured as the optimal hyperparameter set of the target detection model; After the optimal hyperparameter set is input into the target detection model, the target detection model uses the optimal hyperparameter set to train feature data of the object to be identified.

2. The hyperparameter adjustment method according to claim 1, characterized in that: Before starting the first weighted random sampling of the hyperparameter vectors in the preset parameter library, the existing hyperparameter vectors are sorted according to the numerical values ​​of the fitness corresponding to the existing hyperparameter vectors, and then a preset sampling number of hyperparameter vectors with the largest fitness are successively selected therefrom, and then the preset sampling number of hyperparameter vectors are stored in the preset parameter library and configured as the initial data in the preset parameter library; Before the first weighted random sampling of the hyperparameter vectors in the preset parameter library is started, there are no hyperparameter vectors in the preset parameter library, and the maximum number of hyperparameter vectors allowed to be stored in the preset parameter library is the preset sampling number.

3. The hyperparameter adjustment method according to claim 2, characterized in that: Before starting the first weighted random sampling of the hyperparameter vectors in the preset parameter library, when the existing hyperparameter vectors are sorted in ascending order according to the fitness values, the preset number of sampling hyperparameter vectors with the largest fitness are arranged in descending order starting from the largest ranked hyperparameter vector; Before starting the first weighted random sampling of the hyperparameter vectors in the preset parameter library, when the existing hyperparameter vectors are sorted in descending order according to the fitness values, the preset sampling number of hyperparameter vectors with the largest fitness are arranged in ascending order starting from the hyperparameter vector with the smallest sorting.

4. The hyperparameter adjustment method according to claim 1, characterized in that: Before starting the first weighted random sampling of the hyperparameter vectors in the preset parameter library, when it is detected that the number of existing hyperparameter vectors is less than the preset sampling number, all the existing hyperparameter vectors are stored in the preset parameter library and configured as initial data in the preset parameter library; Before the first weighted random sampling of the hyperparameter vectors in the preset parameter library is started, there are no hyperparameter vectors in the preset parameter library, and the maximum number of hyperparameter vectors allowed to be stored in the preset parameter library is the preset sampling number.

5. The hyperparameter adjustment method according to any one of claims 2 to 4, characterized in that: Before storing the hyperparameter vector into the preset parameter library for the first time, the hyperparameter adjustment method includes: Generate an initialized hyperparameter vector, save the initialized hyperparameter vector as a new hyperparameter vector in the existing hyperparameter vectors, perform the preset genetic variation operation on the initialized hyperparameter vector, generate a first-generation hyperparameter vector, and save the first-generation hyperparameter vector as another new hyperparameter vector in the existing hyperparameter vectors.

6. The hyperparameter adjustment method according to claim 1, characterized in that: The hyperparameter adjustment method also includes: when generating the next generation hyperparameter vector, when the fitness corresponding to the next generation hyperparameter vector is less than or equal to the fitness corresponding to the hyperparameter vector with the smallest fitness in the preset parameter library, the next generation hyperparameter vector is not saved, and the hyperparameter vector existing in the preset parameter library is kept unchanged.

7. The hyperparameter adjustment method according to any one of claims 2 to 4, characterized in that: In the process of weighted random sampling of hyperparameter vectors in the preset parameter library, the probability of each hyperparameter vector being selected is set to be proportional to its corresponding fitness.

8. The hyperparameter adjustment method according to claim 7, characterized in that: The preset genetic variation operation includes: Control a hyperparameter vector to multiply a genetic variation ratio, and then configure the multiplied vector as a new hyperparameter vector to achieve evolution from the hyperparameter vector of the current generation to the hyperparameter vector of the next generation; Among them, a hyperparameter vector involved in the multiplication operation is configured as a population participating in the current preset genetic variation operation; the genetic variation ratio is a numerical value.

9. The hyperparameter adjustment method according to claim 8, characterized in that: The preset genetic variation operation specifically includes: Controlling the first random function to generate a first random floating point number vector, wherein the vector length of the first random floating point number vector generated each time by the first random function is equal to the number of hyperparameters included in the hyperparameter vector participating in the current preset genetic variation operation; Controlling the second random function to generate a second random floating point number vector, wherein the vector length of the second random floating point number vector generated by the second random function each time is equal to the number of hyperparameters included in the hyperparameter vector participating in the current preset genetic variation operation; the random floating point numbers included in the second random floating point number vector follow a standard normal distribution; Compare the numerical values ​​of each random floating point number in the first random floating point number vector with the same mutation probability, and then form a logical value vector with the comparison results corresponding to each random floating point number; Controlling the first random function to generate a third random floating point number vector, wherein the vector length of the third random floating point number vector generated by the first random function each time is equal to the value 1; Control the hyperparameter vector, the logic value vector, the second random floating point number vector, the third random floating point number vector and the crossover probability involved in the current preset genetic variation operation to be multiplied in sequence to obtain a first product; then configure the sum of the first product and the value 1 as the pre-genetic variation ratio; Then, the pre-genetic variation ratio is controlled to take a value within a preset numerical range, and the value result of the pre-genetic variation ratio is configured as a genetic variation ratio, so that it becomes the genetic variation ratio under the current preset genetic variation operation; Then, each hyperparameter in the hyperparameter vector participating in the current preset genetic variation operation is controlled to be multiplied by a genetic variation ratio, and the multiplication results are formed into a vector, and the vector is configured as a new hyperparameter vector, and it is determined that the preset genetic variation operation is completed once; Each hyperparameter contained in the hyperparameter vector is a numerical value; the mutation probability and crossover probability are both pre-configured probability values.

10. The hyperparameter adjustment method according to claim 9, characterized in that: The method of controlling the pre-genetic variation ratio to take a value within a preset numerical range includes: When the pre-genetic variation ratio is less than or equal to the second boundary value, the second boundary value is configured as the value result of the pre-genetic variation ratio, and the second boundary value is configured as the genetic variation ratio; When the pre-genetic variation ratio is greater than or equal to the first boundary value, the first boundary value is configured as the value result of the pre-genetic variation ratio, and the first boundary value is configured as the genetic variation ratio; When the pre-genetic variation ratio is greater than the second boundary value and the pre-genetic variation ratio is less than the first boundary value, the pre-genetic variation ratio is within the preset value range, the pre-genetic variation ratio is directly configured as the value result of the pre-genetic variation ratio, and the pre-genetic variation ratio is configured as the genetic variation ratio; The maximum value of the preset numerical range is a first boundary value, and the minimum value of the preset numerical range is a second boundary value.

11. The hyperparameter adjustment method according to claim 9, characterized in that: The method of comparing the numerical values ​​of each random floating point number in the first random floating point number vector with the same mutation probability, and then forming a logical value vector with the comparison results corresponding to each random floating point number comprises: When a random floating point number in the first random floating point number vector is less than the mutation probability, a comparison result between the random floating point number and the mutation probability is configured as a value of 1, and then a value of 1 is configured at the corresponding index in the logic value vector to indicate that the mutation probability is allowed to affect the random floating point number; When a random floating point number in the first random floating point number vector is greater than or equal to the mutation probability, a comparison result between the random floating point number and the mutation probability is configured as a value of 0, and then a value of 0 is configured at the corresponding index in the logic value vector to indicate that the mutation probability is prohibited from affecting the random floating point number; Each random floating point number in the first random floating point number vector is greater than or equal to the value 0, but each random floating point number in the first random floating point number vector is less than the value 1.

12. The hyperparameter adjustment method according to claim 7, characterized in that: The fitness calculation method includes: For each hyperparameter vector, the first mean average precision and the second mean average precision are set; Multiplying the first preset ratio by the first mean average precision to obtain a first precision product; Multiplying the second preset ratio by the second mean average precision to obtain a second precision product; Then configuring the sum of the first precision product and the second precision product as the fitness; The first mean average precision and the second mean average precision are both evaluation indicators of the target detection model, and are used to indicate the average accuracy of the target detection model in identifying various types of objects; The first mean average precision and the second mean average precision use different standard measures of precision.

13. The hyperparameter adjustment method according to claim 1, characterized in that: The situations that meet the iteration termination conditions include: If the current number of iterations reaches a predetermined maximum number of iterations, it is determined that the iteration termination condition is met; or, when the accuracy of the fitness corresponding to a newly generated hyperparameter vector meets the convergence accuracy, it is determined that the iteration termination condition is met.

14. The hyperparameter adjustment method according to claim 13, characterized in that: If it is detected that the iteration termination condition is not met, the next iteration is entered, wherein, during each iteration, the fitness corresponding to the newly generated hyperparameter vector is calculated.

Citation Information

Patent Citations

  • User classification model determination method, apparatus and device, and storage medium

    CN111612528A

  • Deep learning parallel computing architecture method and hyper-parameter automatic configuration optimization thereof

    CN111709519A

  • Method for optimizing hyper parameter of lightweight artificial intelligence algorithm by using genetic algorithm

    WO2022124449A1