AbstractTower cranes are very common at construction sites. As workers focus most of their attention on their own tasks, their ability to detect changes in the surrounding environment is reduced, and it is difficult to avoid the collision risk of heavy falling objects. To solve this problem, this study establishes a dynamic collision prewarning mechanism for tower crane construction based on vision and trajectory analysis by tracking and predicting the trajectories of loads and workers. Specifically, the proposed dynamic collision prewarning mechanism consists of three parts. First, Fairmultiple object tracking (FairMOT), a multiple object tracking algorithm based on deep learning, is used to detect and track workers and loads, and time-series data of their positions are obtained. Then a trajectory prediction model based on a transformer is applied to predict the trajectories of objects in the future (10 s) based on the historical data. Finally, safety rules are established by considering the locations, speeds, shapes, and sizes of loads and workers and their trajectories over a period of time. Risk levels for each worker are assigned to reduce the risk of collisions between workers and loads. Finally, the performance of the models is evaluated at a construction site. FairMOT has good tracking performance and can continuously track objects with short occlusion (2 s). Transformer-based trajectory prediction model has higher accuracy than other methods [e.g., social generative adversarial network (GAN), social long short-term memory (LSTM)]. The results of the study show that the proposed method can accurately predict the unsafe approach of workers and loads. The safety prewarning mechanism proposed in this study can help improve the safety of tower crane construction.