To address the generalization issues of train forward obstacle detection methods based on video imagery under factors such as lighting conditions and target distances,a LiDAR-based detection method is proposed.Firstly,focusing on the accuracy loss in the VoxelNeXt voxelization process,dynamic voxelization technology is incorporated to optimize this process,thereby minimizing information loss.Secondly,considering the spatial distribution characteristics of the forward operating environment of the train,an L-shaped residual sparse convolution module is designed,so as to effectively capture the deep semantic features of point cloud data in the forward operating environment of the train.Finally,a cross dimensional automatic encoding module is proposed,which integrates with the backbone feature extraction network to form a cross-dimensional automatic encoding network,further enhancing the expression capability of the network's output features.The results show that the average accuracy of the proposed method can reach 72.38%,and the average recall rate can reach 76.59%,demonstrating significant performance advantages compared to other methods.This method fulfills the requirements for high-precision,long-distance,and fast detection of obstacles in the forward direction of trains,providing effective technical support for active train safety assurance.