Content and style
StarGAN v2 gave one input many outputs (see StarGAN: one generator for many domains). A style code entered the generator through AdaIN, and a cycle carried the image back with its own style. Three requests are still open. Translate without a second pass through a cycle. Render a photo from a map of labels, "sky here, road there". Make a small image sharp at four times the size. This topic covers one answer to each, and starts with an older route to many outputs.
MUNIT (Huang et al., 2018) assumes that an image is made from two codes. The content code is shared by both domains: the spatial structure, such as a cat's pose and layout. The style code belongs to domain : the rendering, such as fur and colour. Here is content, not StarGAN's label.
Each domain gets a content encoder , a style encoder and a decoder . To translate from domain 1 to domain 2, keep the content and swap the decoder:
A new gives a new output. Taking from a real image of the second domain gives example-guided translation: the output copies the style of the example.
The shapes of the two codes do much of the separating. For a image, the content is a feature map computed with instance normalization. That normalization removes each channel's mean and spread, statistics that carry much of the style. The style is a vector of just 8 numbers from global average pooling, so it has no layout at all. The decoder injects it through AdaIN, as in StyleGAN: a style-based generator, with the scales and shifts computed from by a small MLP.