If obstacles on the railway tracks are not detected and cleared in a timely manner, it is highly likely to cause train derailment, collision, and significant casualties and economic losses. In this context, a multimodal fusion recognition method based on digital twin and visual drive is proposed. The data obtained by laser radar scanning and drone oblique photography technology is used to construct high-precision digital twin models of obstacle free backgrounds corresponding to entities along the railway line through 3D modeling technology. Combined with real-time image acquisition by visual sensors, virtual real scene matching is performed based on SSIM calculation to achieve accurate recognition of obstacles. The results indicate that the method has good static and dynamic obstacle recognition performance. It can adapt to complex railway environments, and the recognition results can provide valuable reference opinions for intelligent railway safety monitoring.