起始字节 和起始位_frechlet起始距离fid的简短介绍

起始字节 和起始位

Generative Adversarial Networks(GANs) are very difficult to evaluate as compared to other networks. And, it is very important to evaluate the quality of GANs, because it can help us in choosing the right model, or when to stop the training, or how to improve the model. Out of several methods, Frechlet Inception Distance(FID) is one performance metric to evaluate the quality of GANs.

与其他网络相比,生成对抗网络(GANs)很难评估。 而且,评估GAN的质量非常重要,因为它可以帮助我们选择正确的模型,何时停止训练或如何改进模型。 在几种方法中,Frechlet起始距离(FID)是评估GAN质量的一种性能指标。

为什么很难? (Why it is difficult?)

  1. GANs are difficult to train and instability in training can cause various problems

    GAN很难训练,训练不稳定会导致各种问题
  2. Existing methods are not accurate enough

    现有方法不够准确
  3. It can be time-consuming and prone to errors if we do evaluate GANs manually or with naked eyes

    如果我们手动或裸眼评估GAN,可能会很耗时且容易出错

什么是Frechlet起始距离(FID)? (What is Frechlet Inception Distance(FID)?)

FID is a performance metric that calculates the distance between the feature vectors of real images and the feature vectors of fake images(Generated by the generator). The lower FID score represents that the quality of images generated by the generator is higher and similar to the real ones. FID is based on the feature vectors of images. If you are using FID as your performance metric then try to minimize it. It was introduced by Heusel et al in 2017.

FID是一种性能指标,用于计算真实图像的特征向量与伪图像的特征向量之间的距离(由生成器生成)。 FID分数越低,表示生成器生成的图像质量越高,并且与真实图像相似。 FID基于图像的特征向量。 如果您将FID用作性能指标,请尝试将其最小化。 它由Heusel等人于2017年推出。

Lower FID means smaller distances between synthetic and real data distributions

较低的FID意味着合成数据分布与实际数据分布之间的距离更短

Source: https://arxiv.org/pdf/1802.03446.pdf

资料来源: https : //arxiv.org/pdf/1802.03446.pdf

公式 (The Formula)

https://arxiv.org/pdf/1706.08500.pdf //arxiv.org/pdf/1706.08500.pdf

如何计算FID? (How to calculate FID?)

  1. Use the Inception V2 pre-trained model to extract the feature vectors of real images and fake images(Generated by the generator)

    使用Inception V2预训练模型提取真实图像和伪图像的特征向量(由生成器生成)
  2. Calculate the feature-wise mean of the feature vectors generated in step 1

    计算在步骤1中生成的特征向量的按特征取平均值
  3. Generate the covariance matrices of the feature vectors — C, C_w

    生成特征向量的协方差矩阵-C,C_w
  4. Calculate trace(The sum of the elements along the main diagonal of the square matrix) of (C+C_w-2*(C*Cₓ)¹/2)

    计算(C + C_w-2 *(C *Cₓ)¹/ 2)的迹线(沿方阵主对角线的元素之和)
  5. Calculate the squared difference of the mean vectors calculated in step 2 — ||m-m_w||²

    计算在步骤2中计算出的均值向量的平方差— || m-m_w ||²
  6. Finally, add the output of step 4 and step 5

    最后,添加步骤4和步骤5的输出
  1. Better than Inception Score as it is robust to noise, image distortions, and perturbations.

    比起Inception Score更好,因为它对噪声,图像失真和扰动具有鲁棒性。
  2. A good metric for diverse datasets

    多样化数据集的良好指标
  3. Computationally efficient

    计算效率高
  4. Can detect intra-class mode dropping

    可以检测类内模式丢失

Unlike Inception Score however, it is able to detect intra-class mode dropping , i.e. a model that generates only one image per class can score a high IS but will have a bad FID

但是,与Inception Score不同,它能够检测类内模式丢失,即,每个类仅生成一张图像的模型可以获得较高的IS,但FID会很差

Source: https://arxiv.org/pdf/1802.03446.pdf

资料来源: https : //arxiv.org/pdf/1802.03446.pdf

它是干什么用的? (What is it used for?)

GANs generate images and to evaluate the quality of images we need a metric. As discussed above, manual inspection of images can be time-consuming and we might miss a lot of details. FID is here to rescue us as it can evaluate the performance of the model with good accuracy.

GAN生成图像并评估图像质量,我们需要一个指标。 如上所述,手动检查图像可能很耗时,而且我们可能会遗漏许多细节。 FID可以挽救我们,因为它可以以很高的准确性评估模型的性能。

资源资源 (Resources)

GANs Trained by a Two Time-Scale Update Rule Converge to a Local Nash Equilibrium — https://arxiv.org/abs/1706.08500017

受两个时标更新规则训练的GAN收敛到局部Nash平衡— https://arxiv.org/abs/1706.08500017

Fréchet Inception Distance-https://nealjean.com/ml/frechet-inception-distance

Fréchet可盗梦空间距离- https://nealjean.com/ml/frechet-inception-distance

Pros and Cons of GANs Evaluation Measures — https://arxiv.org/pdf/1802.03446.pdf

GAN评估措施的利弊— https://arxiv.org/pdf/1802.03446.pdf

Thank you for reading.

感谢您的阅读。

Want to contact me — [email protected]

想与我联系— [email protected]

About Me:

关于我:

I am a Co-Founder and CTO of MateLabs. At Mate Labs, we are making demand forecasting easy for enterprises using automation in machine learning. I am also a Co-founder of Raven Protocol. At Raven Protocol, we are building the world’s first decentralized and distributed Artificial Intelligence Platform. And I represent Snapy, which is instant object detection and discovery tool for consumers.

我是MateLabs的联合创始人兼CTO。 在Mate Labs,我们使使用机器学习自动化的企业的需求预测变得容易。 我也是Raven Protocol的联合创始人。 在Raven协议中,我们正在构建世界上第一个去中心化和分布式的人工智能平台。 我代表Snapy ,它是面向消费者的即时对象检测和发现工具。

Note: I had published a book(In 2019) on GANs titled “Generative Adversarial Networks Projects”, in which I have covered most of the widely popular GAN architectures and their implementations. DCGAN, StackGAN, CycleGAN, Pix2pix, Age-cGAN, and 3D-GAN have been covered in details at the implementation level. Each architecture has a chapter dedicated to it. I have explained these networks in a very simple and descriptive language using Keras + Tensorflow(Backend). If you are working on GANs or planning to use GANs, give it a read and share your valuable feedback with me at [email protected]

注意 :我曾在GAN上出版过一本书(2019年),标题为“ Generative Adversarial Networks Projects”,其中涵盖了大多数广受欢迎的GAN架构及其实现。 在实施级别已详细介绍了DCGAN,StackGAN,CycleGAN,Pix2pix,Age-cGAN和3D-GAN。 每个体系结构都有专门的章节。 我已经使用Keras + Tensorflow(Backend)用非常简单的描述性语言解释了这些网络。 如果您正在使用GAN或打算使用GAN,请阅读并通过 [email protected] 与我分享您的宝贵反馈。

You can grab your copy from:

您可以从以下位置获取副本:

http://www.amazon.com/Generative-Adversarial-Networks-Projects-next-generation/dp/1789136679

http://www.amazon.com/Generative-Adversarial-Networks-Projects-next-generation/dp/1789136679

https://www.amazon.in/Generative-Adversarial-Networks-Projects-next-generation/dp/1789136679

https://www.amazon.in/Generative-Adversarial-Networks-Projects-next-generation/dp/1789136679

https://www.packtpub.com/big-data-and-business-intelligence/generative-adversarial-networks-projects

https://www.packtpub.com/big-data-and-business-intelligence/generative-adversarial-networks-projects

Gain Access to Expert View — Subscribe to DDI Intel

获得访问专家视图的权限- 订阅DDI Intel

翻译自: https://medium.com/datadriveninvestor/a-very-short-introduction-to-frechlet-inception-distance-fid-86c95deb0930

起始字节 和起始位

你可能感兴趣的:(python)