  Railway detection is critical for the automation of railway systems. Existing
models often prioritize either speed or accuracy, but achieving both remains a
challenge. To address the limitations of presetting anchor groups that struggle
with varying track proportions from different camera angles, an ultra-fast
adaptive track detection network is proposed in this paper. This network
comprises a backbone network and two specialized branches (Horizontal
Coordinate Locator and Perspective Identifier). The Perspective Identifier
selects the suitable anchor group from preset anchor groups, thereby
determining the row coordinates of the railway track. Subsequently, the
Horizontal Coordinate Locator provides row classification results based on
multiple preset anchor groups. Then, utilizing the results from the Perspective
Identifier, it generates the column coordinates of the railway track. This
network is evaluated on multiple datasets, with the lightweight version
achieving an F1 score of 98.68% on the SRail dataset and a detection rate of up
to 473 FPS. Compared to the SOTA, the proposed model is competitive in both
speed and accuracy. The dataset and code are available at
https://github.com/idnihai/UFATD
