A method for building an online target detection model

Through the online target detection model construction method and model performance predictor, the problem of low search efficiency of the neural network architecture is solved, the model performance and search efficiency are improved, and efficient model construction in the field of target detection is achieved.

CN114638982BActive Publication Date: 2024-09-17SHANGHAI ULUCU ELECTRON TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202111527053.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-14
Publication Date
2024-09-17
Estimated Expiration
2041-12-14

AI Technical Summary

Technical Problem

Existing neural network architecture search technology has low search efficiency in target detection tasks, resulting in insufficient performance of the searched models.

Method used

An online target detection model construction method is proposed, which uses a model storage pool to store candidate models in the search space, and uses radial basis function networks and evolutionary algorithms to build model performance predictors to directly evaluate the fitness values ​​​​of candidate models instead of complete reasoning process to improve search efficiency.

Benefits of technology

It improves the efficiency of neural network architecture search, discovers high-performance models, and realizes online construction of target detection models, enhancing its practicality in the field of target detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114638982B
    Figure CN114638982B
Patent Text Reader

Abstract

The present invention discloses an online target detection model construction method. The present invention can adaptively construct a target detection model for a task data set through a neural network architecture search technology and a model performance predictor based on an evolutionary algorithm. The predictor is trained by a high-performance model set in Model_cache, and therefore has good prediction performance. In the process of neural network architecture search, the complete reasoning process of the candidate model can be replaced to directly predict the performance evaluation value of the candidate model, thereby further improving the efficiency of the neural network architecture search. Finally, the candidate model set in the model storage pool proposed by the present invention can be updated in real time through an evolutionary algorithm, and therefore can be used to construct a target detection model online, thereby improving the practicality of the neural network architecture search algorithm in the field of target detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to target detection model design and optimization technology, and in particular to an online target detection model construction method. Background Art

[0002] The biggest driving forces behind artificial intelligence technology are machine learning technology and deep learning technology, so the performance of artificial intelligence mainly depends on the neural network model.

[0003] The current mainstream algorithm is that human experts manually design neural network models based on task data sets. Recently, a more advanced method has emerged, which is to automatically design neural network models through neural network architecture search technology (NAS). This method has achieved remarkable results in image classification, segmentation, target detection, tracking and other fields. The existing neural network architecture search technology applied to target detection tasks mainly uses evolutionary algorithms, reinforcement learning, Bayesian optimization algorithms, etc. as search algorithms, and uses the weight sharing technology of the backbone network and the weight fine-tuning technology for the RPN network to reduce the time cost of searching models. Using this method still requires each candidate model to perform a complete inference to obtain its performance evaluation value, resulting in low search efficiency of the neural network architecture search algorithm and insufficient performance of the searched neural network architecture. Summary of the invention

[0004] The purpose of the present invention is to propose an online target detection model construction method, which evaluates the performance of candidate models in the search space and directly obtains the fitness value of the candidate model to replace the complete reasoning. By using the method of the present invention, the problem of low search efficiency and insufficient performance of the searched model in the target detection neural network architecture search algorithm can be solved, thereby providing a feasible solution for online neural network architecture search in the target detection field.

[0005] To solve the above problems, the present invention provides the following technical solutions: This application provides an online target detection model construction method and a model performance predictor, comprising the following steps:

[0006] Step S1: given a labeled image classification dataset, divide the dataset into a training dataset C train , validation dataset C val And the test dataset C test ; Given a labeled target detection dataset, divide the dataset into training dataset D train , validation dataset D val And the test dataset D test , the training data set D train Divide into three parts in a certain proportion, namely: Dtrain1 , D train2 , D train3 ; Create a model storage pool Model_cache to store candidate target detection models; initialize N radial basis function networks (RBF), where N is a number greater than 1; set the maximum search algebra E;

[0007] Step S2: construct a hypernetwork architecture as the search space, and use the training data set C train , the sub-network model in the super network architecture is sampled and pre-trained. During the training process, the validation data set C val Perform cross-validation to determine the convergence of the model. After the hypernetwork architecture converges, pre-training ends and the weights of each layer of the hypernetwork are retained.

[0008] Step S3, fixing the network structures of the FPN network, RPN network, ROI pooling, classification network, and bounding box regression network, and externalizing them to the fixed layer of the super network architecture to form a super network object detection model;

[0009] Step S4, using the training data set D train1 Fine-tune the parameters of the hypernetwork object detection model and retain the fine-tuned model weights w;

[0010] Step S5, initialize the population based on the hypernetwork architecture, randomly generate M chromosomes, where M is a number greater than 1, as the initial population, where the length of the chromosome is K; store the model of the initial population in Model_cache, and all individuals in the population are target detection models;

