A method for constructing a target detection model based on neural network architecture search

Through the method of searching for evolutionary neural network architecture, the object detection model is designed using MobileNet V3 network and evolutionary algorithm, which solves the problem of cumbersome tuning of the object detection model in the existing technology, and realizes efficient customized model design in different deployment scenarios and performance improvement.

CN114419389BActive Publication Date: 2024-11-05SHANGHAI ULUCU ELECTRON TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111527850.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-14
Publication Date
2024-11-05
Estimated Expiration
2041-12-14

AI Technical Summary

Technical Problem

The manual tuning process of existing object detection models under different deployment scenarios and data sets is cumbersome and time-consuming, resulting in limited development of object detection tasks. The NAS-based object detection model design requires the design of network structure search space and coding scheme, and evaluation is carried out. The indicator design is complex.

Method used

Using the method of searching based on evolutionary neural network architecture, using MobileNet V3 network as the search space, searching width parameters, number of layers, number of channels and convolution kernel size through evolutionary algorithms, designing a customized object detection model, combining ImageNet data set pre-order Training and weight sharing technology to improve search efficiency and model performance.

Benefits of technology

It realizes the design of customized object detection models in different deployment scenarios, saves computing resources and manpower, improves model performance and deployment efficiency, and simplifies the model tuning process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114419389B_ABST
    Figure CN114419389B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for constructing a target detection model based on a neural network architecture search. The present invention proposes a coding scheme for a 21-bit integer sequence. The coding scheme covers the width parameter Width multiplier of the MobileNet V3 super network architecture, the number of layers in each submodule, the expansion ratio of the number of channels, and the convolution kernel size of each layer, thereby improving the diversity of the neural network architecture in the search space, enabling the NAS algorithm to achieve a more detailed exploration of the search space, and customizing different neural network architectures for different deployment scenarios and task objectives. Finally, the framework first pre-trains the super network architecture using the ImageNet dataset, and then uses the weight sharing technology and the given target detection training set to fine-tune each candidate target detection model and perform a NAS search, thereby avoiding the use of the ImageNet dataset for pre-training of each candidate model, and further improving the search efficiency of the target detection NAS algorithm.
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 a target detection model construction method based on evolutionary neural network architecture search. Background Art

[0002] The target inspection task is one of the cutting-edge research hotspots in the field of computer vision. Its task goal is to mark objects in images or videos with boxes and identify the categories of objects. In recent years, with the continuous improvement of the performance of target detection models, target detection technology has been widely used in various fields such as intelligent monitoring systems, autonomous driving systems, and criminal investigation. The target detection model is mainly divided into three parts. The first part is the backbone network, whose main task is to extract image features; the second part is the RPN (Region proposal network) network, which is used to generate predicted target box proposals; the third part is ROI pooling, classification network, and bounding box regression network, which mainly adjusts the generated predicted target boxes and classifies them. Among them, the feature extraction ability and network parameter amount of the backbone network have a very important impact on the performance and deployment of the target detection model. The backbone network with excellent performance can extract more effective features from the data, which is conducive to improving the detection and classification capabilities of the target detection model. Currently, the commonly used backbone networks include ResNet, MobileNet, ShuffleNet and other networks, all of which have excellent feature extraction capabilities.

[0003] However, the manual design of models such as ResNet, MobileNet, ShuffleNet, etc. usually requires experts to manually tune the model to achieve the best performance and meet the deployment conditions when facing different deployment scenarios, such as deployment on mobile phones, embedded devices, etc. or different data sets. The entire tuning process is very cumbersome and requires a lot of manpower and material resources, which seriously restricts the development of object detection tasks.

[0004] In recent years, Neural Architecture Search (NAS) technology has developed rapidly because it can use machine learning methods such as evolutionary algorithms, Bayesian optimization algorithms and reinforcement learning to automatically search for the required network model based on a given computer vision task or natural language processing task design, thereby saving a lot of computing resources and manpower consumption. However, the NAS-based target detection model design algorithm still has problems to be solved. It requires researchers to design a good network structure search space and encode the network structure as the input of the NAS algorithm, and design the evaluation indicators of the NAS algorithm so that researchers can search for qualified neural network models. Summary of the invention

[0005] The purpose of the present invention is to solve the problems existing in the above-mentioned prior art. The present invention provides a method for constructing a target detection model based on evolutionary neural network architecture search.

