Skip to content

[Pattern Recognition] Official Pytorch Code for CoBra 🐍 : Complementary Branch Fusing Class and Semantic Knowledge for Robust Weakly Supervised Semantic Segmentation

Notifications You must be signed in to change notification settings

MICV-yonsei/Cobra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

CoBra 🐍 : Complementary Branch Fusing Class and Semantic Knowledge for Robust Weakly Supervised Semantic Segmentation

[Project Page]

voc

We propose Complementary Branch (CoBra), a novel dual branch framework consisting of two distinct architectures which provide valuable complementary knowledge of class (from CNN) and semantic (from vision transformer) to each branch. In particular, we learn Class-Aware Projection (CAP) for the CNN branch and Semantic-Aware Projection (SAP) for the vision transformer branch to explicitly fuse their complementary knowledge and facilitate a new type of extra patch-level supervision. Extensive experiments qualitatively and quantitatively investigate how CNN and vision transformer complement each other on the PASCAL VOC 2012 dataset showing a state-of-the-art WSSS result.

πŸ“– Contents

πŸ”§ Prerequisite

pip install -r requirements.txt

πŸ’» Usage

Step1:

  • Run the run.sh script for training Cobra, it makes Seed and elements for making better Mask.

  • We train IRNet to generate mask to refine Seed.

  • change title and pascal_dataset_path in run shell script.

bash run.sh

πŸ‹οΈ Pretrained Weight

CAK Branch ep19_cnn_checkpoint.pth link
SAK Branch ep19_tran_checkpoint.pth link

Step2: For the Segmentation part, we used DeepLabV2 with resnet101 backbone and MiT-B2 backbone.

🐍 About CoBra

Results

  • Qualitative Results on Pascal VOC 2012 dataset. voc

  • Qualitative Results on MS-COCO 2014 dataset. coco

πŸ“œ Acknowledgement

This repository has been developed based on the IRNet repository. Thanks for the good work!

About

[Pattern Recognition] Official Pytorch Code for CoBra 🐍 : Complementary Branch Fusing Class and Semantic Knowledge for Robust Weakly Supervised Semantic Segmentation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published