Unlocking the Potential of Ordinary Classifier: Class-specific Adversarial Erasing Framework for Weakly Supervised Semantic Segmentation
This repository contains the official PyTorch implementation of the paper "Unlocking the Potential of Ordinary Classifier: Class-specific Adversarial Erasing Framework for Weakly Supervised Semantic Segmentation" paper (ICCV 2021) by Hyeokjun Kweon and Sung-Hoon Yoon.
We have developed a framework that extract the potential of the ordinary classifier with class-specific adversarial erasing framework for weakly supervised semantic segmentation. With image-level supervision only, we achieved new state-of-the-arts both on PASCAL VOC 2012 and MS-COCO.
If our code be useful for you, please consider citing our ICCV paper using the following BibTeX entry.
@inproceedings{kweon2021unlocking,
title={Unlocking the potential of ordinary classifier: Class-specific adversarial erasing framework for weakly supervised semantic segmentation},
author={Kweon, Hyeokjun and Yoon, Sung-Hoon and Kim, Hyeonseong and Park, Daehee and Yoon, Kuk-Jin},
booktitle={Proceedings of the IEEE/CVF International Conference on Computer Vision},
pages={6994--7003},
year={2021}
}
- Tested on Ubuntu 16.04, with Python 3.6, PyTorch 1.5.1, CUDA 10.1, both on both single and multi gpu.
- You can create conda environment with the provided yaml file.
conda env create -f od_cse.yaml
- The PASCAL VOC 2012 development kit: You need to specify place VOC2012 under ./data folder.
- ImageNet-pretrained weights for resnet38d are from [resnet_38d.params]. You need to place the weights as ./pretrained/resnet_38d.params.
- PASCAL-pretrained weights for resnet38d are from [od_cam.pth]. You need to place the weights as ./pretrained/od_cam.pth.
- Please specify the name of your experiment.
- Training results are saved at ./experiment/[exp_name]
python train.py --name [exp_name] --model model_cse
python infer.py --name [exp_name] --model model_cse --load_epo [epoch_to_load] --vis --dict --crf --alphas 6 10 24
python evaluation.py --name [exp_name] --task cam --dict_dir dict
python evaluation.py --name [exp_name] --task crf --dict_dir crf/06
we heavily borrow the work from AffinityNet repository. Thanks for the excellent codes!