Awesome
PSOD (Point Saliency)
Weakly-Supervised Salient Object Detection Using Point Supervision
Prerequisites
- Python 3.6
- Pytorch 1.7
- TensorboardX
- OpenCV 3.4
- Numpy 1.19
Clone repository
git clone git@github.com:shuyonggao/PSOD.git
cd PSOD
Download P-DUTS Dataset
Download Relevant Necessary Data
Saliency map & Trained model
Train Model
-
Put the R50+ViT-B pretrained model into "models" folder.
-
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.
- 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
-
Set the path of the test data in
test.py
. -
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.
-
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