• Stars
    star
    492
  • Rank 89,476 (Top 2 %)
  • Language
    Python
  • Created over 6 years ago
  • Updated almost 4 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
67,358
star
2

latent-diffusion

High-Resolution Image Synthesis with Latent Diffusion Models
Jupyter Notebook
11,417
star
3

taming-transformers

Taming Transformers for High-Resolution Image Synthesis
Jupyter Notebook
5,679
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
373
star
6

depth-fm

DepthFM: Fast Monocular Depth Estimation with Flow Matching
Jupyter Notebook
282
star
7

metric-learning-divide-and-conquer

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

net2net

Network-to-Network Translation with Conditional Invertible Neural Networks
Python
221
star
9

zigma

A PyTorch implementation of the paper "ZigMa: A DiT-Style Mamba-based Diffusion Model"
Python
188
star
10

image2video-synthesis-using-cINNs

Implementation of Stochastic Image-to-Video Synthesis using cINNs.
Python
183
star
11

brushstroke-parameterized-style-transfer

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

fm-boosting

FMBoost: Boosting Latent Diffusion with Flow Matching (ECCV 2024 Oral)
122
star
13

imagebart

ImageBART: Bidirectional Context with Multinomial Diffusion for Autoregressive Image Synthesis
Python
122
star
14

iin

A Disentangling Invertible Interpretation Network
Python
122
star
15

retrieval-augmented-diffusion-models

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

attribute-control

Fine-Grained Subject-Specific Attribute Expression Control in T2I Models
Jupyter Notebook
101
star
17

content-style-disentangled-ST

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

unsupervised-disentangling

Python
54
star
19

invariances

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

interactive-image2video-synthesis

Python
51
star
21

ipoke

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

instant-lora-composition

31
star
23

unsupervised-part-segmentation

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

behavior-driven-video-synthesis

Python
27
star
25

content-targeted-style-transfer

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

robust-disentangling

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

metric-learning-divide-and-conquer-improved

Source code for the paper "Improving Deep Metric Learning byDivide and Conquer"
Python
20
star
28

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
29

visual-search

Visual search interface
10
star
30

magnify-posture-deviations

Unsupervised Magnification of Posture Deviations Across Subjects
9
star
31

cuneiform-sign-detection-code

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

hbugen2018

Towards Learning a Realistic Rendering of Human Behavior
7
star
33

AutomaticBehaviorAnalysis_NatureComm

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

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
35

Characterizing_Generalization_in_DML

Python
3
star
36

network-fusion

1
star