Heterogeneous multi-scale event camera monocular depth estimation optimization method
Through the heterogeneous multi-scale event camera monocular depth estimation optimization method, using heterogeneous sample data training and multi-scale U-shaped network, the problem of mismatching event camera and color camera data characteristics is solved, and the prediction accuracy of monocular depth estimation is improved. and adaptability, maintaining the dynamic capture advantages of event cameras.
Patent Information
- Application Number
- CN202410592852.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-14
- Publication Date
- 2024-08-23
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the existing technology, the prediction accuracy of event camera monocular depth estimation devices is limited, mainly due to the lack of data texture and color, low spatial resolution, and the need to learn a large amount of sample data using deep learning methods, resulting in increased model complexity and increased prediction time. , losing the dynamic capture and low bandwidth advantages of event cameras.
The heterogeneous multi-scale event camera monocular depth estimation optimization method is adopted to solve the heterogeneous data characteristics through heterogeneous sample data training, construction of multi-scale U-shaped network, voxelized event data, depth distribution center conversion and multi-scale feature learning model. The problem of mismatch and excessive learning constraints is solved, and effective matching and feature alignment of event camera and color camera data are achieved.
It improves the prediction accuracy of monocular depth estimation of event cameras, maintains the high dynamic capture and low bandwidth advantages of event cameras, provides a more suitable depth estimation solution, and makes up for the limitations of traditional methods.
Smart Images