[0011] Step S6, using the model weight w in step S4, initialize the weight for the new individual in Model_cache, and then use the training data set D train2 , train the new individuals in Model_cache, each of which inherits weights from the hypernetwork, using the validation dataset D val Evaluate each individual until the individual converges, and save the mAP value of each individual; the chromosome of each individual and its corresponding mAP value constitute a data-label pair {X, Y}, where each X data contains K features; store the data-label pair {X, Y} in Model_cache to form a sample training set L, and count the total number of samples in the training sample set L as H;

[0012] Step S7, using the sample training set L in step S6, taking X as training data and Y as corresponding label value, training N RBF networks by Bootstrap method, and then combining the N RBF networks by model averaging method to form a strong learner as a model performance predictor;

[0013] Step S8, based on the training data set D train3 , validation dataset D val , using the evolutionary algorithm as the search strategy, using the model performance predictor of step S7, evaluating the fitness values ​​of the parent individuals and the offspring individuals, and outputting the optimal population P after reaching the maximum evolutionary generation G;

[0014] Step S8, if the maximum search generation number E is reached, the individual with the best fitness value is output as the selected optimal neural network architecture; if the maximum search generation number E is not reached, the optimal population P is merged into Model_cache, and the process returns to step S6;

[0015] Preferably, the Bootstrap training method comprises the following specific steps:

[0016] Step S71, the first sampling process, i.e. row sampling, uses the sampling with replacement method to randomly sample from the sample data set L to form N sub-data sets {L1, ..., L N}, each sub-dataset contains H training samples;

[0017] Step S72, the second sampling process, i.e., column sampling, randomly extracts k features from K features for each data, and k < K, to obtain the final N sub-datasets {L 1k ,......,L Nk};

[0018] Step S73: train an RBF model for each sub-data set until the RBF model converges, and train N RBF models in total.

[0019] Compared with the prior art, the above application has the following advantages or beneficial effects:

[0020] The present invention can adaptively construct a target detection model for a task data set through a neural network architecture search technology and a model performance predictor based on an evolutionary algorithm. Among them, the present invention first uses an image classification data set to pre-train the backbone structure of the target detection model, and then uses the target detection data set to fine-tune the entire target detection model. During the fine-tuning operation, the present invention does not adopt the traditional uniform sampling training method, but creates a model storage pool Model_cache for storing excellent candidate neural network models, wherein these excellent candidate neural network models are output by the evolutionary neural network architecture search algorithm. Therefore, the algorithm proposed by the present invention is more inclined to train models with excellent performance, so that high-performance neural network models can expand their advantages in the search process and realize a biased sampling. In addition, the present invention uses the model set in Model_cache to construct a training sample set for training a model performance predictor composed of several RBF models, which is obtained by training the high-performance model set in Model_cache. Therefore, it has good prediction performance and can replace the complete reasoning process of the candidate model in the process of neural network architecture search, directly predict the performance evaluation value of the candidate model, and further improve the efficiency of neural network architecture search. Finally, the candidate model set in the model storage pool proposed in the present invention can be updated in real time through the evolutionary algorithm. Therefore, it can be used to build a target detection model online and improve the practicality of the neural network architecture search algorithm in the field of target detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 is a schematic diagram of a hypernetwork target detection model of the present invention;

[0022] Figure 2 It is the algorithm flow chart of the present invention;

[0023] Figure 3 It is a schematic diagram of the architecture of the present invention. DETAILED DESCRIPTION

[0024] The preferred implementation scheme of the present invention is described in conjunction with the following specific examples, but this should not be used to limit the protection scope of this patent.

[0025] Search space design

[0026] like Figure 1As shown, the present invention uses the MobileNet V3 network as a super network, that is, a search space, and encodes the search space using a 21-bit integer coding scheme. The entire network contains 5 submodules, namely block 1, block 2, block 3, block 4, and block 5. The search space is composed of the network width parameter Width multiplier, the number of layers in each subblock, the expansion ratio of the number of channels, and the convolution kernel size of each layer, wherein the optional range of Width multiplier is {1, 1.2}, the optional range of Layer number is {2, 3, 4}, the optional range of Expansion ration is {3, 4, 6}, and the optional range of Kernel size is {3, 5, 7}.

[0027] Search algorithm design

[0028] In order to improve the search efficiency, the present invention provides an online target detection model construction method and a model performance predictor, comprising the following steps:

[0029] Step S1: Given a labeled ImageNet dataset, the training set, validation set, and test set of the ImageNet dataset are respectively train , validation dataset C val And the test dataset C test ; Given a labeled target detection dataset, the Microsoft Common Objects in Context (COCO) dataset; Given a labeled target detection dataset, divide the dataset into a training dataset D train , validation dataset D val And the test dataset D test , the training data set D train Divide into three parts in the ratio of 7:2:1, namely: D train1 , D train2 , D train3 ; Create a model storage pool Model_cache to store candidate target detection models; initialize N = 10 radial basis function networks (RadialBasis Function, RBF); set the maximum search number E = 100;

