The traditional airport runway segmentation algorithm mainly faces the many problems. Firstly, the runway is mostly in a small target state, the foreground and background are unbalanced, making detection difficult. Secondly, in the gradual change of aircraft, the field of view of the airport runway changes greatly, and the background of the airport runway is complex, which makes it difficult for general algorithms to adapt.Therefore, an improved Segformer algorithm incorporating gradient cross pyramid is proposed for airport runway segmentation. Firstly, in the encoder section, the feedforward neural network and the overlapping block merging
section are optimized, with a focus on extracting effective runway information. Secondly, a gradient enhanced pyramid structure is proposed in the decoder section to adapt to airport runway segmentation under different fields of view. Finally, a feature alignment module and a weight feature fusion module based on attention mechanism are designed to focus on extracting runway edge information and capturing cross layer runway semantic relationships improving the quality of runway masks and enhancing runway segmentation accuracy. The algorithm is validated in a self built dataset, and its intersection to union ratio and accuracy reached 91. 44% and 97. 31% , respectively, which is superior to current mainstream algorithms satisfying the precise segmentation needs of airport runways under visible light conditions can provide pilots with sufficient runway information.