This is the official implementation of our work Slim Scissors: Segmenting Thin Object from Synthetic Background.
Slim Scissors: Segmenting Thin Object from Synthetic Background,
Kunyang Han, Jun Hao Liew, Jiashi Feng, Huawei Tian, Yao Zhao*, Yunchao Wei
In: European Conference on Computer Vision (ECCV), 2022 [pdf] [supplementary]
-
Clone the repo:
git clone https://github.com/KunyangHan/SlimScissors cd SlimScissors -
Install dependencies.
pip install -r requirements.txt -
Download the dataset by running the script inside
data/:cd data/ chmod +x download_dataset.sh ./download_dataset.sh cd ..
Data folder expects the following structure:
data βββ COIFT β βββ images β βββ list β βββ masks βββ HRSOD β βββ images β βββ list β βββ masks βββ ThinObject5K β βββ images β βββ list β βββ masks βββ thin_regions βββ coift β βββ eval_mask β βββ gt_thin βββ hrsod β βββ eval_mask β βββ gt_thin βββ thinobject5k_test βββ eval_mask βββ gt_thin -
Download pretrain weights
wget https://download.pytorch.org/models/resnet18-5c106cde.pth
We provide the scripts for training our models on ThinObject-5K dataset. You can start training with the following commands:
python train.py --data_root path_to_data_folderTo evaluate, simply run following commands:
python evaluation.py --ckpt path_to_pth_file --data_root path_to_data_folder --dataset target_datasetFor example
python evaluation.py --ckpt ckpt/checkpoint_epoch_29.pth --data_root ../data --dataset HRSODThis project is licensed under a Creative Commons Attribution-NonCommercial 4.0 International Public License.
If you use this code, please consider citing our paper:
@InProceedings{han2022slim,
title = {Slim Scissors: Segmenting Thin Object from Synthetic Background},
author = {Han, Kunyang and Liew, Jun Hao and Feng, Jiashi and Tian, Huawei and Zhao, Yao and Wei, Yunchao},
booktitle = {eccv},
year = {2022},
}