Home

Awesome

generatePGT

Generating pseudo labels for MFNet.

This can also be served as a pipeline for all weakly supervised salient object detection (WSOD) methods. This code can generate class activation maps (CAMs) as well as two kinds of pseudo labels for WSOD. We sincerely hope that this will contribute to the community.

Prerequisites

environment

training dataset (ImageNet)

you can download ImageNet dataset from this official website.

inference dataset (DUTS-Train RGB image)

you can download DUTS-Train dataset from this official website. Only RGB images are used in our MFNet.

Training

Firstly,

you should set your training and inference dataset root in --cls_dataset_dir and --sal_dataset_dir in run_sample.py, respectively.

Secondly,

setting --train_cam_pass to True, and run run_sample.py.

inference

Firstly,

setting --make_cam_pass to True, and run run_sample.py. Here you can get ① CAMs and ② the pixel-wise pseudo labels in root ./result/.

Secondly,

setting your inference dataset root in img_root in run_slic.py, and run. Here you can get ③superpixel-wise pseudo labels in root ./result/.

Checkpoint & Maps

Checkpoint

link: https://pan.baidu.com/s/1G-YHYsfho-rWwMv6VMFT4g. code: oipw

Maps: CAMs & pseudo labels

link: https://pan.baidu.com/s/1nowIVfeauJs6w_k4waBqOA. code: oipw

Acknowledge

Thanks to pioneering helpful works: