Coder Social home page Coder Social logo

getam's Introduction

GETAM

implementation for 'GETAM: Gradient-weighted Element-wise Transformer Attention Map for Weakly-supervised Semantic segmentation'

https://arxiv.org/abs/2112.02841

image

image

Step1: environment

  • clone this repo
git clone https://github.com/weixuansun/GETAM.git
  • optionally create a new environment python>=3.6
  • install requirements.txt
pip install -r requirements.txt

optional: build python extension module for DenseEnergyLoss:

cd wrapper/bilateralfilter
python setup.py install

More details please see here

Step2: dataset preparation

pascal voc

MS-COCO 2014

Step3: train and inference

end-to-end training on pascal:

Training requires one GPU, you can change GPU setting accordingly.

CUDA_VISIBLE_DEVICES=7 python train_from_init.py --session_name getam_001 -n 1 -g 1 -nr 0 --max_epoches 20  --lr 0.04 --cls_step 0.5 --seg_lr_scale 0.1 --sal_loss True --backbone vitb_hybrid --address 1234 --voc12_root {path to pascal voc dataset} --saliencypath {path to saliency maps}

Inference on pascal

python test.py --weights {path to weight} --val True --backbone {backbone}

end-to-end training on COCO

coming soon

Checkpoints

Dataset Backbone mIoU(val) mIoU(test) Checkpoint
PASCAL VOC 2012 Vit_hybrid 71.7 72.3 Download
PASCAL VOC 2012 Vit 68.1 68.8 Download
PASCAL VOC 2012 deit 66.0 68.9 Download
PASCAL VOC 2012 deit_distilled 70.7 71.1 Download
COCO vit_hybrid 36.4 Download

Acknowledgement

  • Thanks for the saliency object detection code provided by UCNet
  • Thanks for codebase provided by DPT
  • Thanks for codebase provided by RRM

if you use this paper, please kindly cite:

@article{sun2021getam,
  title={GETAM: Gradient-weighted Element-wise Transformer Attention Map for Weakly-supervised Semantic segmentation},
  author={Sun, Weixuan and Zhang, Jing and Liu, Zheyuan and Zhong, Yiran and Barnes, Nick},
  journal={arXiv preprint arXiv:2112.02841},
  year={2021}
}

getam's People

Contributors

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