Monocular depth estimation method based on evolutionary neural network architecture search

Through the combination of neural architecture search and pyramid convolution based on genetic algorithms, the depth estimation network architecture is optimized, solving the problems of time-consuming and labor-intensive manual design and poor model performance, and achieving efficient performance and small size in the depth estimation task. parameter quantity.

CN118397068BActive Publication Date: 2024-09-13HANGZHOU NORMAL UNIVERSITY
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410865847.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-01
Publication Date
2024-09-13
Estimated Expiration
2044-07-01

AI Technical Summary

Technical Problem

In existing depth estimation technology, manual design of neural network architecture is time-consuming and labor-intensive, and existing encoder models are mainly designed based on image classification tasks and fail to fully utilize the characteristics of depth estimation tasks, resulting in poor performance in depth estimation tasks.

Method used

A neural architecture search method based on genetic algorithm is used to define the encoder architecture search space for depth estimation, and the optimal architecture is obtained through multiple iterative evolutions. Pyramid convolution is added to the backbone network, combined with the encoder-decoder structure, to achieve multiple Scale learning.

Benefits of technology

It improves the accuracy and efficiency of monocular depth estimation, overcomes the difficulties of traditional manual network design, and achieves excellent performance on the KITTI and NYU data sets, with higher accuracy and smaller parameter volume.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118397068B
    Figure CN118397068B
Patent Text Reader

Abstract

The present invention relates to a monocular depth estimation method based on evolutionary neural network architecture search, firstly, a neural architecture search space of an encoder architecture for depth estimation is defined; then, a neural architecture search algorithm based on a genetic algorithm is used to search in the neural architecture search space of the encoder architecture for depth estimation to obtain the optimal architecture, which is used as the backbone network of a monocular depth estimation encoder, and pyramid convolution is added to the backbone network, and the monocular depth estimation encoder and the upsampling decoder together constitute a monocular depth estimation network; then, the monocular depth estimation network is trained until the network converges; finally, a test set is input into the trained monocular depth estimation network to obtain the predicted depth value of each pixel in the image. The present invention combines a neural architecture search algorithm with a monocular depth estimation algorithm, and has higher accuracy and smaller parameter amount compared to the monocular depth estimation algorithm of a traditional manual architecture encoder.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of depth estimation and relates to a monocular depth estimation method based on evolutionary neural network architecture search. Background Art

[0002] Monocular depth estimation technology aims to use a single camera or image to infer the distance or depth information of each object in the scene. In the application directions of visual perception and understanding, augmented reality and virtual reality, autonomous driving, three-dimensional reconstruction and auxiliary medical diagnosis, monocular depth estimation is gradually playing an increasingly important role. For example, in the field of three-dimensional modeling, monocular depth estimation technology can restore the geometric structure of a three-dimensional scene from an ordinary two-dimensional image, thereby realizing three-dimensional reconstruction and modeling of the scene. This is of great significance to the fields of virtual tourism, cultural relics protection, game development, etc.; in the field of autonomous driving, monocular depth estimation technology can help vehicles understand the surrounding environment in real time, achieve tasks such as obstacle avoidance and path planning, so as to ensure safe driving or flying; in medical image analysis, monocular depth estimation technology uses depth information to quantify the size and location of tumors, which can help doctors provide more accurate diagnosis and treatment plans. Therefore, monocular depth estimation technology is of great significance in many fields and has attracted widespread attention from industry and academia.

[0003] In recent years, with the development of deep learning technology, deep learning-based monocular depth estimation technology has made important progress in architecture, data, cross-modal information fusion, learning methods, and real-time performance, providing more possibilities for its application in various application fields. However, there are still some challenges in depth estimation technology based on encoder-decoder architecture.

[0004] Existing depth estimation techniques usually use existing deep neural network models, such as VGG, ResNet series and MobileNet series, as encoders to extract deep features. Specifically, researchers have proposed a variety of depth estimation methods based on different neural network models, such as monocular depth estimation based on a dual-stream framework of VGG-16, and multi-scale local plane-guided depth estimation based on ResNet-101. Studies have shown that, for example, the literature 1 (Predicting depth, surface normals and semantic labels with a common multi-scale convolutional architecture, in Proc. IEEE Int. Conf. Comput. Vis. (ICCV), Dec. 2015, pp. 2650–2658.) records that using VGG16 as a backbone network can provide higher accuracy than AlexNet. This result depends on the improved distinguishing ability of the VGG network, which enables the depth estimation to learn more complex features. Therefore, the deep feature extraction ability of the encoder model has a decisive influence on the performance of the monocular depth estimation model. However, today's hand-designed models have their own strengths. For example, some studies have confirmed that the literature 2 (From big to small: Multi-scale local planarguidance for monocular depth estimation, 2019, arXiv: 1907.10326. [Online]. Available: http: / / arxiv.org / abs / 1907.10326) uses DenseNet161 as the encoder backbone to achieve higher accuracy than ResNet101 on the NYUv2 benchmark; and on the KITTI dataset, the literature 3 (Monocular depth estimation using Laplacian pyramid-based depth residuals, IEEE Trans. Circuits Syst. Video Technol., early access, Aug. 1, 2021, doi: 10.1109 / TCSVT.2021.3049869.) records that the ResNeXt encoder provides the model with relatively optimal performance. There are different optimal architectures for different datasets, but to select the most suitable manual model for the current task, researchers need to try them one by one. In addition, existing encoder model architectures are all designed based on image classification tasks.However, image classification requires attention to the global information of an image and determining the category to which the image belongs. Depth estimation, on the other hand, requires further determination of which pixels in the image belong to which target. Directly applying the neural network architecture designed for image classification tasks to depth estimation tasks may not be the best solution. Therefore, designing an encoder model architecture specifically for depth estimation tasks is an urgent task to be solved.

