Home

Awesome

Semantic-shape Adaptive Feature Modulation for Semantic Image Synthesis

Introduction

The source code for our paper "Semantic-shape Adaptive Feature Modulation for Semantic Image Synthesis" (CVPR 2022)

fullcmpv1

Our Framework

overview

Quick Start

Installation

git clone https://github.com/cszy98/SAFM.git
cd SAFM
pip install -r requirements.txt
cd models/counter
python setup.py install

Data Preparation

Follow the dataset preparation process in SPADE. Besides, we get the instance maps of ADE20K from instancesegmentation.

Testing and Evaluate

The pretrained models can be downloaded from GoogleDrive.

python test.py --name [experiment_name] --dataset_mode [dataset] --gpu_ids 0 --batchSize 2 --dataroot [path to dataroot] --which_epoch best --instance_root [path to instance maps]

Training

python train.py --name [experiment_name] --dataset_mode [dataset] --batchSize 4 --dataroot [path to dataroot] --instance_root [path to instance maps] --save_epoch_freq 5 --niter 100 --niter_decay 100

Acknowledgments

This code borrows heavily from SPADE.

Citation

If you find our work useful in your research or publication, please cite:

@article{lv2022semantic,
  title={Semantic-shape Adaptive Feature Modulation for Semantic Image Synthesis},
  author={Lv, Zhengyao and Li, Xiaoming and Niu, Zhenxing and Cao, Bing and Zuo, Wangmeng},
  booktitle = {IEEE Conference on Computer Vision and Pattern Recognition},
  year = {2022}
}

Contact

Please send email to cszy98@gmail.com