https://github.com/mingtaoguo/singan_pytorch
Reimplementing the paper "SinGAN: Learning a Generative Model from a Single Natural Image"
https://github.com/mingtaoguo/singan_pytorch
harmonization pytorch-implementation singan
Last synced: 10 months ago
JSON representation
Reimplementing the paper "SinGAN: Learning a Generative Model from a Single Natural Image"
- Host: GitHub
- URL: https://github.com/mingtaoguo/singan_pytorch
- Owner: MingtaoGuo
- License: mit
- Created: 2020-05-13T07:09:02.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-05-26T04:11:05.000Z (about 3 years ago)
- Last Synced: 2025-04-05T13:11:18.584Z (about 1 year ago)
- Topics: harmonization, pytorch-implementation, singan
- Language: Python
- Size: 16.3 MB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SinGAN_Pytorch
Reimplementing the paper "SinGAN: Learning a Generative Model from a Single Natural Image"
# Requirements
1. python3
2. torch1.1.0
3. pillow
4. numpy
5. imageio
# Training phase what you need to do
1. Modifying the image path in "train.py"
2. Executing the file "train.py"
# Testing phase what you can do
1. Random sample from single image, "random_sample_from_single.py"
2. Harmonization, "harmonization.py"
3. Creating an animation, "animation.py"
4. Converting painting to image, "harmonization.py"
# Results
|Raw img|random sampled|animation|
|-|-|-|
||||
||||
||||
### Harmonization
|Raw img|n=1|n=2|n=3|n=4|
|-|-|-|-|-|
||||||
|Raw img|n=5|n=6|n=7|n=8|
|-|-|-|-|-|
||||||
# Problems
The results of this code still have some problems. Sometimes, it generates the distortion image. I really don't know how to fix it.

# Acknowledgement
Thanks for the [source code](https://github.com/tamarott/SinGAN) of SinGAN, it's very helpful!
# Author
Mingtao Guo
Xi'an University of technology
# Reference
[1]. Shaham, Tamar Rott, Tali Dekel, and Tomer Michaeli. "Singan: Learning a generative model from a single natural image." Proceedings of the IEEE International Conference on Computer Vision. 2019.