ERC-SegFormer: A Railway Scene Semantic Segmentation Network Integrating Edge Perception and Track Structure Constraints
摘要
Semantic segmentation is a crucial task for enabling intelligent environmental perception in Internet of Things (IoT) devices. However, existing methods often suffer from fracture and discontinuity issues when segmenting small-scale and slender objects such as railway tracks and poles. To address these challenges, we propose a segmentation network constrained by edge and rail structures, termed ERC-SegFormer (Edge and Rail-Constrained SegFormer), with the aim of enhancing the intelligent decision-making capabilities of railway IoT systems. First, the network adds a U-Net style hybrid decoding branch based on SegFormer. Second, an edge mapping network based on differential refinement is designed to perform edge detection tasks in parallel. Subsequently, a rail constraint network using edge map prediction as attention activation is added, and directional convolution is used to structurally optimize the continuity and integrity of the slender structure in the initial segmentation results. Finally, the entire network is optimized using a composite loss function based on manually balanced weights. Compared with the baseline network, ERC-SegFormer improves mIoU by 2.09% and 5.59% on both datasets, and achieves the best performance on the Railsem19 dataset. In addition, the intuitive comparison of segmentation results reflects the improvement of the network's ability to segment slender structures. Overall, the effectiveness of the method has been verified.