End-to-end autonomous driving decision-making method based on monocular RGB-D features and reinforcement learning

The end-to-end automatic driving decision-making method through monocular RGB-D features and reinforcement learning solves the traditional system's insufficient environmental perception in complex road conditions and the cost problem caused by depth sensors, achieving better decision-making capabilities and cost reduction. .

CN113920484BActive Publication Date: 2024-09-10HUNAN NORMAL UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111204252.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-15
Publication Date
2024-09-10
Estimated Expiration
2041-10-15

AI Technical Summary

Technical Problem

Traditional autonomous driving systems have poor environmental awareness when faced with complex road conditions, resulting in poor decision-making results. Moreover, the heterogeneous data fusion problem caused by depth sensors increases costs.

Method used

An end-to-end automatic driving decision-making method based on monocular RGB-D features and reinforcement learning is adopted, feature fusion is performed through the image feature extraction network and deep feature extraction network, and input into the agent network for decision-making, improving environmental perception and decision-making capabilities, and avoiding depth Data fusion issues brought by sensors.

Benefits of technology

It enhances the decision-making ability of the autonomous driving system in complex environments, reduces costs, improves environmental perception, and avoids the complexity of data fusion introduced by depth sensors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113920484B
    Figure CN113920484B
Patent Text Reader

Abstract

The present invention discloses an end-to-end autonomous driving decision-making method based on monocular RGB-D features and reinforcement learning, comprising: obtaining an RGB image, inputting the RGB image into a pre-trained image feature extraction network and a pre-trained monocular depth feature extraction network; extracting features from the RGB image using the pre-trained image feature extraction network to obtain a first image feature, and extracting features from the RGB image using the pre-trained monocular depth feature extraction network to obtain a first depth feature; fusing the image feature and the depth feature using RGB-D features to obtain a fused first feature vector; splicing the fused first feature vector and a pre-stored historical action vector to obtain a first state vector, and inputting the first state vector into a pre-trained agent network to obtain a Q value, and making an autonomous driving decision based on the Q value. The ability of the agent to perceive the environment is improved, thereby enhancing the ability of autonomous driving decision-making.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of autonomous driving, and in particular relates to an end-to-end autonomous driving decision method based on monocular RGB-D features and reinforcement learning. Background Art

[0002] The autonomous driving system adopts advanced communication, computer, network and control technologies to achieve real-time and continuous control of the vehicle. It uses modern communication methods and directly faces the vehicle to achieve two-way data communication between the vehicle and the ground. It has a fast transmission rate and a large amount of information. Subsequent tracking vehicles and control centers can promptly know the exact location of the vehicle in front, making operation management more flexible, control more effective, and more adaptable to the needs of vehicle autonomous driving. In the past decade, related research in the field of autonomous driving has received high attention from the artificial intelligence industry of governments, scientific research institutions, automobile companies and Internet companies and has continued to advance. Among them, autonomous driving decision-making technology is a key technology to solve active safety and reduce traffic accidents.

[0003] Traditional autonomous driving strategies are based on prescribed traffic rules. They require accurate identification of obstacles such as traffic signs, traffic lights, pedestrians and vehicles in the scene, segmentation of lane lines and passable roads, and then use of established rules to make control decisions. However, the shallow logical rules of mathematical modeling often have little effect when faced with complex road conditions in the real world. The environmental perception ability during autonomous driving is poor, and the use of depth sensors will bring about heterogeneous data fusion problems and increase the cost of autonomous driving. Summary of the invention

[0004] In response to the above technical problems, the present invention provides an end-to-end autonomous driving decision-making method based on monocular RGB-D features and reinforcement learning, which can improve the environmental perception ability of the intelligent agent and thereby enhance the autonomous driving decision-making ability.

[0005] The technical solution adopted by the present invention to solve the technical problem is:

[0006] An end-to-end autonomous driving decision-making method based on monocular RGB-D features and reinforcement learning includes the following steps:

[0007] Step S500: Acquire an RGB image, and input the RGB image into a pre-trained image feature extraction network and a pre-trained monocular depth feature extraction network;

[0008] Step S600: A pre-trained image feature extraction network performs feature extraction on the RGB image to obtain a first image feature, and a pre-trained monocular depth feature extraction network performs feature extraction on the RGB image to obtain a first depth feature;

[0009] Step S700: performing RGB-D feature fusion on the image feature and the first depth feature to obtain a fused first feature vector;

[0010] Step S800: Concatenate the fused first feature vector and the pre-stored historical action vector to obtain a first state vector, input the first state vector into a pre-trained agent network to obtain a Q value, and make an autonomous driving decision based on the Q value.

[0011] Preferably, before step S500, the following steps are also included:

[0012] Step S100: Building an image feature extraction network, a monocular depth feature extraction network and an agent network;

[0013] Step S200: Obtain RGB training image I t and I t-1 , will I t Input to the image feature extraction network to obtain the second image feature, and I t and I t-1 Input into the monocular deep feature extraction network for training to obtain the second deep feature;

[0014] Step S300: performing RGB-D feature fusion on the second image feature and the second depth feature to obtain a fused second feature vector;

[0015] Step S400: Concatenate the fused second feature vector and the pre-stored historical action vector to obtain a second state vector, obtain a training sample group based on the second state vector and put it into an experience replay pool, obtain a preset group of training samples from the experience replay pool, and train the intelligent agent network based on the preset group of training samples and the preset target network to obtain a trained intelligent agent network.

[0016] Preferably, the monocular deep feature extraction network includes a depth network and a posture network, the depth network includes a first encoding module and a first decoding module, the posture network includes a second encoding module and a second decoding module, and in step S200, I t and I t-1 Input to the monocular deep feature extraction network to obtain the second deep feature, including:

[0017] Step S210: The first encoding module uses a deep residual network to t Perform feature extraction and output feature maps. The first decoding module upsamples the feature maps output by the first encoding module to different sizes to obtain feature maps of different sizes, and upsamples the feature maps of different sizes to the original image size respectively.

[0018] Step S220: splicing the multiple feature maps upsampled to the original image size along the channel to obtain a second depth feature;

[0019] Step S230: The second encoding module uses a deep residual network to t and I t-1 After encoding, it is input to the second decoding module, and the second decoding module decodes the encoded I t and I t-1 Decode and return the decoded I t and I t-1 The motion information corresponding to each pixel in;

[0020] Step S240: Based on the motion information corresponding to each pixel, use global average pooling to obtain I t-1 To I t The axis angle and translation vector pose, and the pose rotation matrix is ​​obtained by the Rodriguez rotation formula

[0021] Step S250: Rotate the matrix according to the position The photometric reprojection error is obtained by the preset first loss function, and the network parameters of the monocular deep feature extraction network are optimized by back propagation based on the photometric reprojection error.

[0022] Preferably, in step S250, according to the posture rotation matrix The photometric reprojection error is obtained by using the preset first loss function, including:

[0023]

[0024] Among them, I t-1→t The pose rotation matrix is ​​used Predicted depth map D t And the camera internal parameter K will I t-1 The result of mapping to time t is as follows:

[0025]

[0026] Among them, the proj function is to use D t , and K reprojected to I t-1 2D pixel coordinates, <·> represents the sampling operator;

[0027] pe(·) represents the preset first loss function, which is:

[0028]

[0029] Among them, SSIM(·) represents the structural similarity loss, ||·||1 represents the L1 norm loss, and α is a parameter used to balance the importance of the two losses: structural similarity loss and norm loss.

[0030] Preferably, the training sample group includes a second state vector, an optimal action, a reward, and a next state. The step S400 of obtaining the training sample group according to the second state vector includes:

[0031] (1) Determine the best action according to the second state vector, specifically:

[0032]

[0033] Among them, s t represents the second state vector, a t represents the best action, ε represents the probability parameter of the greedy strategy;

[0034] (2) Determine the reward based on the best action and the preset reward function:

[0035]

[0036] Among them, c t Indicates whether the vehicle collides at time t, where c t =1 means there is a collision, otherwise no collision occurs, v t represents the driving speed at time t, and “other” means that the collision sensor does not report a collision event or the vehicle speed v t ≤50km / h.

[0037] Preferably, the structures of the preset target network and the agent network are the same, and the step S400 of training the agent network according to the preset group of training samples and the preset target network to obtain a trained agent network includes:

[0038] Step S410: inputting a preset number of state vectors in a preset group of training samples into the agent network respectively, and obtaining a Q(s, a|θ) value corresponding to the action, where s, a, and θ respectively represent the current state, the action corresponding to the current state, and the parameters of the agent network;

[0039] Step S420: Input a preset number of next states in the preset group of training samples into the preset target network to obtain the corresponding next states of the action. Values, s′, a′, θ - Respectively represent the next state, the action corresponding to the next state and the parameters of the preset target network;

[0040] Step S430: Select a preset number of Take the largest value among the values, combine it with the reward, and get the target Q value;

[0041] Step S440: Obtain the loss value according to the Q(s,a|θ) value corresponding to the action, the target Q value and the preset second loss function, perform back propagation according to the loss value to update the network parameters of the intelligent network and iterate the time step. When the time step reaches the preset value, update the network parameters of the intelligent network to the network parameters of the target network.

[0042] Preferably, the preset second loss function in step S440 is specifically:

[0043] L(s,a|θ)=(y i -Q(s,a|θ)) 2

[0044] Among them, Q(s,a|θ) represents the Q value corresponding to action a in state s, and y i represents the target Q value, L(s,a|θ) represents the loss value of the second loss function, where y i The expression is:

[0045]

[0046] Among them, r is the reward, γ is the coefficient, For the preset number of Preferably, the expression of the second eigenvector in step S300 is:

[0047] f t = flatten(f conv (cat(F i ,ds(F d ))))

[0048] Among them, ds(·) represents the bilinear interpolation downsampling operation, cat(·) represents the splicing operation along the channel direction, and f conv The convolution kernel followed by batch normalization and ReLu nonlinear activation function is 1×1×(C i +C d ) is a convolution operation, flatten(·) represents a tensor flattening operation, and F i is the second image feature, F d is the second depth feature, f t is the second eigenvector after fusion.

[0049] Preferably, in step S800, inputting the first state vector into a pre-trained agent network to obtain a Q value includes:

[0050] Step S810: The first state vector is mapped to a preset dimension through a fully connected layer to obtain a first state vector of the preset dimension;

[0051] Step S820: inputting the first state vector of the preset dimension into the value network and the advantage function network respectively, and obtaining the state value at the current moment and the advantage value representing the importance of each action in the state respectively;

[0052] Step S830: Obtain the Q value corresponding to each action according to the current state value and advantage value.

