pix2pix gan
There are times that we want to to transform an image into another style. Let’s say we have a fine collection of sketches. Our daily work is to color these black and white images.
有时候,我们希望将图像转换为另一种样式。 假设我们有一组草图。 我们的日常工作是为这些黑白图像着色。
It might be interesting if the number of tasks is small, but when it comes to hundreds of sketches a day, hmmm… maybe we need some help. This is where GAN comes to rescue. Generative Adversarial Network, or GAN, is a machine learning framework that aims to generate new data with the same distribution as the one in the training dataset. In this article, we will build a pix2pix GAN that takes an image as input, and later outputs another image.
如果任务数量很少,可能会很有趣,但是当涉及到每天数百个草图时,嗯……也许我们需要一些帮助。 这就是GAN救援的地方。 生成对抗网络(GAN)是一种机器学习框架,旨在生成与训练数据集中的分布相同的新数据。 在本文中,我们将构建一个pix2pix GAN,它将图像作为输入,然后输出另一个图像。
To break things down, we will go through these steps:
为了分解,我们将执行以下步骤:
- Prepare our data 准备我们的数据
- Build the network 建立网络
- Train the network 训练网络
- Test and see the results 测试并查看结果
准备我们的数据 (Prepare our data)
In image transformation, we need to have an original image and its expected transformed result. It is recommended to have more than thousands of this kind of before-after-pairs. (Yes, GAN needs a lot of image