Figure CN118537384A
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of depth estimation, and in particular relates to a method for optimizing monocular depth estimation of a heterogeneous multi-scale event camera. Background Art
[0002] The development of artificial intelligence technology has put forward higher requirements and new development goals for monocular depth estimation devices based on deep learning. In application scenarios such as robot navigation, augmented reality, 3D reconstruction, and autonomous driving, high-speed moving objects and harsh light environments are common. These application scenarios have higher requirements for the performance of monocular depth estimation, while existing depth estimation methods and camera hardware limit its performance improvement.
[0003] In 2008, the first commercial event camera was born. Researchers have conducted research on the application of event cameras in industry and commerce. The research shows that the use of event cameras combined with deep learning methods is a new good choice. Continuous in-depth optimization of deep learning network frameworks and exploration of methods using event cameras are the key to achieving the development goals of monocular depth estimation technology in the new era. The development of these methods will help improve the prediction accuracy and adaptability of monocular depth estimation, thereby better meeting the needs of various application scenarios.
[0004] Event cameras are more adaptable when dealing with application scenarios with harsh light environments and high-speed moving objects. Event cameras have the following advantages: they are more sensitive to brightness changes and can capture subtle brightness changes in the environment; the data is continuous in the time domain, not limited by the frame rate, and can capture high-speed moving objects; they do not capture color and texture information, have less data redundancy, and require less transmission bandwidth. Event cameras also have the following disadvantages: the data lacks rich features such as color and texture; the spatial resolution is usually low. Color cameras have the following advantages: the data contains rich features such as color and texture; the spatial resolution is usually high. Color cameras also have the following disadvantages: the frame rate is limited, while the storage and price costs of high-frame rate cameras are very high and there is an upper limit; there is much data redundancy and high transmission bandwidth requirements. Based on the above advantages and disadvantages, to achieve more accurate and fast monocular depth estimation, it is necessary to combine the advantages of the two camera sensors to make up for the shortcomings of a single camera sensor.
[0005] Monocular depth estimation optimization has always been a hot topic and difficulty in the field of deep learning image tasks. For monocular depth estimation, researchers have successively released methods for monocular depth estimation of color cameras such as disparity matching and motion structure recovery in recent years; methods for monocular depth estimation of event cameras such as event data training alone and heterogeneous data joint training. The method of training event data alone inherits the advantages and disadvantages of event cameras, resulting in limited accuracy of monocular depth estimation. Although the method of joint training of heterogeneous data solves the problem of lack of texture and color features in event camera data, it amplifies the following disadvantages: requiring the use of two camera sensors at the same time, resulting in increased costs; losing the advantages of high response speed and low data redundancy of event cameras, greatly increasing the complexity of the task.
[0006] In the exploration of monocular depth estimation, estimation methods can be roughly divided into two categories: traditional methods and deep learning methods. Traditional methods are mainly based on some traditional technologies and features in the field of computer vision, such as disparity, texture, edges, etc. The disparity of objects under different viewpoints (i.e., the difference between corresponding points in the left and right images) is used to estimate the depth of objects. Structured light (such as stripes or grids) is projected into the scene, and then the depth is estimated based on the deformation of the light. The depth is inferred by analyzing the texture features in the image (such as texture direction, frequency, etc.). Most traditional monocular depth estimation methods rely on manually designed feature extraction and depth estimation algorithms, which have certain limitations, such as poor sensitivity to lighting changes and occlusion.
[0007] Deep learning methods mainly use network models such as convolutional neural networks, autoencoders, generative adversarial networks, spatial attention mechanisms, and multi-scale fusion to conduct a large number of sample training to obtain more accurate depth prediction methods and devices. The technology of deep learning methods is relatively mature, but due to technical problems with hardware and neural networks, further in-depth research is needed to explore new hardware and new networks. The emergence of event cameras and new deep learning network learning is expected to further improve the performance of monocular depth estimation.
[0008] In summary, the prior art has the following problems:
[0009] Event camera data suffers from texture and color loss, low spatial resolution, and complex estimation models. Using deep learning methods to achieve monocular depth estimation tasks requires learning the information features of a large amount of sample data. Selecting an event camera to provide sample data has the advantages of low data redundancy and the disadvantages of scarce color and texture features and low spatial resolution. These shortcomings lead to limited prediction accuracy of event camera monocular depth estimation devices. In order to improve the prediction accuracy of event camera monocular depth estimation devices, researchers have explored the use of more complex neural network models to train sample data. However, the increase in model complexity will increase the prediction time, resulting in the loss of the high dynamic capture and low bandwidth advantages unique to event cameras.
[0010] The problem of heterogeneous data between color cameras and event cameras. Color cameras generally have higher spatial resolution than event cameras; the data collected by the two sensors are heterogeneous and the features are incompatible; the absolute depth scale is inconsistent. To properly handle the heterogeneous data of the two sensors, it is necessary to change the structure of the data and align the data information features and the absolute depth scale. Summary of the invention
[0011] The present invention aims to provide a method for optimizing monocular depth estimation of a heterogeneous multi-scale event camera to solve the above-mentioned technical problems.
[0012] In order to solve the above technical problems, the specific technical solution of a heterogeneous multi-scale event camera monocular depth estimation optimization method of the present invention is as follows:
[0013] A method for optimizing monocular depth estimation of heterogeneous multi-scale event cameras comprises the following steps:
[0014] Step 1: Heterogeneous multi-scale event camera monocular depth estimation optimization model;
[0015] Step 1.1: Heterogeneous sample data training;
[0016] Step 1.2: Select encoder and decoder;
[0017] Step 1.3: Construct a multi-scale U-shaped network:
[0018] Step 1.4: Establish the loss function;
[0019] Step 1.5: Event camera monocular depth estimation;
[0020] Step 2: Heterogeneous data matching optimization;
[0021] Step 2.1: voxelization of event data;
[0022] Step 2.2: Depth distribution center conversion;
[0023] Step 3: Build a heterogeneous feature learning model;
[0024] Step 3.1: Multi-scale adaptive feature alignment;
[0025] Step 3.2: Normalized comparison of deep features.
[0026] Furthermore, the step 1.1 includes:
[0027] Prepare a labeled dataset with both color camera and event camera data, establish a teacher task and a student task, the teacher task is the color camera monocular depth estimation task, and the student task is the event camera monocular depth estimation task. The teacher task selects a priori high-performance neural network, namely, a heterogeneous depth encoder and a heterogeneous depth decoder, uses the color camera dataset for sample training, uses an absolute depth converter to convert the predicted relative depth map output by the neural network into a predicted absolute depth map, and then supervises it through a loss function. After multiple rounds of training, the highest prediction accuracy is obtained, and the neural network weight parameters at this time are recorded. After that, the heterogeneous depth encoder and the heterogeneous depth decoder use the weight parameters trained here; the student task selects a neural network with a simple structure, namely, an event absolute depth encoder and an event absolute depth decoder, converts the predicted absolute depth map output by the neural network, and obtains the highest prediction accuracy after multiple rounds of training through learning the teacher task, namely, the heterogeneous data learner and the supervision of the loss function. After that, the network model for event camera monocular depth prediction uses the event absolute depth encoder and the event absolute depth decoder trained here.
[0028] Furthermore, the step 1.2 includes:
[0029] The backbone of the heterogeneous depth encoder and decoder uses the visual converter VIT as the backbone model, and the event absolute depth encoder and decoder uses the convolutional neural network CN as the backbone model. The original image data is input, the encoder completes feature extraction, and the decoder completes feature fusion and relative depth estimation. The predicted relative depth is converted to absolute depth. The relative depth map is normalized between zero and one, and the difference between the predicted depth values is small; the absolute depth map is the real distance, ranging from zero to eighty meters, and the difference between the depths is large. Through logarithmic normalization, the predicted depth map is scaled to the real depth range;
[0030] The event absolute depth decoder: decodes the depth feature map output by the network model, normalizes it to a value between zero and one, generates a relative depth prediction map, and then logarithmically normalizes it to a value (0, D max ) range, generate the absolute depth prediction map, use logarithmic normalization transformation, expressed as:
[0031]
[0032] Here, D max represents the maximum predicted depth, α represents the parameter for calculating the minimum predicted depth, Represents the model predicted depth. Different datasets use different maximum predicted depth and minimum predicted depth parameters because of their different calibrated absolute depth ranges.
[0033] Furthermore, the step 1.3 includes:
[0034] A U-shaped network structure is used as the framework and a residual convolutional network is used as padding to form a network model with multi-scale windows, which aligns features when the size is unified.
[0035] Further, the step 1.4 includes:
[0036] Establish scale-invariant loss, scale-invariant gradient loss, and mean square error function. The scale-invariant loss function is established by normalizing the depth map.
[0037] The scale-invariant loss is achieved by normalizing the depth map and dividing each pixel value in the depth map by its average value, so that the depth map is scaled at a scale with an average value of 1. For scale-invariant loss optimization, L k,si To measure the scale loss, it is expressed as:
[0038]
[0039] Among them, R k represents the difference between the depth of the kth pixel in the depth prediction image and the label depth, n represents the number of valid label pixels u, R k It is expressed as:
[0040]
[0041] in, Denotes the model prediction depth, D k Indicates the tag depth value;
[0042] The scale-invariant gradient loss first passes the input image and the true depth map through a U-shaped multi-scale network to obtain depth maps of multiple sizes; then, in each scale window, the gradient difference between the predicted depth map and the true depth map is calculated; finally, the gradient differences in windows of different scales are weighted and summed to obtain the final scale-invariant gradient loss, using L k,grad To measure the scale-invariant gradient matching loss, it is expressed as:
[0043]
[0044] Here, represents the residual at pixel x, the L1 norm is used to enforce depth discontinuities in the prediction, s represents the scale window size, and n represents the number of valid label pixels u.
[0045] Furthermore, the step 1.5 includes:
[0046] After completing the training of heterogeneous sample data, a separate event camera monocular depth prediction task is established. The event data is trained with the event heterogeneous sample data to obtain the absolute depth encoder and event absolute depth decoder, and the event camera monocular depth prediction map is output.
[0047] Furthermore, the step 2.1 includes:
[0048] Given the asynchronous and sparse nature of event camera data, batches of time need to be converted into tensor-like representations. One way to encode these events is to represent them as a spatiotemporal voxel grid. The data within the event window is voxelized as follows:
[0049]
[0050] Among them, p i represents the event polarity of the ith pixel, e i Represents an event, expressed as:
[0051] e i =(u i , t i , p i )Here, u i Represents the pixel coordinate at time i, expressed as:
[0052] u i =(x i ,y i ) T
[0053] Represents a normalized event timestamp, expressed as:
[0054]
[0055] A spatiotemporal voxel grid was generated using five 50-ms event windows while non-zero values in the voxel grid were normalized to zero mean and unit variance.
[0056] Furthermore, the step 2.2 includes:
[0057] A robust monocular depth prediction model trained with a large amount of outdoor color data is used, and the depth center conversion is used to find its depth distribution center, which is converted to the same distribution center as the event camera to solve the damage caused by heterogeneous models. Each center prediction module is expressed as:
[0058]
[0059] Here, c i (k) represents the predicted absolute depth center, p i (k) is represented as the probability score of the absolute depth center.
[0060] Furthermore, the step 3.1 includes:
[0061] Feature distillation based on multi-scale features is used to process rich spatial information for detection. Different imitation masks m are proposed to form the attention mechanism of foreground features and filter out noise in the background, which is expressed as:
[0062]
[0063] Here, L represents the number of layers of the multi-scale U-shaped network, i,j represents the position of the corresponding feature map with a width of W and a height of H, and F l t represents the features of the teacher detector, F l S Characteristics of the Student Detector, Function Φ adapt Represents a 1*1 convolutional layer.
[0064] Further, the step 3.2 includes:
[0065] First, the features obtained by the teacher task and the student task are normalized to have zero mean and unit variance, and the mean square error between the normalized features is minimized. The normalization follows the convolution property; let the set of all values of the small batch elements and spatial positions in the feature map be the set, select the important features, run on the complete feature map, and fill the scalar value 1 with the imitation mask m, expressed as:
[0066]
[0067] Here, m represents the effective mini-batch, s and t are the standardized values obtained from the heterogeneous data model, and m is expressed as:
[0068] m=b*h*w
[0069] Here, b represents the batch size, h represents the height, and w represents the width. In fact, the feature map can be regarded as m data points. FPN The value of is zero. All data points (s, t) are linearly related to s and t. The gradient loss during training is expressed as:
[0070]
[0071] Here, σ s is the sample standard deviation of the temporal data feature.
[0072] A heterogeneous multi-scale event camera monocular depth estimation optimization method of the present invention has the following advantages: the present invention proposes a heterogeneous multi-scale event camera monocular depth estimation optimization model, and on the basis of studying the optimization of the event camera monocular depth estimation model, proposes a heterogeneous data matching optimization model, which solves the problem that the data characteristics and structures of the event camera sensor and the color camera sensor are very different; a heterogeneous data learning model is proposed, which solves the problem of mismatching of heterogeneous data characteristics and the problem that excessive learning constraints cause negative effects on some channels, and provides a technical option for depth estimation industry solutions. BRIEF DESCRIPTION OF THE DRAWINGS
[0073] Figure 1 It is a schematic diagram of the optimization model for monocular depth estimation of heterogeneous multi-scale event cameras of the present invention;
[0074] Figure 2 This is a schematic diagram of the structure of the heterogeneous data matching optimization model of the present invention;
[0075] Figure 3 Schematic diagram of the heterogeneous feature learning model structure of the present invention. DETAILED DESCRIPTION
[0076] In order to better understand the purpose, structure and function of the present invention, a heterogeneous multi-scale event camera monocular depth estimation optimization method of the present invention is further described in detail below with reference to the accompanying drawings.
[0077] In view of the above problems faced by the optimization of monocular depth estimation of event cameras, the present invention proposes the following Figure 1 Based on the research on the optimization of the event camera monocular depth estimation model, the following is proposed: Figure 2 The heterogeneous data matching optimization model shown is used to solve the problem that the data characteristics and structures of event camera sensors and color camera sensors are very different; Figure 3 The heterogeneous data learning model shown is used to solve the problem of mismatched features of heterogeneous data and the problem that excessive learning constraints cause negative effects on some channels.
[0078] like Figure 1 As shown, a heterogeneous multi-scale event camera monocular depth estimation optimization method of the present invention comprises the following steps:
[0079] Step 1: Heterogeneous multi-scale event camera monocular depth estimation optimization model
[0080] Step 1.1: Heterogeneous sample data training: Prepare a labeled dataset with both color camera and event camera data. Establish a teacher task (color camera monocular depth estimation task) and a student task (event camera monocular depth estimation task). The teacher task selects a priori high-performance neural network (heterogeneous depth encoder, heterogeneous depth decoder) and uses the color camera dataset for sample training. Use the absolute depth converter to convert the predicted relative depth map output by the neural network into a predicted absolute depth map, and then supervise it through the loss function. After multiple rounds of training, the highest prediction accuracy is obtained, and the neural network weight parameters at this time are recorded. After that, the heterogeneous depth encoder and heterogeneous depth decoder use the weight parameters trained here. The student task selects a neural network with a simple structure (event absolute depth encoder, event absolute depth decoder). The predicted absolute depth map output by the neural network is obtained after multiple rounds of training through the learning of the teacher task (heterogeneous data learner) and the supervision of the loss function. The neural network weight parameters at this time are recorded to complete the heterogeneous sample data training. After that, the network model for event camera monocular depth prediction uses the event absolute depth encoder and event absolute depth decoder trained here.
[0081] The main idea of heterogeneous sample data training is to obtain the model's prior knowledge through teacher task training and transfer this knowledge to the target task. In this way, the model can learn common feature representations from the teacher task and improve its generalization ability to the target task data.
[0082] Step 1.2: Select encoder and decoder: The backbone of the heterogeneous depth encoder and decoder selects the visual transformer (VIT) as the backbone model, which has good results on many data sets and strong scalability. The event absolute depth encoder and decoder select the convolutional neural network (CNN) as the backbone model, which has fast model operation speed and high versatility. Input the original image data, the encoder completes feature extraction, and the decoder completes feature fusion and relative depth estimation. The predicted relative depth must be converted to absolute depth. The relative depth map is normalized between zero and one, and the difference between the predicted depth values is small; the absolute depth map is the real distance, ranging from zero to eighty meters (varies with the camera hardware parameters), and the difference between the depths is large. Through logarithmic normalization, the predicted depth map is scaled to the real depth range.
[0083] The event absolute depth decoder: decodes the depth feature map output by the network model, normalizes it to a value between zero and one, generates a relative depth prediction map, and then logarithmically normalizes it to a value (0, D max ) range, an absolute depth prediction map is generated. In order to improve the sensitivity to the change of the predicted relative depth value, a logarithmic normalization transformation is adopted, which can be expressed as:
[0084]
[0085] Here, D max represents the maximum predicted depth, α represents the parameter for calculating the minimum predicted depth, Represents the model predicted depth. Different datasets use different maximum predicted depth and minimum predicted depth parameters because of their different calibrated absolute depth ranges.
[0086] Step 1.3: Construct a multi-scale U-shaped network: The U-shaped network structure is used as the framework, and the residual convolutional network is used as the filling to form a network model with multi-scale windows. The advantages of this network are: providing multiple scale windows, unifying the size of feature maps of different resolutions obtained from heterogeneous data, thereby solving the problem of different spatial resolutions; aligning features when unifying the size, so as to enable comparative supervision.
[0087] Step 1.4: Establish loss function: Establish scale-invariant loss, scale-invariant gradient loss, and mean square error function. The scale-invariant loss function is established by normalizing the depth map. The advantage is that it allows the network model to pay more attention to the relative depth relationship between objects in the depth map, rather than just the absolute value of the depth. The scale-invariant gradient loss function is established by calculating the gradient loss of the depth map. The advantage is that it can make full use of multi-scale information and improve the network model's ability to estimate the depth of objects of different scales. By calculating the gradient difference at different scales, it can better handle the boundary problem in the depth map, thereby obtaining a more accurate and robust depth estimation result. The mean square error function is established by taking the average value of the square difference between the predicted value and the actual value of the depth map. The advantage is that it allows the network model performance to quickly approach the highest point, thereby obtaining the network model weight parameters.
[0088] The scale-invariant loss is to normalize the depth map and divide each pixel value in the depth map by its average value, so that the depth map is scaled on a scale with an average value of 1. The advantage of the scale-invariant loss is that it can not only supervise the model to learn accurate depth estimation results, but also reduce the scale deviation of the depth map, so that the depth estimation result has better scale invariance. k,si To measure the scale loss, it can be expressed as:
[0089]
[0090] Among them, R k Represents the difference between the depth of the kth pixel in the depth prediction image and the label depth, and n represents the number of valid label pixels u. k It can be expressed as:
[0091]
[0092] in, Denotes the model prediction depth, D k Indicates the tag depth value.
[0093] The scale-invariant gradient loss first passes the input image and the true depth map through a U-shaped multi-scale network to obtain depth maps of multiple sizes. Then, in each scale window, the gradient difference between the predicted depth map and the true depth map is calculated. Finally, the gradient differences in different scale windows are weighted and summed to obtain the final scale-invariant gradient loss. k,grad To measure the scale-invariant gradient matching loss, it can be expressed as:
[0094]
[0095] Here, represents the residual at pixel x, the L1 norm is used to enforce depth discontinuities in the prediction, s represents the scale window size, and n represents the number of valid label pixels u.
[0096] Step 1.5: Event camera monocular depth estimation: After completing the heterogeneous sample data training, a separate event camera monocular depth prediction task is established. The event data is trained through the absolute depth encoder and event absolute depth decoder obtained by the event heterogeneous sample data, and the event camera monocular depth prediction map is output.
[0097] Step 2: Heterogeneous data matching optimization
[0098] Step 2.1: Voxelization of event data: Voxelization of event camera data is to process the raw event data captured by the event camera into a voxel expression. Voxels are pixels in three-dimensional space, used to represent points or areas in space. By voxelizing event camera data, event data can be converted from the time domain to the spatial domain for subsequent analysis and application.
[0099] Given the asynchronous and sparse nature of event camera data, batches of time need to be converted to a tensor-like representation. One way to encode these events is to represent them as a spatiotemporal voxel grid. The voxelization of the data within the event window can be expressed as:
[0100]
[0101] Among them, p i represents the event polarity of the ith pixel, e i Represents an event, which can be expressed as:
[0102] e i =(u i , t i , p i )
[0103] Here, u i Represents the pixel coordinate at time i, which can be expressed as:
[0104] u i =(x i ,y i ) T
[0105] Represents a standardized event timestamp, which can be expressed as:
[0106]
[0107] The present invention generates a spatiotemporal voxel grid using five 50-millisecond event windows, while normalizing the non-zero values in the voxel grid to zero mean and unit variance.
[0108] Step 2.2: Depth distribution center conversion: Depth distribution center conversion is to convert the depth center of the color camera dataset into the depth center of the event camera dataset. The dataset is taken by different types of cameras in different scenes, with long-range and close-range views, and also with different camera internal parameters. This results in the farthest and closest distances of the images in the dataset being different, and the depth distribution center is also inconsistent. Predicting the depth distribution center of heterogeneous datasets and converting them can significantly reduce the negative impact of heterogeneous data learning.
[0109] In order to learn the information features of color camera data, a robust color camera monocular depth prediction model is required, and the relative depth value distribution center predicted by the model is inconsistent with that of the event camera. To use the relative depth value with inconsistent distribution center, its distribution center must be found and then changed. The present invention uses a robust monocular depth prediction model trained with a large amount of outdoor color data, and uses depth center conversion to find its depth distribution center, convert it to the same distribution center as the event camera, and solve the damage caused by heterogeneous models. Each center prediction module can be expressed as:
[0110]
[0111] Here, c i (k) represents the predicted absolute depth center, p i (k) is represented as the probability score of the absolute depth center.
[0112] Step 3: Build a heterogeneous feature learning model
[0113] Step 3.1: Multi-scale adaptive feature alignment: Heterogeneous sensors have different spatial resolutions, and the size of the feature map of heterogeneous data is unified through a multi-scale U-shaped network. In scale windows of different sizes, the heterogeneous data features are compared and learned to supplement the missing color and texture features for the event camera data.
[0114] The feature distillation based on multi-scale features is used to process rich spatial information for detection. Different imitation masks m are proposed to form the attention mechanism of foreground features and filter out noise in the background, which can be expressed as:
[0115]
[0116] Here, L represents the number of layers of the multi-scale U-shaped network, i,j represents the position of the corresponding feature map with a width of W and a height of H. represents the features of the teacher detector, F l S Characteristics of the Student Detector. Function Φ adapt Represents a 1*1 convolutional layer.
[0117] Step 3.2: Normalized deep feature comparison: Because the sensors used to obtain data for the teacher task (color camera monocular depth estimation task) and the student task (event camera monocular depth estimation task) are different, the scale range of the data information features output by the two tasks is also inconsistent. Therefore, directly comparing the feature map of the teacher task with the student task may impose overly strict constraints and have negative effects. The normalized deep feature comparison first normalizes the feature map so that its mean and unit variance are zero, removing the learning damage caused by feature differences. Minimizing the mean square error loss between the normalized alignment scale and completing the normalization is equivalent to calculating the Pearson parameter. This normalization mechanism bridges the gap between the activation patterns of the student task and the teacher task, eliminating the negative effects that may arise from heterogeneous data learning.
[0118] First, the features acquired by the teacher task (color camera monocular depth estimation task) and the student task (event camera monocular depth estimation task) are normalized to have zero mean and unit variance, and the mean square error between the normalized features is minimized. In addition, the normalization follows the convolution property so that different elements of the same feature map are normalized in the same way at different locations. Let be the set of all values of the mini-batch elements and spatial positions in the feature map. Select the important features and operate on the complete feature map. That is, the pseudo mask m is filled with scalar values 1 and can be expressed as:
[0119]
[0120] Here, m represents the effective mini-batch, and s and t are the standardized values obtained from the heterogeneous data model. m can be expressed as:
[0121] m=b*h*w
[0122] Here, b is the number of batches, h is the height, and w is the width. In fact, the feature map can be regarded as m data points, L FPN The value of is zero. All data points (s, t) are linearly related to s and t. The gradient loss during training can be expressed as:
[0123]
[0124] Here, σ s is the sample standard deviation of the time data feature. The present invention relaxes the learning constraints of the features, eliminates the negative impact of some channels, and brings better performance.
[0125] It is to be understood that the present invention is described by some embodiments, and it is known to those skilled in the art that various changes or equivalent substitutions may be made to these features and embodiments without departing from the spirit and scope of the present invention. In addition, under the teachings of the present invention, these features and embodiments may be modified to adapt to specific circumstances and materials without departing from the spirit and scope of the present invention. Therefore, the present invention is not limited by the specific embodiments disclosed herein, and all embodiments falling within the scope of the claims of this application are within the scope of protection of the present invention.
Claims
1. A method for optimizing monocular depth estimation from heterogeneous multi-scale event cameras. It is characterized in that The steps include: Step 1: Heterogeneous multi-scale event camera monocular depth estimation optimization model; Step 1.1: Heterogeneous sample data training; Step 1.2: Select encoder and decoder; Step 1.3: Construct a multi-scale U-shaped network: Step 1.4: Establish the loss function; Step 1.5: Event camera monocular depth estimation; Step 2: Heterogeneous data matching optimization; Step 2.1: voxelization of event data; Step 2.2: Depth distribution center conversion; Step 3: Build a heterogeneous feature learning model; Step 3.1: Multi-scale adaptive feature alignment; Step 3.2: Normalized comparison of deep features.
2. The method for optimizing monocular depth estimation of heterogeneous multi-scale event cameras according to claim 1, It is characterized in that The step 1.1 comprises: Prepare a labeled dataset with both color camera and event camera data, establish a teacher task and a student task, the teacher task is the color camera monocular depth estimation task, and the student task is the event camera monocular depth estimation task. The teacher task selects a priori high-performance neural network, namely, a heterogeneous depth encoder and a heterogeneous depth decoder, uses the color camera dataset for sample training, uses an absolute depth converter to convert the predicted relative depth map output by the neural network into a predicted absolute depth map, and then supervises it through a loss function. After multiple rounds of training, the highest prediction accuracy is obtained, and the neural network weight parameters at this time are recorded. After that, the heterogeneous depth encoder and the heterogeneous depth decoder use the weight parameters trained here; the student task selects a neural network with a simple structure, namely, an event absolute depth encoder and an event absolute depth decoder, converts the predicted absolute depth map output by the neural network, and obtains the highest prediction accuracy after multiple rounds of training through learning the teacher task, namely, the heterogeneous data learner and the supervision of the loss function. After that, the network model for event camera monocular depth prediction uses the event absolute depth encoder and the event absolute depth decoder trained here.
3. The method for optimizing the monocular depth estimation of heterogeneous multi-scale event cameras according to claim 2, It is characterized in that The step 1.2 comprises: The backbone of the heterogeneous depth encoder and decoder uses the visual converter VIT as the backbone model, and the event absolute depth encoder and decoder uses the convolutional neural network CN as the backbone model. The original image data is input, the encoder completes feature extraction, and the decoder completes feature fusion and relative depth estimation. The predicted relative depth is converted to absolute depth. The relative depth map is normalized between zero and one, and the difference between the predicted depth values is small; the absolute depth map is the real distance, ranging from zero to eighty meters, and the difference between the depths is large. Through logarithmic normalization, the predicted depth map is scaled to the real depth range; The event absolute depth decoder: decodes the depth feature map output by the network model, normalizes it to a value between zero and one, generates a relative depth prediction map, and then logarithmically normalizes it to a value (0, D max ) range, generate the absolute depth prediction map, use logarithmic normalization transformation, expressed as: Here, D max represents the maximum predicted depth, α represents the parameter for calculating the minimum predicted depth, Represents the model predicted depth. Different datasets use different maximum predicted depth and minimum predicted depth parameters because of their different calibrated absolute depth ranges.
4. The method for optimizing monocular depth estimation of heterogeneous multi-scale event cameras according to claim 1, It is characterized in that The step 1.3 comprises: A U-shaped network structure is used as the framework and a residual convolutional network is used as padding to form a network model with multi-scale windows, which aligns features when the size is unified.
5. The method for optimizing monocular depth estimation of heterogeneous multi-scale event cameras according to claim 1, It is characterized in that The step 1.4 comprises: Establish scale-invariant loss, scale-invariant gradient loss, and mean square error function. The scale-invariant loss function is established by normalizing the depth map. The scale-invariant loss is achieved by normalizing the depth map and dividing each pixel value in the depth map by its average value, so that the depth map is scaled at a scale with an average value of 1. For scale-invariant loss optimization, L k,si To measure the scale loss, it is expressed as: Among them, R k represents the difference between the depth of the kth pixel in the depth prediction image and the label depth, n represents the number of valid label pixels u, R k It is expressed as: in, Denotes the model prediction depth, D k Indicates the tag depth value; The scale-invariant gradient loss first passes the input image and the true depth map through a U-shaped multi-scale network to obtain depth maps of multiple sizes; then, in each scale window, the gradient difference between the predicted depth map and the true depth map is calculated; finally, the gradient differences in windows of different scales are weighted and summed to obtain the final scale-invariant gradient loss, using L k,grad To measure the scale-invariant gradient matching loss, it is expressed as: Here, represents the residual at pixel x, L 1 The norm is used to enforce depth discontinuities in the prediction, s represents the scale window size, and n represents the number of valid label pixels u.
6. The method for optimizing monocular depth estimation of heterogeneous multi-scale event cameras according to claim 1, It is characterized in that The step 1.5 comprises: After completing the training of heterogeneous sample data, a separate event camera monocular depth prediction task is established. The event data is trained with the event heterogeneous sample data to obtain the absolute depth encoder and event absolute depth decoder, and the event camera monocular depth prediction map is output.
7. The method for optimizing monocular depth estimation of heterogeneous multi-scale event cameras according to claim 1, It is characterized in that The step 2.1 comprises: Given the asynchronous and sparse nature of event camera data, batches of time need to be converted into tensor-like representations. One way to encode these events is to represent them as a spatiotemporal voxel grid. The data within the event window is voxelized as follows: Among them, p i represents the event polarity of the ith pixel, e i Represents an event, expressed as: e i =(u i ,t i ,P i ) Here, u i Represents the pixel coordinate at time i, expressed as: u i =(x i ,y i ) T Represents a normalized event timestamp, expressed as: A spatiotemporal voxel grid was generated using five 50-ms event windows while non-zero values in the voxel grid were normalized to zero mean and unit variance.
8. The method for optimizing monocular depth estimation of heterogeneous multi-scale event cameras according to claim 1, It is characterized in that The step 2.2 comprises: A robust monocular depth prediction model trained with a large amount of outdoor color data is used, and the depth center conversion is used to find its depth distribution center, which is converted to the same distribution center as the event camera to solve the damage caused by heterogeneous models. Each center prediction module is expressed as: Here, c i (k) represents the predicted absolute depth center, p i (k) is represented as the probability score of the absolute depth center.
9. The method for optimizing monocular depth estimation of heterogeneous multi-scale event cameras according to claim 1, It is characterized in that The step 3.1 comprises: Feature distillation based on multi-scale features is used to process rich spatial information for detection. Different imitation masks m are proposed to form the attention mechanism of foreground features and filter out noise in the background, which is expressed as: Here, L represents the number of layers of the multi-scale U-shaped network, i,j represents the position of the corresponding feature map with a width of W and a height of H, and F l t represents the features of the teacher detector, F l S Characteristics of the Student Detector, Function Φ adapt Represents a 1*1 convolutional layer.
10. The method for optimizing monocular depth estimation of heterogeneous multi-scale event cameras according to claim 1, It is characterized in that The step 3.2 comprises: First, the features obtained by the teacher task and the student task are normalized to have zero mean and unit variance, and the mean square error between the normalized features is minimized. The normalization follows the convolution property; let the set of all values of the small batch elements and spatial positions in the feature map be the set, select the important features, run on the complete feature map, and fill the scalar value 1 with the imitation mask m, expressed as: Here, m represents the effective mini-batch, s and t are the standardized values obtained from the heterogeneous data model, and m is expressed as: m=b*h*w Here, b represents the batch size, h represents the height, and w represents the width. In fact, the feature map can be regarded as m data points. FPN The value of is zero. All data points (s, t) are linearly related to s and t. The gradient loss during training is expressed as: Here, σ s is the sample standard deviation of the temporal data feature.
Citation Information
Cited By
Self-supervised monocular depth estimation method based on uncertainty and edge enhancement
CN119152004A
Dynamic scene sensing method, sensing system and intelligent driving equipment
CN120070847A