[0005] Manually designing a neural network architecture is a huge challenge for researchers. Manually designing a network architecture often requires rich expertise and experience, and a large number of structural parameters and training parameters bring a huge workload for tuning the model architecture. Selecting a suitable network architecture often requires a lot of experience and experimental verification, which consumes a lot of time and computing costs. Therefore, it is particularly important to find an automated method to solve the problem of network architecture selection.

[0006] Neural Architecture Search (NAS) has attracted widespread attention in recent years as a method for automatically designing neural network structures. The NAS method transforms the design of the neural network architecture into a combinatorial optimization problem and uses the optimization method as a search strategy to solve it. The solution output by the optimization algorithm is the optimal neural network architecture for the data set. The NAS method can adaptively design the neural network architecture for a given task, making up for the shortcomings of traditional manual design methods and saving a lot of manpower and time costs.

[0007] Therefore, it is of great significance to study a monocular depth estimation method based on evolutionary neural network architecture search to solve the problems existing in the existing technology. Summary of the invention

[0008] The purpose of the present invention is to solve the problems existing in the prior art and provide a monocular depth estimation method based on evolutionary neural network architecture search.

[0009] To achieve the above object, the technical solution adopted by the present invention is as follows:

[0010] A monocular depth estimation method based on evolutionary neural network architecture search, firstly defining a neural architecture search space of an encoder architecture for depth estimation; then using a neural architecture search algorithm based on a genetic algorithm to search in the neural architecture search space of the encoder architecture for depth estimation, in this process, using the accuracy of depth estimation δ1 as the fitness value of the genetic algorithm to guide the direction of population update, and obtaining the optimal architecture after multiple iterative evolutions as the backbone network of the monocular depth estimation encoder, and adding pyramid convolution to the backbone network, the pyramid convolution includes multiple convolution kernels of different sizes, thereby introducing a multi-scale learning mechanism, the monocular depth estimation encoder and the upsampling decoder The monocular depth estimation network is composed of an encoder and a decoder (the monocular depth estimation network usually uses an encoder-decoder structure. The core idea of ​​the encoder-decoder structure is to extract and compress the input image through the encoder, and then restore the extracted feature map to the original size output through the decoder. Among them, the encoder is used to extract the feature information of the input image, and the decoder is used to infer the depth value of the restored image); then the monocular depth estimation network is trained until the network converges; finally, the test set is input into the trained monocular depth estimation network to obtain the predicted depth value of each pixel in the image, and compared with the corresponding true depth value to evaluate the performance of the trained monocular depth estimation network;

[0011] The optimal architecture is obtained by searching the neural architecture search space of the encoder architecture for depth estimation using a neural architecture search algorithm based on a genetic algorithm. The specific steps are as follows:

[0012] (1) Prepare the corresponding dataset for depth estimation and divide it into training set D train and the test set D test ; The data set comprises image-depth value pairs;

[0013] (2) Setting search training related parameters and genetic algorithm related parameters; the search training related parameters include: batch processing data volume batch size , training round epoch, initial learning rate lr, weight decay w, momentum coefficient m; the genetic algorithm related parameters include the number of blocks in each unit N b , the number of standard unit stacks N c , the initial number of network channels C, the population size P s , the number of new individuals generated in each generation G s , the crossover rate p c , mutation rate p m ;

[0014] (3) Initialize network weights;

[0015] (4) For each batch processing round, sample a subnet architecture in the training set Dtrain The weight parameters are optimized by stochastic gradient descent (SGD);

[0016] (5) Determine whether all batch training rounds have been completed. If so, proceed to the next step; otherwise, return to step (4);

[0017] (6) Evaluate all individuals in the current population, using weight sharing to inherit the weight parameters in step (4). The evaluation method is to evaluate all individuals in the current population using the weight sharing method in the test set D. test The depth estimation performance evaluation indicators are calculated on the subset of the inference, including absolute relative error Abs Rel, square relative error Sq Rel, root mean square relative error RMSE, logarithmic root mean square error RMSE log , accuracy δ1, δ2, δ3, logarithmic error log10, using δ1 as the individual fitness value f; AbsRel (absolute relative error) represents the average relative error between the model prediction value and the true value, emphasizing the size of the relative difference; Sq Rel (square relative error) represents the square of the average relative error, giving a higher penalty for large errors; RMSE (root mean square relative error) represents the standard deviation of the average error between the predicted value and the true value, reflecting the true error value, which is affected by the data range; RMSE log (Logarithmic root mean square error) measures the square root of the average of the logarithmic differences between the predicted value and the true value, and is applicable when the data range is large; δ1 represents the percentage of pixels in the predicted depth map that satisfy the ratio of the predicted value to the true value within 1.25, which is used to indicate the accuracy of the model's predicted depth value; δ2 and δ3 are the accuracies evaluated for a more tolerant error range, and their specific thresholds are 1.25 respectively. 2 and 1.25 3 ; log10 (logarithmic error) is the average of the logarithmic differences between the true value and the predicted value, and is suitable for situations where the data is widely distributed because it compares the errors on a logarithmic scale; Under normal circumstances, evaluating the quality of a network architecture requires retraining the network weights, because the performance of a network that does not train and only randomly initializes the weights is not comparable. Weight inheritance refers to a weight parameter sharing mechanism. When a subnet architecture has optimized its weight parameters on a training set, these parameters can be saved. In subsequent searches, if the same subnet architecture is encountered again, these optimized parameters can be used directly without retraining. The neural architecture search used in the present invention uses a weight sharing strategy. The weight parameters are learned through step (4), and the weights of the same architecture part are directly inherited in subsequent evaluations, so there is no need to retrain;

[0018] The calculation formula of δ1 is as follows:

[0019]

[0020] Where y represents the depth value of each pixel position in the predicted depth image, and y* represents the depth value of each pixel position in the real depth image;

