本文概述:文章源自技术奇点-https://www.xerer.com/archives/30477.html
本篇文章试图从用AI算法脱掉女性衣服的DeepNude的不良应用现象及其消亡的现象为引子,介绍了DeepNude应用的2种python技术。支持生成Nude图像的pix2pix算法,和支持对python程序打包的PyOxidizer库做了介绍。本文旨在抛砖引玉,对读者的python技术提高有帮助。文章源自技术奇点-https://www.xerer.com/archives/30477.html
文章源自技术奇点-https://www.xerer.com/archives/30477.html
DeepNude的起源:文章源自技术奇点-https://www.xerer.com/archives/30477.html
" 世界还没有为DeepNude做好准备。 " 2019年3月,当DeepNude正式推出时,DeepNude应该只是一个"玩笑项目"。DeepNude提供用户选择一个穿着衣服女性的照片,通过应用算法计算后,应用会将果体的效果呈现出来。在免费版本的照片上标有"假"水印。据称,该算法的模型基于近10,000张果体女性的图像进行训练而来。根据测试,在50美元的DeepNude付费版本上,水印只出现在角落里,而不会像DeepNude免费版那样全部打个大大圆圈的码,DeepNude专业版本可以很容易地隐藏或修剪。该算法不适用于男性图像。文章源自技术奇点-https://www.xerer.com/archives/30477.html
文章源自技术奇点-https://www.xerer.com/archives/30477.html
2019年4月20日,DeepNude宣布临时暂停申请。DeepNude作者然后宣布他们正在制作PC电脑版。DeepNude于6月23日在Windows 10和Linux上正式推出。几天后,在6月26日,DeepNude指示其服务器以及应用程序不可用。文章源自技术奇点-https://www.xerer.com/archives/30477.html
文章源自技术奇点-https://www.xerer.com/archives/30477.html
文章源自技术奇点-https://www.xerer.com/archives/30477.html
从python算法模型,到能运行在window平台的应用,这些背后都用到了哪些python资源呢,以下为你一一道来。当然作出一款非法的应用,会受到法律的制裁,这里仅仅从技术角度出发来思考。文章源自技术奇点-https://www.xerer.com/archives/30477.html
文章源自技术奇点-https://www.xerer.com/archives/30477.html
DeepNude算法pix2pix介绍文章源自技术奇点-https://www.xerer.com/archives/30477.html
文章源自技术奇点-https://www.xerer.com/archives/30477.html
DeepNude应用程序基于pix2pix,这是一种由加州大学伯克利分校的研究人员于2017年开发的算法。生成对抗性网络模型,包括图像样本的"生成器"网络,以及"鉴别器"网络,其作用是提高算法的准确性。pix2pix模型通过对成对图像进行训练,例如将尝试从您给出的任何输入简笔图像生成相应的真实世界输出图像。文章源自技术奇点-https://www.xerer.com/archives/30477.html
文章源自技术奇点-https://www.xerer.com/archives/30477.html
DeepNude算法-pix2pix介绍文章源自技术奇点-https://www.xerer.com/archives/30477.html
文章源自技术奇点-https://www.xerer.com/archives/30477.html
看下面的基于pix2pix的神笔马良魔术,简笔画猫咪,通过pix2pix模型变化后,就能变成一只真实的猫咪图片。真神奇。怪不得能生成不雅图片了。文章源自技术奇点-https://www.xerer.com/archives/30477.html
文章源自技术奇点-https://www.xerer.com/archives/30477.html
文章源自技术奇点-https://www.xerer.com/archives/30477.html
如果要使用这个深度学习模型并获取相关资料,可以关注公众号,python_dada发送"pix2pix"获取对应的下载网址和具体介绍资料。文章源自技术奇点-https://www.xerer.com/archives/30477.html
文章源自技术奇点-https://www.xerer.com/archives/30477.html
上面介绍了训练出不良效果的python深度学习模型,下面来说一个python程序是如何将这一切打包成exe文件来进行非法传播的。当然,我们只是基于技术原理来介绍的,大家切莫应用于不当目的哦。文章源自技术奇点-https://www.xerer.com/archives/30477.html
文章源自技术奇点-https://www.xerer.com/archives/30477.html
把python打包的PyOxidizer文章源自技术奇点-https://www.xerer.com/archives/30477.html
文章源自技术奇点-https://www.xerer.com/archives/30477.html
将Python代码转换为应用的python库就是PyOxidizer。PyOxidizer是一个免费的实用程序,可以将Python代码转换为单个可执行文件,以便在Windows,Mac和Linux等不同的操作系统上运行。它是由Mozilla开发人员Gregory Szorc创建,目标是让程序员更容易在Python中创建应用程序,最牛叉的是它也可以被非码农使用。并且它创建的应用程序兼容Windows,Mac和Linux三大平台。文章源自技术奇点-https://www.xerer.com/archives/30477.html
文章源自技术奇点-https://www.xerer.com/archives/30477.html
文章源自技术奇点-https://www.xerer.com/archives/30477.html
把python打包的PyOxidizer文章源自技术奇点-https://www.xerer.com/archives/30477.html
文章源自技术奇点-https://www.xerer.com/archives/30477.html
PyOxidizer可以生成一个可执行文件,其中包含功能齐全的Python解释器,扩展,标准库以及应用程序的模块和资源。由于该工具从内存加载所有内容并且未执行显式I / O,因此可以更快地启动和导入可执行文件。Szorc表示,普通计算机用户无需下载正确的软件库即可运行该应用程序。这是因为PyOxidizer生成嵌入Python的二进制文件。因此,用户无需安装或了解该语言。文章源自技术奇点-https://www.xerer.com/archives/30477.html
文章源自技术奇点-https://www.xerer.com/archives/30477.html
PyOxidizer安装也比较简单,运行如下指令:文章源自技术奇点-https://www.xerer.com/archives/30477.html
文章源自技术奇点-https://www.xerer.com/archives/30477.html
cargo install pyoxidizer文章源自技术奇点-https://www.xerer.com/archives/30477.html
文章源自技术奇点-https://www.xerer.com/archives/30477.html
使用pyoxidizer来创建程序。文章源自技术奇点-https://www.xerer.com/archives/30477.html
文章源自技术奇点-https://www.xerer.com/archives/30477.html
pyoxidizer init pyapp文章源自技术奇点-https://www.xerer.com/archives/30477.html
文章源自技术奇点-https://www.xerer.com/archives/30477.html
该pyoxidizer init命令将创建一个支持嵌入Python的新[Rust]项目。使用您要在其中创建新项目的目录调用它:文章源自技术奇点-https://www.xerer.com/archives/30477.html
文章源自技术奇点-https://www.xerer.com/archives/30477.html
创建的默认项目pyoxidizer init将生成一个嵌入Python的可执行文件,并默认启动Python REPL。让我们测试一下:文章源自技术奇点-https://www.xerer.com/archives/30477.html
文章源自技术奇点-https://www.xerer.com/archives/30477.html
cd pyapp文章源自技术奇点-https://www.xerer.com/archives/30477.html
$ pyoxidizer run文章源自技术奇点-https://www.xerer.com/archives/30477.html
no existing PyOxidizer artifacts found文章源自技术奇点-https://www.xerer.com/archives/30477.html
processing config file /home/gps/src/pyapp/pyoxidizer.toml文章源自技术奇点-https://www.xerer.com/archives/30477.html
resolving Python distribution...文章源自技术奇点-https://www.xerer.com/archives/30477.html
...文章源自技术奇点-https://www.xerer.com/archives/30477.html
Compiling pyapp v0.1.0 (/home/gps/src/pyapp)文章源自技术奇点-https://www.xerer.com/archives/30477.html
Finished dev [unoptimized + debuginfo] target(s) in 53.14s文章源自技术奇点-https://www.xerer.com/archives/30477.html
Running `target/debug/testapp`文章源自技术奇点-https://www.xerer.com/archives/30477.html
>>>文章源自技术奇点-https://www.xerer.com/archives/30477.html
文章源自技术奇点-https://www.xerer.com/archives/30477.html
如果一切顺利,会启动了一个Rust可执行文件,它启动了一个Python解释器,它启动了一个交互式Python调试器!尝试输入一些Python代码:文章源自技术奇点-https://www.xerer.com/archives/30477.html
文章源自技术奇点-https://www.xerer.com/archives/30477.html
>>> print("你好,世界")文章源自技术奇点-https://www.xerer.com/archives/30477.html
你好,世界文章源自技术奇点-https://www.xerer.com/archives/30477.html
文章源自技术奇点-https://www.xerer.com/archives/30477.html
到这里一切都搞定!一个简单的可将Python嵌入Rust可执行文件并启动的demo就完成了。至于更高级的自定义并打包成可执行文件的步骤,可以关注公众号,python_dada发送"pyoxidizer"获取对应的下载网址和具体介绍资料。文章源自技术奇点-https://www.xerer.com/archives/30477.html
文章源自技术奇点-https://www.xerer.com/archives/30477.html
最后的结语:文章源自技术奇点-https://www.xerer.com/archives/30477.html
文章源自技术奇点-https://www.xerer.com/archives/30477.html
以上从deepnude的由来和幕后的python技术都做了一个详细的介绍,希望能对大家提高python技术做出有趣的应用有所帮助。谢谢大家。文章源自技术奇点-https://www.xerer.com/archives/30477.html