EDTER: Edge Detection with Transformer
Mengyang Pu, Yaping Huang, Yuming Liu, Qingji Guan and Haibin Ling
CVPR 2022
Please refer to supplementary material for more results.
Download the augmented BSDS500 data (1.2GB) from here.
|-- data
|-- BSDS
|-- ImageSets
| |-- train_pair.txt
| |-- test.txt
| |-- pascal_train_pair.txt
|-- train
| |-- aug_data
| |-- aug_data_scale_0.5
| |-- aug_data_scale_1.5
| |-- aug_gt
| |-- aug_gt_scale_0.5
| |-- aug_gt_scale_1.5
|-- test
| |-- 2018.jpg
......
Download the augmented NYUD data (~11GB) from here(Code:t2ce).
|-- data
|-- NYUD
|-- ImageSets
| |-- hha-test.txt
| |-- hha-train.txt
| |-- image-test.txt
| |-- image-train.txt
|-- train
|-- GT
|-- GT_05
|-- GT_15
|-- HHA
|-- HHA_05
|-- HHA_15
|-- Images
|-- Images_05
|-- Images_15
|-- test
|-- HHA
| |-- img_5001.png
......
|-- Images
| |-- img_5001.png
......
If you are unable to download due to network reasons, you can download the inital weights from here and here.
./tools/dist_train.sh ${CONFIG_FILE} ${GPU_NUM}
# For example, train Stage I on BSDS500 dataset with 8 GPUs
./tools/dist_train.sh configs/bsds/EDTER_BIMLA_320x320_80k_bsds_bs_8.py 8
Change the '--global-model-path' in train_local.py.
./tools/dist_train_local.sh ${GLOBALCONFIG_FILE} ${CONFIG_FILE} ${GPU_NUM}
# For example, train Stage II on BSDS500 dataset with 8 GPUs
./tools/dist_train_local.sh configs/bsds/EDTER_BIMLA_320x320_80k_bsds_bs_8.py configs/bsds/EDTER_BIMLA_320x320_80k_bsds_local8x8_bs_8.py 8
Change the '--config', '--checkpoint', and '--tmpdir' in test.py.
python tools/test.py
Change the '--globalconfig', '--config', '--global-checkpoint', '--checkpoint', and '--tmpdir' in test_local.py.
Use the config file ending in _ms.py in configs/EDTER.
python tools/test_local.py
cd eval
run eval_bsds.m
Download the matfile(NYUD) from here(Code:25p8).
cd eval
run eval_nyud.m
If you want to compare your method with EDTER, you can download the precomputed results BSDS500 and NYUD(code:b941).
model | Pre-trained Model |
---|---|
EDTER-BSDS-VOC-StageI | BaiDuNetdisk (Code:l282) or Google Drive |
EDTER-BSDS-VOC-StageII | BaiDuNetdisk (Code:skjw) or Google Drive |
EDTER-NYUD-RGB-StageI | BaiDuNetdisk (Code:dwdi) |
EDTER-NYUD-RGB-StageII | BaiDuNetdisk (Code:s00u) |
EDTER-NYUD-HHA-StageI | BaiDuNetdisk (Code:ko2f) |
EDTER-NYUD-HHA-StageII | BaiDuNetdisk (Code:p7wu) |
- We thank the anonymous reviewers for valuable and inspiring comments and suggestions.
- Thanks to previous open-sourced repo:
SETR
MMsegmentation
@InProceedings{Pu_2022_CVPR,
author = {Pu, Mengyang and Huang, Yaping and Liu, Yuming and Guan, Qingji and Ling, Haibin},
title = {EDTER: Edge Detection With Transformer},
booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
month = {June},
year = {2022},
pages = {1402-1412}
}