[0053] Preferably, step S830 is specifically:

[0054]

[0055] Among them, Q(s,a) represents the reward value of taking action a in state s, V(s) represents the state value at the current moment, A(s,a) represents the advantage value of the importance of each action in this state, and A(s,a') represents the advantage value of the importance of all actions in state s.

[0056] In the above-mentioned end-to-end autonomous driving decision-making method based on monocular RGB-D features and reinforcement learning, a pre-trained image feature extraction network extracts features from RGB images to obtain image features, a pre-trained monocular depth feature extraction network extracts features from RGB images to obtain depth features, and RGB-D features are fused between the joint image features and the monocular depth features and used as the input of the intelligent agent network, thereby improving the environmental perception ability in the autonomous driving process, enhancing the decision-making ability of the intelligent agent in complex environments, avoiding the heterogeneous data fusion problem caused by the use of depth sensors, and reducing the cost of autonomous driving. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] Figure 1 A flowchart of an end-to-end autonomous driving decision-making method based on monocular RGB-D features and reinforcement learning provided by an embodiment of the present invention;

[0058] Figure 2 A schematic diagram of the structure of the overall network of an end-to-end autonomous driving decision-making method based on monocular RGB-D features and reinforcement learning provided by another embodiment of the present invention;

[0059] Figure 3 A schematic diagram of a Markov decision process of an end-to-end autonomous driving decision method based on monocular RGB-D features and reinforcement learning provided in another embodiment of the present invention;

[0060] Figure 4 A schematic diagram of a starting point and an end point in a test scenario in another embodiment of the present invention;

[0061] Figure 5 A reward distribution curve diagram of all training segments in another embodiment of the present invention;

[0062] Figure 6 This is a test reward distribution diagram in another embodiment of the present invention. DETAILED DESCRIPTION

[0063] In order to enable those skilled in the art to better understand the technical solution of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings.

[0064] In one embodiment, Figure 1 As shown, an end-to-end autonomous driving decision-making method based on monocular RGB-D features and reinforcement learning includes the following steps:

[0065] Step S500: Acquire an RGB image, and input the RGB image into a pre-trained image feature extraction network and a pre-trained monocular depth feature extraction network;

[0066] Step S600: A pre-trained image feature extraction network performs feature extraction on the RGB image to obtain a first image feature, and a pre-trained monocular depth feature extraction network performs feature extraction on the RGB image to obtain a first depth feature;

[0067] Step S700: performing RGB-D feature fusion on the image feature and the first depth feature to obtain a fused first feature vector;

[0068] Step S800: Concatenate the fused first feature vector and the pre-stored historical action vector to obtain a first state vector, input the first state vector into a pre-trained agent network to obtain a Q value, and make an autonomous driving decision based on the Q value.

[0069] In the above-mentioned end-to-end autonomous driving decision-making method based on monocular RGB-D features and reinforcement learning, a pre-trained image feature extraction network extracts features from RGB images to obtain image features, a pre-trained monocular depth feature extraction network extracts features from RGB images to obtain depth features, and RGB-D features are fused between the joint image features and the monocular depth features and used as the input of the intelligent agent network, thereby improving the environmental perception ability in the autonomous driving process, enhancing the decision-making ability of the intelligent agent in complex environments, avoiding the heterogeneous data fusion problem caused by the use of depth sensors, and reducing the cost of autonomous driving.

[0070] In one embodiment, before step S500, the method further includes:

[0071] Step S100: Building an image feature extraction network, a monocular depth feature extraction network and an agent network.

[0072] Specifically, the first 5 convolutional layers of VGG-M (Visual Geometry Group M-Network) are used as the image feature extraction network, and the network input is a 1024x320 RGB image. The network structure parameters of the image feature extraction network are shown in Table 1. The left side is the dimension of the input feature map, and the right side is each network module. W, H, and C represent the width, height, and number of channels, respectively. The first parameter of the convolution module represents the number of filters, "st" and "pad" represent the convolution step size and space padding, respectively, LRN represents the local response normalization layer, x2 pool represents the maximum pooling downsampling factor of 2, and ×3 represents the same convolution layer repeated three times. All weight layers use the ReLU function as the nonlinear activation function.

[0073] Table 1 Image feature extraction network structure

[0074]

[0075] The monocular deep feature extraction network consists of two parts: the deep network and the pose network. The deep network includes the first encoding module F d and the first decoding module G d , the pose network includes a second encoding module F p and the second decoding module G p , and its network structure parameters are shown in Table 2.

[0076] Table 2 Depth estimation network structure

[0077]

[0078]

[0079] The agent network includes input layer, fully connected layer, value network, advantage function network and aggregation layer.

[0080] The overall network structure consists of four parts, such as Figure 2 As shown in the figure. The first part is the image feature extraction network, as shown in the dotted box 1; the second part is the monocular deep feature extraction network, as shown in the dotted box 2; the third part is the feature fusion module, as shown in the dotted box 3; as before, the network structures of the first three parts are combined to realize the function of converting observations into states, and their parameters are represented by α. The fourth part is the agent network, as shown in the dotted box 4. This part of the network receives the fused features and outputs the optimal decision action under the corresponding state. Its parameters include the value function network parameter β, the advantage function network parameter μ and the common parameter γ, which are synthesized here as θ.

