Our project is based-on MMSegmentation. Please follow the official MMsegmentation INSTALL.md with Python= 3.7, Pytorch= 1.12.1, CUDA=11.3 and CUDNN=8.3.2.
Download the augmented NYUD data from EDTER Repository:
-Download Train Data
-Download Test Data
Put these files into data/NYUD/.
Download the augmented BSDS data from here
Put these file into data/BSDS_RS/.
Extract these files via tar zxvf filename.tar.gz
Download the pretrained model from here
Put this file into preTrain/.
-Change delta as 0.4 and split (in Line 9) based on your GPU memory (split=1 requires huge memory about ~40 GB) in mmseg/model/losses/ap_loss.py
-Run the following command to start training.
python tools/train.py configs/APLoss/base_320_fullData.py --options model.pretrained=preTrain/swin_base_patch4_window12_384_22k.pth model.backbone.use_checkpoint=True --work-dir your_folder
-Change delta as 0.1 and split (in Line 9) based on your GPU memory (split=1 requires huge memory about ~40 GB) in mmseg/model/losses/ap_loss.py
-Run the following command to start training.
python tools/train.py configs/APLoss/base_320_fullData_bsds.py --options model.pretrained=preTrain/swin_base_patch4_window12_384_22k.pth model.backbone.use_checkpoint=True --work-dir your_folder
-Change delta as 0.1 and split (in Line 9) based on your GPU memory (split=1 requires huge memory about ~40 GB) in mmseg/model/losses/rank_loss.py and mmseg/model/losses/sort_loss.py
-Run the following command to start training.
python tools/train.py configs/RSLoss/base_320_fullData_bsds.py --options model.pretrained=preTrain/swin_base_patch4_window12_384_22k.pth model.backbone.use_checkpoint=True --work-dir your_folder
-Run the following command to start inference. python tools/test.py --config configs/APLoss/base_320_fullData_bsds.py --checkpoint your_folder/xxx.pth --tmpdir your_save_result_dir
Thanks to the previous open-sourced repo:
@InProceedings{cetinkaya2024ranked,
title={RankED: Addressing Imbalance and Uncertainty in Edge Detection Using Ranking-based Losses},
author={Bedrettin Cetinkaya and Sinan Kalkan and Emre Akbas},
year={2024},
booktitle={IEEE/CVF Conference on Computer Vision and Pattern Recognition},
url={https://ranked-cvpr24.github.io/}
}