生成对抗网络 图像生成_用生成对抗网络在10分钟内生成图像

生成对抗网络 图像生成

Machines are generating perfect images these days and it’s becoming more and more difficult to distinguish the machine-generated images from the originals.

如今,机器正在生成完美的图像,将机器生成的图像与原始图像区分开来变得越来越困难。

If you are reading this article, I am sure that we share similar interests and are/will be in similar industries. So let’s connect via Linkedin! Please do not hesitate to send a contact request! Orhan G. Yalçın — Linkedin

如果您正在阅读本文,我相信我们拥有相似的兴趣并且将会/将会从事相似的行业。 因此,让我们通过Linkedin连接 请不要犹豫,发送联系请求! Orhan G.Yalçın— Linkedin

生成对抗网络 图像生成_用生成对抗网络在10分钟内生成图像_第1张图片
3] 3 ]

After receiving more than 300k views for my article, Image Classification in 10 Minutes with MNIST Dataset, I decided to prepare another tutorial on deep learning. But this time, instead of classifying images, we will generate images using the same MNIST dataset, which stands for Modified National Institute of Standards and Technology database. It is a large database of handwritten digits that is commonly used for training various image processing systems[1].

在我的文章“使用MNIST数据集在10分钟内进行图像分类”获得了超过30万的观看次数之后,我决定编写另一篇有关深度学习的教程。 但是这一次,我们将使用相同的MNIST数据集生成图像,而不是对图像进行分类,该数据集代表改良的美国国家标准技术研究院数据库。 它是一个庞大的手写数字数据库,通常用于训练各种图像处理系统[1]。

生成对抗网络 (Generative Adversarial Networks)

To generate -well basically- anything with machine learning, we have to use a generative algorithm and at least for now, one of the best performing generative algorithms for image generation is Generative Adversarial Networks (or GANs).

为了通过机器学习基本生成任何东西,我们必须使用一种生成算法,并且至少到目前为止,用于生成图像的性能最好的生成算法之一是“生成对抗网络”(GAN)。

生成对抗网络的发明 (The invention of Generative Adversarial Network)

生成对抗网络 图像生成_用生成对抗网络在10分钟内生成图像_第2张图片
Ian Goodfellow on Wikipedia上的 Wikipedia [ Ian Goodfellow的照片[ 4] 4 ]

The invention of GANs has occurred pretty unexpectedly. The famous AI researcher, then, a Ph.D. fellow at the University of Montreal, Ian Goodfellow, landed on the idea when he was discussing with his friends -at a friend’s going away party- about the flaws of the other generative algorithms. After the party, he came home with high hopes and implemented the concept he had in mind. Surprisingly, everything went as he hoped in the first trial [5] and he successfully created the Generative Adversarial Networks (shortly, GANs). According to Yann Lecun, the director of AI research at Facebook and a professor at New York University, GANs are “the most interesting idea in the last 10 years in machine learning” [6].

GAN的发明已经出乎意料地发生了。 当时著名的AI研究人员是博士学位。 蒙特利尔大学的研究员伊恩·古德费洛( Ian Goodfellow )在与朋友(在一个朋友走开的聚会上)讨论其他生成算法的缺陷时,想到了这个想法。 晚会结束后,他满怀希望地回到了家,并实现了他所构想的构想。 出乎意料的是,一切都如他在第一次试验中所希望的那样[ 5 ],并且他成功创建了Generative Adversarial Networks(简称GAN)。 根据Facebook AI研究总监,纽约大学教授Yann Lecun的说法,GAN是“过去10年来机器学习中最有趣的想法” [ 6 ]。

The rough structure of the GANs may be demonstrated as follows:

GAN的粗略结构可以证明如下:

生成对抗网络 图像生成_用生成对抗网络在10分钟内生成图像_第3张图片
Figure 4. Generative Adversarial Networks (GANs) utilizing CNNs | (Graph by author) 图4.使用CNN的生成对抗网络(GAN)| (作者图表)

In an ordinary GAN structure, there are two agents competing with each other: a Generator and a Discriminator. They may be designed using different networks (e.g. Convolutional Neural Networks (CNNs), Recurrent Neural Networks (RNNs), or just Regular Neural Networks (ANNs or RegularNets)). Since we will generate images, CNNs are better suited for the task. Therefore, we will build our agents with convolutional neural networks.

在普通GAN结构中,有两个代理相互竞争:生成器鉴别器。 可以使用不同的网络(例如卷积神经网络( CNN ),递归神经网络( RNN )或仅常规神经网络( ANN或RegularNets))来设计它们。 由于我们将生成图像,因此CNN更适合该任务。 因此,我们将使用卷积神经网络构建代理。

我们的GAN模型如何运作? (How does our GAN model operate?)

生成对抗网络 图像生成_用生成对抗网络在10分钟内生成图像_第4张图片
Figure 5. Generator and Discriminator Relationship in a GAN Network | (Graph by author) 图5. GAN网络中的生成器和鉴别器关系(作者图表)

In a nutshell, we will ask the generator to generate handwritten digits without giving it any additional data. Simultaneously, we will fetch the existing handwritten digits to the discriminator and ask it to decide whether the images generated by the Generator are genuine or not. At first, the Generator will generate lousy images that will immediately be labeled as fake by the Discriminator. After getting enough feedback from the Discriminator, the Generator will learn to trick the Discriminator as a result of the decreased variation from the genuine images. Consequently, we will obtain a very good generative model which can give us very realistic outpu

你可能感兴趣的:(网络,python,java,机器学习,计算机视觉)