[0021] (7) Based on step (6), environmental selection is performed, that is, excellent individuals are retained and inferior individuals are eliminated; the specific operation is: all current individuals are sorted in descending order according to the fitness value f from large to small, and only the top P individuals are retained. s Individuals form the current population and update the optimal architecture α best ;

[0022] (8) On the complete test set D test Revalidate the current optimal architecture α best performance;

[0023] (9) According to the crossover rate p c and mutation rate p m , select, crossover, and mutate the current population in sequence, and repeat until the number of new individuals generated is equal to G s ;

[0024] (10) Repeat steps (6) to (9) to increase the number of evolutionary iterations;

[0025] (11) Determine whether all training epochs have been completed. If not, return to step (4); if completed, return to the optimal architecture α obtained in step (7) best , which is the optimal architecture obtained by the search;

[0026] The selection operation in step (9) is as follows: randomly select individuals, the selection probability of each individual is obtained according to the individual's fitness f, and the probability value p of each individual being selected is j Normalize the fitness of all individuals in the population, the formula is as follows:

[0027]

[0028] Among them, p j is the probability of the jth individual being selected, f j represents the fitness value of the jth individual;

[0029] By the crossover rate p c Decide whether to perform crossover; generate a random number p, if p≤p C , then crossover is performed. The crossover operation is as follows: two parent individuals are selected from the randomly selected individuals, and a binary list Status′ is randomly generated, with a length equal to the number of blocks in the unit N. b, the basic unit of crossover operation is block; if the value of the corresponding position list is 1, the block is exchanged, if it is 0, it is not exchanged, and finally two new individuals are returned;

[0030] The mutation operation is as follows: according to the mutation probability p m , randomly generate a binary list Status=[S1,S2,…,S N ], where S i =1 with a probability of p m , and randomly generate a list of symbols containing only ±1 Flag=[F1,F2,…,F N ]; then, the product of the corresponding position elements is added to the corresponding position of the individual code, that is, the individual random position code is +1 or -1; the individual mutation calculation formula is as follows:

[0031] P before =[x1,x2,…,x N ];

[0032] P mew =[f Mutation (x1),f Mutation (x2),…,f Mutation (x N )];

[0033] f Mutation (x i )=x i +S i ×F i ;

[0034] Among them, P before is the individual code before mutation, P new Encode the new individual after mutation, x i For each bit in the individual code, f Mutation is the mutation formula for each bit of coding, S i For each bit in the randomly generated binary status list Status, F i Each bit in the randomly generated binary symbol list Flag;

[0035] The calculation formulas for each evaluation index in step (6) are as follows:

[0036] Absolute relative error:

[0037] Squared relative error:

[0038] RMS relative error:

[0039] Logarithmic Root Mean Square Error:

[0040] Accuracy:

[0041]

[0042] Logarithmic error:

[0043] Where T represents the total number of valid pixels in the real depth map corresponding to the test image, y represents the depth value of each pixel position in the predicted depth image, and y * Represents the depth value of each pixel position in the real depth image, y and y * is the corresponding relationship, that is, the pixel value (depth value) in the predicted image and the real depth image of the same image; in the above formula, δ i The calculation formula of is relatively complicated, so let’s interpret it here: i The value of is the percentage of y that meets the condition, which is Where thr is the threshold, usually 1.25,1.25 2 ,1.25 3 , corresponding to δ1, δ2, and δ3 respectively.

[0044] Most of the existing monocular depth estimation algorithms use an encoder-decoder structure network, and the backbone network of the encoder directly uses existing deep neural network models, such as ResNet, DenseNet, etc., which are all built based on classification tasks and are directly used in depth estimation networks, and their effects are not optimal. The present invention combines a neural architecture search algorithm with monocular depth estimation, and uses the accuracy of depth estimation δ1 as the fitness value of the genetic algorithm to guide the direction of population update. The neural architecture is used to search for an encoder architecture that is more suitable for the monocular depth estimation network, replacing the traditional manual network architecture to achieve performance improvement. In addition, the optimal models for different data sets are different. The present invention introduces a multi-scale learning mechanism in the architecture for the first time. Specifically, a pyramid convolution is added to the backbone network of the encoder. The pyramid convolution contains multiple convolution kernels of different sizes, which can help the network better process feature information of different scales and improve the accuracy of the final inference depth value.

[0045] As the preferred technical solution:

[0046] In a monocular depth estimation method for an evolutionary neural network architecture search as described above, the upsampling decoder is an upsampling decoder including a Laplacian pyramid, which is used to map the image features extracted by the encoder back to a depth map; the decoder is mainly composed of an upsampling layer and a convolution layer, as well as a jump connection from the middle layer of the encoder; the introduced Laplacian pyramid is used to enhance the contour features of the object; the specific operation of the Laplacian pyramid is: the original image is downsampled multiple times and then upsampled, and the contour feature map obtained by subtracting images of the same size is used to assist in guiding the decoder, and the decoder is gradually refined through multiple upsampling, residual connections and weighted merging of contour maps of corresponding sizes, and finally a more accurate depth map is obtained.

[0047] In the monocular depth estimation method of the evolutionary neural network architecture search as described above, the neural architecture search space of the encoder architecture for depth estimation defines the architecture search scope of the encoder for the depth estimation task, which includes the various components in the backbone network of the encoder, such as units, blocks and hierarchical structures, as well as the connection methods and operation selections between them, as follows:

[0048] (a) The neural network architecture is divided into three levels: network, unit and block;

[0049] (b) Each block consists of two inputs I A ,I B and candidate operations, where each input is passed through the corresponding candidate operation O A ,O B , and then merged into one output B through the addition operation i ; The input and candidate operations of each block are search objects, which are included in the search space; Each block is encoded as an integer quadruple When the number of blocks in a unit is N b When , the encoding of a unit is:

[0050]

[0051] The calculation formula for the i-th block is as follows:

[0052]

