← Open Source
YudeWang

SEAM

Self-supervised Equivariant Attention Mechanism for Weakly Supervised Semantic Segmentation, CVPR 2020 (Oral).

Model DevelopmentArchitecturePython
Open on GitHub
Momentum
+0stars in 24 hours0.0%
552
Stars
94
Forks
+0
This week
1
Contributors
Created 2020-03-19 · Updated 2026-07-04 · #17167 today
Top developers
YudeWang

YudeWang/SEAM is ranked 17,167 with 552 stars.

Same-category comparison

YudeWang/SEAM is ranked 17,167 among these 8 peers; uber-research/LaneGCN is ranked 17,164.

Same-category comparison
NameRankMetrics
facebookresearch/SymbolicMathematics17,158
Language:
Python
Stars:
553
Forks:
121
Description:
Deep Learning for Symbolic Mathematics.
lee-zq/3DUNet-Pytorch17,160
Language:
Python
Stars:
553
Forks:
107
Description:
3DUNet implemented with pytorch.
taki0112/Self-Attention-GAN-Tensorflow17,163
Language:
Python
Stars:
553
Forks:
147
Description:
Simple Tensorflow implementation of "Self-Attention Generative Adversarial Networks" (SAGAN).
uber-research/LaneGCN17,164
Language:
Python
Stars:
553
Forks:
132
Description:
[ECCV2020 Oral] Learning Lane Graph Representations for Motion Forecasting.
dclambert/Python-ELM17,170
Language:
Python
Stars:
552
Forks:
249
Description:
Extreme Learning Machine implementation in Python.
facebookresearch/banmo17,172
Language:
Python
Stars:
552
Forks:
61
Description:
BANMo Building Animatable 3D Neural Models from Many Casual Videos.
ryouchinsa/Rectlabel-support17,177
Language:
Jupyter Notebook
Stars:
552
Forks:
72
Description:
RectLabel is an offline image annotation tool for object detection and segmentation.
LatticeX-Foundation/Rosetta17,182
Language:
C++
Stars:
551
Forks:
107
Description:
A Privacy-Preserving Framework Based on TensorFlow.
Key parameters and specifications
Key parameters and specifications
ParameterValue
LanguagePython
CategoryModel Development
SubcategoryArchitecture
KeywordsComputer vision
Stars552
Forks94
Contributors1
Created date2020-03-19
Updated date2026-07-04
Stars in 1 day0
Stars in 7 days0
Rank17,167
Previous rank16,952
Rank change-215
7-day stars rank15,946
Previous 7-day stars rank15,953
7-day stars rank change7
Total stars rank17,911
Previous total stars rank17,885
Total stars rank change-26
CountryChina
README summary

SEAM The implementation of **Self-supervised Equivariant Attention Mechanism for Weakly Supervised Semantic Segmentaion**. You can also download the repository from Abstract Image-level weakly supervised semantic segmentation is a challenging problem that has been deeply studied in recentyears. Most of advanced solutions exploit class activation map (CAM). However, CAMs can hardly serve as the object mask due to the gap between full and weak supervisions. In this paper, we propose a self-supervised equivariant attention mechanism (SEAM) to discover

additional supervision and narrow the gap. Our method is based on the observation that equivariance is an implicit constraint in fully supervised semantic segmentation, whose pixel-level labels take the same spatial transformation as the input images during data augmentation. However, this constraint is lost on the CAMs trained by image-level supervision. Therefore, we propose consistency regularization on predicted CAMs from various transformed images to provide self-supervision for network learning. Moreover, we propose a pixel correlation module (PCM

), which exploits context appearance information and refines the prediction of current pixel by its similar neighbors, leading to further improvement on CAMs consistency. Extensive experiments on PASCAL VOC 2012 dataset demonstrate our method outperforms state-of-the-art methods using the same level of supervision. Thanks to the work of jiwoon-ahn, the code of this repository borrow heavly from his AffinityNet repository, and we follw the same pipeline to verify the effectiveness of our SEAM. 0 4 x

