Home

Awesome

SCNN lane detection in Pytorch

SCNN is a segmentation-tasked lane detection algorithm, described in 'Spatial As Deep: Spatial CNN for Traffic Scene Understanding'. The official implementation is in lua torch.

This repository contains a re-implementation in Pytorch.

Updates

<br/>

Data preparation

CULane

The dataset is available in CULane. Please download and unzip the files in one folder, which later is represented as CULane_path. Then modify the path of CULane_path in config.py. Also, modify the path of CULane_path as data_dir in utils/lane_evaluation/CULane/Run.sh .

CULane_path
├── driver_100_30frame
├── driver_161_90frame
├── driver_182_30frame
├── driver_193_90frame
├── driver_23_30frame
├── driver_37_30frame
├── laneseg_label_w16
├── laneseg_label_w16_test
└── list

Note: absolute path is encouraged.

Tusimple

The dataset is available in here. Please download and unzip the files in one folder, which later is represented as Tusimple_path. Then modify the path of Tusimple_path in config.py.

Tusimple_path
├── clips
├── label_data_0313.json
├── label_data_0531.json
├── label_data_0601.json
└── test_label.json

Note: seg_label images and gt.txt, as in CULane dataset format, will be generated the first time Tusimple object is instantiated. It may take time.

<br/>

Trained Model Provided

AccuracyFPFN
94.16%0.07350.0825
CategoryF1-measure
Normal90.26
Crowded68.23
HLight61.84
Shadow61.16
No line43.44
Arrow84.64
Curve61.74
Crossroad2728 (FP measure)
Night65.32
<br/>

Demo Test

For single image demo test:

python demo_test.py   -i demo/demo.jpg 
                      -w experiments/vgg_SCNN_DULR_w9/vgg_SCNN_DULR_w9.pth 
                      [--visualize / -v]

<br/>

Train

  1. Specify an experiment directory, e.g. experiments/exp0.

  2. Modify the hyperparameters in experiments/exp0/cfg.json.

  3. Start training:

    python train.py --exp_dir ./experiments/exp0 [--resume/-r]
    
  4. Monitor on tensorboard:

    tensorboard --logdir='experiments/exp0'
    

Note

<br/>

Evaluation

Acknowledgement

This repos is build based on official implementation.