This study aims to enhance the accuracy of rail‐lane extraction, which determines the rail lane and its background at a pixel‐wise level from an ego‐perspective image captured by the front camera of a train. For this purpose, cutting‐edge deep neural network (DNN)‐based semantic segmentation models, MANet and UNet++, were applied. In addition, a method that effectively enlarges the rail lane extracted by DNN‐based segmentation was proposed based on thoroughly analyzing the issues of DNN‐based segmentation. Our experiment, which employed 601 ego‐perspective images, demonstrated that the proposed method using the cutting‐edge DNN‐based segmentation method increased the balanced accuracy by 6.66% compared with the conventionally employed ERFNet in the literature. Further discussions and useful analyses are presented herein. © 2024 Institute of Electrical Engineer of Japan and Wiley Periodicals LLC.