[0006] In order to achieve the above-mentioned purpose, the present application provides a method for constructing a target detection model based on evolutionary neural network architecture search. The present invention first uses the MobileNet V3 network with excessive parameters as the search space, that is, a super network. The entire network contains a total of 5 sub-modules, and the search space is composed of the network width parameter Width multiplier, the number of layers of the network in each sub-module, the expansion ratio of the number of channels, and the Kernel size of each layer. The search algorithm used in the present invention is an evolutionary algorithm. By applying the evolutionary algorithm to the search space, different customized models can be designed for different deployment scenarios of the target detection model, taking into account the balance between the size of the model and the performance of the model. The present invention comprises the following steps:

[0007] Step 1, define the search space and encoding scheme:

[0008] Step 1-1, the search space consists of three parts: network architecture, submodules, and neural network layers.

[0009] Step 1-2, the backbone network architecture contains 5 submodules, which are connected in sequence. Each submodule contains m layers, and 2≤m≤4. The parameter to be searched in the network architecture is the network width parameter W, which is represented by a one-bit integer. The parameter to be searched in the submodule is the number of layers m contained in the submodule. Since each module contains at most 4 layers, each submodule is represented by a 4-bit integer, where the integer 0 indicates that the layer does not exist. The parameters that need to be determined in the neural network layer are the expansion rate E of the number of channels, and E∈{3, 4, 6} and the convolution kernel size K of each layer of convolution kernels, and K∈{3, 5, 7}. Therefore, there are 9 combinations of expansion rate E and convolution kernel size K, which are represented by integers 1, 2, 3, 4, 5, 6, 7, 8, 9 respectively. Specifically, a backbone network architecture can be encoded as a 21-bit integer gene sequence.

[0010] Step 2: Build a neural network architecture search algorithm based on target detection:

[0011] Step 2-1: Use the ImageNet dataset to pre-train the MobileNet V3 super network until convergence, and retain the network model weights of the MobileNet V3 super network;

[0012] Step 2-2, use the mAP value of the validation set as the evaluation indicator of the candidate target detection model;

[0013] Step 2-3, algorithm initialization, initialize the population size M, crossover probability Pc, mutation probability Pm, maximum evolutionary generation G, connect FPN network, RPN network, ROIpooling, classification network, bounding box regression network to the super network, and construct a target detection model with each candidate model.

[0014] Step 2-4, randomly initialize the population, that is, randomly generate M integer gene sequences, where M is an integer greater than 0, and each integer gene sequence is the backbone network architecture of a target detection model, where the FPN network, RPN network, ROIpooling, classification network, and bounding box regression network can form a target detection model;

[0015] Step 2-5, use the evolutionary algorithm as the search algorithm to search for the optimal subnetwork based on the MobileNet V3 super network:

[0016] First, the network structures of FPN network, RPN network, ROI pooling, classification network, and bounding box regression network are fixed. Then, the backbone network structure is searched using the given object detection training set and weight sharing technology.

[0017] Step 2-6, applying the evolutionary search algorithm of step 2-5 to the MobileNet V3 super network search space; after the search is completed, retaining the integer gene sequence with the best mAP value as the output of the search algorithm;

[0018] Step 2-7, the evolutionary algorithm trains the candidate model by a stochastic gradient descent (SGD) algorithm;

[0019] Step 3: decode the optimal integer sequence output by the algorithm into the corresponding backbone network structure based on the MobileNet V3 super network, and integrate the FPN network, RPN network, ROI pooling, classification network, and bounding box regression network to form a complete target detection model. After that, use the given target detection training set and SGD optimizer to train the target detection model until convergence. After the model training is completed, test the performance of the model based on the given target detection validation set.

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

[0021] First, the present invention uses the MobileNet V3 network as the search space. Compared with the existing neural network architecture search space, the present framework requires less computing resources and video memory. Then, the present invention proposes a coding scheme for a 21-bit integer sequence. The coding scheme covers the width parameter Width multiplier of the MobileNet V3 super network architecture, the number of layers in each submodule, the expansion ratio of the number of channels, and the convolution kernel size of each layer, which improves the diversity of the neural network architecture in the search space, and enables the NAS algorithm to achieve a more detailed exploration of the search space, and customize different neural network architectures for different deployment scenarios and task objectives. Finally, the present framework first uses the ImageNet dataset to pre-train the super network architecture, and then uses the weight sharing technology and the given target detection training set to fine-tune each candidate target detection model and perform NAS search, avoiding the use of the ImageNet dataset for pre-training for each candidate model, and further improving the search efficiency of the target detection NAS algorithm. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0023] Figure 2 is the search space proposed by the present invention;