[0030] Step S2: construct a hypernetwork architecture as the search space, and use the training data set C train , the sub-network model in the super network architecture is sampled and pre-trained. During the training process, the validation data set C valPerform cross-validation to determine the convergence of the model. After the hypernetwork architecture converges, the pre-training ends and the weights of hypernetwork block 1, block 2, block 3, block 4, and block 5 are retained.

[0031] Step S3, fix the network structure of the FPN network, RPN network, ROI pooling, classification network, and bounding box regression network, and connect them to the fixed layer of the super network architecture to form a super network target detection model. When fusing the FPN network, a set of convolution layers with a convolution kernel of 1 is used by default to reduce the number of channels and match the FPN network. First, perform 1×1 convolution on the calculation module 5 to reduce the number of channels to obtain P6, and then perform 2 times nearest neighbor upsampling in sequence to obtain P5, P4, P3, and P2, where the feature maps of the P5, P4, P3, and P2 layers need to be the same length and width as the corresponding calculation module feature maps in order to perform element-by-element addition. After the upsampling is completed, the FPN network fuses the image feature information at each level, that is, the shallow features with high resolution but insufficient semantic information and the deep features with rich semantic information but low resolution. Among them, in the P3-P6 layers, each layer has 9 anchors, and the sizes of the anchors are defined as: 32×32, 64×64, 128×128, 256×256, 512×512, and the ratios are set to 1:2, 1:1, 2:1. The predicted value output by the RPN network includes the predicted value (Dets), which contains the 4-bit regression vector (x, y, w, h) of the object category and the position of the border, and the score of the object, which is generated by the classification layer and the regression layer. The label value (GTs) contains the 4-bit true value vector of the object category and the position of the border. For each anchor, there is an N-dimensional one-bit effective encoding (one-hot) vector, where N is the number of object categories. For the classification layer, each anchor must have N categories, that is, an N-dimensional vector, representing the probability of each category. Based on one-hot encoding, the highest probability value is set to 1, and the remaining N-1 categories are set to 0. In addition, the 4-bit regression vector (x, y, w, h) of each anchor is output by the regression layer to predict the offset between the anchor and its corresponding label box position to refine the anchor position and calculate the loss. The classification layer and regression layer parameters are not shared. In addition, the feature map output by the RPN will be unified to 7×7 through the ROI pooling operation, and further input into the fully connected network to predict the classification of each RoI, and predict the offset to refine the position of the frame and calculate the loss.

[0032] Step S4, using the training data set D train1 Fine-tune the parameters of the hypernetwork object detection model and retain the fine-tuned model weights w.

[0033] Step S5, based on the super network architecture, the population is initialized, M = 20 chromosomes are randomly generated as the initial population, and the network structures of the FPN network, RPN network, ROI pooling, classification network, and bounding box regression network are fixed, that is, all candidate models share the FPN network, RPN network, ROI pooling, classification network, and bounding box regression network structure; wherein the length of the chromosome is K, K = 21; the model of the initial population is stored in Model_cache; the individuals in the population are all target detection models;

[0034] Step S6, using the model weight w in step S4, initialize the weight for the new individual in Model_cache, and then use the training data set D train2 , train the new individuals in Model_cache, each of which inherits weights from the hypernetwork, using the validation dataset D val Evaluate each individual until the individual converges, and save the mAP value of each individual; the chromosome of each individual and its corresponding mAP value constitute a data-label pair {X, Y}, where each X data contains K features, K = 21; store the data-label pair {X, Y} in Model_cache to form a sample training set L, and count the total number of samples in the training sample set L as H;

[0035] Step S7, using the sample training set L in step S6, taking X as training data and Y as corresponding label value, training 10 RBF networks by Bootstrap method, and then averaging the 10 RBF networks to form a strong learner as a model performance predictor;

[0036] Step S8, initialize the hyperparameters of the evolutionary algorithm, including the crossover probability P c =0.95, mutation probability P m =0.1, maximum evolutionary number G=50; the fitness function of the evolutionary algorithm is the mAP value of the individual, and the optimization goal is to find the individual with the largest mAP value;

[0037] Step S9, based on the training data set D train3 , validation dataset D val , using the evolutionary algorithm as the search strategy, using the model performance predictor of step S7, evaluating the fitness values ​​of the parent individuals and the offspring individuals, and outputting the optimal population P after reaching the maximum evolutionary generation G; wherein the specific steps of the evolutionary algorithm are:

[0038] Step S9.1, for the current population, using the mAP value as the fitness function, and using the model performance predictor to evaluate the fitness of each individual;

[0039] Step S9.2, selecting a number of individuals from the population using a tournament selection method to form a first population;