GPUs (12GB) Usage Installation Download the repository. **Download model weights from google drive or baidu cloud (with code 6nmo)**, including ImageNet pretrained models and our training results. Download PASCAL VOC 2012 devkit (follow instructions in It is suggested to make a soft link toward downloaded dataset. (Optional) The image-level labels have already been given in . If you want to regenerate it (which is unnecessary), please download the annotation of VOC 2012 SegmentationClassAug training set (containing 10582 images), which can

be download here and place them all as . We provide python mIoU evaluation script , or you can use official development kit. Here we suggest to show the curve of mIoU with different background score. Random walk step The random walk step keep the same with AffinityNet repository. Random walk step evaluation Pseudo labels retrain Pseudo label retrain on DeepLabv1. Citation Please cite our paper if the code is helpful to your research. Learning pixel-level semantic affinity with image-level

supervision for weakly supervised semantic segmentation. IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2018.

Frequently asked questions

How many stars and forks are recorded?

YudeWang/SEAM has 552 stars and 94 forks.

What is the repository rank?

YudeWang/SEAM is ranked 17,167.

What language and category are recorded?

YudeWang/SEAM has 552 stars, uses Python and belongs to Model Development.

Which repository is closest in rank?

YudeWang/SEAM is compared with uber-research/LaneGCN, ranked 17,164 with 553 stars.

README

SEAM

The implementation of Self-supervised Equivariant Attention Mechanism for Weakly Supervised Semantic Segmentaion.

You can also download the repository from https://gitee.com/hibercraft/SEAM

Abstract

Image-level weakly supervised semantic segmentation is a challenging problem that has been deeply studied in recentyears. Most of advanced solutions exploit class activation map (CAM). However, CAMs can hardly serve as the object mask due to the gap between full and weak supervisions. In this paper, we propose a self-supervised equivariant attention mechanism (SEAM) to discover additional supervision and narrow the gap. Our method is based on the observation that equivariance is an implicit constraint in fully supervised semantic segmentation, whose pixel-level labels take the same spatial transformation as the input images during data augmentation. However, this constraint is lost on the CAMs trained by image-level supervision. Therefore, we propose consistency regularization on predicted CAMs from various transformed images to provide self-supervision for network learning. Moreover, we propose a pixel correlation module (PCM), which exploits context appearance information and refines the prediction of current pixel by its similar neighbors, leading to further improvement on CAMs consistency. Extensive experiments on PASCAL VOC 2012 dataset demonstrate our method outperforms state-of-the-art methods using the same level of supervision.

Thanks to the work of jiwoon-ahn, the code of this repository borrow heavly from his AffinityNet repository, and we follw the same pipeline to verify the effectiveness of our SEAM.

Requirements

  • Python 3.6
  • pytorch 0.4.1, torchvision 0.2.1
  • CUDA 9.0
  • 4 x GPUs (12GB)

Usage

Installation

  • Download the repository.
git clone https://github.com/YudeWang/SEAM.git
  • Install python dependencies.
pip install -r requirements.txt
ln -s $your_dataset_path/VOCdevkit/VOC2012 VOC2012
  • (Optional) The image-level labels have already been given in voc12/cls_label.npy. If you want to regenerate it (which is unnecessary), please download the annotation of VOC 2012 SegmentationClassAug training set (containing 10582 images), which can be download here and place them all as VOC2012/SegmentationClassAug/xxxxxx.png. Then run the code
cd voc12
python make_cls_labels.py --voc12_root VOC2012

SEAM step

  1. SEAM training
python train_SEAM.py --voc12_root VOC2012 --weights $pretrained_model --session_name $your_session_name
  1. SEAM inference.
python infer_SEAM.py --weights $SEAM_weights --infer_list [voc12/val.txt | voc12/train.txt | voc12/train_aug.txt] --out_cam $your_cam_dir --out_crf $your_crf_dir
  1. SEAM step evaluation. We provide python mIoU evaluation script evaluation.py, or you can use official development kit. Here we suggest to show the curve of mIoU with different background score.
python evaluation.py --list VOC2012/ImageSets/Segmentation/[val.txt | train.txt] --predict_dir $your_cam_dir --gt_dir VOC2012/SegmentationClass --comment $your_comments --type npy --curve True

Random walk step

The random walk step keep the same with AffinityNet repository.

  1. Train AffinityNet.
python train_aff.py --weights $pretrained_model --voc12_root VOC2012 --la_crf_dir $your_crf_dir_4.0 --ha_crf_dir $your_crf_dir_24.0 --session_name $your_session_name
  1. Random walk propagation
python infer_aff.py --weights $aff_weights --infer_list [voc12/val.txt | voc12/train.txt] --cam_dir $your_cam_dir --voc12_root VOC2012 --out_rw $your_rw_dir
  1. Random walk step evaluation
python evaluation.py --list VOC2012/ImageSets/Segmentation/[val.txt | train.txt] --predict_dir $your_rw_dir --gt_dir VOC2012/SegmentationClass --comment $your_comments --type png

Pseudo labels retrain

Pseudo label retrain on DeepLabv1. Code is available here.

Citation

Please cite our paper if the code is helpful to your research.

@InProceedings{Wang_2020_CVPR_SEAM,
    author = {Yude Wang and Jie Zhang and Meina Kan and Shiguang Shan and Xilin Chen},
    title = {Self-supervised Equivariant Attention Mechanism for Weakly Supervised Semantic Segmentation},
    booktitle = {Proc. IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
    year = {2020}
}

Reference

[1] J. Ahn and S. Kwak. Learning pixel-level semantic affinity with image-level supervision for weakly supervised semantic segmentation. In Proc. IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2018.

Nearby in the ranking
Similar items