Pedestrian trajectory prediction is an important part of crowd motion analysis.Improving the efficiency of pedestrian trajectory prediction is conductive to understanding pedestrian movement patterns,and provides effective reference for anomaly detection of pedestrian.The future trajectory of target pedestrians is not only affected by the historical trajectory of themselves,but also affected by the spatial position distribution and motion trajectory of neighbor pedestrians.In this paper,the main research contents of pedestrian trajectory prediction are as follows:(1)A pedestrian trajectory prediction model TF-GCN combining ST-GCN and improved Transformer model is constructed.Taking advantage of the high efficiency and small amount of data of ST-GCN in processing graph structure data,the spatial features of pedestrians are extracted,and the feature map of pedestrian spatial interaction is output.This feature map is integrated with pedestrian trajectory,and then the combination features are input to the improved Transformer model for extracting the temporal and spatial feature combination of pedestrians,which reduces the loss of information and improves the accuracy of pedestrian trajectory feature extraction.(2)The time-affinity attention mechanism is proposed.The time-affinity attention mechanism can be applied to Transformer structure,considering the influence of different input frames on future trajectories.It takes the different affinity of different historical frames for future trajectories into account in the trajectory prediction process,which makes the model more suitable for realistic trajectory prediction scenarios,and improves the prediction effect of Transformer model applied to trajectory prediction problems.(3)An improved position encoding method for Transformer model is proposed.This paper proposes a position encoding method combining absolute position encoding and relative position encoding,which makes full use of the relative position information of pedestrians,and considering the different interrelation between pedestrians at different distances.Combined with the spatial interaction feature map extracted from ST-GCN,the spatial interaction feature information between target pedestrians is comprehensively analyzed to improve the accuracy of trajectory prediction.Using two foreign public datasets,ETH and UCY,and based on the two public indexes of ADE and FDE,this paper compares with the classic pedestrian trajectory prediction models and the latest pedestrian trajectory prediction models,which fully proves the necessity and effectiveness of the improvement.The experiments show that the trajectory prediction effect of the model proposed in this paper is superior to many recent trajectory prediction models. |