Skip to content

NUST-Machine-Intelligence-Laboratory/MDBA

Repository files navigation

Multi-Granularity Denoising and Bidirectional Alignment for Weakly Supervised Semantic Segmentation

Introduction

This is the source code for our paper Multi-Granularity Denoising and Bidirectional Alignment for Weakly Supervised Semantic Segmentation

Network Architecture

The architecture of our proposed approach is as follows network

Installation

  • Install PyTorch 1.6 with Python 3 and CUDA 10.1

  • Clone this repo

git clone https://github.com/NUST-Machine-Intelligence-Laboratory/MDBA.git

Download PASCAL VOC 2012

  • Download PASCAL VOC 2012 and put it into ./dataset to obtain ./dataset/VOC2012

Testing

  • Download our trained model VOC_69.5.pth and put it in the ./model folder
python evaluate.py --restore-from ./model/VOC_69.5.pth

python evaluate_crf.py 

Training

  • Download the COCO pre-trained parameters and put it in the ./model folder

  • Download saliency-generated pseudo labels sal2gt and put it into ./dataset to obtain ./dataset/sal2gt.

  • Train the segmentation model

python train.py  

Testing two-step result

cd step2

python main.py test --config-path configs/voc12.yaml --model-path data/models/checkpoint_72.0.pth

python main.py crf --config-path configs/voc12.yaml

Two-step training

  • Generate pseudo labels from the segmentation network trained by our proposed approach.
python gen_label.py --restore-from ./model/VOC_69.5.pth

python gen_label_crf.py 

python gen_label_mining.py
python main.py train --config-path configs/voc12.yaml

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages