Coder Social home page Coder Social logo

irvingao / ganet Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wolfwjs/ganet

0.0 0.0 0.0 77.8 MB

A Keypoint-based Global Association Network for Lane Detection. Accepted by CVPR 2022

Shell 0.14% C++ 75.52% Python 16.81% C 5.04% Objective-C 0.13% Cuda 2.31% Makefile 0.05%

ganet's Introduction

GANet

This repo is the PyTorch implementation for our paper:

A Keypoint-based Global Association Network for Lane Detection. Accepted by CVPR 2022.

img.png In this paper, we propose a Global Association Network (GANet) to formulate the lane detection problem from a new perspective, where each keypoint is directly regressed to the starting point of the lane line instead of point-by-point extension. Concretely, the association of keypoints to their belonged lane line is conducted by predicting their offsets to the corresponding starting points of lanes globally without dependence on each other, which could be done in parallel to greatly improve efficiency. In addition, we further propose a Lane-aware Feature Aggregator (LFA), which adaptively captures the local correlations between adjacent keypoints to supplement local information to the global association.

Installation

  1. Create a conda virtual environment and activate it.
    conda create -n ganet python=3.7 -y
    conda activate ganet
    conda install pytorch==1.6.0 torchvision==0.7.0 cudatoolkit=10.1 -c pytorch -y
    pip install -r requirements/build.txt
  2. Clone this repository and enter it:
    git clone https://github.com/Wolfwjs/GANet.git
    cd GANet
    python setup.py develop

Dataset

Download datasets and put it into [data-path] folder. And edit the data_root in the config file to your dataset path.

CULane

[CULane website] [Download]

The directory structure should be like follows:

[data-path]/culane
├── driver_23_30frame
├── driver_37_30frame
├── driver_100_30frame
├── driver_161_90frame
├── driver_182_30frame
├── driver_193_90frame
└── list
    └── test_split
    |   ├── test0_normal.txt
    |   ├── test1_crowd.txt
    |   ├── test2_hlight.txt
    |   ├── test3_shadow.txt
    |   ├── test4_noline.txt
    |   ├── test5_arrow.txt
    |   ├── test6_curve.txt
    |   ├── test7_cross.txt
    |   └── test8_night.txt
    └── train.txt
    └── test.txt
    └── val.txt

TuSimple

[TuSimple website] [Download]

The directory structure should be like follows:

[data-path]/tusimple
├── clips
├── label_data_0313.json
├── label_data_0531.json
├── label_data_0601.json
├── label_data_0601.json
├── test_label.json
└── test_baseline.json

Evaluation

Here are our GANet models (released on April 24th, 2022):

CULane

Version Backbone FPS F1 Weights
Small ResNet18 153 78.79 ganet_culane_resnet18.pth
Medium ResNet-34 127 79.39 ganet_culane_resnet34.pth
Large ResNet-101 63 79.63 ganet_culane_resnet101.pth

TuSimple

Version Backbone FPS F1 Weights
Small ResNet18 153 97.71 ganet_tusimple_resnet18.pth
Medium ResNet-34 127 97.68 ganet_tusimple_resnet34.pth
Large ResNet-101 33 97.45 ganet_tusimple_resnet101.pth

To evalute the model, download the corresponding weights file into the [CHECKPOINT] directory and run the following commands.

# For example, model = ganet-small 
sh slurm_test.sh [PARTITION] [JOB_NAME] tusimple final_exp_res18_s8 [CHECKPOINT]
sh dist_test.sh tusimple final_exp_res18_s8 [CHECKPOINT]

We use the official evaluation tools of CULane and TuSimple to evaluate the results. And we include them in tools directory which may be helpful for you.

Training

# For example, model = ganet-small 
sh slurm_train.sh [PARTITION] [JOB_NAME] tusimple final_exp_res18_s8 ./output
sh dist_train.sh tusimple final_exp_res18_s8 ./output

Citation

If you find this repo useful for your research, please cite

@inproceedings{ganet-cvpr2022,
  author    = {Jinsheng Wang, Yinchao Ma, Shaofei Huang, Tianrui Hui, Fei Wang, Chen Qian, Tianzhu Zhang},
  title     = {A Keypoint-based Global Association Network for Lane Detection},
  booktitle = {CVPR},
  year      = {2022},
}

Contact

For questions about our paper or code, please contact Jinsheng Wang or Yinchao Ma

ganet's People

Contributors

wolfwjs avatar spyflying avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.