[0053] in, represents the first input index in the i-th block, represents the candidate operation performed on the first input in the i-th block;

[0054] (c) Candidate Operation O A ,O BThere are 5 types, namely, identity connection, 3×3 maximum pooling layer, 3×3 average pooling layer, 3×3 depth-separable convolution, and 5×5 depth-separable convolution; these operations ensure that the size of the input feature map is not changed by adjusting the step size and padding so that it can be replaced during the search process;

[0055] (d) Units are divided into three types according to their positions: input units, standard units, and dimension reduction units. All units are arranged in series, and the output of the current unit is the input of the next unit. The input unit is at the beginning of the network and has only one input. Both standard units and dimension reduction units have two inputs, one of which is the output of the previous unit and the other is the input of the previous unit. Specifically, assuming that the input of the nth unit is h n , the output is h n+1 , then the other input of the nth unit is h n-1 , which is the input of the n-1th unit;

[0056] (e) The structure of each unit consists of a directed acyclic graph, a pyramid convolution module, and a skip connection from the head to the tail; the directed acyclic graph is composed of N b The blocks are connected to each other, and the topological connection mode between the blocks and the selection of the operation within the blocks are the target to be searched, which is also the search space of the present invention; the outputs of all the blocks without out-degree are merged at the end of the directed acyclic graph and input into the pyramid convolution module; the pyramid convolution helps the network to better process the feature information of different scales through the multi-scale convolution kernel, improves the adaptability of the model to scale changes and spatial structures, and thus improves the accuracy of the inference depth value, specifically:

[0057] 1) Adjust the input feature map to the appropriate number of channels through 1×1 convolution. The feature map is the unit of information flow in the network, which contains the concentrated feature information in the original image and is used to restore the inference depth value.

[0058] 2) The feature map passes through four convolution kernels of different sizes in parallel, and the results are concatenated according to the channel dimension.

[0059] 3) Use 1×1 convolution to restore the original number of channels as the result output;

[0060] (f) Starts with an input unit, followed by N c standard units, and then a dimension reduction unit and N c The standard units are grouped into a group and 3 groups are repeatedly stacked to form the backbone network of the depth estimation encoder. Among them, a pooling operation is additionally used before each dimensionality reduction unit to reduce the size of the input feature map to half of its original size, and the number of channels is expanded to twice through 1×1 convolution.

[0061] As described above, in the monocular depth estimation method based on evolutionary neural network architecture search, the Kaiming normal distribution is used for weight initialization in step (3).

[0062] As described above, in the monocular depth estimation method based on evolutionary neural network architecture search, the sampling method in step (4) is to select two parents in the current population, generate two offspring individuals through crossover mutation operation, and return the first individual of the two offspring individuals; for the first training round, that is, when epoch = 0, the current population is empty, then a subnet architecture is randomly generated in the search space and returned.

[0063] Beneficial effects:

[0064] (1) A monocular depth estimation method based on evolutionary neural network architecture search of the present invention combines the neural architecture search algorithm and the monocular depth estimation algorithm for the first time, and uses the optimal architecture searched by the neural architecture search algorithm as the backbone network of the monocular depth estimation encoder, and combines it with a fixed upsampling decoder as the final architecture, thereby overcoming the difficulty of selecting and designing the network;

[0065] (2) A monocular depth estimation method based on evolutionary neural network architecture search of the present invention uses a genetic algorithm as a search algorithm and a subnet architecture as a population individual. The subnet architecture is optimized through iterative evolution of the population, and a weight sharing strategy is used to accelerate the evaluation of the population and reduce the search overhead.

[0066] (3) The present invention provides a monocular depth estimation method based on evolutionary neural network architecture search, which integrates the pyramid convolution module into the backbone network of the encoder, helping the network to better process feature information of different scales and further improve the performance of the final monocular depth estimation architecture. This method has achieved excellent performance in the KITTI and NYU monocular depth estimation tasks, and has higher accuracy and smaller parameters than the monocular depth estimation algorithm of the traditional manual architecture encoder. BRIEF DESCRIPTION OF THE DRAWINGS

[0067] Figure 1 It is a schematic diagram of the overall architecture of monocular depth estimation in the monocular depth estimation method based on evolutionary neural network architecture search of the present invention;

[0068] Figure 2 It is a schematic diagram of the components of the neural architecture search space;

[0069] Figure 3 This is a workflow diagram of the neural architecture search algorithm;

[0070] Figure 4 It is a schematic diagram of individual crossover mutation operation;

[0071] Figure 5It is a schematic diagram of the pyramid convolution module structure. DETAILED DESCRIPTION

[0072] The present invention will be further described below in conjunction with specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and are not intended to limit the scope of the present invention. In addition, it should be understood that after reading the content taught by the present invention, those skilled in the art can make various changes or modifications to the present invention, and these equivalent forms fall within the scope limited by the appended claims of the application equally.

[0073] A monocular depth estimation method based on evolutionary neural network architecture search, such as Figure 1 As shown, the specific steps are as follows:

[0074] (1) Define a neural architecture search space for encoder architectures for depth estimation;

[0075] The neural architecture search space for encoder architectures for depth estimation includes the various components of the encoder backbone network and the connections and operation choices between them, such as Figure 2 As shown, the details are as follows:

[0076] (a) The neural network architecture is divided into three levels: network, unit and block;

[0077] (b) Each block consists of two inputs I A ,I B and candidate operations, where each input is passed through the corresponding candidate operation O A ,O B , and then merged into one output B through the addition operation i ; The input and candidate operations of each block are search objects, which are included in the search space; Each block is encoded as an integer quadruple When the number of blocks in a unit is N b When , the encoding of a unit is:

[0078]

[0079] The calculation formula for the i-th block is as follows:

[0080]

[0081] in, represents the first input index in the i-th block, represents the candidate operation performed on the first input in the i-th block;

