Max F-measure: 91.75% [Baseline: 90.61%]
- Download the pretrained model [Google Drive|BaiduYunPan].
- Try it now!
python predict.py --im_path [IM_PATH] \ --netG [MODEL_PATH] \ --thres [-1|161] \ --dgf --nn_dgf \ --post_sigmoid --cuda
-
Download and unzip the saliency dataset MSRA-B.
-
Make A-B (Image-Label) pairs.
python scripts/preprocess.py --data_path [MSRA-B_ROOT] --mode train python scripts/preprocess.py --data_path [MSRA-B_ROOT] --mode valid python scripts/preprocess.py --data_path [MSRA-B_ROOT] --mode test
-
Start training!
- WITHOUT Guided Filtering Layer
python main.py --dataroot [MSRA-B_ROOT]/AB --cuda --experiment [EXP_NAME]
- WITH Guided Filtering Layer
python main.py --dataroot [MSRA-B_ROOT]/AB --cuda --experiment [EXP_NAME] --dgf
- Finetune
python main.py --dataroot [MSRA-B_ROOT]/AB --cuda --experiment [EXP_NAME] --netG [MODEL_PATH] --dgf
-
Evaluation
python test.py --dataroot [MSRA-B_ROOT]/AB/test \ --netG [MODEL_PATH] --cuda \ --experiment [SAVE_FOLDER] \ --nn_dgf --post_sigmoid --dgf
-
Calculate metrics
- Install SalMetric.
git clone https://github.com/Andrew-Qibin/SalMetric && cd SalMetric mkdir build && cd build cmake .. && make
- Calculate !
cd [SAVE_FOLDER] [SalMetric_ROOT]/build/salmetric test.txt [WORKER_NUM]
- Install SalMetric.
A part of the code was adapted from DSS.