All models

TextureGAN

A GAN that synthesizes an image from a sketch plus user-placed color and texture patches.

Diffusion and generative · 134 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (30 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
8M
Operations
134
Framework
PyTorch
Recurrent
No
Published
CVPR 2018
Cited by
308 (as of 27 October 2026)
Authors
Wenqi Xian, Patsorn Sangkloy, Varun Agrawal and others
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m20951
Graph hash
dc46bbf6c1fdbab4d053d553a174045c18c969ebbada5f4eaa5b67137d188b05
Skeleton hash
87bc8c4c4fe586dce0fb33c532c493ee999cde90c3486cf01a475c338e1e49e6
Architecture hash
8214d6234c77e31a129d21017d7d78a1a7d2441fb50c9b3641925efc7ba93adc
Diagram SHA-256
63fb41ffad4492fcaf5451b9cdb81412c183d488ee748cd1600b376e68444b48
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

TextureGAN is a generative adversarial network conditioned on a sketch and on colors and textures. A user drags one or more example textures onto a sketched object, and the network applies those textures to the indicated object. The paper states that previous image synthesis methods could be controlled by sketch and color strokes and that it is the first to examine texture control.

To make the output consistent with the texture suggestions, the generative network is trained with a local texture loss in addition to adversarial and content loss. The code describes a two-stage training scheme. The first stage is ground-truth pre-training, in which the input edge and the texture patch are extracted from the same ground-truth image. The second stage is external texture fine-tuning, which takes texture patches from an external texture dataset and adds the local texture loss by training a separate texture discriminator.

The experiments use sketches generated from real images, with edges computed by the HED edge detector plus post-processing. Pre-trained models are provided for shoes, handbags and clothes. The paper is listed as a CVPR 2018 spotlight.

Key idea. TextureGAN lets a user place a texture patch on a sketch at arbitrary locations and scales, and trains the generator with a local texture loss to follow it.

  • texturegan
  • texture gan
  • sketch to image
  • sketch-based image synthesis
  • texture patch
  • texture control
  • image synthesis
  • conditional gan
  • local texture loss

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{xian2018texturegancontrollingdeepimage,
      title={TextureGAN: Controlling Deep Image Synthesis with Texture Patches}, 
      author={Wenqi Xian and Patsorn Sangkloy and Varun Agrawal and Amit Raj and Jingwan Lu and Chen Fang and Fisher Yu and James Hays},
      year={2018},
      eprint={1706.02823},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/1706.02823}, 
}