The source code for our paper "Semantic-shape Adaptive Feature Modulation for Semantic Image Synthesis" (CVPR 2022)
git clone https://github.com/cszy98/SAFM.git
cd SAFM
pip install -r requirements.txt
cd models/counter
python setup.py install
Follow the dataset preparation process in SPADE. Besides, we get the instance maps of ADE20K from instancesegmentation.
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]
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
This code borrows heavily from SPADE.
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}
}
Please send email to cszy98@gmail.com