[0040] Step S9.3, according to the crossover rate p c , using the multi-point crossover method to cross over the individual chromosomes in the first population in pairs, to obtain several individual chromosomes to form the second population;

[0041] Step S9.4, according to the mutation rate p m , replace or delete a module of the individual chromosomes in the second population;

[0042] Step S9.5, for the second population, using the mAP value as the fitness function, and using the model performance predictor to evaluate the fitness of each individual;

[0043] Step S9.6, merge the individuals in the first population and the second population, sort them according to the fitness value, select the top N individuals in fitness ranking, and feed them back to step S9.1 as the new current population until the preset evolutionary generation is reached.

[0044] Step S10: If the maximum search number of generations is 50, the final population output in step S9 is merged into Model_cache, and the individual with the largest mAP value in Model_cache is selected as the optimal neural network architecture; if the maximum search number E is not reached, return to step S6;

[0045] The above are only preferred embodiments of the present invention and are not limitations on the implementation methods. For ordinary technicians in the relevant field, other improvements and optimizations can be made without departing from the technical principles of the present invention, and the improvements and optimizations made thereby should also be regarded as the protection scope of the present invention.

Claims

1. A method for constructing an online target detection model, characterized in that: The following steps are involved: Step S1: given a labeled image classification dataset, divide the dataset into a training dataset C train , validation dataset C val And the test dataset C test ; Given a labeled target detection dataset, divide the dataset into training dataset D train , validation dataset D val And the test dataset D test , the training data set D train Divide into three parts in a certain proportion, namely: D train1 , D train2 , D train3 ; Create a model storage pool Model_cache to store candidate target detection models; initialize N radial basis function networks (RBF), where N is a number greater than 1; set the maximum search algebra E; Step S2: construct a hypernetwork architecture as the search space, and use the training data set C train , the sub-network model in the super network architecture is sampled and pre-trained. During the training process, the validation data set C val Perform cross-validation to determine the convergence of the model. After the hypernetwork architecture converges, pre-training ends and the weights of each layer of the hypernetwork are retained. Step S3, fixing the network structures of the FPN network, RPN network, ROI pooling, classification network, and bounding box regression network, and externalizing them to the fixed layer of the super network architecture to form a super network object detection model; Step S4, using the training data set D train1 Fine-tune the parameters of the hypernetwork object detection model and retain the fine-tuned model weights w; Step S5, initialize the population based on the hypernetwork architecture, randomly generate M chromosomes, where M is a number greater than 1, as the initial population, where the length of the chromosome is K; store the model of the initial population in Model_cache, and all individuals in the population are target detection models; Step S6, using the model weight w in step S4, initialize the weight for the new individual in Model_cache, and then use the training data set D train2 , train the new individuals in Model_cache, each of which inherits weights from the hypernetwork, using the validation dataset D val Evaluate each individual until the individual converges, and save the mAP value of each individual; the chromosome of each individual and its corresponding mAP value constitute a data-label pair {X, Y}, where each X data contains K features; store the data-label pair {X, Y} in Model_cache to form a sample training set L, and count the total number of samples in the training sample set L as H; Step S7, using the sample training set L in step S6, taking X as training data and Y as corresponding label value, training N RBF networks by Bootstrap method, and then combining the N RBF networks by model averaging method to form a strong learner as a model performance predictor; Step S8, based on the training data set D train3 , validation dataset D val , using the evolutionary algorithm as the search strategy, using the model performance predictor of step S7, evaluating the fitness values ​​of the parent individuals and the offspring individuals, and outputting the optimal population P after reaching the maximum evolutionary generation G; Step S9, if the maximum search generation E is reached, the individual with the best fitness value is output as the selected optimal neural network architecture; if the maximum search generation E is not reached, the optimal population P is merged into Model_cache and returns to step S6.

2. The method for constructing an online target detection model according to claim 1, characterized in that: The Bootstrap training method comprises the following specific steps: Step S71, the first sampling process, i.e. row sampling, uses the sampling with replacement method to randomly sample from the sample data set L to form N sub-data sets {L1, ..., L N }, each sub-dataset contains H training samples; Step S72, the second sampling process, i.e., column sampling, randomly extracts k features from K features for each data, and k < K, to obtain the final N sub-datasets {L 1k ,......,L Nk }; Step S73: train an RBF model for each sub-data set until the RBF model converges, and train N RBF models in total.

Citation Information

Patent Citations

  • Small target detection network model based on darknet53 network and detection method

    CN111199255A

  • Rapid attention neural network architecture search method based on evolutionary method

    CN112465120A

  • Improved evolutionary neural network architecture search method based on super network

    CN112561039A

  • Scalable pattern recognition system

    US20080168013A1

  • Computer-based systems, computing components and computing objects configured to implement dynamic outlier bias reduction in machine learning models

    WO2021055847A1