[0024] Figure 3 It is a schematic diagram of network structure coding of the present invention;

[0025] Figure 4 It is an evolutionary search trend diagram of mAP values ​​of different models in the present invention. DETAILED DESCRIPTION

[0026] 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.

[0027] The present embodiment is further described below in conjunction with the accompanying drawings:

[0028] The present invention uses MobileNet V3 as the search space of the neural network architecture, and proposes a coding scheme for a 21-bit integer sequence. The proposed framework saves computing resources well, and can achieve very detailed search for the MobileNet V3 search space, and uses the ImageNet data set to pre-train the super network architecture, and then uses the weight sharing technology and the given target detection training set to fine-tune each candidate target detection model and perform NAS search, and customize different target detection models for different deployment scenarios and task objectives. The present invention mainly includes two parts: a search space and a neural network architecture search algorithm based on an evolutionary algorithm. The search space contains all candidate network architectures. A reasonable search space is very critical to the performance of the model finally generated, and has a very important influence on the search efficiency of the algorithm. The search algorithm defines how to quickly find the neural network architecture for the task target in the search space. Therefore, the efficiency of the search algorithm is also very critical, and quickly and accurately finding a suitable neural network architecture in the search space is very important for the promotion of the algorithm. Starting from the above two parts, the present invention improves the efficiency of the search algorithm and the performance of the final model.

[0029] In order to achieve the above-mentioned purpose, the present application provides a method for constructing a target detection model based on evolutionary neural network architecture search. The present invention first uses the MobileNet V3 network with excessive parameters as the search space, that is, a super network. The entire network contains a total of 5 sub-modules, and the search space is composed of the network width parameter Width multiplier, the number of layers of the network in each sub-module, the expansion ratio of the number of channels, and the Kernel size of each layer. The search algorithm used in the present invention is an evolutionary algorithm. By applying the evolutionary algorithm to the search space, different customized models can be designed for different deployment scenarios of the target detection model, taking into account the balance between the size of the model and the performance of the model. The present invention comprises the following steps:

[0030] Step 1, define the search space and encoding scheme:

[0031] Step 1-1, the search space consists of three parts: network architecture, submodules, and neural network layers.

[0032] Step 1-2, the backbone network architecture contains 5 submodules, which are connected in sequence. Each submodule contains m layers, and 2≤m≤4. The parameter to be searched in the network architecture is the network width parameter W, which is represented by a one-bit integer. The parameter to be searched in the submodule is the number of layers m contained in the submodule. Since each module contains at most 4 layers, each submodule is represented by a 4-bit integer, where the integer 0 indicates that the layer does not exist. The parameters that need to be determined in the neural network layer are the expansion rate E of the number of channels, and E∈{3, 4, 6} and the convolution kernel size K of each layer of convolution kernel, and K∈{3, 5, 7}. Therefore, there are 9 combinations of expansion rate E and convolution kernel size K, represented by integers 1, 2, 3, 4, 5, 6, 7, 8, 9 respectively. Specifically, a backbone network architecture can be encoded as a 21-bit integer gene sequence.

[0033] Step 2: Build a neural network architecture search algorithm based on target detection:

[0034] Step 2-1: Use the ImageNet dataset to pre-train the MobileNet V3 super network until convergence, and retain the network model weights of the MobileNet V3 super network.

[0035] Step 2-2, use the mAP value of the validation set as the evaluation indicator of the candidate target detection model;

[0036] Step 2-3, algorithm initialization, initialize the population size M, crossover probability Pc, mutation probability Pm, maximum evolutionary generation G, connect FPN network, RPN network, ROI pooling, classification network, bounding box regression network to the super network, and construct a target detection model with each candidate model.

[0037] Step 2-4, randomly initialize the population, that is, randomly generate M integer gene sequences, where M is an integer greater than 0. Each integer gene sequence is the backbone network architecture of a target detection model, where the FPN network, RPN network, ROIpooling, classification network, and bounding box regression network can form a target detection model.

