All Projects β†’ InhwanBae β†’ Enet Sad_pytorch

InhwanBae / Enet Sad_pytorch

Licence: mit
Pytorch implementation of "Learning Lightweight Lane Detection CNNs by Self Attention Distillation (ICCV 2019)"

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Enet Sad pytorch

Randla Net
πŸ”₯RandLA-Net in Tensorflow (CVPR 2020, Oral)
Stars: ✭ 637 (+2023.33%)
Mutual labels:  semantic-segmentation
Labelme
Image Polygonal Annotation with Python (polygon, rectangle, circle, line, point and image-level flag annotation).
Stars: ✭ 7,742 (+25706.67%)
Mutual labels:  semantic-segmentation
Face Parsing.pytorch
Using modified BiSeNet for face parsing in PyTorch
Stars: ✭ 838 (+2693.33%)
Mutual labels:  semantic-segmentation
Pytorch segmentation
Semantic segmentation models, datasets and losses implemented in PyTorch.
Stars: ✭ 674 (+2146.67%)
Mutual labels:  semantic-segmentation
Pytorch 3dunet
3D U-Net model for volumetric semantic segmentation written in pytorch
Stars: ✭ 765 (+2450%)
Mutual labels:  semantic-segmentation
Deeplab Pytorch
PyTorch implementation of DeepLab v2 on COCO-Stuff / PASCAL VOC
Stars: ✭ 787 (+2523.33%)
Mutual labels:  semantic-segmentation
Semseg
εΈΈη”¨ηš„θ―­δΉ‰εˆ†ε‰²ζžΆζž„η»“ζž„η»ΌθΏ°δ»₯及代码倍现
Stars: ✭ 624 (+1980%)
Mutual labels:  semantic-segmentation
Ssc
Semantic Scene Completion
Stars: ✭ 29 (-3.33%)
Mutual labels:  semantic-segmentation
Deeplab v3
Tensorflow Implementation of the Semantic Segmentation DeepLab_V3 CNN
Stars: ✭ 768 (+2460%)
Mutual labels:  semantic-segmentation
Medicaldetectiontoolkit
The Medical Detection Toolkit contains 2D + 3D implementations of prevalent object detectors such as Mask R-CNN, Retina Net, Retina U-Net, as well as a training and inference framework focused on dealing with medical images.
Stars: ✭ 917 (+2956.67%)
Mutual labels:  semantic-segmentation
Pytorch Segmentation Toolbox
PyTorch Implementations for DeeplabV3 and PSPNet
Stars: ✭ 691 (+2203.33%)
Mutual labels:  semantic-segmentation
Gscnn
Gated-Shape CNN for Semantic Segmentation (ICCV 2019)
Stars: ✭ 720 (+2300%)
Mutual labels:  semantic-segmentation
Semantic Segmentation Editor
Web labeling tool for bitmap images and point clouds
Stars: ✭ 894 (+2880%)
Mutual labels:  semantic-segmentation
Adaptsegnet
Learning to Adapt Structured Output Space for Semantic Segmentation, CVPR 2018 (spotlight)
Stars: ✭ 654 (+2080%)
Mutual labels:  semantic-segmentation
Kaggle Carvana Image Masking Challenge
Top 15% ranked solution to the Carvana Image Masking Challenge on Kaggle
Stars: ✭ 13 (-56.67%)
Mutual labels:  semantic-segmentation
Mobile Semantic Segmentation
Real-Time Semantic Segmentation in Mobile device
Stars: ✭ 630 (+2000%)
Mutual labels:  semantic-segmentation
Sota Point Cloud
πŸ”₯Deep Learning for 3D Point Clouds (IEEE TPAMI, 2020)
Stars: ✭ 778 (+2493.33%)
Mutual labels:  semantic-segmentation
Tf Unet
tensorflow version of unet
Stars: ✭ 29 (-3.33%)
Mutual labels:  semantic-segmentation
3d Semantic Segmentation For Scene Parsing
A new approach for the real time 3D semantic segmentation based on feature abstract and deep learning method
Stars: ✭ 13 (-56.67%)
Mutual labels:  semantic-segmentation
Efficientdet Pytorch
A PyTorch impl of EfficientDet faithful to the original Google impl w/ ported weights
Stars: ✭ 906 (+2920%)
Mutual labels:  semantic-segmentation

ENet-SAD Pytorch

Pytorch implementation of "Learning Lightweight Lane Detection CNNs by Self Attention Distillation (ICCV 2019)"

drawing

Demo

Video

demo_gif

Demo trained with CULane dataset & tested with \driver_193_90frame\06051123_0635.MP4

gpu_runtime: 0.016253232955932617 FPS: 61

total_runtime: 0.017553091049194336 FPS: 56 on RTX 2080 TI

Comparison

Category 40k episode (before SAD) 60k episode (after SAD)
Image img1 img2
Lane img3 img4

Train

Requirements

  • pytorch
  • tensorflow (for tensorboard)
  • opencv

Datasets

  • CULane

    CULane dataset path (click to expand)
    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
    
  • TuSimple

    TuSimple dataset path (click to expand)
    Tusimple_path
    β”œβ”€ clips
    β”œβ”€ label_data_0313.json
    β”œβ”€ label_data_0531.json
    β”œβ”€ label_data_0601.json
    └─ test_label.json
    
  • BDD100K

    • Download modified labels and lists generated by author's method (train, val and list) and put the BDD100K dataset in the desired folder.
    BDD100K dataset path (click to expand)
    BDD100K_path
    β”œβ”€ images
    β”‚  β”œβ”€ 10k
    β”‚  └─ 100k
    β”œβ”€ list
    β”‚  β”œβ”€ test_gt_bdd.txt
    β”‚  β”œβ”€ train_gt_bdd.txt
    β”‚  └─ val_gt_bdd.txt
    β”œβ”€ train_label
    β”‚  └─ final_train
    └─ val_label
       └─ final_val
    

You need to change the correct dataset path in ./config.py

Dataset_Path = dict(
    CULane = "/workspace/CULANE_DATASET",
    Tusimple = "/workspace/TUSIMPLE_DATASET",
    BDD100K = "/workspace/BDD100K_DATASET",
    VPGNet = "/workspace/VPGNet_DATASET"
)

Training

First, change some hyperparameters in ./experiments/*/cfg.json

{
  "model": "enet_sad",               <- "scnn" or "enet_sad"
  "dataset": {
    "dataset_name": "CULane",        <- "CULane" or "Tusimple"
    "batch_size": 12,
    "resize_shape": [800, 288]       <- [800, 288] with CULane, [640, 368] with Tusimple, and [640, 360] with BDD100K
                                        This size is defined in the ENet-SAD paper, any size is fine if it is a multiple of 8.
  },
  ...
}

And then, start training with train.py

python train.py --exp_dir ./experiments/exp1
Optional

If you write your own code using ENet-SAD model, you can init ENet_SAD with some parameters.

class ENet_SAD(nn.Module):
    """
    Generate the ENet-SAD model.
    Keyword arguments:
    - input_size (tuple): Size of the input image to segment.
    - encoder_relu (bool, optional): When ``True`` ReLU is used as the
    activation function in the encoder blocks/layers; otherwise, PReLU
    is used. Default: False.
    - decoder_relu (bool, optional): When ``True`` ReLU is used as the
    activation function in the decoder blocks/layers; otherwise, PReLU
    is used. Default: True.
    - sad (bool, optional): When ``True``, SAD is added to model;
    otherwise, SAD is removed. Default: False.
    - weight_share (bool, optional): When ``True``, weights are shared
    with encoder blocks (E2, E3 and E4); otherwise, encoders will each
    learn with their own weights. Default: True.
    """

Performance

Will continue to be updated.

  • TuSimple dataset

    Category ENet-SAD Pytorch ENet-SAD paper
    Accuracy 93.93% 96.64%
    FP 0.2279 0.0602
    FN 0.0838 0.0205
  • CULane dataset (F1-measure, FP measure for crossroad)

    Category ENet-SAD Pytorch ENet-SAD paper
    Normal 86.8 90.1
    Crowded 65.3 68.8
    Night 54.0 66.0
    No line 37.3 41.6
    Shadow 52.4 65.9
    Arrow 78.2 84.0
    Dazzle light 51.0 60.2
    Curve 58.6 65.7
    Crossroad 2278 1995
    Total 65.5 70.8
  • BDD100K

    Category ENet-SAD Pytorch ENet-SAD paper
    Accuracy 37.09% 36.56%
    IoU 15.14 16.02

Acknowledgement

This repo is built upon official implementation ENet-SAD and based on PyTorch-ENet, SCNN_Pytorch.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].