Chainer implementation of our novel CNN-based image editing method that allows the user to change the semantic information of an image over a user-specified region:
Collaging on Internal Representations: An Intuitive Approach for Semantic Transfiguration
Ryohei Suzuki1,2*, Masanori Koyama2, Takeru Miyato2, Taizan Yonetsuji2
1The University of Tokyo,
2Preferred Networks, Inc.,
*This work was done when the author was at Preferred Networks, Inc.
arXiv:1811.10153
Image editing results using spatial class-translation:
Spatially-modulated image generation results:
Image editing results using semantic transplantation:
Left: example image editing result with spatial class-translation + semantic transplantation.
Right: image generation with spatial
class (horizontal) + semantic (vertical) morphing.
- Python >= 3.6
pip install -r requirements.txt
If you want to use pretrained models for the image generation, please download the model from link and set the snapshot argument to the path to the downloaded pretrained model file (.npz).
- 256x256 ImageNet Dog and Cat Images
# launch server on localhost:5000
python demo_spatial_translation.py \
--config ./configs/sn_projection_dog_and_cat_256_scbn.yml \
--gen_model ./sn_projection_dog_and_cat_256/ResNetGenerator_450000.npz \
--gpu 0
# launch server on localhost:5000
python demo_feature_blending.py \
--config ./configs/sn_projection_dog_and_cat_256_scbn.yml \
--gen_model ./sn_projection_dog_and_cat_256/ResNetGenerator_450000.npz \
--gpu 0
Please go to this link.