Mwongozo wa AI unaoonekana

Usanifu wa Picha ya SPADE Semantiki

SPADE, short for spatially-adaptive normalization, is a neural network layer from NVIDIA researchers (CVPR 2019) that turns a semantic map, a picture where each region is labeled sky, tree or water, into a photorealistic image.

Sikiliza mwongozo huuInaonyeshwa na AI · ~8 min

Katika ukurasa huudk 9 kusoma
  1. Muhtasari
  2. Mambo muhimu ya kuchukua
  3. Dive ya kina
  4. Turning a three-region sketch into a landscape with a pretrained SPADE model
  5. Utekelezaji wa Ulimwengu Halisi
  6. Mustakabali wa Usanifu wa Taswira ya Semantiki ya SPADE
  7. Kuiweka katika vitendo
  8. Vyanzo na kusoma zaidi
  9. Endelea Kuchunguza
  10. Maswali yanayoulizwa mara kwa mara

Muhtasari

It feeds the map into every normalization layer so layout information is not washed out, and it powered NVIDIA's GauGAN painting demo and later the NVIDIA Canvas app.

Mambo muhimu ya kuchukua

  1. SPADE is a normalization layer whose scale and shift vary per pixel according to the input segmentation map, so layout information reaches every generator layer.
  2. The 2019 SPADE paper showed that ordinary normalization can erase semantic information because segmentation maps contain large uniform regions.
  3. On COCO-Stuff, SPADE reached 37.4 mIoU and 22.6 FID, against 14.6 mIoU and 111.5 FID for the earlier pix2pixHD model.
  4. NVIDIA's GauGAN demo, announced in March 2019, used SPADE to turn painted label maps into landscapes, and its technology later shipped in NVIDIA Canvas.
  5. Newer methods such as OASIS and ControlNet improved layout-controlled generation, with ControlNet adding segmentation control to diffusion models in 2023.

Dive ya kina

Semantic image synthesis is the task of producing a realistic photograph from a semantic segmentation map. A segmentation map is an image in which every pixel holds a class label rather than a color: this region is sky, that region is mountain, the strip at the bottom is water. It is the reverse of semantic segmentation, where a network labels each pixel of a photo. The appeal is control. A user decides exactly what goes where, and the model fills in texture, lighting, reflections and detail. SPADE, introduced by Taesung Park, Ming-Yu Liu, Ting-Chun Wang and Jun-Yan Zhu in "Semantic Image Synthesis with Spatially-Adaptive Normalization" (arXiv March 2019, oral presentation at CVPR 2019), made this task work much better by changing one layer.

The problem SPADE fixed is subtle. Earlier generators such as pix2pixHD fed the segmentation map into the first layer of a convolutional network and then passed it through stacks of convolution, normalization and activation layers. Normalization layers, such as batch or instance normalization, rescale each channel's activations to zero mean and unit variance so training stays stable. The paper points out that a segmentation map consists mostly of large uniform regions. If a whole region carries one label, convolution produces a uniform output there, and instance normalization turns that uniform output into zeros, regardless of which label it was. The layout information is, in the authors' words, washed away. Their Figure 3 shows pix2pixHD producing identical images from two different single-label maps.

SPADE's mechanism works in four steps. First, activations in a layer are normalized per channel, like batch normalization, but without a learned scale and shift. Second, the segmentation map is resized to that layer's resolution. Third, a small two-layer convolutional network reads the resized map and outputs two tensors, gamma and beta, that have the same height and width as the activations, so they vary from pixel to pixel. Fourth, the normalized activations are multiplied by gamma and added to beta. Because the scale and shift depend on the label at each location, the network re-injects layout information at every layer instead of only at the input. The generator is a stack of residual blocks with SPADE layers and upsampling, starting from a small random vector, and the encoder half used in earlier generators is removed, making the network lighter.

Training uses a generative adversarial network (GAN): a generator makes images and a discriminator tries to tell them from real photos. SPADE reused the multi-scale discriminator and loss terms of pix2pixHD, swapping its least-squares adversarial loss for a hinge loss, and kept a perceptual loss that compares deep features of generated and real images. An optional image encoder turns a reference photo into a style vector, forming a variational autoencoder (VAE) with the generator. At test time that encoder lets a user pick a style image, such as a sunset photo, while the segmentation map controls the layout. The experiments ran on an Nvidia DGX-1 with eight 32 GB V100 GPUs.

The results were a clear step forward. On COCO-Stuff, with 118,000 training images and 182 classes, SPADE reached a mean intersection over union (mIoU, a measure of how well a segmentation network can recover the input layout from the generated image) of 37.4, against 23.7 for the cascaded refinement network (CRN) and 14.6 for pix2pixHD, and a Frechet Inception Distance (FID, lower means more realistic) of 22.6, against 70.4 and 111.5. On ADE20K, with 150 classes, SPADE scored 38.5 mIoU and 33.9 FID. On Cityscapes street scenes, the semi-parametric SIMS method, which stitches real image patches, had a lower FID of 49.7 against SPADE's 71.8, but weaker layout alignment, since copied patches may not match the requested segments.

NVIDIA turned the research into GauGAN, announced on March 18, 2019 and named after the painter Paul Gauguin. NVIDIA said its discriminator was trained on a million real images and that the model was built in PyTorch. Bryan Catanzaro, NVIDIA's vice president of applied deep learning research, described it as a "smart paintbrush". GauGAN won two awards at SIGGRAPH 2019 Real-Time Live. A later version, GauGAN2, added the ability to generate a scene from a short text phrase and then edit it with the segmentation brush, and the technology was packaged as NVIDIA Canvas, a desktop app for RTX GPUs. NVIDIA also released the SPADE source code for non-commercial use.

Compared with other approaches, SPADE sits between earlier image-to-image translation and today's diffusion models. Against pix2pixHD and CRN, it gave better realism and layout fidelity with fewer parameters. Against SIMS, it synthesized new content instead of retrieving patches. Later GAN work improved on it: OASIS (Sushko and colleagues, ICLR 2021) replaced the discriminator with a segmentation network and dropped the perceptual loss, reporting average gains of 6 FID and 5 mIoU points over the prior state of the art. Since 2023, diffusion-based methods such as ControlNet have added segmentation-map control to large text-to-image models trained on billions of images, giving more diverse content at the cost of slower generation.

SPADE has clear limits. It needs paired data, images with pixel-accurate segmentation maps, which are expensive to label by hand; the Flickr landscape experiment sidestepped this by labeling photos automatically with a segmentation network, so label errors pass into training. Output quality falls on rare classes and complex scenes with many small objects, and COCO-Stuff images were still visibly imperfect. As a GAN, it can suffer from training instability and limited diversity for a given map unless the style encoder or noise input is used. Its vocabulary is fixed to the training classes: a map can only contain labels the model saw. Resolution was modest by current standards: the paper trained at 256 by 256 pixels, or 512 by 256 for Cityscapes.

04Mfano uliofanya kazi

Turning a three-region sketch into a landscape with a pretrained SPADE model

  1. Download the official NVlabs SPADE code and a pretrained checkpoint, such as the ADE20K or COCO-Stuff model, following the repository instructions.

  2. Create a 256 by 256 label map: fill the top third with the sky class, the middle with the mountain class and the bottom with the water class, using the dataset's class IDs.

  3. Save it as a single-channel PNG in which each pixel value is a class ID, not a color.

  4. Run the test script on the label map to generate an image from a random style vector.

  5. Change the bottom region's class from water to grass and run again, keeping everything else fixed.

  6. If the model includes the style encoder, supply a sunset photo as the style image and generate a third version.

Nini inaonyesha

Three images share the same layout but differ in content or style: a lake scene, a meadow scene and a sunset version. Check layout fidelity by running a segmentation network on each output and comparing its labels to the input map.

Utekelezaji wa Ulimwengu Halisi

NVIDIA's GauGAN demo, shown at the GPU Technology Conference in March 2019, let visitors paint regions labeled sea, sand or snow and watch a SPADE model render a matching landscape on a TITAN RTX GPU.

GauGAN won Best of Show and Audience Choice at the SIGGRAPH 2019 Real-Time Live competition, where NVIDIA and UC Berkeley researchers demonstrated it live on an RTX Studio laptop with a pen display.

NVIDIA Canvas, a desktop app that runs on NVIDIA RTX GPUs, brings GauGAN technology to artists who paint labeled regions such as grass or clouds and works alongside tools like Adobe Photoshop.

In the 2019 paper, a SPADE model trained on 41,000 Flickr landscape photos, labeled automatically by a DeepLabV2 segmentation network, produced new landscapes from user-edited layouts.

Architects, urban planners, landscape designers and game developers were named by NVIDIA as potential users for quickly prototyping synthetic scenes from rough layouts.

Mustakabali wa Usanifu wa Taswira ya Semantiki ya SPADE

Since SPADE, research on layout-controlled image generation has moved in two directions. GAN-based methods kept refining the training signal, as in OASIS (ICLR 2021), which treats the discriminator as a segmentation network and reports average gains of 6 FID and 5 mIoU points without perceptual losses. Diffusion-based methods now dominate new work: ControlNet (Zhang, Rao and Agrawala, 2023) attaches spatial conditions such as segmentation maps, edges, depth and pose to a frozen Stable Diffusion model through zero-initialized convolutions, and reports robust training on datasets from under 50,000 to over a million images. NVIDIA's own product path also changed. GauGAN2 combined segmentation painting with text prompts, and NVIDIA Canvas brought the approach to artists as a free desktop app. Open problems include generating many small objects correctly, keeping open vocabularies while preserving the precise layout control that segmentation maps offer, speeding up diffusion models enough for the real-time interaction GauGAN demonstrated, and reducing dependence on costly pixel-level labels. The SPADE layer itself, spatially varying modulation of normalized features, remains a reusable idea that appears in later conditional generators.

Kuiweka katika vitendo

Kwa nini ni muhimu

  • Kasi na kiwango. Visual AI inaweza kufanya ukaguzi, ugunduzi na kazi za kuweka lebo kiotomatiki kwa kiwango.
  • Tengeneza chaguzi. Timu bunifu zinaweza kuiga dhana kwa haraka zaidi na masahihisho machache ya mikono.
  • Timu na mtiririko wa kazi. Uendeshaji unaweza kutumia ishara za picha na video ambazo hapo awali zilikuwa ngumu kuchakata.

Jihadharini na

  • Haki za picha na idhini zinaweza kuwa hatari za kisheria ikiwa asili haiko wazi.
  • Utendaji wa muundo unaweza kutofautiana katika mwangaza, idadi ya watu na mazingira.
  • Chanya za uwongo zinaweza kutotambuliwa isipokuwa viwango vya uaminifu vifuatiliwe.

Hatua zinazofuata

  1. Bainisha vigezo vya kukubalika vya usahihi, kumbukumbu na gharama za makosa.
  2. Jaribu kwa kutumia data inayolingana na hali halisi ya uzalishaji.
  3. Ongeza ukaguzi wa kibinadamu kwa utabiri wa chini au utabiri wa athari kubwa.
  4. Fuatilia mtindo wa kuteleza na uthibitishe upya baada ya mabadiliko ya kamera au mkusanyiko wa data.

Vyanzo na kusoma zaidi

  1. arXiv (CVPR 2019)Semantic Image Synthesis with Spatially-Adaptive Normalization
  2. NVIDIA BlogStroke of Genius: GauGAN Turns Doodles into Stunning, Photorealistic Landscapes
  3. NVIDIA BlogWhat Is GauGAN? How AI Turns Words and Pictures Into Art
  4. NVIDIA Technical BlogGauGAN Wins Major Awards at SIGGRAPH 2019's Real Time Live Competition
  5. arXiv (ICLR 2021)You Only Need Adversarial Supervision for Semantic Image Synthesis
  6. arXivAdding Conditional Control to Text-to-Image Diffusion Models

Endelea Kuchunguza

Jarida halali

Pata taarifa ya kila siku ya AI

Hadithi tatu za AI zilizothibitishwa kila asubuhi ya wiki, zimetengenezwa kwa Kiingereza rahisi. Bila malipo daima, hakuna matangazo.

Barua pepe moja kila siku ya wiki. Jiondoe kwa bonyeza moja. Hatutauza au kushiriki anwani yako.

Jijaribu mwenyewe

Take the SPADE Semantic Image Synthesis quiz

Maoni ya haraka juu ya kila jibu, na cheti kinachoweza kushirikishwa na kitambulisho kinachoweza kuthibitishwa baada ya kupita kozi.

Anza chemsha bongo

Changia elimu ya AI bila malipo. AI Understanding ni 501(c)(3) isiyo na faida — hakuna matangazo, hakuna kizuizi cha malipo, daima. Toa mchango

Maswali yanayoulizwa mara kwa mara

What is SPADE Semantic Image Synthesis?

SPADE, short for spatially-adaptive normalization, is a neural network layer from NVIDIA researchers (CVPR 2019) that turns a semantic map, a picture where each region is labeled sky, tree or water, into a photorealistic image. It feeds the map into every normalization layer so layout information is not washed out, and it powered NVIDIA's GauGAN painting demo and later the NVIDIA Canvas app.

Je, SPADE hutumia ingizo gani kutoa picha?

SPADE huunda picha halisi kutoka kwa ramani za sehemu za kisemantiki ambapo kila pikseli hubeba lebo ya kategoria kama vile anga au nyasi.

Ni shida gani na kuhalalisha mapema ambayo SPADE ilirekebisha?

Urekebishaji wa kawaida unaelekea kufuta maelezo ya anga ya kisemantiki, kwa hivyo SPADE huingiza tena mpangilio katika mtandao wote.

Ni programu gani inayoingiliana iliyojengwa kwenye SPADE?

GauGAN ya NVIDIA, baadaye NVIDIA Canvas, huruhusu watumiaji kuchora ramani za lebo ambazo SPADE hugeuza kuwa matukio ya picha halisi.

Je, 'SP' katika SPADE inasimamia nini?

SPADE inasimamia urekebishaji wa Spatially-Adaptive (De), ikimaanisha urekebishaji wake unaotegemea eneo.

Why can SPADE-generated images be useful when training semantic-segmentation systems?

The guide lists generating varied synthetic images with known pixel labels as a practical way to develop segmentation models.