[0082] (c) Candidate Operation O A ,O BThere are 5 types, namely, identity connection, 3×3 maximum pooling layer, 3×3 average pooling layer, 3×3 depth-separable convolution, and 5×5 depth-separable convolution; these operations ensure that the size of the input feature map is not changed by adjusting the step size and padding so that it can be replaced during the search process;

[0083] (d) Units are divided into three types according to their positions: input units, standard units, and dimension reduction units; all units are arranged in series, and the output of the current unit is the input of the next unit. The input unit is located at the beginning of the network and has only one input; standard units and dimension reduction units have two inputs, one of which is the output of the previous unit, and the other is the input of the previous unit;

[0084] (e) The structure of each unit consists of a directed acyclic graph, a pyramid convolution module, and a skip connection from the head to the tail; the directed acyclic graph is composed of N b The blocks are connected to each other, and the topological connection between blocks and the selection of operations within the blocks are the targets to be searched; at the end of the directed acyclic graph, the outputs of all blocks with no out-degree are merged and input into the pyramid convolution module; pyramid convolution helps the network better process feature information of different scales through multi-scale convolution kernels, improves the model's adaptability to scale changes and spatial structures, and thus improves the accuracy of the inference depth value, such as Figure 5 As shown, specifically:

[0085] 1) Adjust the input feature map to the appropriate number of channels through 1×1 convolution. The feature map is the unit of information flow in the network, which contains the concentrated feature information in the original image and is used to restore the inference depth value.

[0086] 2) The feature map passes through four convolution kernels of different sizes in parallel, and the results are concatenated according to the channel dimension.

[0087] 3) Use 1×1 convolution to restore the original number of channels as the result output;

[0088] (f) Starts with an input unit, followed by N c standard units, and then a dimension reduction unit and N c The standard units are grouped into a group and 3 groups are repeatedly stacked to form the backbone network of the depth estimation encoder. Among them, a pooling operation is additionally used before each dimensionality reduction unit to reduce the size of the input feature map to half of its original size, and the number of channels is expanded to twice through 1×1 convolution.

[0089] (2) A neural architecture search algorithm based on a genetic algorithm is used to search in the neural architecture search space of the encoder architecture used for depth estimation in step (1). In this process, the accuracy of depth estimation δ1 is used as the fitness value of the genetic algorithm to guide the direction of population update. After multiple iterations, the optimal architecture is obtained, such as Figure 3 As shown, the specific steps are as follows:

[0090] (2.1) Prepare the corresponding dataset for depth estimation and divide it into training set D train and the test set D test ; The data set comprises image-depth value pairs;

[0091] (2.2) Set search training related parameters and genetic algorithm related parameters; search training related parameters include: batch processing data volume size , training round epoch, initial learning rate lr, weight decay w, momentum coefficient m; genetic algorithm related parameters include the number of blocks in each unit N b , the number of standard unit stacks N c , the initial number of network channels C, the population size P s , the number of new individuals generated in each generation G s , crossover rate p c , mutation rate p m ;

[0092] (2.3) Use Kaiming normal distribution to initialize network weights;

[0093] (2.4) For each batch processing round, sample a subnet architecture in the training set D train The weight parameters are optimized by stochastic gradient descent. The sampling method is to select two parent individuals in the current population, generate two offspring individuals through crossover mutation operation, and return the first individual of the two offspring individuals. For the first training round, if the current population is empty, a subnetwork architecture is randomly generated in the search space and returned.

[0094] (2.5) Determine whether all batch training rounds are completed. If completed, proceed to the next step, otherwise return to step (2.4);

[0095] (2.6) Evaluate all individuals in the current population, using the weight parameters inherited from step (2.4) using weight sharing. The evaluation method is to evaluate all individuals in the test set D test The inference is performed on a subset of the depth estimation related performance evaluation indicators, including: absolute relative error Abs Rel, square relative error Sq Rel, root mean square relative error RMSE, logarithmic root mean square error RMSE log, accuracy δ1, δ2, δ3, logarithmic error log10, using δ1 as the individual fitness value f; AbsRel (absolute relative error) represents the average relative error between the model prediction value and the true value, emphasizing the size of the relative difference; Sq Rel (square relative error) represents the square of the average relative error, giving a higher penalty for large errors; RMSE (root mean square relative error) represents the standard deviation of the average error between the predicted value and the true value, reflecting the true error value, which is affected by the data range; RMSE log (Logarithmic root mean square error) measures the square root of the average of the logarithmic differences between the predicted value and the true value, and is applicable when the data range is large; δ1 represents the percentage of pixels in the predicted depth map that satisfy the ratio of the predicted value to the true value within 1.25, which is used to indicate the accuracy of the model's predicted depth value; δ2 and δ3 are the accuracies evaluated for a more tolerant error range, and their specific thresholds are 1.25 respectively. 2 and 1.25 3 ; log10 (logarithmic error) is the average of the logarithmic differences between the true value and the predicted value, which is suitable for situations where the data distribution is relatively wide because it compares the errors on a logarithmic scale; the present invention uses δ1 as the fitness value f of the individual;

[0096] The calculation formulas for each evaluation index are as follows:

[0097] Absolute relative error:

[0098] Squared relative error:

[0099] RMS relative error:

[0100] Logarithmic Root Mean Square Error:

[0101] Logarithmic error:

[0102]

[0103] Where T represents the total number of valid pixels in the real depth map corresponding to the test image, y represents the depth value of each pixel position in the predicted depth image, and y* represents the depth value of each pixel position in the real depth image;

[0104] (2.7) Based on step (2.6), environmental selection is performed, that is, excellent individuals are retained and inferior individuals are eliminated; the specific operation is: all current individuals are sorted in descending order according to the fitness value f from large to small, and only the top P individuals are retained. s Individuals form the current population and update the optimal architecture α best;

