This project implements rail-track detection using fast semantic segmentation for high-resolution images from bisenetv2 algorithm.
The author of bisenetv2 has not made the official implementation public so the implementation in this project might yeild different performance with the network introduced in the original paper.
This project trains bisenetv2 on a modified version of RailSem19 dataset with only three labels ("rail-raised", "rail-track", "background"). Please follow here if you want to download the original dataset.
conda env create --file environment.yml
conda activate rail_marking
Download trained weights from HERE.
python ./scripts/segmentation/test_one_image.py -snapshot [path/to/trained/weight] -image_path [path/to/image/path]
Sample segmentation result:
Download sample video from HERE.
The video was originally downloaded from this youtube channel.
python ./scripts/segmentation/test_video.py -snapshot [path/to/trained/weight] -video_path [path/to/video/path]
The test result can be seen as the gif image above. The frame rate could reach 40fps, faster than needed for an autonomous system.