# Przekładanie obrazu na obraz (pix2pix, CycleGAN)

EN: **Image-to-image translation (pix2pix, CycleGAN)** · id `imagetranslation` · aliases: image-to-image translation, pix2pix, CycleGAN, conditional GAN, unpaired translation, tłumaczenie obraz-obraz

Path: [AI Atlas](https://aiatlasgraph.com/llms.txt) › [Sieci i modele generatywne](https://aiatlasgraph.com/t/neural.md) › [Rodziny modeli generatywnych](https://aiatlasgraph.com/t/generative.md) › [Generatywne sieci przeciwstawne (GAN)](https://aiatlasgraph.com/t/gan.md) › Przekładanie obrazu na obraz (pix2pix, CycleGAN)

## Description

- PL: Warunkowe GAN uczące mapowania między dziedzinami obrazów, z parami (pix2pix) lub bez par dzięki stracie spójności cyklu (CycleGAN).
- EN: Conditional GANs learning mappings between image domains, from paired examples (pix2pix) or without pairs via a cycle-consistency loss (CycleGAN).

## In one sentence

- PL: Model, który zamienia obraz jednego rodzaju na inny: szkic w zdjęcie, dzień w noc, mapę w widok z satelity.
- EN: A model that turns one kind of image into another: a sketch into a photo, day into night, a map into a satellite view.

## Problem it solves

- PL: Ręczne przerabianie tysięcy obrazów na inny styl lub format zajmuje mnóstwo czasu, a dobranych par przed-i-po często brakuje.
- EN: Converting thousands of images into another style or format by hand takes ages, and matching before-and-after pairs are often missing.

## What it does

- PL: Jak tłumacz, który sprawdza się, przekładając tekst tam i z powrotem: obraz po podwójnej zamianie musi wrócić do oryginału.
- EN: Like a translator checking work by translating there and back: after a double conversion the image must return to the original.

## Everyday example

- PL: Aplikacja zamienia twoje zdjęcie z wakacji w obraz w stylu dawnego malarza albo dzienną fotografię ulicy w nocną.
- EN: An app turns your holiday photo into a painting in an old master's style, or a daytime street shot into a night scene.

## This concerns you if you…

- PL: zamieniasz zdjęcia na inny styl lub porę dnia
- PL: masz obrazy z dwóch źródeł bez dopasowanych par
- EN: convert photos into another style or time of day
- EN: have images from two sources without matching pairs

## Keywords

CycleGAN · pix2pix · conditional GAN · cycle-consistency loss · PatchGAN · unpaired translation · style transfer · domain adaptation

## How it works

- PL: W wersji z parami generator dostaje obraz wejściowy, a dyskryminator ocenia parę wejście–wynik, często łatkami. Bez par trenuje się dwa generatory w przeciwnych kierunkach: strata przeciwstawna upodabnia wynik do dziedziny docelowej, a strata cyklu wymaga, by przekład tam i z powrotem odtworzył oryginał.
- EN: In the paired setting the generator receives the input image and the discriminator judges input–output pairs, often patch by patch. Without pairs two generators are trained in opposite directions: an adversarial loss makes outputs look like the target domain, while a cycle loss requires a round trip to reconstruct the original.

## Limits

- PL: Bez dopasowanych par wiele różnych mapowań może spełnić stratę przeciwstawną. Spójność cyklu zawęża rozwiązania, ale nie dowodzi, że model nauczył się jedynego semantycznie poprawnego przekładu między dziedzinami.
- EN: Without paired examples, many different mappings can satisfy the adversarial objective. Cycle consistency narrows the solutions but does not prove that the model learned the uniquely correct semantic translation between domains.

## Key terms

- PL: **spójność cyklu**: Wymóg, by obraz po przekładzie tam i z powrotem wrócił do oryginału.
- PL: **dyskryminator łatkowy**: Ocenia realizm małych fragmentów obrazu zamiast całości.
- PL: **warunkowy GAN**: Generator tworzący wynik na podstawie podanego wejścia, a nie samego szumu.
- EN: **cycle consistency**: Requiring an image translated there and back to match the original.
- EN: **PatchGAN discriminator**: Judges realism of small image patches rather than the whole.
- EN: **conditional GAN**: A generator producing output from a given input, not noise alone.

## Know first

- [Głębokie architektury konwolucyjne (ResNet, U-Net) (Deep convolutional architectures (ResNet, U-Net))](https://aiatlasgraph.com/t/cnnarchs.md)

## Related topics

Untyped, symmetric "see also" links.

- [Edycja obrazu poleceniem i podmiana fragmentów (inpainting) (Instruction-based image editing and inpainting)](https://aiatlasgraph.com/t/imageediting.md)

## Sources

- [Unpaired Image-to-Image Translation using Cycle-Consistent Adversarial Networks](<https://arxiv.org/abs/1703.10593>) `zhu-cyclegan-2017` · by Jun-Yan Zhu, Taesung Park, Phillip Isola, Alexei A. Efros

---

AI Atlas revision 122 (2026-10-30) · HTML: https://aiatlasgraph.com/t/imagetranslation · index: https://aiatlasgraph.com/llms.txt · everything: https://aiatlasgraph.com/llms-full.txt · updated 2026-10-30