[0081] Step S200: Obtain RGB training image I t and I t-1, will I t Input to the image feature extraction network to obtain the second image feature, and I t and I t-1 Input into the monocular deep feature extraction network to obtain the second deep feature.

[0082] Specifically, the overall network training is divided into two stages: in the first stage, continuous frame images are generated by using a simulated interactive environment, and the depth estimation network is trained under the premise of given camera internal parameters; in the second stage, the image feature extraction network is initialized using the VGG-M model pre-trained with the ImageNet dataset, and the depth estimation network parameters obtained by the first stage training are combined, and the subsequent feature fusion module and the agent network are connected. The feature fusion module and the agent network are trained with a larger learning rate, and the image feature extraction network and the deep feature extraction network are fine-tuned with a smaller learning rate to train the optimal decision model.

[0083] In one embodiment, the monocular deep feature extraction network includes a depth network and a posture network, the depth network includes a first encoding module and a first decoding module, the posture network includes a second encoding module and a second decoding module, and in step S200, I t and I t-1 Input to the monocular deep feature extraction network to obtain the second deep feature, including:

[0084] Step S210: The first encoding module uses a deep residual network to t Perform feature extraction and output feature maps. The first decoding module upsamples the feature maps output by the first encoding module to different sizes to obtain feature maps of different sizes, and upsamples the feature maps of different sizes to the original image size respectively.

[0085] Step S220: splicing the multiple feature maps upsampled to the original image size along the channel to obtain a second depth feature;

[0086] Step S230: The second encoding module uses a deep residual network to t and I t-1 After encoding, it is input to the second decoding module, and the second decoding module decodes the encoded I t and I t-1 Decode and return the decoded I t and I t-1 The motion information corresponding to each pixel in;

[0087] Step S240: Based on the motion information corresponding to each pixel, use global average pooling to obtain I t-1 To I t The axis angle and translation vector pose, and the pose rotation matrix is ​​obtained by the Rodriguez rotation formula

[0088] Step S250: Rotate the matrix according to the position The photometric reprojection error is obtained by the preset first loss function, and the network parameters of the monocular deep feature extraction network are optimized by back propagation based on the photometric reprojection error.

[0089] Specifically, the monocular depth estimation network is divided into two parts: the deep network and the pose network. The deep network adopts the classic U-Net encoder-decoder model structure. The first encoding module F d The first 5 convolution modules of the deep residual network ResNet-18 (32 times downsampling) are used, and the first decoding module G d F d The output first feature map is upsampled to different scales, and the feature maps of different scales are upsampled to the original image size to achieve multi-scale depth estimation to obtain the second depth feature. The pose network is also divided into the second encoding module F p With the second decoding module G p , where F p With F d Have a common network structure, the second decoding module G p It consists of three convolutional layers. Using two consecutive frames of images I t and I t-1 As the input of the pose network, through F p After encoding and G p After decoding, the motion information corresponding to each pixel is regressed, and the global average pooling can be used to obtain I t-1 To I t The axis angle and translation vector pose, and finally the pose rotation matrix can be obtained through the Rodriguez rotation formula

[0090] Since the pose network is only needed in the training phase, the four-level output of the first decoding module of the deep network is upsampled to the size of the last layer and concatenated along the channel as the deep feature, which is further input into the subsequent RGB-D feature fusion module to participate in autonomous driving decision-making.

[0091] In one embodiment, in step S250, according to the posture rotation matrix The photometric reprojection error is obtained by using the preset first loss function, including:

[0092]

[0093] Among them, I t-1→t The pose rotation matrix is ​​used Predicted depth map D t And the camera internal parameter K will I t-1 The result of mapping to time t is as follows:

[0094]

[0095] Among them, the proj function is to use D t , and K reprojected to I t-1 2D pixel coordinates, <·> represents the sampling operator;

[0096] pe(·) represents the preset first loss function, which is:

[0097]

[0098] Among them, SSIM(·) represents the structural similarity loss, ||·||1 represents the L1 norm loss, and α is a parameter used to balance the importance of the two losses: structural similarity loss and norm loss.

[0099] Specifically, the present invention uses bilinear interpolation to t-1 Sampling is performed, α = 0.85, and the agent's environmental perception ability is improved through the self-supervised loss of depth estimation.

[0100] Step S300: performing RGB-D feature fusion on the second image feature and the second depth feature to obtain a fused second feature vector.

[0101] Specifically, given the second image feature from the image feature extraction network And the second depth feature of the monocular depth extraction network The feature fusion module first downsamples the second depth feature to the same size as the second image feature, further concatenates it on the channel, and uses a 1×1 layer to reduce the dimension to C channels (H×W×C). Finally, the H×W×C tensor is flattened into a one-dimensional vector of fused image and depth features, and is input into the agent network as part of the current state vector. The function of the RGB-D feature fusion module is summarized as follows:

[0102] f t = flatten(f conv (cat(F i ,ds(F d ))))

[0103] Among them, ds(·) represents the bilinear interpolation downsampling operation, cat(·) represents the splicing operation along the channel direction, and f conv The convolution kernel followed by batch normalization and ReLu nonlinear activation function is 1×1×(C i +C d ) convolution operation, C i The number of channels representing the second image feature, C drepresents the number of channels of the second deep feature, flatten(·) represents the tensor flattening operation, and F i is the second image feature, F d is the second depth feature, f t is the second eigenvector after fusion.

