This repository is the official implementation of Few-Cost Salient Object Detection with Adversarial-Paced Learning.
Note: Please clone this project and install required pytorch first
To install requirements:
pip install -r requirements.txt
Please select one of the links below to download resnet101 pre-trained model on COCO
- BaiduDisk: (code: 1234)
- GoogleDisk
After downloading, put it into pretrained
folder
Please select one of the links below to download related Saliency Object Detection Dataset
- BaiduDisk: (code: 9ib7)
- GoogleDisk
After downloading, unzip them into dataset
folder
To train the model in the paper, run this command:
python run.py -pretrain ./pretrained/resnet101COCO-41f33a49.pth -d DUTS -save <saved dir name in logs> -gpu <you GPU number> -part 0.1 -idx ./pretrained/train_id.pkl -l_semi_sal 1 -l_pred_adv 0.01 -l_semi_adv 0.007 -proc FC-SOD
Note:
This command will automatically test and evaluate the trained model.
If you need not to evaluate, you just specify the
-disable_eval
parameter.If you need not to test, you just specify the
-disable_test
parameter.
-gpu
parameter is the GPU number that you use.(e.g.0
0,1
...)Evaluation code is embedded in this project.
If you want to evaluate all dataset just specify the
-eval_d All
parameter.The evaluation result can be found in
logs/ExperimentalNotes.md
- To evaluate other trained model (eg,our pre-trained model) on the Saliency Object Detection Dataset, run:
python run.py -pretrain ./pretrained/resnet101COCO-41f33a49.pth -d DUTS -save <saved dir name in logs> -gpu <you GPU number> -part 0.1 -idx ./pretrained/train_id.pkl -l_semi_sal 1 -l_pred_adv 0.01 -l_semi_adv 0.007 -proc AdvSaliency -disable_train -eval_d ALL -test_model <your trained model path>
- If you want test generated results(eg,our pre-trained result) using this project, you need to adapt your folder names to our required structure and put it into
logs
directory. Suppose your directory name is "FCSOD", you can specify-save FCSOD
and-disable_train -diabale_test
, then run this command to evaluate
python run.py -pretrain ./pretrained/resnet101COCO-41f33a49.pth -d DUTS -save FCSOD -gpu <you GPU number> -part 0.1 -idx ./pretrained/train_id.pkl -l_semi_sal 1 -l_pred_adv 0.01 -l_semi_adv 0.007 -proc AdvSaliency -disable_train -diabale_test -eval_d ALL
logs/
|-- <folder name>
| `-- test
| |-- SOD
| |-- DUTS
| `-- ...
You can download our pretrained models here:
- BaiduDisk: (code: gtie)
- GoogleDisk
Our model achieves the following performance on :
Dataset | F-measure | MAE |
---|---|---|
DUTS-TE | 0.846 | 0.045 |
You can download our testing result here:
- BaiduDisk: (code: 0011)
- GoogleDisk
If you have any questions, feel free to contact me via: ***@163.com
().
Thanks list: