Skip to content

Code of PyTorch implementation of 'Weakly Supervised Semantic Segmentation via Box-driven Masking and Filling Rate Shifting'

Notifications You must be signed in to change notification settings

developfeng/BCM

Repository files navigation

BCM and Filling Rate Shifting


  • Weakly Supervised Semantic Segmentation via Box-driven Masking and Filling Rate Shifting
  • Code Version 1.0
  • E-mail: [email protected]

i. Overview ii. Copying iii. Use

i. OVERVIEW

This code implements our paper [PDF]:

Weakly Supervised Semantic Segmentation via Box-driven Masking and Filling Rate Shifting. IEEE TPAMI, 2023.

and reimplement the Conference Version with PyTorch [PDF]:

Box-driven Class-wise Region Masking and Filling Rate Guided Loss for Weakly Supervised Semantic Segmentation. CVPR, 2019.

If you find this work is helpful for your research, please cite our papers.

ii. COPYING

We share this code only for research use. We neither warrant correctness nor take any responsibility for the consequences of using this code. If you find any problem or inappropriate content in this code, feel free to contact us ([email protected]).

iii. USE

This code should work on PyTorch and based on the widely used DeepLabV2 implementation.

(1) Data Preparation.

Download the VOC2012 dataset following the guideline from DeepLabV2 and the init pseudo seeds M&G+ from SDS. Our pretrained models and the final generated pseudo labels can be download from GoogleDrive.

(2) Model Training.

BCM Training

python main.py train --config-path configs/voc12_bcm.yaml

FR-Shifting Training

python main.py train --config-path configs/voc12_fr.yaml

Testing

python main.py test --config-path configs/voc12_fr.yaml --model-path data/models/voc12/FR/checkpoint_final.pth

Generating Pseudo Labels for Semantic Segmenation

python main.py test --config-path configs/voc12_fr.yaml --model-path data/models/voc12/FR/checkpoint_final.pth --gen-training True
python main.py gen --config-path configs/voc12_fr.yaml

Generating Pseudo Labels for Instance Segmenation

python make_coco_inst_mask_label.py

Related links

About

Code of PyTorch implementation of 'Weakly Supervised Semantic Segmentation via Box-driven Masking and Filling Rate Shifting'

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages