Advancing Railway Safety Through Long-Range Obstacle Detection