Giter VIP home page Giter VIP logo

oc-cse's Introduction

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.

Introduction

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.

Citation

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}
}

Prerequisite

  • 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.

Usage

Training

  • Please specify the name of your experiment.
  • Training results are saved at ./experiment/[exp_name]
python train.py --name [exp_name] --model model_cse

Inference

python infer.py --name [exp_name] --model model_cse --load_epo [epoch_to_load] --vis --dict --crf --alphas 6 10 24

Evaluation for CAM result

python evaluation.py --name [exp_name] --task cam --dict_dir dict

Evaluation for CRF result (ex. alpha=6)

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!

oc-cse's People

Contributors

kaist-vilab avatar sangrockeg avatar yoon307 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.