Skip to content

The official implementation of Few-Cost Salient Object Detection with Adversarial-Paced Learning

License

Notifications You must be signed in to change notification settings

hb-stone/FC-SOD

Repository files navigation

Few-Cost Salient Object Detection with Adversarial-Paced Learning

This repository is the official implementation of Few-Cost Salient Object Detection with Adversarial-Paced Learning.

Prerequisites

Requirements

Note: Please clone this project and install required pytorch first

To install requirements:

pip install -r requirements.txt

Backbone pre-trained model download

Please select one of the links below to download resnet101 pre-trained model on COCO

After downloading, put it into pretrained folder

Dataset download

Please select one of the links below to download related Saliency Object Detection Dataset

After downloading, unzip them into dataset folder

Train and test

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:

  1. 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.

  2. -gpu parameter is the GPU number that you use.(e.g. 0 0,1...)

  3. Evaluation code is embedded in this project.

    If you want to evaluate all dataset just specify the -eval_d All parameter.

  4. The evaluation result can be found in logs/ExperimentalNotes.md

Evaluation

  • 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

Our required structure

logs/
|-- <folder name>
|   `-- test
|       |-- SOD
|       |-- DUTS
|       `-- ...

Pre-trained Models

You can download our pretrained models here:

Results

Our model achieves the following performance on :

Dataset F-measure MAE
DUTS-TE 0.846 0.045

You can download our testing result here:

Contributing

If you have any questions, feel free to contact me via: ***@163.com().

Thanks list:

License

MIT

About

The official implementation of Few-Cost Salient Object Detection with Adversarial-Paced Learning

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages