• Stars
    star
    492
  • Rank 86,499 (Top 2 %)
  • Language
    Python
  • Created about 6 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A generative model conditioned on shape and appearance.

A Variational U-Net for Conditional Appearance and Shape Generation

This repository contains training code for the CVPR 2018 spotlight

A Variational U-Net for Conditional Appearance and Shape Generation

The model learns to infer appearance from a single image and can synthesize images with that appearance in different poses.

teaser

Project page with more results

Notes

This is a slightly modified version of the code that was used to produce the results in the paper. The original code was cleaned up, the data dependent weight initialization was made compatible with tensorflow >= 1.3.0 and a unified model between the datasets is used. You can find the original code and checkpoints online (vunet/runs) but if you want to use them, please keep in mind that:

  • the original checkpoints are not compatible with the graphs defined in this repository. You must use the original code distributed with the checkpoints.
  • the original code uses a data dependent weight initialization scheme which does not work with tensorflow >= 1.3.0. You should use tensorflow==1.2.1.
  • the original code became a bit of a mess and we can no longer provide support for it.

Requirements

The code was developed with Python 3. Dependencies can be installed with

pip install -r requirements.txt

These requirements correspond to the dependency versions used to generate the pretrained models but other versions might work as well.

Training

Download and unpack the desired dataset. This results in a folder containing an index.p file. Either add a symbolic link named data pointing to the download directory or adjust the path to the index.p file in the <dataset>.yaml config file.

For convenience, you can also run

./download_data.sh <dataset> <store_dir>

which will perform the above steps automatically. <dataset> can be one of coco, deepfashion or market. To train the model, run

python main.py --config <dataset>.yaml

By default, images and checkpoints are saved to log/<current date>. To change the log directory and other options, see

python main.py -h

and the corresponding configuration file. To obtain images of optimal quality it is recommended to train for a second round with a loss based on Gram matrices. To do so run

python main.py --config <dataset>_retrain.yaml --retrain --checkpoint <path to checkpoint of first round>

Pretrained models

You can find pretrained models online (vunet/pretrained_checkpoints).

Other Datasets

To be able to train the model on your own dataset you must provide a pickled dictionary with the following keys:

  • joint_order: list indicating the order of joints.
  • imgs: list of paths to images (relative to pickle file).
  • train: list of booleans indicating if this image belongs to training split
  • joints: list of [0,1] normalized xy joint coordinates of shape (len(joint_jorder), 2). Use negative values for occluded joints.

joint_order should contain

'rankle', 'rknee', 'rhip', 'rshoulder', 'relbow', 'rwrist', 'reye', 'lankle', 'lknee', 'lhip', 'lshoulder', 'lelbow', 'lwrist', 'leye', 'cnose'

and images without valid values for rhip, rshoulder, lhip, lshoulder are ignored.

More Repositories

1

stable-diffusion

A latent text-to-image diffusion model
Jupyter Notebook
64,474
star
2

latent-diffusion

High-Resolution Image Synthesis with Latent Diffusion Models
Jupyter Notebook
10,221
star
3

taming-transformers

Taming Transformers for High-Resolution Image Synthesis
Jupyter Notebook
5,244
star
4

adaptive-style-transfer

source code for the ECCV18 paper A Style-Aware Content Loss for Real-time HD Style Transfer
Python
710
star
5

geometry-free-view-synthesis

Is a geometric model required to synthesize novel views from a single image?
Python
356
star
6

metric-learning-divide-and-conquer

Source code for the paper "Divide and Conquer the Embedding Space for Metric Learning", CVPR 2019
Python
262
star
7

net2net

Network-to-Network Translation with Conditional Invertible Neural Networks
Python
217
star
8

image2video-synthesis-using-cINNs

Implementation of Stochastic Image-to-Video Synthesis using cINNs.
Python
179
star
9

brushstroke-parameterized-style-transfer

TensorFlow implementation of our CVPR 2021 Paper "Rethinking Style Transfer: From Pixels to Parameterized Brushstrokes".
Python
158
star
10

imagebart

ImageBART: Bidirectional Context with Multinomial Diffusion for Autoregressive Image Synthesis
Python
119
star
11

iin

A Disentangling Invertible Interpretation Network
Python
119
star
12

content-style-disentangled-ST

Content and Style Disentanglement for Artistic Style Transfer [ICCV19]
89
star
13

retrieval-augmented-diffusion-models

Official codebase for the Paper โ€œRetrieval-Augmented Diffusion Modelsโ€
Jupyter Notebook
83
star
14

fm-boosting

Boosting Latent Diffusion with Flow Matching
73
star
15

unsupervised-disentangling

Python
54
star
16

invariances

Making Sense of CNNs: Interpreting Deep Representations & Their Invariances with Invertible Neural Networks
Python
52
star
17

interactive-image2video-synthesis

Python
51
star
18

ipoke

iPOKE: Poking a Still Image for Controlled Stochastic Video Synthesis
Python
46
star
19

unsupervised-part-segmentation

Code for GCPR 2020 Oral : "Unsupervised Part Discovery by Unsupervised Disentanglement"
Jupyter Notebook
30
star
20

instant-lora-composition

29
star
21

behavior-driven-video-synthesis

Python
26
star
22

content-targeted-style-transfer

Content Transformation Block For Image Style Transfer [CVPR19]
24
star
23

robust-disentangling

Unsupervised Robust Disentangling of Latent Characteristics for Image Synthesis
Python
23
star
24

metric-learning-divide-and-conquer-improved

Source code for the paper "Improving Deep Metric Learning byDivide and Conquer"
Python
19
star
25

cuneiform-sign-detection-dataset

Dataset provided with the article "Deep learning for cuneiform sign detection with weak supervision using transliteration alignment". It comprises image references, transliterations and sign annotations of clay tablets from the Neo-Assyrian epoch.
Jupyter Notebook
11
star
26

visual-search

Visual search interface
10
star
27

magnify-posture-deviations

Unsupervised Magnification of Posture Deviations Across Subjects
8
star
28

cuneiform-sign-detection-code

Code for the article "Deep learning of cuneiform sign detection with weak supervision using transliteration alignment"
Jupyter Notebook
7
star
29

hbugen2018

Towards Learning a Realistic Rendering of Human Behavior
7
star
30

zigma

7
star
31

cuneiform-sign-detection-webapp

Code for demo web application of the article "Deep learning for cuneiform sign detection with weak supervision using transliteration alignment".
JavaScript
4
star
32

Characterizing_Generalization_in_DML

Python
3
star
33

AutomaticBehaviorAnalysis_NatureComm

Source Code + Documentation of our Automatic Behavior Analysis Software
MATLAB
3
star
34

depth-fm

DepthFM: Fast Monocular Depth Estimation with Flow Matching
Jupyter Notebook
3
star
35

network-fusion

1
star