[0038] Step 2-5, use the evolutionary algorithm as the search algorithm to search for the optimal subnetwork based on the MobileNet V3 super network:

[0039] First, the network structures of FPN network, RPN network, ROI pooling, classification network and bounding box regression network are fixed. Then, the backbone network structure is searched using the given object detection training set and weight sharing technology.

[0040] Step 2-6, applying the evolutionary search algorithm of step 2-5 to the MobileNet V3 super network search space; after the search is completed, retaining the integer gene sequence with the best mAP value as the output of the search algorithm;

[0041] Step 2-7, the evolutionary algorithm trains the candidate model by a stochastic gradient descent (SGD) algorithm;

[0042] Step 3: decode the optimal integer sequence output by the algorithm into the corresponding backbone network structure based on the MobileNet V3 super network, and integrate the FPN network, RPN network, ROI pooling, classification network, and bounding box regression network to form a complete target detection model. After that, use the given target detection training set and SGD optimizer to train the target detection model until convergence. After the model training is completed, test the performance of the model based on the given target detection validation set; Specific embodiment:

[0044] 1. Define the search space

[0045] like Figure 1 As shown in FIG. 1 , the present invention uses NAS technology to design the backbone network part of the target detection model based on the MobileNet V3 super network, namely Figure 1 In addition, since the features extracted by shallow neural networks are usually general features such as fine-grained and texture information, while deep neural networks can extract high-dimensional semantic features, the present invention uses the FPN module to fuse shallow features and deep features, while retaining fine-grained features and high semantic features, and then generates a predicted bounding box through RPN and the fused features to perform classification and regression tasks of the detection box. FPN, RPN, classification network and bounding box regression network, following the manually designed connection method, together constitute the complete backend of the target detection model.

[0046] like Figure 2 As shown, the focus of the search in the present invention is on the design of the backbone network, that is, the design of the width parameters of the entire network, the number of layers of each submodule and the parameters of each layer, including the channel expansion rate of the layer and the convolution kernel size of the layer. In order to explore the search space more carefully, Figure 3 As shown, the present invention uses a 21-bit integer sequence encoding scheme to encode the neural network architecture, covering the network parameters. Among them, for any integer gene sequence, the first gene bit W represents the width parameter of the network, and W contains two candidate items, namely W1=1.0 and W2=1.2, represented by integers 0 and 1 respectively; every four gene bits thereafter represent a module. Taking the first module as an example, the second to fifth gene bits represent the parameter values ​​of submodule 1, for example L11 represents the parameters of the first layer of module 1, L 12 represents the parameters of the second layer of module 1, and so on, L xx ∈[0,9], where 0 means that the layer is a skip layer and contains no parameters, 1 means that the channel expansion rate of the layer is E=3, the size of the convolution kernel is 3, and so on.

[0047] 1. Build a search algorithm

[0048] Based on the consideration of search efficiency, the present invention divides the entire search algorithm into four stages: super network pre-training stage, network model fine-tuning stage, network architecture search stage, and network architecture performance testing stage.

[0049] 1) Hypernetwork pre-training stage

[0050] Using the ImageNet dataset, the MobileNet V3 hypernetwork is pre-trained and the structural weights are saved.

[0051] 2) Network model fine-tuning stage

[0052] First, a super network model is used to integrate the FPN network, RPN network, ROI pooling, classification network, and bounding box regression network to form a complete target detection model. Then, the present invention uses the PASCAL VOC dataset as the target detection training dataset, which contains a total of 5715 training images of 20 types. Here, 70% of the images are extracted from the dataset for fine-tuning the network model, and the remaining images are used in the search stage as a search training set. The size of the input image is cropped to 384×384, and an SGD optimizer with a learning rate of 0.005 and a batchsize of 32 is used. When fine-tuning the network model, the fixed and trained backbone network is fine-tuned only for structures such as the FPN network, RPN network, ROIpooling, classification network, and bounding box regression network.

[0053] 3) Network architecture search phase

[0054] Randomly sample sub-networks from the search space, and fuse FPN network, RPN network, ROI pooling, classification network, and bounding box regression network to form a candidate target detection model. The network parameters of each selected candidate target detection model will directly inherit the parameters that have been trained in step 1) and step 2) using the weight sharing technology, and then train 10 epochs based on the search training set given in step 2). According to the experiment of the present invention, 10 epochs can converge. Each candidate target detection model uses the mAP value of the validation set as the evaluation indicator of model performance. The evolutionary search trend diagram of the mAP values ​​of different models in the present invention is shown in FIG. Figure 4 shown.

[0055] 4) Network architecture performance testing phase

[0056] During the network architecture performance testing phase, the complete PASCAL VOC dataset was used to fully train the target detection model output by the NAS algorithm. After the training was completed, the test set of the PASCAL VOC dataset was used to test the performance of the network model.

[0057] 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 a target detection model based on evolutionary neural network architecture search, characterized in that: The steps include: Step 1, define the search space and encoding scheme; Step 1-1, the search space consists of three parts: network architecture, submodules, and neural network layers; Step 1-2, the backbone network architecture contains 5 submodules, which are connected in sequence. Each submodule contains m layers, and 2≤m≤4. The parameter to be searched in the network architecture is the network width parameter W, which is represented by a one-bit integer. The parameter to be searched in the submodule is the number of layers m contained in the submodule. Since each module contains at most 4 layers, each submodule is represented by a 4-bit integer, where the integer 0 indicates that the layer does not exist; the parameters that need to be determined in the neural network layer are the expansion rate E of the number of channels, and E∈{3, 4, 6} and the convolution kernel size K of each layer of convolution kernel, and K∈{3, 5, 7}. Therefore, there are 9 combinations of expansion rate E and convolution kernel size K, which are represented by integers 1, 2, 3, 4, 5, 6, 7, 8, 9 respectively. Specifically, any backbone network architecture can be encoded as a 21-bit integer gene sequence; Step 2: Build a neural network architecture search algorithm based on target detection: Step 2-1: Use the ImageNet dataset to pre-train the MobileNet V3 super network until convergence, and retain the network model weights of the MobileNet V3 super network; Step 2-2, use the mAP value of the validation set as the evaluation indicator of the candidate target detection model; Step 2-3, algorithm initialization, initialization population size M, crossover probability Pc, mutation probability Pm, maximum evolutionary number G, external FPN network, RPN network, ROI pooling, classification network, bounding box regression network for the super network, each candidate model constitutes a target detection model; Step 2-4, randomly initialize the population, that is, randomly generate M integer gene sequences, where M is an integer greater than 0, and each integer gene sequence is the backbone network architecture of a target detection model, where the FPN network, RPN network, ROIpooling, classification network, and bounding box regression network can form a target detection model; Step 2-5, use the evolutionary algorithm as the search algorithm to search for the optimal subnetwork based on the MobileNet V3 super network: First, the network structures of FPN network, RPN network, ROI pooling, classification network, and bounding box regression network are fixed. Then, the backbone network structure is searched using the given object detection training set and weight sharing technology. Step 2-6, applying the evolutionary search algorithm of step 2-5 to the MobileNet V3 super network search space; after the search is completed, retaining the integer gene sequence with the best mAP value as the output of the search algorithm; Step 2-7, the evolutionary algorithm trains the candidate model by a stochastic gradient descent (SGD) algorithm; In step 3, the optimal integer sequence output by the algorithm is decoded into the corresponding backbone network structure based on the MobileNet V3 super network, and the networks of FPN network, RPN network, ROI pooling, classification network, and bounding box regression network are integrated to form a complete target detection model. After that, the target detection model is trained using the given target detection training set and SGD optimizer until convergence. After the model training is completed, the performance of the model is tested based on the given target detection verification set.

2. The method for constructing a target detection model based on evolutionary neural network architecture search according to claim 1, characterized in that: A backbone network architecture can be encoded as a 21-bit integer gene sequence, represented as: W, Y 11 , Y 12 , Y 13 , Y 14 , Y 21 , Y 22 , Y 23 , Y 24 , Y 31 , Y 32 , Y 33 , Y 34 , Y 41 , Y 42 , Y 43 , Y 44 , Y 51 , Y 52 , Y 53 , Y 54 , where W represents the network width parameter Width multiplier, W∈[0,1]; each submodule has a maximum of 4 layers, so each submodule contains 4 Y values, each Y value represents the parameters of each layer, including the expansion rate of the number of channels and the convolution kernel size of each layer, and Y∈[0,9].