[0105] (2.8) On the complete test set D test Revalidate the current optimal architecture α test performance;

[0106] (2.9) Figure 4 As shown, according to the crossover rate p c and mutation rate p m , select, crossover, and mutate the current population in sequence, and repeat until the number of new individuals generated is equal to G s ;

[0107] The selection operation is as follows: randomly select individuals, the selection probability of each individual is obtained according to the individual's fitness value f, and the probability value of each individual being selected is p j Normalize the fitness of all individuals in the population, the formula is as follows:

[0108]

[0109] Among them, p j is the probability of the jth individual being selected, f j represents the fitness value of the jth individual;

[0110] By the crossover rate p c Decide whether to perform crossover; generate a random number p, if p≤p C , then crossover is performed. The crossover operation is as follows: two parent individuals are selected from the randomly selected individuals, and a binary list Status′ is randomly generated, with a length equal to the number of blocks in the unit N. b , the basic unit of crossover operation is block; if the value of the corresponding position list is 1, the block is exchanged, if it is 0, it is not exchanged, and finally two new individuals are returned;

[0111] The mutation operation is as follows: according to the mutation probability p m , randomly generate a binary list Status=[S1,S2,…,S N ], where S i =1 with a probability of p m , and randomly generate a list of symbols containing only ±1 Flag=[F1,F2,…,F N ]; then, the product of the corresponding position elements is added to the corresponding position of the individual code, that is, the individual random position code is +1 or -1; the individual mutation calculation formula is as follows:

[0112] P before =[x1,x2,…,x N ];

[0113] P new =[fMutation (x1),f Mutation (x2),…,f Mutation (x N )];

[0114] f Mutation (x i )=x i +S i ×F i ;

[0115] Among them, P before is the individual code before mutation, P new Encode the new individual after mutation, x i For each bit in the individual code, f Mutation is the mutation formula for each bit of coding, S i For each bit in the randomly generated binary status list Status, F i Each bit in the randomly generated binary symbol list Flag;

[0116] (2.10) Determine whether all training epochs are completed. If not, return to step (2.4); if completed, return to the optimal architecture α obtained in step (2.7) best , which is the optimal architecture obtained by the search;

[0117] (3) The optimal architecture obtained by the search is used as the backbone network of the monocular depth estimation encoder, and pyramid convolution is added to the backbone network. The monocular depth estimation encoder and the upsampling decoder containing the Laplacian pyramid together constitute a monocular depth estimation network;

[0118] The specific operation of the Laplacian pyramid is as follows: the original image is downsampled multiple times and then upsampled, and the contour feature map obtained by subtracting images of the same size is used to assist in guiding the decoder; the decoder is gradually refined through multiple upsampling, residual connections and weighted merging of contour maps of corresponding sizes, and finally a more accurate depth map is obtained;

[0119] (4) Train the monocular depth estimation network until the network converges; then use the test set D test The predicted depth value of each pixel in the image is obtained by inputting it into the trained monocular depth estimation network, and then compared with the corresponding true depth value to evaluate the performance of the trained monocular depth estimation network.

[0120] The following uses a specific embodiment to illustrate the effect of the monocular depth estimation method based on the evolutionary neural network architecture search of the present invention through simulation experiments, as follows:

[0121] (1) Simulation conditions;

[0122] The present invention is developed on the Pycharm platform, and the developed deep learning architecture is based on Pytorch. The main language used in the present invention is Python.

[0123] (2) Simulation content;

[0124] This paper verifies the effectiveness of the monocular depth estimation method based on evolutionary neural network architecture search on two monocular depth estimation tasks, KITTI and NYU Depth V2, and compares its performance with a variety of traditional manual architectures.

[0125] (2.1) Simulations were performed on the KITTI and NYU Depth V2 datasets. The KITTI dataset contains various road environments obtained from autonomous driving scenarios, and the resolution of the images obtained is 1242×375 pixels. In order to compare the performance, the training / test split strategy introduced in the literature (Depth map prediction from a single image using a multi-scale deep network, in Proc. Adv. Neural Inf. Process. Syst., Dec. 2014, pp. 2366–2374.) was adopted; according to this scheme, the test set D test It contains 697 images selected from 29 scenes, while the training set consists of 23,488 images from the remaining 32 scenes; during the test phase, the maximum value of the predicted output is limited to a range of 80 meters.

[0126] The NYU Depth V2 dataset includes 120,000 pairs of RGB and depth images captured with a Microsoft Kinect sensor in 464 indoor scenes with a resolution of 640×480 pixels. The previous training / test split was adopted, which included 249 scenes for training and 654 images from the remaining 215 scenes for testing. 36,253 samples were fully selected from the 249 scenes for training. The original images input to the network were cropped before entering the model. The original images were center-cropped to 561×427 pixels for comparison with existing methods;

[0127] (2.2) Set the search training related parameters and genetic algorithm related parameters; set the batch processing data volume size =8, training round epoch = 60, initial learning rate lr = 0.05, weight decay w = 0.0001, momentum coefficient m = 0.0001; the number of blocks in each unit N b =5, the number of standard unit stacks Nc =1, the initial number of network channels C = 32, the population size P s = 20, the number of new individuals produced in each generation G s =20, crossover rate p c=1 , mutation rate p m =0.02;

[0128] (2.3) Use Kaiming normal distribution to initialize network weights;

[0129] (2.4) For each batch processing round, sample a subnet architecture in the training set D train The weight parameters are optimized by stochastic gradient descent; the learning rate change strategy uses the cosine annealing algorithm, and the minimum learning rate min_lr = 0;

[0130] Stochastic gradient descent and learning rate change strategy are two related but different concepts in deep learning, and there is a close relationship between them. Stochastic gradient descent updates the model parameters by calculating the gradient of each training sample, which can be seen as a way to determine the "direction" of optimization, which tells us in which direction we should update the model parameters to minimize the loss function. The learning rate change strategy can be seen as a way to determine the "speed" of optimization, which tells us how far we should go in this direction.

[0131] "Weight parameters" usually refer to the trainable parameters in deep learning models, that is, the parameters of the connection weights in the neural network, and their number is generally in the millions. In layman's terms: the optimized weight parameters are a set of numbers learned by the model after training, which determine how the model makes predictions based on the input data. Just like each letter in a book has a specific meaning, these weight parameters contain the information learned by the model, allowing the model to better understand and interpret the input data. However, due to the large number of weight parameters and the complex meaning, these parameters are usually not listed directly, but predicted and inferred by using the trained model.

[0132] (2.5) Determine whether all batch training rounds are completed. If completed, proceed to the next step, otherwise return to step (2.4);

[0133] (2.6) Evaluate all individuals in the current population, using the weight parameters inherited from step (2.4) using weight sharing. The evaluation method is to evaluate all individuals in the test set D test Perform reasoning and calculation of depth estimation related performance evaluation indicators on a subset of ;

[0134] (2.7) Based on step (2.6), environmental selection is performed, that is, excellent individuals are retained and inferior individuals are eliminated; the specific operation is: all current individuals are sorted in descending order according to the fitness value f from large to small, and only the top P individuals are retained.s Individuals form the current population and update the optimal architecture α best ;

[0135] (2.8) On the complete test set D test Revalidate the current optimal architecture α best performance;

[0136] (2.9) According to the crossover rate p c and mutation rate p m , select, crossover, and mutate the current population in sequence, and repeat until the number of new individuals generated is equal to G s ;

[0137] (2.10) Repeat steps (2.6) to (2.9) to increase the number of evolutionary iterations;

[0138] (2.11) Determine whether all training rounds epoth are completed. If not, return to step (2.4); if completed, return to the optimal architecture α obtained in step (2.7) test .

[0139] (3) The optimal architecture is used as the backbone network of the monocular depth estimation encoder, and pyramid convolution is added to the backbone network. The monocular depth estimation encoder and the upsampling decoder containing the Laplacian pyramid together form a monocular depth estimation network;

[0140] (4) Train the monocular depth estimation network until the network converges; then use the test set D test Input into the trained monocular depth estimation network to obtain the predicted depth value of each pixel in the image, and compare it with the corresponding true depth value to evaluate the performance of the trained monocular depth estimation network;

[0141] (5) Simulation results;

[0142] First, on the KITTI dataset, the results are shown in Table 1. The final architecture searched by the method proposed in the present invention outperforms most existing manual models in all 7 performance indicators. Specifically, the model searched by the NAS of the present invention achieved an accuracy of δ1=0.938, which is about 2% higher than the existing manual models. In terms of Abs Rel, Sq Rel, RMSE and RMSE log indicators, the models searched by the NAS of the present invention all achieved the lowest values, showing better depth estimation capabilities. In addition, in terms of model size, the present invention also shows a competitive advantage. The model searched by the NAS of the present invention has a smaller parameter amount (22.3M), which is one-third less than the highest-performing DenseNet161 in the manual group, and its performance far exceeds other models. This shows that this model has a significant advantage in parameter efficiency and can achieve better performance while maintaining a smaller parameter amount.

[0143] Table 1

[0144]

[0145] Then, the indoor scene was evaluated using the NYU Depth V2 dataset, and the results are shown in Table 2. The architecture searched based on the NYUv2 dataset and the existing manual models were compared. The method of the present invention is still slightly better than most manual models, and due to the design of the search space, the number of parameters of the searched architecture is relatively small. Therefore, in general, the architecture searched by the present invention is still better than the existing manual model. This proves that the proposed method can effectively search for an architecture suitable for the depth estimation task.

[0146] Table 2

[0147]

[0148] In summary, the experimental results show that the proposed method has achieved excellent performance on both KITTI and NYU Depth V2 datasets, with high accuracy and small number of parameters. This further verifies the effectiveness and superiority of the method and provides a more effective solution for depth estimation tasks.

Claims

