- 🍨 本文为🔗365天深度学习训练营 中的学习记录博客
- 🍖 原作者:K同学啊 | 接辅导、项目定制
- 🚀 文章来源:K同学的学习圈子
一、背景知识
1.1 图像翻译
图像内容(Image Content):图像中包含的主要信息和对象,如物体、场景、结构等。图像内容是指图像中的实际物体或场景,通常用来描述图像中的主要特征和信息。
图像域(Image Domain):图像域指的是图像数据的空间范围或特定属性。在图像翻译中,不同的图像域可能表示不同的特征或属性,如黑白图像域、彩色图像域、草图图像域等。
图像翻译(Image Translation):图像翻译是指将一个图像从一个域(如黑白图像)转换到另一个域(如彩色图像)的过程。这种技术可以实现不同图像域之间的转换,如图像风格转换、图像去噪、图像增强等。
1.2 CGAN
前两周的博客记录已经有更详细介绍了,如有需求可以跳转。
第G3周:CGAN入门|生成手势图像
第G4周:CGAN|生成手势图像 | 可控制生成
Conditional Generative Adversarial Network(CGAN)是生成对抗网络(GAN)的一种变体,它在生成器和判别器之间引入了条件信息。这种条件信息可以是类别标签、文本描述、图像等,使得生成器可以根据条件信息生成具有特定属性的图像。
CGAN结构:
-
CGAN由两部分组成:生成器(Generator)和判别器(Discriminator)。生成器接收一个随机噪声向量 z z z和条件信息 c c c作为输入,生成器的任务是将这两部分信息映射到目标图像空间。判别器接收生成器生成的图像和条件信息 c c c,并判断输入图像是真实图像还是生成图像。
-
生成器和判别器的结构可以根据具体任务和需求而定,通常采用卷积神经网络(CNN)或全连接神经网络设计。生成器和判别器的结构可以根据具体任务和需求而定,通常采用卷积神经网络(CNN)或全连接神经网络设计。
CGAN工作原理:
-
生成器生成图像:生成器接收一个随机噪声向量 z z z和条件信息 c c c作为输入,通过学习将这两部分信息映射到目标图像空间,生成与条件信息匹配的图像。
-
判别器区分真假:判别器接收生成器生成的图像和条件信息 c c c,并判断输入图像是真实图像还是生成图像。判别器的目标是尽可能准确地区分真实图像和生成图像。
-
对抗训练:生成器和判别器相互对抗地进行训练。生成器试图生成足够逼真的图像来欺骗判别器,而判别器试图准确区分真实图像和生成图像。通过对抗训练,生成器不断提高生成图像的逼真度,判别器不断提高区分真伪的能力。
-
生成器优化:生成器通过最小化生成图像被判别为假的概率来优化自身参数,使得生成的图像更加逼真,同时欺骗判别器。
-
判别器优化:判别器通过最大化正确区分真实和生成图像的概率来优化自身参数,提高判别的准确性。
1.3 UNet
编码器-解码器(Encoder-Decoder)结构:
- 编码器:编码器负责将输入图像逐渐降采样为高级别的特征表示。通常采用卷积层和池化层来实现这一过程,以捕获图像中的局部特征。
- 解码器:解码器负责将编码器提取的特征图逐步上采样为与输入图像相同分辨率的输出。解码器通常采用反卷积层和上采样操作,同时结合跳跃连接来保留更丰富的信息。
跳跃连接(Skip Connections):
- 跳跃连接是UNet中的关键设计特点,通过将编码器中某一层的特征图与解码器对应的层特征图进行连接,实现跨层级信息传递。
跳跃连接有助于解决传统编码器-解码器结构中信息丢失和分辨率损失的问题,提高了网络对细节和局部信息的捕捉能力。
多层次特征融合:
- UNet通过跳跃连接实现了多层次特征融合,将不同层级的特征信息进行融合,从而在解码器端获得更丰富的信息。
多层次特征融合有助于网络学习到更全局和局部的特征表示,提高了网络的表达能力和对复杂场景的理解能力。
二、Pix2Pix
参考文章
2.1 Pix2Pix特点
Pix2Pix结合了UNet结构和生成对抗网络(GAN)的特点,实现了高质量的图像到图像的转换。其特点主要体现在以下方面:
-
UNet结构:
- UNet是一种用于图像分割的网络结构,具有编码器-解码器的架构和跳跃连接(skip connections)的特点。
- 在Pix2Pix中,生成器采用了UNet结构,编码器部分用于提取输入图像的特征表示,解码器部分用于将特征表示解码为目标域图像。
- 跳跃连接允许信息在编码器和解码器之间直接传递,有助于保留更多的细节信息,提高了转换的准确性。
-
生成对抗网络(GAN):
- Pix2Pix引入了生成对抗网络(GAN)的概念,通过同时训练生成器和判别器来实现图像到图像的转换任务。
- 生成器负责将输入图像转换为目标域图像,判别器则用于区分生成的估计图像和真实的目标图像。
- 通过对抗训练的方式,生成器学习生成逼真的图像,判别器学习区分真实图像和生成图像,促使生成器学习更好的转换映射。
Pix2Pix通过结合UNet的特征提取和跳跃连接机制以及生成对抗网络(GAN)的对抗训练机制,实现了高质量的图像到图像的转换。这种结合使得Pix2Pix能够在保留细节信息的同时生成逼真的目标域图像,广泛应用于图像翻译、风格转换等任务中。
2.2 Pix2Pix原理
它采用UNet编码器-解码器(Encoder-Decoder)结构,生成器输入为真实图像 x x x和随机噪声 z z z,判别器输入为生成器生成的 G ( x ) G(x) G(x)和真实图像 x x x(可对照前面对CGAN介绍)。
2.3 损失函数
参考CGAN可得到Pix2Pix损失函数公式,如下:
-
生成器的损失函数:
L GAN ( G , D ) = E x , y [ log D ( x , y ) ] + E x [ log ( 1 − D ( x , G ( x ) ) ) ] \mathcal{L}_{\text{GAN}}(G, D) = \mathbb{E}_{x,y}[\log D(x, y)] + \mathbb{E}_x[\log(1 - D(x, G(x)))] LGAN(G,D)=Ex,y[logD(x,y)]+Ex[log(1−D(x,G(x)))] -
L1 loss损失函数:
L L1 ( G ) = E x , y , z [ ∣ ∣ y − G ( x , z ) ∣ ∣ 1 ] \mathcal{L}_{\text{L1}}(G) = \mathbb{E}_{x,y,z}[||y - G(x, z)||_1] LL1(G)=Ex,y,z[∣∣y−G(x,z)∣∣1] -
最终的目标函数:
L ( G , D ) = L GAN ( G , D ) + λ L L1 ( G ) \mathcal{L}(G, D) = \mathcal{L}_{\text{GAN}}(G, D) + \lambda \mathcal{L}_{\text{L1}}(G) L(G,D)=LGAN(G,D)+λLL1(G)
2.4 结构分析
Pix2Pix 生成器和判别器的结构如下:
-
生成器(Generator):
- 生成器采用 U-Net 结构,包括编码器(Encoder)和解码器(Decoder)部分。
- 编码器负责将输入的轮廓或标签图片进行特征提取和压缩。
- 解码器负责将编码器输出的特征图解码并生成最终的合成图像。
- 生成器还包括跳跃连接(Skip Connections),有助于保留细节信息。
-
判别器(Discriminator):
- 判别器采用 PatchGAN 结构,将输入图像切分成多个小块进行判别。
- 每个小块对应一个输出结果,从而提高对局部结构的感知能力。
- PatchGAN 判别器有助于生成更加细致和逼真的图像。
三、代码运行
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
[Epoch 0/10] [Batch 0/506] [D loss: 1.647789] [G loss: 60.340595, pixel: 0.581072, adv: 2.233401] ETA: 1 day, 1:25:43.998771Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
[Epoch 0/10] [Batch 500/506] [D loss: 0.142009] [G loss: 29.688620, pixel: 0.290967, adv: 0.591954] ETA: 1:27:49.591770Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
[Epoch 0/10] [Batch 505/506] [D loss: 0.053237] [G loss: 51.577415, pixel: 0.502725, adv: 1.304922] ETA: 1:34:02.564807Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
[Epoch 1/10] [Batch 494/506] [D loss: 0.070610] [G loss: 46.547913, pixel: 0.459572, adv: 0.590704] ETA: 1:18:55.368929Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
[Epoch 1/10] [Batch 505/506] [D loss: 0.123835] [G loss: 30.472618, pixel: 0.300761, adv: 0.396541] ETA: 1:20:11.961080Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
[Epoch 2/10] [Batch 488/506] [D loss: 0.026758] [G loss: 37.314384, pixel: 0.364822, adv: 0.832226] ETA: 1:01:29.325409Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
[Epoch 2/10] [Batch 505/506] [D loss: 0.014538] [G loss: 40.809853, pixel: 0.397772, adv: 1.032671] ETA: 1:04:14.834893Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
[Epoch 3/10] [Batch 482/506] [D loss: 0.052123] [G loss: 31.460102, pixel: 0.303137, adv: 1.146399] ETA: 0:55:04.997478Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
[Epoch 3/10] [Batch 505/506] [D loss: 0.079315] [G loss: 35.501881, pixel: 0.349199, adv: 0.582012] ETA: 0:58:02.538474Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
[Epoch 4/10] [Batch 476/506] [D loss: 0.030885] [G loss: 30.457699, pixel: 0.294100, adv: 1.047739] ETA: 0:49:40.476074Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
[Epoch 4/10] [Batch 505/506] [D loss: 0.028141] [G loss: 38.486000, pixel: 0.373164, adv: 1.169581] ETA: 0:44:54.406027Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
[Epoch 5/10] [Batch 470/506] [D loss: 0.038394] [G loss: 32.262707, pixel: 0.311849, adv: 1.077832] ETA: 0:41:14.786348Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
[Epoch 5/10] [Batch 505/506] [D loss: 0.039467] [G loss: 37.964828, pixel: 0.370645, adv: 0.900284] ETA: 0:32:56.709133Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
[Epoch 6/10] [Batch 464/506] [D loss: 0.023386] [G loss: 29.847828, pixel: 0.289348, adv: 0.913019] ETA: 0:28:14.697390Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
[Epoch 6/10] [Batch 505/506] [D loss: 0.017719] [G loss: 37.603901, pixel: 0.366791, adv: 0.924826] ETA: 0:25:02.061517Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
[Epoch 7/10] [Batch 458/506] [D loss: 0.045083] [G loss: 34.635059, pixel: 0.332324, adv: 1.402660] ETA: 0:18:18.177452Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
[Epoch 7/10] [Batch 505/506] [D loss: 0.014225] [G loss: 25.492990, pixel: 0.243784, adv: 1.114637] ETA: 0:17:42.465789Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
[Epoch 8/10] [Batch 452/506] [D loss: 0.008428] [G loss: 28.374493, pixel: 0.273673, adv: 1.007191] ETA: 0:10:20.948391Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
[Epoch 8/10] [Batch 505/506] [D loss: 0.013490] [G loss: 25.190414, pixel: 0.240928, adv: 1.097572] ETA: 0:10:25.141053Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
[Epoch 9/10] [Batch 446/506] [D loss: 0.034311] [G loss: 41.953709, pixel: 0.413027, adv: 0.651020] ETA: 0:00:56.186142Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name=‘data_facades’, decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=8, n_epochs=10, sample_interval=500)
[Epoch 9/10] [Batch 505/506] [D loss: 0.009487] [G loss: 39.018578, pixel: 0.380509, adv: 0.967647] ETA: 0:00:00.993219