Skip to content

Jinwon-Ko/SLCD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

[CVPR 2024] Semantic Line Combination Detector

Jinwon Ko, Dongkwon Jin and Chang-Su Kim.

overview

Official code for "Semantic Line Combination Detector" in CVPR 2024. [arxiv].

Dataset

Download the following datasets to root/Datasets/. SEL and SEL_Hard datasets are provided in here. NKL dataset is provided in here. A new dataset called CDL is available at here.

Installation

  1. Create conda environment:
$ conda create -n SLCD python=3.6 anaconda
$ conda activate SLCD
$ conda install pytorch==1.10.1 torchvision==0.11.2 torchaudio==0.10.1 cudatoolkit=11.3 -c pytorch -c conda-forge
$ pip install opencv-python==4.7.0.72
  1. If you want to get the performance of the paper, download our pre-trained model to root/Modeling/pretrained/ and preprocessed data for SEL, SEL_Hard, NKL(SL5K), and CDL datasets to root/Preprocessing/.

Directory structure

.                           # ROOT
├── Modeling                # directory for modeling
│   ├── Detector
|   |   ├── code            
│   ├── SLCD           
|   |   ├── code            
│   ├── pretrained          # pretrained model parameters      
|   |   ├── Detector      
|   |   |   ├── checkpoint_paper_SEL.pth
|   |   |   ├── checkpoint_paper_NKL.pth
|   |   |   ├── checkpoint_paper_CDL.pth
|   |   ├── SLCD   
|   |   |   ├── checkpoint_paper_SEL.pth
|   |   |   ├── checkpoint_paper_NKL.pth
|   |   |   ├── checkpoint_paper_CDL.pth    
├── Preprocessing           # directory for preprocessed data
│   ├── SEL                 
|   |   ├── pickle             
│   ├── SEL_Hard            
|   |   ├── pickle             
│   ├── NKL                 
|   |   ├── pickle             
│   ├── CDL                 
|   |   ├── pickle             
├── Datasets                # Dataset directory
│   ├── SEL                 # SEL dataset
|   |   ├── ICCV2017_JTLEE_gt_pri_lines_for_test
|   |   ├── ICCV2017_JTLEE_gtlines_all
|   |   ├── ICCV2017_JTLEE_images
|   |   ├── Readme.txt
|   |   ├── test_idx_1716.txt
|   |   ├── train_idx_1716.txt
│   ├── SEL_Hard            # SEL_Hard dataset
|   |   ├── data
|   |   ├── edge
|   |   ├── gtimgs
|   |   ├── images
|   |   ├── README
│   ├── NKL                 # NKL dataset
|   |   ├── Data
|   |   ├── train.txt
|   |   ├── val.txt  
│   ├── CDL                 # CDL dataset
|   |   ├── train           
|   |   |   ├── Images
|   |   |   ├── Labels
|   |   ├── test            
|   |   |   ├── Images
|   |   |   ├── Labels

Evaluation

Run with

cd root/Modeling/SLCD/code/
python main.py

Train

For training line detector

  1. Edit root/Modeling/Detector/code/config.py. Please modify run_mode to 'train'. Also, set the dataset you want to train (dataset_name).
  2. Run with
$ cd root/Modeling/Detector/code/
$ python main.py

For training SLCD

  1. Edit root/Modeling/SLCD/code/config.py. Please modify run_mode to 'train'. Also, set the dataset you want to train (dataset_name).
  2. Run with
$ cd root/Modeling/SLCD/code/
$ python main.py

Test

  1. If you want to evaluate a model you trained, edit root/Modeling/SLCD/code/config.py. Please modify run_mode to 'test'. Also, set the dataset you want to test (dataset_name).
  2. Run with
$ cd root/Modeling/SLCD/code/
$ python main.py

Results

  1. Semantic line detection

Semantic line detection

  1. Road lane detection

Road lane detection

  1. Composition-based image retrieval

Composition-based image retrieval

  1. Symmetric axis detection

Symmetric axis detection

  1. Vanishing point detection

Vanishing point detection

Semantic feature grouping results Semantic feature grouping

About

Semantic Line Combination Detector, CVPR 2024.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages