Skip to content

Files

Latest commit

Sep 26, 2019
314069a · Sep 26, 2019

History

History

Saliency_DSS

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Mar 12, 2018
Mar 12, 2018
Mar 12, 2018
Mar 12, 2018
Sep 25, 2019
Sep 26, 2019
Sep 25, 2019
Sep 25, 2019

README.md

Saliency Detection with DSS

Max F-measure: 91.75% [Baseline: 90.61%]

Try on an image!

  1. Download the pretrained model [Google Drive|BaiduYunPan].
  2. Try it now!
    python predict.py --im_path [IM_PATH] \
                      --netG [MODEL_PATH] \
                      --thres [-1|161] \
                      --dgf --nn_dgf \
                      --post_sigmoid --cuda

Training on MSRA-B

  1. Download and unzip the saliency dataset MSRA-B.

  2. 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
  3. 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
  4. Evaluation

    python test.py --dataroot [MSRA-B_ROOT]/AB/test \
                   --netG [MODEL_PATH] --cuda \
                   --experiment [SAVE_FOLDER] \
                   --nn_dgf --post_sigmoid --dgf
  5. Calculate metrics

    1. Install SalMetric.
      git clone https://github.com/Andrew-Qibin/SalMetric && cd SalMetric 
      mkdir build && cd build
      cmake .. && make
    2. Calculate !
      cd [SAVE_FOLDER]
      [SalMetric_ROOT]/build/salmetric test.txt [WORKER_NUM]

Acknowledgement

A part of the code was adapted from DSS.