Code Monkey home page Code Monkey logo

keypatchgan's Introduction

[ECCV 2018] A PyTorch implementation of Patch2Image

  • This is a pytorch implementation of the paper, Unsupervised Holistic Image Generation from Key Local Patches. (ECCV 2018).
  • Paper link: https://arxiv.org/abs/1703.10730 (warning: this is an old version. Latest version will be uploaded!)

Concept

alt text

Examples (Faces)

alt text

Examples (Cars)

alt text

Requirements

  • Python2 or 3
  • Cuda device (NVIDIA GTX1080Ti was used to test)
  • Pytorch
  • Visdom (optional)
  • Tensorflow & Tensorboard (optional)

Preparing dataset

Download dataset via visiting celebA or CompCar.

For celebA dataset,

You can download using download.py

> python download.py celebA

For compcar dataset, Download the entire compcar dataset and some pre-processing is required.

You should crop the car patches using the ground truth bounding boxes, resize them 128*128 resolution, and save them in a single directory.

Key-patches

We already extracted key patches from celebA and compcar dataset and save the bounding box coordinates to celebA_allbbs.mat and compcar_allbbs.mat.

You can extract key patches and use your own key patches.

Training celebA dataset

Run

python main.py --db_name=celebA --dataset_root=YOUR_DATA_ROOT --is_crop=True --image_size=108 --output_size=64 --model_structure=unet

The resolution of output image can be enlarged by --output_size=128 or --output_size=256 options.

Training compcar dataset

Run

python main.py --db_name=compcar --dataset_root=YOUR_DATA_ROOT --is_crop=False --image_size=128 --output_size=128 --conv_dim=64  --batch_size=32 --model_structure=unet

Misc.

Modify the options output_size, conv_dim, or batch_size to prevent out-of-memory error.

keypatchgan's People

Contributors

hellbell avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

keypatchgan's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.