Home

Awesome

BiSeNet

BiSeNet based on pytorch 0.4.1 and python 3.6

Dataset

Download CamVid dataset from Google Drive or Baidu Yun(6xw4).

Pretrained model

Download best_dice_loss_miou_0.655.pth in Google Drive or in Baidu Yun(6y3e) and put it in ./checkpoints

Demo

python demo.py

Result

OriginalGTPredict
<img src="https://github.com/ooooverflow/BiSeNet/blob/master/test.png" width="300" height="225" alt=""/><img src="https://github.com/ooooverflow/BiSeNet/blob/master/test_label.png" width="300" height="225" alt=""/><img src="https://github.com/ooooverflow/BiSeNet/blob/master/demo.png" width="300" height="225" alt=""/>

Train

python train.py

Use tensorboard to see the real-time loss and accuracy

loss on train

<img src="https://github.com/ooooverflow/BiSeNet/blob/master/tfboard_loss.jpg" width="1343" height="260" alt=""/>

pixel precision on val

<img src="https://github.com/ooooverflow/BiSeNet/blob/master/tfboard_precision.jpg" width="1343" height="260" alt=""/>

miou on val

<img src="https://github.com/ooooverflow/BiSeNet/blob/master/tfboard_miou.jpg" width="1343" height="260" alt=""/>

Test

python test.py

Result

classBicyclistBuildingCarPoleFencePedestrianRoadSidewalkSignSymbolSkyTreemiou
iou0.610.800.860.350.370.590.880.810.280.910.730.655

This time I train the model with dice loss and get better result than cross entropy loss. I did not use lots special training strategy, you can get much better result than this repo if using task-specific strategy.
This repo is mainly for proving the effeciveness of the model.
I also tried some simplified version of bisenet but it seems does not preform very well in CamVid dataset.

Speed

Method640×3201280×7201920×1080
Paper129.447.923
This Repo126.853.723.6

This shows the speed comparison between paper and my implementation.

  1. The number in first row means input image resolution.
  2. The number in second and third row means FPS.
  3. The result is based on resnet-18.

Future work

Reference