A study on basketball formation recognition based on the Swin Transformer algorithm
Abstract
Abstract Basketball tactical states span possession phase, defensive coverage, pressure intensity, and offensive organization, and therefore cannot be represented reliably by a single mutually exclusive label. A temporal-order-aware Swin Transformer is developed as a hierarchical multi-task framework for possession-level tactical recognition. Each clip is first classified as settled possession or transition. For settled possessions with observable defensive structures, a conditional branch distinguishes man-to-man from zone defense, while independent sigmoid heads identify high-pressure defense, weak-side overload, and high-post organization as potentially co-occurring attributes. Player-location heat maps, formation-density maps, and relative spatial-connectivity maps are encoded through multi-scale feature fusion, hierarchical window attention, and shifted-window propagation. Temporal position embeddings and learnable attention pooling preserve the order of 16 frames and emphasize tactical reorganization states. Annotator vote distributions are retained as soft targets, entropy-based weights reduce the influence of uncertain samples, and prototype regularization is restricted to the phase and coverage branches. Experiments use 9840 possession clips with a match-disjoint split of 6888/984/1968. On the test set, phase, conditional-coverage, and attribute Macro-F1 reach 0.944, 0.923, and 0.900, respectively; the exact-match ratio, Hamming loss, Brier score, and expected calibration error are 0.825, 0.058, 0.061, and 0.026. The auxiliary dominant-label Accuracy and Macro-F1 are 0.941 and 0.928. The structured model operates at 53.8 FPS with 58.4 G FLOPs, supporting accurate and efficient possession-level tactical analysis.
// Source
Authors: Zhixiang Jin
Institutions: Huazhong Agricultural University