Obstacle trajectory prediction method, trajectory prediction model training method and device, and autonomous vehicle
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- LUOBO KUAIPAO (WUHAN) TECHNOLOGY CO LTD
- Filing Date
- 2026-05-28
- Publication Date
- 2026-08-04
AI Technical Summary
然而,真实交通场景中障碍物(尤其是行人、非机动车等)的行为具有高度的不确定性和非理性,可能偏离理性预测;相关技术中的方案预测的障碍物轨迹倾向于远离主车,这种过度保守的预测会导致误判障碍物的避让能力,从而导致障碍物实际轨迹与理性假设不符的情况,预测结果与真实轨迹偏差较大,需要考虑如何提升障碍物轨迹预测的准确性
[0011]According to the technical solution of this disclosure, irrational features are obtained based on obstacle information and environmental information, and rational features are obtained based on irrational features, environmental information, and interaction information between obstacles and the main vehicle. The candidate trajectories are predicted using irrational features and rational features respectively, and a candidate trajectory set is constructed. This effectively increases the diversity of prediction modes, better copes with the uncertain behavior of obstacles, and reduces the risk of misjudgment and accidents caused by prediction deviations in extreme traffic scenarios.
Smart Images

Figure CN122501403A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of artificial intelligence technology, and in particular to the fields of computer vision, image processing, autonomous driving and large models. Background Technology
[0002] In recent years, autonomous driving technology has seen widespread improvement. Accurately predicting the trajectories of surrounding obstacles is a reliable foundation for path planning and control decisions in autonomous driving systems. Obstacle trajectory prediction schemes in related technologies typically assume that obstacles possess rational decision-making capabilities and will adjust their trajectories according to the driver's intentions. However, in real-world traffic scenarios, the behavior of obstacles (especially pedestrians and non-motorized vehicles) is highly uncertain and irrational, potentially deviating from rational predictions. Current schemes tend to predict obstacle trajectories that are far removed from the driver; this overly conservative prediction can lead to misjudgments of the obstacle's avoidance capabilities, resulting in actual obstacle trajectories that do not match rational assumptions. The predicted results deviate significantly from the actual trajectories, necessitating consideration of how to improve the accuracy of obstacle trajectory prediction. Summary of the Invention
[0003] This disclosure provides a method for predicting the trajectory of obstacles, a method for training a trajectory prediction model, an apparatus, and an autonomous vehicle.
[0004] According to one aspect of this disclosure, a method for predicting the trajectory of an obstacle is provided, comprising: In the first module of the trajectory prediction model, irrational features are obtained based on obstacle information and environmental information, and X candidate trajectories and the initial probability of each candidate trajectory are obtained based on the irrational features; where X is an integer greater than or equal to 1. In the second module of the trajectory prediction model, rational features are obtained based on the irrational features, the environmental information, and the interaction information between the obstacle and the main vehicle. Based on the rational features, Y candidate trajectories and the initial probability of each of the Y candidate trajectories are obtained; where Y is an integer greater than or equal to 1. The target trajectory is determined based on the initial probabilities of each candidate trajectory in the candidate trajectory set; wherein the candidate trajectory set includes the X candidate trajectories and the Y candidate trajectories.
[0005] According to another aspect of this disclosure, a method for training a trajectory prediction model is provided, comprising: Based on the actual trajectory of the obstacle and the candidate trajectories predicted by each layer in the initial model, the loss of each layer is calculated; Based on the loss of each layer, the initial model is trained to obtain the target model; Based on the target model, a trajectory prediction model based on any embodiment of this disclosure is obtained.
[0006] According to another aspect of this disclosure, an obstacle trajectory prediction device is provided, comprising: The first module is used to obtain irrational features based on obstacle information and environmental information, and based on the irrational features, obtain X candidate trajectories and the initial probability of each candidate trajectory among the X candidate trajectories; where X is an integer greater than or equal to 1; The second module is used to obtain rational features based on the irrational features, the environmental information, and the interaction information between the obstacle and the main vehicle, and to obtain Y candidate trajectories and the initial probability of each candidate trajectory based on the rational features; where Y is an integer greater than or equal to 1. The trajectory determination module is used to determine the target trajectory based on the initial probability of each candidate trajectory in the candidate trajectory set; wherein the candidate trajectory set includes the X candidate trajectories and the Y candidate trajectories.
[0007] According to another aspect of this disclosure, a training apparatus for a trajectory prediction model is provided, comprising: The loss calculation module is used to calculate the loss of each layer based on the actual trajectory of the obstacle and the candidate trajectories predicted by each layer in the initial model. The model training module is used to train the initial model based on the loss of each layer to obtain the target model; The model application module is used to obtain a trajectory prediction model based on any embodiment of the present disclosure based on the target model.
[0008] According to another aspect of this disclosure, an electronic device is provided, comprising: At least one processor; and The memory is communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform any of the methods described in the present disclosure.
[0009] According to another aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are used to cause the computer to perform any of the methods according to embodiments of this disclosure.
[0010] According to another aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements any of the methods according to embodiments of this disclosure.
[0011] According to the technical solution of this disclosure, irrational features are obtained based on obstacle information and environmental information, and rational features are obtained based on irrational features, environmental information, and interaction information between obstacles and the main vehicle. The candidate trajectories are predicted using irrational features and rational features respectively, and a candidate trajectory set is constructed. This effectively increases the diversity of prediction modes, better copes with the uncertain behavior of obstacles, and reduces the risk of misjudgment and accidents caused by prediction deviations in extreme traffic scenarios.
[0012] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0013] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein: Figure 1 This is a schematic diagram of an obstacle trajectory prediction method provided in an embodiment of the present disclosure; Figure 2 This is a schematic diagram illustrating an application example of this disclosure; Figure 3 This is a schematic diagram of a training method for a trajectory prediction model provided in another embodiment of this disclosure; Figure 4 This is a schematic diagram of another application example of this disclosure; Figure 5 This is a schematic block diagram of an obstacle trajectory prediction device provided in an embodiment of the present disclosure; Figure 6 This is a schematic block diagram of an obstacle trajectory prediction device provided in another embodiment of this disclosure; Figure 7 This is a schematic block diagram of an obstacle trajectory prediction device provided in yet another embodiment of this disclosure; Figure 8 This is a schematic block diagram of a training apparatus for a trajectory prediction model provided in an embodiment of the present disclosure; Figure 9 This is a block diagram of an electronic device used to implement the obstacle trajectory prediction method of the embodiments of this disclosure. Detailed Implementation
[0014] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0015] Current obstacle trajectory prediction schemes in the field of autonomous driving are mainly based on the assumption of rational interactive game theory. In scenarios with strong interactive game theory (such as lane changing, lane switching, and intersection crossing), existing schemes fully consider the interaction relationship between obstacles and the driver vehicle, such as using attention mechanisms to model the interaction effects between multiple agents. The core idea of existing obstacle trajectory prediction schemes is to assume that obstacles have rational decision-making capabilities and will adjust their trajectories according to the driver vehicle's intentions. However, schemes based entirely on the assumption of rational interaction have significant shortcomings. First, in real traffic scenarios, the behavior of obstacles (especially pedestrians and non-motorized vehicles) is highly uncertain and irrational, and may deviate from rational predictions due to factors such as distraction, illegal driving, or sudden emotions. Second, in scenarios with strong interactive game theory, existing schemes tend to predict obstacle trajectories that are far away from the driver vehicle. This overly conservative prediction can lead the driver vehicle to misjudge the obstacle's avoidance ability, thus adopting more aggressive driving strategies (such as accelerating through or forcibly changing lanes), which actually increases the risk of collision. In addition, when the actual behavior of the obstacle does not conform to the rational assumption, the prediction results deviate significantly from the actual trajectory, seriously affecting the safety and reliability of the autonomous driving system.
[0016] This disclosure provides an obstacle trajectory prediction method. It obtains irrational features based on obstacle and environmental information, derives a subset of candidate trajectories and their initial probabilities based on these irrational features, and obtains rational features based on the irrational features, environmental information, and the interaction between the obstacle and the vehicle. It then obtains another subset of candidate trajectories and their initial probabilities based on these rational features, constructing a candidate trajectory set. Finally, it determines the target trajectory based on the initial probabilities of each candidate trajectory in the set. This method effectively considers both rational and irrational features, increases the diversity of prediction modes, better addresses the uncertain behavior of obstacles, and reduces the risk of misjudgment and accidents caused by prediction bias in extreme traffic scenarios.
[0017] Figure 1 A schematic diagram of an obstacle trajectory prediction method according to an embodiment of this disclosure is shown. This method can be applied to an obstacle trajectory prediction device, which can be deployed in an electronic device. The electronic device is, for example, a single-machine or multi-machine terminal, server, or other processing device. In some possible implementations, the method can also be implemented by a processor calling computer-readable instructions stored in memory. Figure 1 As shown, the method may include the following steps S110 to S130.
[0018] S110. In the first module of the trajectory prediction model, based on the information of obstacles and the information of the environment, irrational features are obtained, and based on the irrational features, X candidate trajectories and the initial probability of each candidate trajectory among the X candidate trajectories are obtained; where X is an integer greater than or equal to 1.
[0019] This embodiment of the disclosure can be used to predict the trajectory of an obstacle (hereinafter referred to as the target trajectory). The obstacle information in step S110 may include one or more types of information such as the obstacle's historical trajectory, current position, size, and obstacle type. The environmental information may include one or more types of information such as map information, information about other obstacles, traffic rule information, and traffic light information. Among them, the map information may include information such as the location, size, and type of map elements, and may also include road topology.
[0020] Optionally, the specific value of X can be determined according to actual needs.
[0021] Optionally, in the first module, irrational features can be obtained by interacting with obstacle information and environmental information, or by processing obstacle information and environmental information separately and then splicing them together.
[0022] Optionally, the first module may include multiple layers. Each layer may determine a candidate trajectory and its corresponding initial probability based on irrational features. Alternatively, the output features of the previous layer may be used as the output features of the next layer, and multiple candidate trajectories and their corresponding initial probabilities may be determined based on the output features of the last layer. Or, the combination of the above two methods may be adjusted according to the actual application scenario.
[0023] Optionally, the first module can use fully connected networks, residual networks, convolutional neural networks, etc. to process and obtain irrational features.
[0024] Optionally, in the first module, processing is not based on the interaction information between the obstacle and the main vehicle. That is, irrational features may be unrelated to the interaction between the obstacle and the main vehicle. It should be noted that the name "irrational feature" is only used to distinguish it from other features and does not limit the type of information it contains.
[0025] S120. In the second module of the trajectory prediction model, rational features are obtained based on irrational features, environmental information, and the interaction information between obstacles and the main vehicle. Based on the rational features, Y candidate trajectories and the initial probability of each candidate trajectory among the Y candidate trajectories are obtained; where Y is an integer greater than or equal to 1.
[0026] In this embodiment of the disclosure, the master vehicle is an autonomous driving vehicle, such as an autonomous driving vehicle currently predicting the trajectory of an obstacle. The interaction information between the obstacle and the master vehicle can be information obtained by interacting and processing the relevant information of the obstacle (such as the aforementioned irrational features or obstacle information) and the information of the master vehicle, for example, information obtained by processing the relevant information of the obstacle and the information of the master vehicle using an attention mechanism. For example, the information of the master vehicle may include the master vehicle's position, speed, acceleration, historical trajectory, etc.
[0027] Alternatively, the second module can use fully connected networks, residual networks, convolutional neural networks, etc., to obtain rational features.
[0028] In one implementation, the second module can interact with irrational features and environmental information to obtain environmental interaction features, interact with irrational features and information of the main vehicle to obtain interaction information between obstacles and the main vehicle, and obtain irrational features based on environmental interaction features and such interaction information.
[0029] Optionally, the specific value of Y can be determined according to actual needs.
[0030] Optionally, the second module may include multiple layers. Each layer may determine a candidate trajectory and its corresponding initial probability based on the output of irrational features. Alternatively, the output features of the previous layer may be used as the output features of the next layer, and multiple candidate trajectories and their corresponding initial probabilities may be determined based on the output features of the last layer. Or, the combination of the two methods may be adjusted according to the actual application scenario.
[0031] S130. Determine the target trajectory based on the initial probabilities of each candidate trajectory in the candidate trajectory set; wherein the candidate trajectory set includes X candidate trajectories and Y candidate trajectories.
[0032] Optionally, the candidate trajectory with the highest initial probability in the candidate trajectory set can be determined as the target trajectory. Alternatively, the candidate trajectory with the highest probability can be selected as the prediction result output based on the initial probability sorting. Or, a threshold can be set, and the candidate trajectory with the initial probability greater than the threshold can be the target trajectory.
[0033] Optionally, based on the specific application scenario, the initial probability of each candidate trajectory can be updated using appropriate methods, and the target trajectory can be determined based on the updated probability.
[0034] Optionally, the X candidate trajectories and Y candidate trajectories can be deduplicated to remove duplicate candidate trajectories with an overlap exceeding a preset threshold, and then the target trajectory can be determined based on the deduplicated candidate trajectory set.
[0035] As can be seen, the method described in the embodiments of this disclosure obtains irrational features based on obstacle information and environmental information, obtains a portion of candidate trajectories and the initial probability corresponding to each candidate trajectory based on the irrational features, obtains rational features based on the irrational features, environmental information, and the interaction information between the obstacle and the vehicle, obtains another portion of candidate trajectories and the initial probability corresponding to each candidate trajectory based on the rational features, constructs a candidate trajectory set, and determines the target trajectory based on the initial probability of each candidate trajectory in the candidate trajectory set. This method can simultaneously and fully consider rational and irrational features, effectively increase the diversity of prediction modes, better cope with the uncertain behavior of obstacles, and reduce the risk of misjudgment and accidents caused by prediction deviations in extreme traffic scenarios.
[0036] In some embodiments, the first module includes M layers, where the irrational feature is the output feature of the Mth layer in the M layers, and the i-th layer in the M layers is used for: Based on the interaction between the input features of the i-th layer and the environmental information, the output features of the i-th layer are obtained; where i is a positive integer greater than or equal to 1 and less than or equal to M. If i equals 1, the input features of the i-th layer are the information of obstacles; if i is greater than 1, the input features of the i-th layer are the output features of the (i-1)-th layer in the M layers; M is a positive integer greater than 1.
[0037] In this embodiment of the disclosure, the information of the obstacle is used as the initial input. When i is greater than 1, the i-th layer only interacts with the output features of the previous layer and the environmental information, without introducing the interaction information between the obstacle and the main vehicle.
[0038] In other words, in the first layer of the first module, the information of obstacles interacts with the information of the environment to obtain the output features of the first layer. In the second layer of the first module, the output features of the first layer interact with the information of the environment to obtain the output features of the second layer, and so on. After the interaction of the M layers, the irrational features are obtained. Therefore, the irrational features are obtained based on the deep interaction between the information of obstacles and the information of the environment.
[0039] Optionally, the specific value of M can be determined based on the model capacity and actual needs.
[0040] According to the above embodiment, the first module is set as layer M, with obstacle information as the initial input. Each subsequent layer generates new features based on the output features of the previous layer and environmental information through interaction. This avoids introducing interaction information between obstacles and the vehicle, enabling the extraction of features reflecting potential irrational behaviors of obstacles based on obstacle and environmental information. This avoids introducing interaction features between obstacles and the vehicle that could affect the generation of candidate trajectories for irrational behavior. Furthermore, through deep interaction between obstacle and environmental information, features that better reflect the behavioral characteristics of obstacles in different real-world environments can be extracted, improving the representational ability of irrational features and thus enhancing the accuracy of corresponding candidate trajectories.
[0041] In some embodiments, the second module includes N layers, where the rational feature is the output feature of the Nth layer, and the jth layer in the N layers is used for: The output features of layer j are obtained based on the input features of layer j, environmental information, and the interaction information between obstacles and the main vehicle. Here, j is a positive integer greater than or equal to 1 and less than or equal to N. If j equals 1, the input features of layer j are irrational features. If j is greater than 1, the input features of layer j are the output features of layer j-1 in layer N. N is a positive integer greater than 1.
[0042] In this embodiment of the disclosure, the existing irrational features are used as the initial input. When j is greater than 1, the j-th layer interacts with the output features of the (j-1)-th layer, environmental information, and the interaction information between obstacles and the main vehicle.
[0043] Specifically, in the first layer of the second module, irrational features, environmental information, and the information of the master vehicle can interact. For example, irrational features can interact with environmental information or with the information of the master vehicle to obtain the output features of the first layer. In the second layer of the first module, the output features of the first layer, environmental information, and the information of the master vehicle can interact. For example, the output features of the first layer can interact with environmental information or with the information of the master vehicle to obtain the output features of the second layer. And so on. After N layers of interaction, rational features are obtained. Therefore, rational features are obtained based on the deep interaction of obstacle information, environmental information, and master vehicle information.
[0044] Optionally, the specific value of N can be determined based on the model capacity and actual needs.
[0045] According to the above embodiment, the second module is set as N layers. Existing irrational features are used as initial input, and each subsequent layer is based on the output features of the previous layer, environmental information, and interaction information between obstacles and the vehicle. This allows for further integration of interaction information between the vehicle and obstacles, extracting features that consider the physical decision-making behavior of obstacles, and obtaining candidate trajectories of obstacles based on rational decision-making behavior features. Simultaneously, through multi-layered deep interaction, features that more closely resemble the characteristics of rational decision-making behavior of obstacles based on the current environment and their interaction with the vehicle in real traffic scenarios can be extracted, improving the representational ability of rational features and thus enhancing the accuracy of the corresponding candidate trajectories.
[0046] In some embodiments, determining the target trajectory based on the initial probabilities of each candidate trajectory in the candidate trajectory set includes: Based on the distance between each candidate trajectory in the candidate trajectory set, the initial probability of each candidate trajectory is updated to obtain the updated probability of each candidate trajectory. The target trajectory is determined based on the updated probability.
[0047] In this embodiment of the disclosure, the distance between different candidate trajectories can be the Euclidean distance between candidate trajectories, the average distance between candidate trajectories, or other distance metrics that can reflect the similarity or overlap between two candidate trajectories.
[0048] Optionally, the initial probability of each candidate trajectory is updated based on the distance between each candidate trajectory in the candidate trajectory set. This can be achieved by judging the similarity between two candidate trajectories based on the distance between them; the smaller the distance, the higher the overlap between the two candidate trajectories. Probability suppression is applied to candidate trajectories with high overlap to prevent them from occupying too high a total probability weight, thereby enriching the diversity of candidate trajectory distribution. Alternatively, for the candidate trajectory to be processed in the candidate trajectory set, the similarity between the candidate trajectory to be processed and the candidate trajectory in the candidate trajectory set can be judged based on the distance between the candidate trajectory to be processed and the candidate trajectory in the candidate trajectory set. The smaller the distance, the higher the overlap between the candidate trajectory to be processed and the candidate trajectory, the greater the probability of similar candidate trajectories appearing, and the greater the weight of similar candidate trajectories in influencing the initial probability of the candidate trajectory to be processed.
[0049] Optionally, the target trajectory is determined based on the update probability. This can be done by determining the candidate trajectory with the highest update probability as the final target trajectory, sorting the candidate trajectories from high to low update probability and selecting the top-ranked candidate trajectories as the multimodal prediction result output, or selecting all candidate trajectories with update probabilities greater than a preset threshold as the target trajectory set output.
[0050] According to the above embodiments, by updating the initial probability of the candidate trajectory based on the distance between each candidate trajectory in the candidate trajectory set, the probability weight of different candidate trajectories can be adjusted, making the probability distribution more in line with the actual probability, and further improving the accuracy of obstacle trajectory prediction.
[0051] In some embodiments, the initial probability of each candidate trajectory is updated based on the distance between each candidate trajectory in the candidate trajectory set, to obtain the updated probability of each candidate trajectory, including: For each candidate trajectory to be processed in the candidate trajectory set, the weight corresponding to each candidate trajectory is calculated based on the distance between the candidate trajectory to be processed and each candidate trajectory in the candidate trajectory set. Based on the weights corresponding to each candidate trajectory, the initial probabilities of each candidate trajectory are summed in a weighted manner to obtain the updated probabilities of the candidate trajectories to be processed.
[0052] The candidate trajectory to be processed can be any trajectory in the candidate trajectory set, that is, any one of the X candidate trajectories and Y candidate trajectories mentioned above. For example, each trajectory in the candidate trajectory set can be used as a candidate trajectory to be processed in turn, and the steps for the candidate trajectory to be processed described above can be performed to obtain the update probability of each candidate trajectory.
[0053] Optionally, in the above embodiments, the smaller the distance between a candidate trajectory in the candidate trajectory set and the candidate trajectory to be processed, the greater its weight. Therefore, the initial probability of a candidate trajectory that is more similar to the candidate trajectory to be processed has a greater impact on the update probability of the candidate trajectory to be processed. Since the trajectory to be processed is the same as the trajectory to be processed itself, the candidate trajectory to be processed has the largest weight, and its initial probability has the greatest impact on its own update probability. Furthermore, if a trajectory is similar to multiple high-probability trajectories, its weighted probability will be increased accordingly; conversely, the probability of outlier trajectories that differ significantly from the majority of trajectories will be suppressed.
[0054] Optionally, the weights can be calculated based on the Gaussian kernel function, where the distance between candidate trajectories is input to obtain the corresponding weights. Alternatively, other functions can be used to calculate the weights, so that the smaller the distance between candidate trajectories, the greater the weight. The specific calculation method can be adjusted according to actual needs.
[0055] According to this embodiment, by calculating the weight corresponding to each candidate trajectory based on the initial probability of the candidate trajectory to be processed and the distance between the candidate trajectory to be processed and the candidate trajectories in the candidate trajectory set, and by weighted summing of the initial probabilities of each candidate trajectory based on the weights, the updated probability can be obtained. This allows candidate trajectories that are close in distance and have high similarity to mutually increase their probability weights, suppresses scattered and invalid candidate trajectories with extremely low probabilities, further optimizes the probability distribution of the candidate trajectory set, improves the accuracy of finally determining the target trajectory, and reduces the interference of unreasonable candidate trajectories on the prediction results.
[0056] In some embodiments, the weight corresponding to each candidate trajectory is calculated based on the distance between the candidate trajectory to be processed and each candidate trajectory in the candidate trajectory set, including: The distance between the candidate trajectory to be processed and each candidate trajectory in the candidate trajectory set is calculated using the Gaussian kernel function, and the corresponding weight of each candidate trajectory is obtained.
[0057] For example, for the candidate trajectories to be processed First, calculate its distance to each candidate trajectory, for example, the distance to the candidate trajectory. distance Then, the candidate trajectory is calculated using the Gaussian kernel function. Weights: The update probability of the candidate trajectory to be processed is determined by weighted summation based on the weight and initial probability of each candidate trajectory. Optionally, the update probabilities of each trajectory can then be normalized.
[0058] According to this embodiment, a Gaussian kernel function is used, which can effectively capture the similarity of trajectories in spatial location and motion trend. By transforming the distance between two trajectories through a Gaussian kernel to obtain the similarity, the accuracy of the similarity can be improved. This allows for a reasonable weighted correction of the initial probability of each trajectory, effectively integrating the probability distribution of multimodal trajectories obtained based on rational and irrational features, thereby helping to select accurate target trajectories.
[0059] In some embodiments, determining the target trajectory based on the update probability includes: Based on the pairwise distances between candidate trajectories in the candidate trajectory set, Z candidate trajectories are selected from the candidate trajectory set; Z is an integer greater than or equal to 1. The target trajectory is determined from the Z candidate trajectories based on the update probability of each candidate trajectory.
[0060] Optionally, based on the distance between each pair of candidate trajectories in the candidate trajectory set, Z candidate trajectories are selected from the candidate trajectory set. This can be done by setting a threshold to remove candidate trajectories whose distance between each pair of candidate trajectories is less than the threshold, or by setting Z to a fixed value, sorting the candidate trajectories in descending order based on the distance between each pair of candidate trajectories, and retaining the top Z candidate trajectories.
[0061] Optionally, based on the update probability of each candidate trajectory among the Z candidate trajectories, the target trajectory is determined among the Z candidate trajectories. This can be done by determining the candidate trajectory with the highest update probability among the Z candidate trajectories as the target trajectory, or by selecting all candidate trajectories among the Z candidate trajectories whose update probability is greater than a preset probability threshold as multiple target trajectories in the final output, or by selecting a preset number of candidate trajectories with the highest update probability as the target trajectory set output according to the actual scenario requirements.
[0062] According to this embodiment, Z candidate trajectories with greater differences are first retained based on the distance between candidate trajectories, and then the target trajectory is determined based on the update probability. This can further reduce the interference of redundant similar candidate trajectories on the prediction results, simplify subsequent probability judgment while ensuring the diversity of candidate trajectories, and improve the overall efficiency and accuracy of trajectory prediction.
[0063] To facilitate understanding of the above technical solutions, a specific application example is provided below. Figure 2 This is a schematic diagram of an application example. In this application example, the trajectory prediction model includes m+n layers, that is, layers 1 to m+n. For ease of description, Figure 2The example uses layers 1, m, (m+1), and (m+n) as examples, omitting intermediate layers. Specifically, the first module includes layers 1 to m, and the second module includes layers (m+1 to m+n) (i.e., layers 1 to n in the second module). According to the method described above, obstacle information is used as input to layer 1. Layer 1 obtains irrational feature 1 based on interaction with the surrounding environment (including other obstacles and the map, but excluding interaction between obstacles and the main vehicle). Irrational feature 1 is used as input to layer m. Layer m obtains irrational feature m based on interaction with the surrounding environment (including other obstacles and the map, but excluding interaction between obstacles and the main vehicle). Based on irrational feature m, L irrational candidate trajectories and their corresponding initial probabilities are obtained. Irrational feature m is used as input to layer (m+1). Layer (m+1) obtains irrational feature m based on interaction with the surrounding environment (including other obstacles and the map, and interaction between obstacles and the main vehicle). The system first generates rational features m+1 based on interactions with the surrounding environment (including other obstacles and the map, as well as interactions between obstacles and the driver). Then, it uses these rational features m+1 as input to the (m+n)th layer. The (m+n)th layer generates further rational features m+n based on interactions with the surrounding environment (including other obstacles and the map, and interactions between obstacles and the driver). Based on these rational features m+n, it generates L rational candidate trajectories and their corresponding initial probabilities. From these L candidate trajectories and their initial probabilities, a Gaussian kernel function is used to generate updated probabilities for each candidate trajectory. Based on these updated probabilities, a maximum suppression algorithm is used to select the L candidate trajectories as the target trajectories. The final output top-L trajectories include both rational trajectories considering interactions with the driver and irrational trajectories that do not consider interactions, effectively increasing the diversity of trajectory modes. This diverse prediction result helps the autonomous driving system better cope with the uncertain behavior of obstacles, providing more comprehensive information support for subsequent path planning and decision-making, thereby improving the overall system's safety and robustness. In practical applications, the embodiments of this disclosure can also cover more extreme scenarios (such as pedestrians crossing the road illegally, non-motorized vehicles suddenly changing lanes, etc.), reduce the risk of misjudgment and accidents caused by prediction deviations, and provide more comprehensive reference information for path planning and control decisions.
[0064] Figure 3 A schematic diagram of a training method for a trajectory prediction model according to an embodiment of this disclosure is shown. This method can be applied to a training device for a trajectory prediction model, which can be deployed in an electronic device. The electronic device is, for example, a single-machine or multi-machine terminal, server, or other processing device. Optionally, the electronic device can be a device in an autonomous vehicle, which in some examples may be referred to as the host vehicle. In some possible implementations, the method can also be implemented by a processor calling computer-readable instructions stored in memory. Figure 3 As shown, the method may include the following steps S310 to S330.
[0065] S310. Based on the actual trajectory of the obstacle and the candidate trajectories predicted by each layer in the initial model, calculate the loss for each layer.
[0066] In this embodiment of the disclosure, the initial model may include an M-layer first module for generating irrational features and an N-layer second module for generating rational features; for the M-layer first module and the N-layer second module, the loss between the candidate trajectory generated corresponding to the output feature of each layer and the actual trajectory is calculated respectively.
[0067] Optionally, the loss can be calculated using the cross-entropy loss function or other loss functions suitable for probabilistic prediction tasks.
[0068] S320. Based on the loss of each layer, the initial model is trained to obtain the target model.
[0069] In this embodiment of the disclosure, each layer calculates its corresponding loss separately and backpropagates to update its parameters, enabling each layer to adjust its parameters based on the currently generated candidate trajectory.
[0070] S330. Based on the target model, a trajectory prediction model is obtained.
[0071] Optionally, the trajectory prediction model can be the trajectory prediction model in any of the foregoing embodiments.
[0072] Optionally, the target model can be pruned to obtain a trajectory prediction model. For example, the structure for obtaining irrational and rational features, the structure for predicting trajectories based on the deepest irrational features, and the structure for predicting trajectories based on the deepest rational features in the target model can be retained, while the structure for predicting trajectories based on features from other layers can be pruned to obtain a trajectory prediction model.
[0073] According to the above embodiments, by predicting trajectories at each layer of the initial model and calculating the corresponding losses for parameter updates, each layer can better perform its corresponding feature extraction and candidate trajectory generation. This allows the first module to better extract irrational features and generate irrational candidate trajectories, and the second module to better extract rational features and generate rational candidate trajectories, effectively improving the prediction accuracy of the trained trajectory prediction model. Furthermore, in practical applications of the trajectory prediction model, accurate predictions can be made based solely on the deepest layer's irrational and rational features, without requiring output and prediction at every layer. This ensures prediction accuracy without increasing additional inference costs, balancing model performance and inference efficiency.
[0074] In some embodiments, the initial model includes a first module, which includes M layers, wherein the p-th layer in the M layers is used for: Based on the interaction between the input features of the p-th layer and the environmental information, the output features of the p-th layer are obtained; where p is a positive integer greater than or equal to 1 and less than or equal to M. If p equals 1, the input features of the p-th layer are the information of obstacles; if p is greater than 1, the input features of the p-th layer are the output features of the (p-1)-th layer in the M layers; M is a positive integer greater than 1. Based on the output features of the p-th layer, predict at least one candidate trajectory.
[0075] In this embodiment of the disclosure, the information of the obstacle is used as the initial input. When i is greater than 1, the i-th layer only interacts with the output features of the previous layer and the environmental information, without introducing the interaction information between the obstacle and the main vehicle.
[0076] Optionally, the specific value of M can be determined based on the model capacity and actual needs.
[0077] According to the above embodiment, the first module is set as layer M, with obstacle information as the initial input. Each of the remaining layers generates new features based on the output features of the previous layer and the environmental information. Without introducing the interaction information between the obstacle and the main vehicle, it is possible to extract features reflecting the irrational behavior of the obstacle based on the obstacle information and the environmental information, and avoid introducing interaction features that may affect the possibility of generating candidate trajectories of irrational behavior.
[0078] In some embodiments, the initial model includes a second module, which includes N layers, wherein the q-th layer in the N layers is used for: The output features of layer q are obtained based on the input features of layer q, environmental information, and the interaction information between obstacles and the main vehicle; where q is a positive integer greater than or equal to 1 and less than or equal to N. If q is equal to 1, the input features of layer q are irrational features; if q is greater than 1, the input features of layer q are the output features of layer (q-1) in layer N; N is a positive integer greater than 1. Based on the output features of the q-th layer, predict at least one candidate trajectory.
[0079] In this embodiment of the disclosure, the existing irrational features are used as the initial input. When q is greater than 1, the q-th layer interacts with the output features of the (q-1)-th layer, the environmental information, and the interaction information between the obstacle and the main vehicle.
[0080] Optionally, the specific value of N can be determined based on the model capacity and actual needs.
[0081] According to the above embodiment, the second module is set as N layers, with the existing irrational features as the initial input. Each of the remaining layers is based on the output features of the previous layer, environmental information, and the interaction information between the obstacle and the main vehicle. Based on the existing irrational features, the interaction information between the main vehicle and the obstacle can be further integrated to extract the features of the obstacle's physical decision-making behavior and obtain the candidate trajectory of the obstacle based on the features of rational decision-making behavior.
[0082] In some embodiments, the initial model is trained based on the loss of each layer, including: The parameters of layers 1 to k in the initial model are optimized based on the loss of layer k in the initial model, where k is a positive integer greater than or equal to 1 and less than or equal to the sum of M and N.
[0083] In this embodiment of the disclosure, training is performed layer by layer starting from the first layer. After the first layer is trained, the second layer is trained, and so on, until the optimization of parameters of all layers is completed. During the training of each layer, only the parameters of the current layer and all previous layers are updated.
[0084] Optionally, after all layers have been trained, if the overall loss of the model meets the preset convergence condition, training can be stopped to obtain the target model. Alternatively, overall fine-tuning can be performed after each layer has been trained to further optimize all parameters of the model.
[0085] According to this embodiment, the parameters are optimized from front to back by training layer by layer. During the training of each layer, only the parameters of the current layer and all previous layers are updated, which ensures that each layer can fully learn the feature extraction capability of the corresponding layer. This avoids adjusting the parameters of the previous layer too early before the later layers are trained, thereby improving the stability of model training and the prediction effect of the final model.
[0086] To facilitate understanding of the above technical solutions, a specific application example is provided below. Figure 4 This is a schematic diagram of an application example. (For example...) Figure 4As shown, in this application example, the initial model includes layers 1, m, (m+1), and (m+n) (similar to the previous application example, intermediate layers are omitted). The first module includes layers 1 and m, and the second module includes layers (m+1) and (m+n). According to the method described above, obstacle information is used as input to layer 1. Layer 1 obtains irrational feature 1 based on interaction with the surrounding environment (including other obstacles and the map, but excluding interaction between obstacles and the main vehicle). Based on irrational feature 1, irrational candidate trajectory 1 is obtained. Based on the loss 1 between irrational candidate trajectory 1 and the actual trajectory, the parameters of layer 1 are updated. Irrational feature 1 is used as input to layer m. Layer m obtains irrational feature m based on interaction with the surrounding environment (including other obstacles and the map, but excluding interaction between obstacles and the main vehicle). Based on irrational feature m, irrational candidate trajectory m is obtained. Based on the loss m between irrational candidate trajectory m and the actual trajectory, the parameters of layers 1 and m are updated. Irrational feature m is used as input to layer (m+1). The (m+1)th layer obtains rational features m+1 based on interactions with the surrounding environment (including other obstacles and the map, as well as interactions between obstacles and the main vehicle). Based on rational features m+1, rational candidate trajectories m+1 are obtained. The parameters of layers 1, m, and m+1 are updated based on the loss m+1 between the irrational candidate trajectories m+1 and the actual trajectory. Rational features m+1 are used as input to the (m+n)th layer. The (m+n)th layer obtains rational features m+n based on interactions with the surrounding environment (including other obstacles and the map, as well as interactions between obstacles and the main vehicle). Based on rational features m+n, rational candidate trajectories m+n are obtained. The parameters of layers 1, m, m+1, and m+n are updated based on the loss m+n between the rational candidate trajectories m+n and the actual trajectory. By performing these parameter updates during training, the target model is obtained. In practical applications, a trajectory prediction model is obtained by retaining the feature processing structure in the target model and the trajectory prediction structure based on irrational features m and rational features m+n.
[0087] This disclosure provides an obstacle trajectory prediction device. Figure 5 This is a schematic block diagram of the device. Figure 5 As shown, the device includes: The first module 510 is used to obtain irrational features based on obstacle information and environmental information, and based on the irrational features, obtain X candidate trajectories and the initial probability of each candidate trajectory among the X candidate trajectories; where X is an integer greater than or equal to 1; The second module 520 is used to obtain rational features based on irrational features, environmental information, and interaction information between obstacles and the main vehicle, and based on rational features, to obtain Y candidate trajectories and the initial probability of each candidate trajectory among the Y candidate trajectories; where Y is an integer greater than or equal to 1. The trajectory determination module 530 is used to determine the target trajectory based on the initial probability of each candidate trajectory in the candidate trajectory set; wherein the candidate trajectory set includes X candidate trajectories and Y candidate trajectories.
[0088] In some embodiments, the first module 510 includes M layers, where the irrational feature is the output feature of the Mth layer in the M layers, and the i-th layer in the M layers is used for: Based on the interaction between the input features of the i-th layer and the environmental information, the output features of the i-th layer are obtained; where i is a positive integer greater than or equal to 1 and less than or equal to M. If i equals 1, the input features of the i-th layer are the information of obstacles; if i is greater than 1, the input features of the i-th layer are the output features of the (i-1)-th layer in the M layers; M is a positive integer greater than 1.
[0089] In some embodiments, the second module 520 includes N layers, where the rational feature is the output feature of the Nth layer, and the jth layer in the N layers is used for: The output features of layer j are obtained based on the input features of layer j, environmental information, and the interaction information between obstacles and the main vehicle. Here, j is a positive integer greater than or equal to 1 and less than or equal to N. If j equals 1, the input features of layer j are irrational features. If j is greater than 1, the input features of layer j are the output features of layer j-1 in layer N. N is a positive integer greater than 1.
[0090] In some embodiments, such as Figure 6 As shown, the trajectory determination module 530 includes: Probability update unit 531: used to update the initial probability of each candidate trajectory based on the distance between each candidate trajectory in the candidate trajectory set, so as to obtain the updated probability of each candidate trajectory; Trajectory determination unit 532: used to determine the target trajectory based on the update probability.
[0091] In some embodiments, such as Figure 7 As shown, the probability update unit 531 includes: Weight calculation component 5311: For each candidate trajectory to be processed in the candidate trajectory set, the weight corresponding to each candidate trajectory is calculated based on the distance between the candidate trajectory to be processed and each candidate trajectory in the candidate trajectory set. Probability update component 5312: used to perform a weighted summation of the initial probabilities of each candidate trajectory based on the weights corresponding to each candidate trajectory, to obtain the updated probability of the candidate trajectory to be processed.
[0092] In some embodiments, the weight calculation component 5311 includes: The distance between the candidate trajectory to be processed and each candidate trajectory in the candidate trajectory set is calculated using the Gaussian kernel function, and the corresponding weight of each candidate trajectory is obtained.
[0093] In some embodiments, the trajectory determination module 530 includes: Based on the pairwise distances between candidate trajectories in the candidate trajectory set, Z candidate trajectories are selected from the candidate trajectory set; Z is an integer greater than or equal to 1. The target trajectory is determined from the Z candidate trajectories based on the update probability of each candidate trajectory.
[0094] This disclosure also provides a training apparatus for a trajectory prediction model. Figure 8 This is a schematic block diagram of the device. Figure 8 As shown, the device includes: The loss calculation module 810 is used to calculate the loss of each layer based on the actual trajectory of the obstacle and the candidate trajectories predicted by each layer in the initial model. The model training module 820 is used to train the initial model based on the loss of each layer to obtain the target model; The model application module 830 is used to obtain a trajectory prediction model based on any embodiment of the present disclosure based on the target model.
[0095] In some embodiments, the initial model includes a first module, which includes M layers, wherein the p-th layer in the M layers is used for: Based on the interaction between the input features of the p-th layer and the environmental information, the output features of the p-th layer are obtained; where p is a positive integer greater than or equal to 1 and less than or equal to M. If p equals 1, the input features of the p-th layer are the information of obstacles; if p is greater than 1, the input features of the p-th layer are the output features of the (p-1)-th layer in the M layers; M is a positive integer greater than 1. Based on the output features of the p-th layer, predict at least one candidate trajectory.
[0096] In some embodiments, the initial model includes a second module, which includes N layers, wherein the q-th layer in the N layers is used for: The output features of layer q are obtained based on the input features of layer q, environmental information, and the interaction information between obstacles and the main vehicle; where q is a positive integer greater than or equal to 1 and less than or equal to N. If q is equal to 1, the input features of layer q are irrational features; if q is greater than 1, the input features of layer q are the output features of layer (q-1) in layer N; N is a positive integer greater than 1. Based on the output features of the q-th layer, predict at least one candidate trajectory.
[0097] In some embodiments, the model training module 820 includes: The parameters of layers 1 to k in the initial model are optimized based on the loss of layer k in the initial model, where k is a positive integer greater than or equal to 1 and less than or equal to the sum of M and N.
[0098] Figure 9 A schematic block diagram of an example electronic device 900 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0099] like Figure 9 As shown, device 900 includes a computing unit 901, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 902 or a computer program loaded from storage unit 908 into random access memory (RAM) 903. RAM 903 may also store various programs and data required for the operation of device 900. The computing unit 901, ROM 902, and RAM 903 are interconnected via bus 904. Input / output (I / O) interface 905 is also connected to bus 904.
[0100] Multiple components in device 900 are connected to I / O interface 905, including: input unit 906, such as keyboard, mouse, etc.; output unit 907, such as various types of monitors, speakers, etc.; storage unit 908, such as disk, optical disk, etc.; and communication unit 909, such as network card, modem, wireless transceiver, etc. Communication unit 909 allows device 900 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0101] The computing unit 901 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 901 performs the various methods and processes described above, such as obstacle trajectory prediction methods. For example, in some embodiments, the obstacle trajectory prediction method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 908. In some embodiments, part or all of the computer program may be loaded and / or installed on device 900 via ROM 902 and / or communication unit 909. When the computer program is loaded into RAM 903 and executed by the computing unit 901, one or more steps of the obstacle trajectory prediction method described above may be performed. Alternatively, in other embodiments, the computing unit 901 may be configured by any other suitable means (e.g., by means of firmware) to perform a trajectory prediction method or a training method for a trajectory prediction model.
[0102] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0103] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0104] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0105] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0106] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0107] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.
[0108] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0109] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A method for predicting the trajectory of an obstacle, comprising: In the first module of the trajectory prediction model, irrational features are obtained based on obstacle information and environmental information, and X candidate trajectories and the initial probability of each candidate trajectory are obtained based on the irrational features; where X is an integer greater than or equal to 1. In the second module of the trajectory prediction model, rational features are obtained based on the irrational features, the environmental information, and the interaction information between the obstacle and the main vehicle. Based on the rational features, Y candidate trajectories and the initial probability of each of the Y candidate trajectories are obtained; where Y is an integer greater than or equal to 1. The target trajectory is determined based on the initial probabilities of each candidate trajectory in the candidate trajectory set; wherein the candidate trajectory set includes the X candidate trajectories and the Y candidate trajectories.
2. The method according to claim 1, wherein the first module comprises M layers, the irrational feature is the output feature of the Mth layer in the M layers, and the i-th layer in the M layers is used for: Based on the interaction between the input features of the i-th layer and the environmental information, the output features of the i-th layer are obtained; where, i is a positive integer greater than or equal to 1 and less than or equal to M. If i equals 1, then the input feature of the i-th layer is the information of the obstacle. If i is greater than 1, then the input feature of the i-th layer is the output feature of the (i-1)-th layer in the M layers; M is a positive integer greater than 1.
3. The method according to claim 1 or 2, wherein the second module comprises N layers, the rational feature is the output feature of the Nth layer in the N layers, and the jth layer in the N layers is used for: The output features of the j-th layer are obtained based on the input features of the j-th layer, environmental information, and the interaction information between obstacles and the main vehicle; wherein, j is a positive integer greater than or equal to 1 and less than or equal to N. If j equals 1, then the input feature of the j-th layer is the irrational feature. If j is greater than 1, then the input feature of the j-th layer is the output feature of the (j-1)-th layer in the N layers; N is a positive integer greater than 1.
4. The method according to any one of claims 1-3, wherein determining the target trajectory based on the initial probability of each candidate trajectory in the candidate trajectory set comprises: Based on the distance between each candidate trajectory in the candidate trajectory set, the initial probability of each candidate trajectory is updated to obtain the updated probability of each candidate trajectory; The target trajectory is determined based on the updated probability.
5. The method according to claim 4, wherein updating the initial probability of each candidate trajectory based on the distance between each candidate trajectory in the candidate trajectory set to obtain the updated probability of each candidate trajectory includes: For each candidate trajectory to be processed in the candidate trajectory set, a weight corresponding to each candidate trajectory is calculated based on the distance between the candidate trajectory to be processed and each candidate trajectory in the candidate trajectory set. Based on the weights corresponding to each candidate trajectory, the initial probabilities of each candidate trajectory are weighted and summed to obtain the updated probability of the candidate trajectory to be processed.
6. The method according to claim 5, wherein calculating the weight corresponding to each candidate trajectory based on the distance between the candidate trajectory to be processed and each candidate trajectory in the candidate trajectory set includes: The distance between the candidate trajectory to be processed and each candidate trajectory in the candidate trajectory set is calculated using a Gaussian kernel function to obtain the corresponding weight of each candidate trajectory.
7. The method according to any one of claims 4-6, wherein determining the target trajectory based on the update probability comprises: Based on the pairwise distances between candidate trajectories in the candidate trajectory set, Z candidate trajectories are selected from the candidate trajectory set; Z is an integer greater than or equal to 1; The target trajectory is determined from the Z candidate trajectories based on the update probability of each candidate trajectory.
8. A training method for a trajectory prediction model, comprising: Based on the actual trajectory of the obstacle and the candidate trajectories predicted by each layer in the initial model, the loss of each layer is calculated; Based on the loss of each layer, the initial model is trained to obtain the target model; Based on the target model, a trajectory prediction model as described in any one of claims 1-7 is obtained.
9. The method according to claim 8, wherein the initial model comprises a first module, the first module comprising M layers, and the p-th layer in the M layers is used for: Based on the interaction between the input features of the p-th layer and the environmental information, the output features of the p-th layer are obtained; where, p is a positive integer greater than or equal to 1 and less than or equal to M. If p equals 1, then the input feature of the p-th layer is the information of the obstacle. If p is greater than 1, then the input feature of the p-th layer is the output feature of the (p-1)-th layer in the M layers; M is a positive integer greater than 1; Based on the output features of the p-th layer, at least one candidate trajectory is predicted.
10. The method according to claim 8 or 9, wherein the initial model comprises a second module, the second module comprising N layers, and the q-th layer of the N layers is used for: The output features of the q-th layer are obtained based on the input features of the q-th layer, environmental information, and the interaction information between obstacles and the main vehicle; where, q is a positive integer greater than or equal to 1 and less than or equal to N. If q equals 1, then the input feature of the qth layer is the irrational feature. If q is greater than 1, then the input feature of the q-th layer is the output feature of the (q-1)-th layer in the N layers; N is a positive integer greater than 1; Based on the output features of the q-th layer, at least one candidate trajectory is predicted.
11. The method according to any one of claims 8-10, wherein training the initial model based on the loss of each layer comprises: The parameters of layers 1 to k in the initial model are optimized based on the loss of layer k in the initial model, where k is a positive integer greater than or equal to 1 and less than or equal to the sum of M and N.
12. An obstacle trajectory prediction device, comprising: The first module is used to obtain irrational features based on obstacle information and environmental information, and based on the irrational features, obtain X candidate trajectories and the initial probability of each candidate trajectory among the X candidate trajectories; where X is an integer greater than or equal to 1; The second module is used to obtain rational features based on the irrational features, the environmental information, and the interaction information between the obstacle and the main vehicle, and to obtain Y candidate trajectories and the initial probability of each candidate trajectory based on the rational features; where Y is an integer greater than or equal to 1. The trajectory determination module is used to determine the target trajectory based on the initial probability of each candidate trajectory in the candidate trajectory set; wherein the candidate trajectory set includes the X candidate trajectories and the Y candidate trajectories.
13. A training device for a trajectory prediction model, comprising: The loss calculation module is used to calculate the loss of each layer based on the actual trajectory of the obstacle and the candidate trajectories predicted by each layer in the initial model. The model training module is used to train the initial model based on the loss of each layer to obtain the target model; The model application module is used to obtain a trajectory prediction model as described in any one of claims 1-7 based on the target model.
14. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-11.
15. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-11.
16. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-11.
17. An autonomous vehicle, including the electronic equipment as claimed in claim 14.