GithubHelp home page GithubHelp logo

freedreamer-crypto / pose-guided-image-generation Goto Github PK

View Code? Open in Web Editor NEW

This project forked from harshitbansal05/pose-guided-image-generation

0.0 1.0 0.0 219 KB

Implementation of NIPS 2017 paper "Pose Guided Person Image Generation" in PyTorch. https://arxiv.org/abs/1705.09368

Python 33.00% Jupyter Notebook 66.17% Shell 0.83%

pose-guided-image-generation's Introduction

Pose-Guided-Image-Generation

Implementation of NIPS 2017 paper Pose Guided Person Image Generation in PyTorch.

Pre-requisites

  • Python 3.6
  • PyTorch
  • Scikit-Image
  • Numpy
  • Scipy

Method

The key task is to transfer the appearance of a person from a given pose to a desired pose keeping the important appearance details intact. A two-stage approach is proposed to address the task, with each stage focusing on one aspect. The first stage comprises of pose integration generating a coarse image. The second stage utilizes a variant of a conditional DCGAN to fill in more appearance details.

Network Architecture

The generation framework utilizes the pose information explicitly and consists of two key stages: pose integration and image refinement. The architecture of generator is inspired by U-Net in both the key stages. In the first stage the condition image and the target pose are fed into the network to generate a coarse image of the person with the target pose. The second stage then refines the blurry result by training a generator in an adversarial way. The architecture of the generator and discriminator are shown below:

Network Architecture

Setup

  • Clone the source code:

git clone https://github.com/harshitbansal05/Pose-Guided-Image-Generation/
cd Pose-Guided-Image-Generation
  • Data preparation:

    1. Run ./run_prepare_data.sh. It creates a data folder in the root directory and downloads the data from the author's website. It extracts the zip file and processes the images for the train and test data sets.
    2. It creates the folders DF_train_data and DF_test_data in the directory data/DF_img_pose for the train and test data sets respectively printing the count of both the sets at the end.
  • Training Steps:

    1. Run ./run_train_model.sh. It performs the data preparation step if it has'nt been performed. The variable gpu in the script must be changed to -1 if the training process is carried on the cpu. Finally, training begins.
    2. It parses the namespaces present in the file config.py and those passed explicitly. It also imports the models from the file models.py and the PyTorch DataLoader from the file data_loader.py.
    3. It trains the two generators and the discriminator for a specified number of epochs, printing the loss at each step. It also periodically saves the generator and discriminator models in the directory specified by argument checkpoint_dir in the file config.py.

Datasets

The DeepFashion (In-shop Clothes Retrieval Benchmark) dataset consists of 52,712 in-shop clothes images, and 200,000 cross-pose/scale pairs. All images are in high-resolution of 256ร—256. The entire dataset can be downloaded from here.

Contributing

Suggestions and pull requests are actively welcome.

References

  1. Pose Guided Person Image Generation. (Paper)
  2. A TensorFlow Implementation of Pose Guided Person Image Generation. (Link)

pose-guided-image-generation's People

Contributors

harshitbansal05 avatar

Watchers

James Cloos avatar

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.