wuhuikai/GP-GAN
wuhuikai/GP-GAN has 474 GitHub stars and 92 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-09 10:49 UTC. Last push 2020-03-27.
Official Chainer implementation of GP-GAN: Towards Realistic High-Resolution Image Blending (ACMMM 2019, oral)
Measured star growth
- in 24h
- 0
- in 7 days
- Update delayed
- in 15 days
- Update delayed
- in 1 month
- Update delayed
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalGP-GAN: Towards Realistic High-Resolution Image Blending (ACMMM 2019, oral)
[Project] [Paper] [Demo] [Related Work: A2RL (for Auto Image Cropping)] [Colab]
Official Chainer implementation of GP-GAN: Towards Realistic High-Resolution Image Blending
Overview
| source | destination | mask | composited | blended |
|---|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
The author's implementation of GP-GAN, the high-resolution image blending algorithm described in:
"GP-GAN: Towards Realistic High-Resolution Image Blending"
Huikai Wu, Shuai Zheng, Junge Zhang, Kaiqi Huang
Given a mask, our algorithm can blend the source image and the destination image, generating a high-resolution and realsitic blended image. Our algorithm is based on deep generative models Wasserstein GAN.
Contact: Hui-Kai Wu ([email protected])
Citation
@article{wu2017gp,
title = {GP-GAN: Towards Realistic High-Resolution Image Blending},
author = {Wu, Huikai and Zheng, Shuai and Zhang, Junge and Huang, Kaiqi},
journal = {ACMMM},
year = {2019}
}
Getting started
The code is tested with
python==3.5andchainer==6.3.0onUbuntu 16.04 LTS.Download the code from GitHub:
git clone https://github.com/wuhuikai/GP-GAN.git cd GP-GANInstall the requirements:
pip install -r requirements/test/requirements.txtDownload the pretrained model
blending_gan.npzorunsupervised_blending_gan.npzfrom Google Drive, and then put them in the foldermodels.Run the script for
blending_gan.npz:python run_gp_gan.py --src_image images/test_images/src.jpg --dst_image images/test_images/dst.jpg --mask_image images/test_images/mask.png --blended_image images/test_images/result.pngOr run the script for
unsupervised_blending_gan.npz:python run_gp_gan.py --src_image images/test_images/src.jpg --dst_image images/test_images/dst.jpg --mask_image images/test_images/mask.png --blended_image images/test_images/result.png --supervised FalseType
python run_gp_gan.py --helpfor a complete list of the arguments.
Train GP-GAN step by step
Train Blending GAN
Download Transient Attributes Dataset here.
Crop the images in each subfolder:
python crop_aligned_images.py --data_root [Path for imageAlignedLD in Transient Attributes Dataset]Train Blending GAN:
python train_blending_gan.py --data_root [Path for cropped aligned images of Transient Attributes Dataset]Training Curve

Visual Result
Training Set Validation Set 

Training Unsupervised Blending GAN
Requirements
pip install git+git://github.com/mila-udem/fuel.git@stableDownload the hdf5 dataset of outdoor natural images: ourdoor_64.hdf5 (1.4G), which contains 150K landscape images from MIT Places dataset.
Train unsupervised Blending GAN:
python train_wasserstein_gan.py --data_root [Path for outdoor_64.hdf5]Training Curve

Samples after training

Visual results
| Mask | Copy-and-Paste | Modified-Poisson | Multi-splines | Supervised GP-GAN | Unsupervised GP-GAN |
|---|---|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Explore related projects
affaan-m/ECC
The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
300,313 starsNousResearch/hermes-agent
The agent that grows with you
262,134 starsmultica-ai/andrej-karpathy-skills
A single CLAUDE.md file to improve Claude Code behavior, derived from Andrej Karpathy's observations on LLM coding pitfalls.
231,460 starsfirecrawl/firecrawl
Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥
200,178 stars

