1. A monocular depth estimation method based on evolutionary neural network architecture search, characterized in that: First, a neural architecture search space of an encoder architecture for depth estimation is defined; then, a neural architecture search algorithm based on a genetic algorithm is used to search in the neural architecture search space of the encoder architecture for depth estimation. In this process, the accuracy of depth estimation δ1 is used as the fitness value of the genetic algorithm to guide the direction of population update, and the optimal architecture is obtained after multiple iterative evolutions; after the search, the optimal architecture is used as the backbone network of the monocular depth estimation encoder, and pyramid convolution is added to the backbone network. The monocular depth estimation encoder and the upsampling decoder together constitute a monocular depth estimation network; then, the monocular depth estimation network is trained until the network converges; finally, the test set is input into the trained monocular depth estimation network to obtain the predicted depth value of each pixel in the image; The optimal architecture is obtained by searching the neural architecture search space of the encoder architecture for depth estimation using a neural architecture search algorithm based on a genetic algorithm. The specific steps are as follows: (1) Prepare the corresponding dataset for depth estimation and divide it into training set D train and the test set D test ; The data set comprises image-depth value pairs; (2) Setting search training related parameters and genetic algorithm related parameters; The search training related parameters include: batch processing data volume batch size , training round epoch, initial learning rate lr, weight decay w, momentum coefficient m; the genetic algorithm related parameters include the number of blocks in each unit N b , the number of standard unit stacks N c , the initial number of network channels C, the population size P s , the number of new individuals generated in each generation G s , crossover rate p c , mutation rate p m ; (3) Initialize network weights; (4) For each batch processing round, sample a subnet architecture in the training set D train The weight parameters are optimized by stochastic gradient descent; (5) Determine whether all batch training rounds have been completed. If so, proceed to the next step; otherwise, return to step (4); (6) Evaluate all individuals in the current population, using weight sharing to inherit the weight parameters in step (4). The evaluation method is to evaluate all individuals in the current population using the weight sharing method in the test set D. test The depth estimation performance evaluation indicators are calculated on the subset of the inference, including absolute relative error Abs Rel, square relative error Sq Rel, root mean square relative error RMSE, logarithmic root mean square error RMSE log , accuracy δ1, δ2, δ3, logarithmic error log10, use δ1 as the individual fitness value f; The calculation formula of δ1 is as follows: Where y represents the depth value of each pixel position in the predicted depth image, and y* represents the depth value of each pixel position in the real depth image; (7) Based on step (6), environmental selection is performed, that is, excellent individuals are retained and inferior individuals are eliminated; the specific operation is: all current individuals are sorted in descending order according to the fitness value f from large to small, and only the top P individuals are retained. s Individuals form the current population and update the optimal architecture α best ; (8) On the complete test set D test Revalidate the current optimal architecture α best performance; (9) According to the crossover rate p c and mutation rate p m , select, crossover, and mutate the current population in sequence, and repeat until the number of new individuals generated is equal to G s ; (10) Repeat steps (6) to (9) to increase the number of evolutionary iterations; (11) Determine whether all training epochs have been completed. If not, return to step (4); if completed, return to the optimal architecture α obtained in step (7) best ; The selection operation in step (9) is as follows: randomly select individuals, the selection probability of each individual is obtained according to the individual's fitness f, and the probability value p of each individual being selected is j Normalize the fitness of all individuals in the population, the formula is as follows: Among them, p j is the probability of the jth individual being selected, f j represents the fitness value of the jth individual; By the crossover rate p c Decide whether to perform crossover; generate a random number p, if p≤p C , then crossover is performed. The crossover operation is as follows: two parent individuals are selected from the randomly selected individuals, and a binary list Status′ is randomly generated, with a length equal to the number of blocks in the unit N. b , the basic unit of crossover operation is block; if the value of the corresponding position list is 1, the block is exchanged, if it is 0, it is not exchanged, and finally two new individuals are returned; The mutation operation is as follows: according to the mutation probability p m , randomly generate a binary list Status = [S1, S2, ..., S N ], where S i =1 with a probability of p m , and randomly generate a list of symbols containing only ±1 Flag = [F1, F2, ..., F N ]; then, the product of the corresponding position elements is added to the corresponding position of the individual code, that is, the individual random position code is +1 or -1; the individual mutation calculation formula is as follows: P before =[x1,x2,...,x N ]; P new =[f Mutation (x1),f Mutation (x2),...,f Mutation (x N )]; f Mutation (x i )=x i +S i ×F i ; Among them, P before is the individual code before mutation, P new Encode the new individual after mutation, x i For each bit in the individual code, f Mutation is the mutation formula for each bit of coding, S i For each bit in the randomly generated binary status list Status, F i Each bit in the randomly generated binary symbol list Flag; The calculation formulas for each evaluation index in step (6) are as follows: Where T represents the total number of valid pixels in the real depth map corresponding to the test image, y represents the depth value of each pixel position in the predicted depth image, and y * Represents the depth value of each pixel in the true depth image.

2. The monocular depth estimation method based on evolutionary neural network architecture search according to claim 1, characterized in that: The upsampling decoder is an upsampling decoder including a Laplacian pyramid.

3. The monocular depth estimation method based on evolutionary neural network architecture search according to claim 2, characterized in that: The neural architecture search space of the encoder architecture for depth estimation includes the various components in the encoder backbone network and the connection methods and operation selections between them, as follows: (a) The neural network architecture is divided into three levels: network, unit and block; (b) Each block consists of two inputs I A ,I B and candidate operations, where each input is passed through the corresponding candidate operation O A ,O B , and then merged into one output B through the addition operation i ; The calculation formula for the i-th block is as follows: in, represents the first input index in the i-th block, represents the candidate operation performed on the first input in the i-th block; (c) Candidate Operation O A ,O B There are 5 types, namely, identity connection, 3×3 maximum pooling layer, 3×3 average pooling layer, 3×3 depth-separable convolution, and 5×5 depth-separable convolution; these operations ensure that the size of the input feature map is not changed by adjusting the step size and padding so that it can be replaced during the search process; (d) Units are divided into three types according to their positions: input units, standard units, and dimension reduction units; all units are arranged in series, and the output of the current unit is the input of the next unit. The input unit is located at the beginning of the network and has only one input; standard units and dimension reduction units have two inputs, one of which is the output of the previous unit, and the other is the input of the previous unit; (e) The structure of each unit consists of a directed acyclic graph, a pyramid convolution module, and a skip connection from the head to the tail; the directed acyclic graph is composed of N b The blocks are connected to each other; at the end of the directed acyclic graph, the outputs of all the blocks with no out-degree are merged and input into the pyramid convolution module; (f) Starts with an input unit, followed by N c standard units, and then a dimension reduction unit and N c The standard units are grouped into a group and 3 groups are repeatedly stacked to form the backbone network of the depth estimation encoder. Among them, a pooling operation is additionally used before each dimensionality reduction unit to reduce the size of the input feature map to half of its original size, and the number of channels is expanded to twice through 1×1 convolution.

4. The monocular depth estimation method based on evolutionary neural network architecture search according to claim 1, characterized in that: In step (3), Kaiming normal distribution is used for weight initialization.

5. The monocular depth estimation method based on evolutionary neural network architecture search according to claim 1, characterized in that: The sampling method in step (4) is to select two parent individuals in the current population, generate two offspring individuals through crossover mutation operation, and return the first individual of the two offspring individuals; for the first training round, the current population is empty, then a subnet architecture is randomly generated in the search space and returned.

Citation Information

Cited By

  • Monocular depth estimation method based on multi-target federated evolutionary neural architecture search

    CN122244121A