Uncertainty Estimation via Response Scaling for Pseudo-mask Noise Mitigation in Weakly-supervised Semantic Segmentation
This is a PyTorch implementation of Uncertainty Estimation via Response Scaling for Pseudo-mask Noise Mitigation in Weakly-supervised Semantic Segmentation (AAAI2022), based on mmsegmentation. Please refer the classification phase to PMM and refer the segmentation phase to WSSS_MMSeg.
In this papper, we mitigate the noise of pseudo-mask in segmentation phase via uncertainty from response scaling which simulates the behavior of noise. This technique is applicable to all weakly-supervised semantic segmentation methods based on fully-supervised semantic segmentation.
(Extract code of BaiduYun: mtci)
VOC12 OneDrive, BaiduYun COCO14 BaiduYun Pretrained weights OneDrive, BaiduYun
Pseudo-masks (if you want to skip cls phase), VOC12 OneDrive, COCO14 BaiduYun
Intermediate weights (if you want to skip first segmentation), VOC12 OneDrive, COCO14 OneDrive
Released weights, VOC12 OneDrive, COCO14 OneDrive
Once downloaded, execute the following commands to link the datasets and weights.
git clone https://github.com/XMed-Lab/URN.git
cd URN
mkdir data
cd data
ln -s [path to model files] models
ln -s [path to VOC12] voc12
ln -s [path to COCO14] coco2014
ln -s [path to your voc pseudo-mask] voc12/VOC2012/ppmg
ln -s [path to your coco pseudo-mask] coco2014/voc_format/ppmg
(If you don't run on server cluster based on srun, please modify the scripts "tools/dist_*.sh" refer to given scripts"tools/srun_*.sh")
cd URN
pip install mmcv==1.1.5
pip install -e .
(If you meet installation problems, please refer to mmsegmentation)
cd URN
bash tools/slurm_train.sh [cluster partition] python configs/pspnet_wsss/pspnet_res2net_20k_voc12aug_pus.py work_dirs/voc12_r2n_pus 8
bash tools/slurm_test.sh [cluster partition] python configs/pspnet_wsss/pspnet_res2net_20k_voc12aug_uncertainty.py [intermediate weights] 8
bash tools/slurm_train.sh [cluster partition] python configs/pspnet_wsss/pspnet_res2net_20k_voc12aug_urn.py work_dirs/voc12_r2n_urn 8
- We provide other backbones, including ResNet101, ScaleNet101, Wide-ResNet38
- Configs of COCO14 are provided in "configs/pspnet_wsss"
- It's suggested to use multiple cluster nodes to accelerate the genetation of pseudo-mask when use "tools/slurm_test.sh"
- Run "tools/run_pmm.sh" to get baselines of PMM
Please refer to: LICENSE.