pix2pix gan_用python构建pix2pix gan

2023-11-11

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,它将图像作为输入,然后输出另一个图像。

this paper 本文展示的惊人作品

To break things down, we will go through these steps:

为了分解,我们将执行以下步骤:

  1. Prepare our data

    准备我们的数据
  2. Build the network

    建立网络
  3. Train the network

    训练网络
  4. 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

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

pix2pix gan_用python构建pix2pix gan 的相关文章

  • 使用 Python 编辑 RTF 文件

    也许这是一个愚蠢的问题 但我不明白 所以道歉 我有一个 RTF 文档 我想更改它 例如 有一个表 我想复制一行并以面向对象的方式更改代码中第二行中的文本 我认为 pyparsing 应该是可行的方法 但我摆弄了几个小时但没有明白 我没有提供
  • 如何指定聚类的距离函数?

    我想对给定距离的点进行聚类 奇怪的是 似乎 scipy 和 sklearn 聚类方法都不允许指定距离函数 例如 在sklearn cluster AgglomerativeClustering 我唯一可以做的就是输入一个亲和力矩阵 这将非常
  • 2d 图像点和 3d 网格之间的交点

    Given 网格 源相机 我有内在和外在参数 图像坐标 2d Output 3D 点 是从相机中心发出的光线穿过图像平面上的 2d 点与网格的交点 我试图找到网格上的 3d 点 This is the process From Multip
  • Tkinter 菜单删除项

    如何删除任何菜单项 例如我想删除 播放 self menubar Menu self root self root config menu self menubar self filemenu2 Menu self menubar self
  • 定义Python源代码编码的正确方法

    PEP 263 http www python org dev peps pep 0263 定义如何声明Python源代码编码 通常 Python 文件的前两行应以以下内容开头 usr bin python coding
  • 如何使用 python 的 http.client 准确读取一个响应块?

    Using http client在 Python 3 3 或任何其他内置 python HTTP 客户端库 中 如何一次读取一个分块 HTTP 响应一个 HTTP 块 我正在扩展现有的测试装置 使用 python 编写 http clie
  • 如何在python中附加两个字节?

    说你有b x04 and b x00 你如何将它们组合起来b x0400 使用Python 3 gt gt gt a b x04 gt gt gt b b x00 gt gt gt a b b x04 x00
  • 如何调整 matplotlib 单选按钮的大小和纵横比?

    我已经尝试了几个小时来使简单的单选按钮列表的大小和纵横比正确 但没有成功 首先 导入模块 import matplotlib pyplot as plt from matplotlib widgets import RadioButtons
  • 尝试从网页Python和BeautifulSoup获取编码

    我试图从网页检索字符集 这会一直改变 目前我使用 beautifulSoup 来解析页面 然后从标题中提取字符集 这工作正常 直到我遇到一个网站 到目前为止 我的代码以及与其他页面一起使用的代码是 def get encoding soup
  • 检查 python 中命令行参数的数量

    我是蟒蛇新手 还是把脚弄湿了 我正在尝试做这样的事情 import sys if len sys argv lt 3 or lt len sys argv gt 3 print This script will compare two fi
  • 使用 Pytest 的参数化添加测试功能的描述

    当其中一个测试失败时 可以在测试正在测试的内容的参数化中添加描述 快速了解测试失败的原因 有时您不知道测试失败的原因 您必须查看代码 通过每个测试的描述 您就可以知道 例如 pytest mark parametrize num1 num2
  • 将 pandas 剪切操作转换为常规字符串

    我明白了 pandas cut 操作的输出 0 0 20 1 0 20 2 0 20 3 0 20 4 0 20 5 0 20 6 0 20 7 0 20 8 0 20 9 0 20 如何将 0 20 转换为 0 20 我正在这样做 str
  • 更改QLineEdit的ClearButton图标

    我想在Windows 10 1909 64位 上的Python 3 8和PyQt5 5 15 0 上更改我的QLineEdit的ClearButton图标 稍后我想在Linux上运行代码 我尝试应用此处找到的代码 如何在 QLineEdit
  • PIL.Image.open和tf.image.decode_jpeg返回值的区别

    我使用 PIL Image open 和 tf image decode jpeg 将图像文件解析为数组 但发现PIL Image open 中的像素值与tf image decode jpeg不一样 为什么会出现这种情况 Thanks 代
  • 为什么在Python解释器中输入_会返回True? [复制]

    这个问题在这里已经有答案了 我的翻译行为非常奇怪 gt gt gt True gt gt gt type True
  • 使用 suds SOAP 库进行 HTTP 身份验证的奇怪行为

    我有一个正在运行的 python 程序 它使用 suds 通过 SOAP 获取大量数据 Web服务是通过分页功能实现的 这样我就可以抓取nnn每个 fetch 调用的行并获取下一个nnn与后续的电话 如果我使用如下代码向 HTTP 服务器进
  • numpy polyfit 中使用的权重值是多少以及拟合误差是多少

    我正在尝试对 numpy 中的某些数据进行线性拟合 Ex 其中 w 是该值的样本数 即对于点 x 0 y 0 我只有 1 个测量值 该测量值是2 2 但对于这一点 1 1 我有 2 个测量值 值为3 5 x np array 0 1 2 3
  • 在 numpy 中连接维度

    我有x 1 2 3 4 5 6 7 8 9 10 11 12 shape 2 2 3 I want 1 2 3 4 5 6 7 8 9 10 11 12 shape 2 6 也就是说 我想连接中间维度的所有项目 在这种特殊情况下我可以得到这
  • 寻找完美的正方形

    我有这个Python代码 def sqrt x ans 0 if x gt 0 while ans ans lt x ans ans 1 if ans ans x print x is not a perfect square return
  • PyQt5:如何使QThread返回数据到主线程

    I am a PyQt 5 4 1 1初学者 我的Python是3 4 3 这是我尝试遵循的many https mayaposch wordpress com 2011 11 01 how to really truly use qthr

随机推荐

Powered by Hwhale