shuyonggao / PSOD

Point Saliency
32 stars 9 forks source link

PSOD (Point Saliency)

Weakly-Supervised Salient Object Detection Using Point Supervision

image

Prerequisites

Clone repository

git clone git@github.com:shuyonggao/PSOD.git
cd PSOD

Download P-DUTS Dataset

VIZ

Download Relevant Necessary Data

Saliency map & Trained model

Train Model

  1. Put the R50+ViT-B pretrained model into "models" folder.

  2. Create the "dataset" folder in the main dirctory ("PSOD"). You should modify the create_link.sh file, then run it to create the soft link.

|----dataset
        |---edge
        |---gray
        |---image
        |---json
        |---train.txt
        |---filled_correct_img_gt  # Run "utills/EdgePoint2gt.py"
        |---filled_correct_mask  # Run "utills/EdgePoint2gt.py"

The Point supervison (json) and edge maps (edge) are employed to generate initial pseudo-labels (we provided the initial pseudo-labels and you can use it directly for training, or you can run python utils/EdgePoint2gt.py) to make initial pseudo-labels.

  1. We organize all steps into a shell file, you can run bash edgepoint2gt_train_nss_retrain.sh to complete the entire training process.

Test Model

  1. Set the path of the test data in test.py.

  2. Create "out_2nd" folder and put the trained model into "out_2nd" folder.

    Run python test.py

    The saliency maps will be saved in the "eval/maps" folder.

  3. We also provied the final saliency maps saliency maps: google.

Evaluation Code

The "Eval_SingleMeth_MulDataset.py" in "Saliency-Evaluation-numpy" folder is used to evaluate the saliency maps.

Citation

*If you find this work is helpful, please cite our paper:

@InProceedings{PSOD_aaai2022,
  title={Weakly-Supervised Salient Object Detection Using Point Supervision},
  author={Gao, Shuyong and Zhang, Wei and Wang, Yan and Guo, Qianyu and Zhang, Chenglong and He, Yangji and Zhang, Wenqiang},
  booktitle={AAAI},
  year={2022}
}

Acknowledgement

Weakly-Supervised Salient Object Detection via Scribble Annotations
[Structure-Consistent Weakly Supervised Salient Object Detection with Local Saliency Coherence]()
[Rethinking Semantic Segmentation from a Sequence-to-Sequence Perspective with Transformers]()