[0104] Step S400: Concatenate the fused second feature vector and the pre-stored historical action vector to obtain a second state vector, obtain a training sample group based on the second state vector and put it into an experience replay pool, obtain a preset group of training samples from the experience replay pool, and train the intelligent agent network based on the preset group of training samples and the preset target network to obtain a trained intelligent agent network.

[0105] Specifically, since the sequence experience generated by the process of interaction between the agent and the environment has a high degree of time correlation, and using the same agent network to simultaneously generate the target Q value of the next state and update the current state Q value is likely to cause network instability and non-convergence, the present invention is based on the DQN method. First, an experience replay pool R is established, and the Markov decision process of each time step is stored as an experience to update the experience replay pool. This process can mix past and current experience to reduce the correlation between samples and ensure that the training samples can be fully trained. During the training process, only a certain number of experiences will be randomly extracted from R as samples each time. This method can effectively reduce data correlation. At the same time, R allows experience to be reused, which is conducive to improving learning efficiency. Furthermore, a target network that is exactly the same as the agent network is introduced. To estimate the target Q value, the parameters of the target network θ - The parameter θ is copied from the agent network at a certain number of steps, which can temporarily fix the Q value of the training process and make the agent learning process more stable. After adopting the above two measures, the training process of the agent network is completed by minimizing the preset second loss function.

[0106] In one embodiment, the training sample group includes a second state vector, a best action, a reward, and a next state. The training sample group is obtained according to the second state vector in step S400, including:

[0107] (1) Determine the best action according to the second state vector, specifically:

[0108]

[0109] Among them, s t represents the second state vector, a t represents the best action, ε represents the probability parameter of the greedy strategy;

[0110] (2) Determine the reward based on the best action and the preset reward function:

[0111]

[0112] Among them, c t Indicates whether the vehicle collides at time t, where c t =1 means there is a collision, otherwise no collision occurs, v t represents the driving speed at time t, and “other” means that the collision sensor does not report a collision event or the vehicle speed v t ≤50km / h.

[0113] Specifically, reinforcement learning refers to the process in which an agent learns strategies to maximize rewards during its interaction with the environment. The sequential decision problem of autonomous driving is regarded as a Markov decision process (MDP), which consists of a 4-tuple (s t ,a t ,r t ,s t+1 ) represents. At time t, the agent obtains state s t Determine the best action a t , and perform action a t Interact with the environment E to determine the reward r t , and finally get the next state s t+ 1. The state represents the image. For example, after turning left and right, the observed image is different, that is, the next state s t+1 Depends on action a t .

[0114] The Markov decision process definition diagram of the end-to-end autonomous driving decision problem in this application is as follows Figure 3 As shown in Figure 2, in the problem of autonomous driving decision-making, in the setting of a single-modal sensor (camera), it is not advisable to directly use the RGB image (observation o) as the state of the agent because the pixel space is extremely large. Usually, it is necessary to use a convolutional neural network to extract features and transform the high-dimensional observation space into a lower-dimensional state space. This process is represented as s t =(f(o t ,α),h t ), where o t represents the observed image at the current moment, f(·) represents the feature extraction network, whose parameters are represented by α, and h t Represents past historical actions, which is a vector that encodes actions that have been performed in the past. The purpose of adding historical action vectors is to stabilize the search strategy.

[0115] Regarding actions, the control quantities of the vehicle defined in this application include steering, throttle, and brakes. This application considers a decision-making method based on discrete action output, combining the outputs of the three control quantities into eight discrete actions, corresponding to straight driving, turns of different magnitudes, and braking. The discrete actions defined in this article are t The corresponding relationship between the control quantity and its meaning are shown in Table 3.

[0116] Table 3 Correspondence between discrete actions and control quantities

[0117]

[0118] About rewards, rewards r t is to act a at the current moment t The reward function is defined by accurately evaluating the effectiveness of the agent, and is used to supervise and train the agent. This paper uses the measurement data fed back by the vehicle to define the reward function, as shown in the following formula.

[0119]

[0120] Among them, c t Indicates whether the vehicle collides at time t, where c t =1 means there is a collision, otherwise no collision occurs, v t represents the driving speed at time t, and “other” means that the collision sensor does not report a collision event or the vehicle speed v t ≤50km / h; According to the above reward function, the total reward obtained by the agent at time t can be expressed as follows:

[0121]

[0122] Wherein, λ∈[0,1] represents a discount factor, and a larger value thereof indicates that the total reward R is more relevant to future actions. In this embodiment, λ=0.9 is set.

[0123] In one embodiment, the structures of the preset target network and the agent network are the same, and the step S400 of training the agent network according to the preset group of training samples and the preset target network to obtain a trained agent network includes:

[0124] Step S410: inputting a preset number of state vectors in a preset group of training samples into the agent network respectively, and obtaining a Q(s, a|θ) value corresponding to the action, where s, a, and θ respectively represent the current state, the action corresponding to the current state, and the parameters of the agent network;

[0125] Step S420: Input a preset number of next states in the preset group of training samples into the preset target network to obtain the corresponding next states of the action. Values, s′, a′, θ- Respectively represent the next state, the action corresponding to the next state and the parameters of the preset target network;

[0126] Step S430: Select a preset number of Take the largest value among the values, combine it with the reward, and get the target Q value;

[0127] Step S440: Obtain the loss value according to the Q(s,a|θ) value corresponding to the action, the target Q value and the preset second loss function, perform back propagation according to the loss value to update the network parameters of the intelligent network and iterate the time step. When the time step reaches the preset value, update the network parameters of the intelligent network to the network parameters of the target network.

[0128] In one embodiment, the preset second loss function in step S440 is specifically:

[0129] L(s,a|θ)=(y i -Q(s,a|θ)) 2

[0130] Among them, Q(s,a|θ) represents the Q value corresponding to action a in state s, and y i represents the target Q value, L(s,a|θ) represents the loss value of the second loss function, where y i The expression is:

[0131]

[0132] Among them, r is the reward, γ is the coefficient, For the preset number of The maximum value among the values.

[0133] Specifically, in reinforcement learning, the action value function Q(s,a) is used to evaluate the reward value of taking an action in a given state s. The larger the Q value, the larger the long-term reward value R obtained by taking action a in state s. The Q function can be iteratively updated by the following equation.

[0134] Q(s,a)=Q(s,a)+α(r+γmaxa′Q(s′,a′)-Q(s,a))

[0135] Among them, r represents the immediate reward for performing action a in the current state s, and Q(s′,a′) represents the Q value of performing action a′ in the next state s′.

[0136] In high-dimensional state and action space, it is impossible to calculate the Q value of each state and action one by one using the above formula. The Deep Q-Network (DQN) uses a deep network to build an agent network Q(s,a|θ) to approximate the Q function, where θ represents the parameters of the agent network. The input of the network is the current state, and the output is the Q value of each action in the current state.

[0137] The strategy learned by DQN has the problem that it cannot evaluate different strategies well when the Q values ​​corresponding to different actions are similar. This application uses the idea of ​​Dueling DQN and uses the value function network V(s|γ,β) and the advantage function network A(s,a|γ,μ) to jointly estimate the Q function (where γ represents the common parameter part of the two networks, and β and μ represent the unique parameters of the value function network and the advantage function network respectively). In order to improve the identifiability of the advantage function for each action, the advantage function is centralized and the Q value is calculated using the following combination:

[0138]

[0139] Finally, the update of Q(s,a) can be achieved by minimizing the preset second loss function:

[0140] L(s,a|γ i ,β i ,μ i )=(r+γmax a′ Q(s′,a′|γ i ,β i ,μ i )-Q(s,a|γ i ,β i ,μ i )) 2

[0141] Due to the differentiability of convolutional neural networks, end-to-end learning of feature extraction network and agent network parameters can be achieved by minimizing the preset second loss function.

[0142] During the experimental verification, the Adam optimizer was used in the first stage of deep feature extraction network training, and the learning rate was 10 -4 , the number of iterations is 11,000 (the training sample is 6,600 images, the batch size is set to 12, and the training cycle is 20 times); in the second stage of training, the SGD (stochastic gradient descent) optimizer is used with 10 -4 The feature fusion module and agent network are trained with a learning rate of 10 -5The learning rate is fine-tuned for the image feature extraction network and the deep feature extraction network. For the agent network, the capacity of the experience replay pool is set to 5,000, the total number of training segments is 30,000, the time step of each segment is 10, the batch size is set to 16, and the target network is updated every 1,000 steps. The initial value of the greedy strategy probability parameter ε is set to 0.9, and it decreases by 0.1 each time until it is fixed at 0.1. In addition, the minimum reward threshold is set to -1,000 to prevent the agent's reward from becoming infinitesimal.

[0143] In the training task, the starting point is randomly generated, and the test task uses a fixed starting point and ending point, which are recorded as (starting point, ending point) (respectively (36, 40), (68, 71), (27, 130)), which are displayed in the map as follows Figure 4 As shown in the figure (circle represents the starting point, star represents the ending point), the number of vehicles and pedestrians are set to 15 and 50 respectively under the condition of dynamic obstacles. The weather condition of the training task is set to the noon period of a sunny day. 30,000 fragments are sampled for training. In order to fully verify the effectiveness of the proposed algorithm and the generalization performance of the trained model, the performance of the trained model is tested at two different time periods, noon and night.

[0144] The test task is to let the vehicle make its own decision to reach the end point from the starting point on the planned path while ignoring traffic signals and speed limits. All test tasks are performed 15 times. If the vehicle reaches the end point within the specified time, it is successful. The specified time refers to the time required to complete the task at a speed of 10km / h on the optimal route. Three indicators are used to evaluate the algorithm performance, namely: the number of successful tasks (referring to the number of completed task segments), the average task completion rate (the percentage of the vehicle's travel distance in each test to the total task distance / the number of tests) and the illegal driving score (referring to the intensity of lane crossing and collision, given by the measurement data of the vehicle by the interactive environment).

[0145] Analysis of experimental results,(1) Reward distribution: The distribution of reward values ​​can represent the learning process of the agent from scratch, and intuitively reflect the training effect of reinforcement learning.,For every 100 segments of the 30,000 trained segments, the reward value statistics are taken, and the reward curve is shown in the figure. Figure 5As shown in the figure, the horizontal axis is the number of fragments, the left vertical axis is the reward value of the agent algorithm trained using image features (solid line), and the right vertical axis is the reward value of the agent algorithm trained using joint image and monocular depth features (dashed line). By observing the reward change curve of the joint image and depth features, it can be seen that the autonomous driving decision-making learning process can be roughly divided into four stages: initial training (0-1,000), early training (1,100-8,500), mid-training (8,600-21,000) and late training (21,100-30,000). The reward fluctuates slightly in the early training stage, when the network just starts to explore randomly. The reward in the early training stage is The reward has been decreasing, the vehicle rushes to the roadside, and the speed slows down due to crossing the lane. The overall reward in the middle of training is shifting in the direction of getting bigger, which shows that the vehicle has basically learned how to keep the lane. The reward distribution at the end of training has hardly changed, indicating that the network has converged at this time. By comparing the reward change curve that only relies on image features, it can be found that the reward change curve of the agent trained with image features is generally more volatile, indicating that the algorithm converges slowly and it is difficult for the agent to learn and obtain correct experience. The overall reward obtained by the joint image and deep feature algorithm is much greater than the reward that relies only on image features, and the distribution trend is more stable. (2) Test result analysis: In order to fully verify the effectiveness of the proposed algorithm and the generalization performance of the trained model, the performance of the trained model was tested at two different time periods, noon and night. To facilitate the analysis of experimental results, the model trained using image features is denoted as "RGB", and the model trained using the combined image and monocular depth features is denoted as "RGB+D". Based on four navigation tasks (01 straight, 02 one turn, 03 no dynamic obstacles, 04 with dynamic vehicles and pedestrians), 15 tests were conducted in daytime and complex nighttime scenes. The results of the average task completion are shown in Table 4 below, where the bold font represents the best result:

[0146] Table 4. Results of average task completion

[0147]

[0148]

[0149] From the analysis of the results in the above table, we can see that: for the noon test, in the absence of vehicles and pedestrians, the trained model has basically learned the lane keeping strategy, and the combination of deep features has greatly improved the average task completion rate. For the night test, due to the problem of domain gap, the model trained in the daytime scene cannot be well transferred to the night scene. However, compared with the model that integrates image and depth features, the model trained only by image features has lower night test results in turning tasks and comprehensive tasks with and without dynamic obstacles. This shows that the model trained only by image features is particularly sensitive to the domain gap problem, and the image depth feature has a certain alleviating effect on the model degradation caused by the domain gap.

[0150] In addition, the rewards of the test process in the comprehensive task 03 (without dynamic obstacles) are visualized as follows Figure 6 As shown in the figure, we can see that the reward value of the fused feature is higher and the trend is more stable, which means that the fused feature is used to guide the agent to learn a better driving strategy.

[0151] Finally, in the test task, the results of the task completion times, average task completion rate, lane crossing rate and obstacle collision intensity are summarized as shown in Table 5 below:

[0152] Table 5 Results of task completion times, average task completion rate, lane crossing rate and obstacle collision intensity

[0153]

[0154]

[0155] From the comparison results, we can see that its average task completion rate is slightly lower than that of the Dueling DQN (deep reinforcement learning) algorithm model based on image features, and much lower than the result of the Dueling DQN algorithm model based on combined image and depth features. This further shows that the combined image and monocular depth features are beneficial to improving the agent's ability to perceive the environment, thereby enhancing the autonomous driving decision-making ability.

[0156] The above end-to-end autonomous driving decision-making method based on monocular RGB-D features and reinforcement learning first uses a self-supervised approach to mine depth information from monocular images, combines image information, enhances the agent's environmental perception ability and guides the agent to learn more robust autonomous driving strategies. Secondly, Dueling DQN is used to improve the agent's ability to evaluate strategies. The experimental results provide a certain reference for using single-modal sensors to obtain depth information to improve autonomous driving decision-making capabilities. In future work, domain adaptation methods will be considered to further solve the problem of degradation of autonomous driving decision-making capabilities at night.

[0157] The above is a detailed introduction to the end-to-end autonomous driving decision-making method based on monocular RGB-D features and reinforcement learning provided by the present invention. This article uses specific examples to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the core idea of ​​the present invention. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.

Claims

1. An end-to-end autonomous driving decision-making method based on monocular RGB-D features and reinforcement learning, characterized in that: The method comprises the following steps: Step S500: Acquire an RGB image, and input the RGB image into a pre-trained image feature extraction network and a pre-trained monocular depth feature extraction network; Step S600: the pre-trained image feature extraction network performs feature extraction on the RGB image to obtain a first image feature, and the pre-trained monocular depth feature extraction network performs feature extraction on the RGB image to obtain a first depth feature; Step S700: performing RGB-D feature fusion on the image feature and the first depth feature to obtain a fused first feature vector; Step S800: concatenating the fused first feature vector and the pre-stored historical action vector to obtain a first state vector, inputting the first state vector into a pre-trained agent network to obtain a Q value, and making an autonomous driving decision based on the Q value; In step S800, the first state vector is input into a pre-trained agent network to obtain a Q value, including: Step S810: The first state vector is mapped to a preset dimension through a fully connected layer to obtain a first state vector of the preset dimension; Step S820: inputting the first state vector of the preset dimension into the value network and the advantage function network respectively, and obtaining the state value at the current moment and the advantage value representing the importance of each action in the state respectively; Step S830: Obtaining a Q value corresponding to each action according to the current state value and the advantage value; Step S830 is specifically as follows: Among them, Q(s, a) represents the reward value of taking action a in state s, V(s) represents the state value at the current moment, A(s, a) represents the advantage value of the importance of each action in state s, and A(s, a′) represents the advantage value of the importance of all actions in state s.

2. The method according to claim 1, characterized in that Before step S500, the following steps are also included: Step S100: Building an image feature extraction network, a monocular depth feature extraction network and an agent network; Step S200: Obtain RGB training image I t and I t-1 , the I t Input into the image feature extraction network to obtain the second image feature, and convert the I t and I t-1 Input into the monocular deep feature extraction network for training to obtain a second deep feature; Step S300: performing RGB-D feature fusion on the second image feature and the second depth feature to obtain a fused second feature vector; Step S400: Concatenate the fused second feature vector and the pre-stored historical action vector to obtain a second state vector, obtain a training sample group based on the second state vector and put it into an experience replay pool, obtain a preset group of training samples from the experience replay pool, and train the intelligent agent network based on the preset group of training samples and a preset target network to obtain a trained intelligent agent network.

3. The method according to claim 2, characterized in that The monocular deep feature extraction network includes a depth network and a posture network, the depth network includes a first encoding module and a first decoding module, the posture network includes a second encoding module and a second decoding module, and the I t and I t-1 Inputting into the monocular deep feature extraction network to obtain a second deep feature includes: Step S210: The first encoding module uses a deep residual network to t Perform feature extraction and output feature maps, the first decoding module upsampling the feature maps output by the first encoding module to different sizes to obtain feature maps of different sizes, and upsampling the feature maps of different sizes to the original image size respectively; Step S220: splicing the multiple feature maps upsampled to the original image size along the channel to obtain a second depth feature; Step S230: The second encoding module uses a deep residual network to t and I t-1 After being encoded, it is input to the second decoding module, and the second decoding module decodes the encoded I t and I t-1 Decode and return the decoded I t and I t-1 The motion information corresponding to each pixel in; Step S240: Based on the motion information corresponding to each pixel, use global average pooling to obtain I t-1 To I t The axis angle and translation vector pose, and the pose rotation matrix is ​​obtained by the Rodriguez rotation formula Step S250: Rotate the matrix according to the posture A photometric reprojection error is obtained by using a preset first loss function, and back propagation is performed according to the photometric reprojection error to optimize the network parameters of the monocular deep feature extraction network.

4. The method according to claim 3, characterized in that In step S250, according to the posture rotation matrix The photometric reprojection error is obtained by using the preset first loss function, including: Among them, I t-1→t The pose rotation matrix is ​​used Predicted depth map D t And the camera internal parameter K will I t-1 The result of mapping to time t is as follows: Among them, the proj function is to use D t , and K reprojected to I t-1 2D pixel coordinates, <·> represents the sampling operator; pe(·) represents the preset first loss function, which is: Among them, SSIM(·) represents the structural similarity loss, ||·||1 represents the L1 norm loss, and α is a parameter used to balance the importance of the two losses: structural similarity loss and norm loss.

5. The method according to claim 2, characterized in that: The training sample group includes a second state vector, a best action, a reward, and a next state. The training sample group is obtained according to the second state vector in step S400, including: (1) Determine the best action according to the second state vector, specifically: Among them, s t represents the second state vector, a t represents the best action, ε represents the probability parameter of the greedy strategy; (2) Determine the reward based on the optimal action and a preset reward function: Among them, c t Indicates whether the vehicle collides at time t, where c t =1 means there is a collision, otherwise no collision occurs, v t represents the driving speed at time t, and "other" means that the collision sensor does not report a collision event or the vehicle speed v t ≤50km / h.

6. The method according to claim 5, characterized in that The structure of the preset target network is the same as that of the agent network. In step S400, the agent network is trained according to the preset group of training samples and the preset target network to obtain a trained agent network, including: Step S410: inputting a preset number of state vectors in the preset group of training samples into the agent network respectively, and obtaining a Q(s, a|θ) value corresponding to the action, where s, a, and θ respectively represent the current state, the action corresponding to the current state, and the parameters of the agent network; Step S420: Input a preset number of next states in the preset group of training samples into the preset target network to obtain the action corresponding to Values, s′, a′, θ - Respectively represent the next state, the action corresponding to the next state and the parameters of the preset target network; Step S430: Select a preset number of Take the largest value among the values, combine it with the reward, and get the target Q value; Step S440: Obtain a loss value according to the Q(s, a|θ) value corresponding to the action, the target Q value and a preset second loss function, perform backpropagation according to the loss value to update the network parameters of the agent network and iterate the time step, and when the time step reaches a preset value, update the network parameters of the agent network to the network parameters of the target network.

7. The method according to claim 6, characterized in that The preset second loss function in step S440 is specifically: L(s, a|θ)=(y i -Q(s,a|θ))2 Among them, Q(s, a|θ) represents the Q value corresponding to action a in state s, and y i represents the target Q value, L(s, a|θ) represents the loss value of the second loss function, where y i The expression is: Among them, r is the reward, γ is the coefficient, For the preset number of The maximum value among the values.

8. The method according to claim 2, characterized in that: The expression of the second eigenvector in step S300 is: f t =flatten(f conv (cat(F i ,ds(F d )))) Among them, ds(·) represents the bilinear interpolation downsampling operation, cat(·) represents the splicing operation along the channel direction, and f conv The convolution kernel followed by batch normalization and ReLu nonlinear activation function is 1×1×(C i +C d ) convolution operation, C i The number of channels representing the second image feature, C d represents the number of channels of the second deep feature, flatten(·) represents the tensor flattening operation, and F i is the second image feature, F d is the second depth feature, f t is the second eigenvector after fusion.