Skip to content

[IMAVIS 2021] MetaPix: Domain Transfer for Semantic Segmentation by Meta Pixel Weighting

Notifications You must be signed in to change notification settings

yiren-jian/MetaPix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MetaPix

This repo covers the implementation of MetaPix: Domain transfer for semantic segmentation by meta pixel weighting published on Image and Vision Computing, 2021.

@article{Jian2021MetaPix,
  author = {Jian, Yiren and Gao, Chongyang},
  title = {MetaPix: Domain Transfer for Semantic Segmentation by Meta Pixel Weighting},
  journal = {Image and Vision Computing},
  pages = {104334},
  year = {2021},
  issn = {0262-8856}
}

Preparation

Pre-requisites

  • Python 3.7
  • Pytorch >= 1.5
  • CUDA 9.2 or higher

Installation

  1. Clone the repo:
$ git clone https://github.com/yiren-jian/MetaPix
$ cd MetaPix
  1. Install this repository and the dependencies using pip:
$ pip install -e <root_dir>
  1. Optional. To uninstall this package, run:
$ pip uninstall MetaPix

Running the code

Preparation

$ cd <root_dir>/meta_domain_transfer/model
$ python fcn8s_v2.py

This will create a directory pretrained_models with/and a FCN model pretrained on ImageNet.

Training

To train MetaPixelWeight:

$ cd <root_dir>/meta_domain_transfer/scripts
$ python train.py --cfg ./configs/direct_joint.yml
$ cd <root_dir>/meta_domain_transfer/scripts
$ python train.py --cfg ./configs/train_W_with_FCN.yml
$ cd <root_dir>/meta_domain_transfer/scripts
$ python train.py --cfg ./configs/train_FCN_with_W.yml

Testing

To test MetaPixelWeight:

$ cd <root_dir>/meta_domain_transfer/scripts
$ python test.py --cfg ./configs/train_FCN_with_W.yml

Baselines

$ cd <root_dir>/meta_domain_transfer/scripts
$ python train.py --cfg ./configs/direct_joint.yml
$ python test.py --cfg ./configs/direct_joint.yml
$ cd <root_dir>/meta_domain_transfer/scripts
$ python train.py --cfg ./configs/target_only.yml
$ python test.py --cfg ./configs/target_only.yml

Acknowledgements

This codebase is heavily borrowed from ADVENT.

About

[IMAVIS 2021] MetaPix: Domain Transfer for Semantic Segmentation by Meta Pixel Weighting

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages