您现在的位置是:热点 >>正文
20分钟,这个AI就能创造复杂艺术作品!1080显卡就能跑
热点3130973人已围观
简介...
本文经AI新媒体量子位(公众号ID:QbitAI)授权转载,转载请联系出处。
20分钟生成复杂的艺术作品,而且还是用英伟达上上代的1080显卡?
现在神经网络上手门槛这么亲民了吗?
没错,这是一个叫做neural-style-pt的风格迁移模型,基于Pytorch实现,而且20刚刚开源!
有关这个算法模型的话题在Reddit上才发布一天,热度接近2000。
neural-style-pt,真的酷炫又亲民吗?
丰富的融合方式
neural-style-pt是论文A Neural Algorithm of Artistic Style的Pytorch实现。
论文介绍了一分钟种利用卷积神经网络将一张图片的内容,与另一张图片的风格相结合的算法,就是我们熟知的“风格迁移”网络。
比如,将《星空》的艺术风格映射到一张斯坦福校园的夜景照片上:
或者根据给定图像的不同艺术风格,分别融合进目标图片:
除了“分别”融合,还能把多个艺术风格融进一张图片:
从左上,这角顺时针开始风格分别为”星空 “+”呐喊”、”呐喊 “+”构图七(瓦西里·康定斯基油画)“、”坐着的裸女(莫蒂里安尼油画) “+”构图七”、”坐着的裸体 “+”星空”。
在进行风格迁移时,添加“-original_colors 1”指令,还可以只改变风格,不改变原图颜色:
108个A0卡就能跑?
根据后台和优化器的不同,算法运行速度会有很大差异。
在Tesla K80上使用512像素图片迭代500次时间参考:
后台nn、优化器L-BFGS: 117秒 后台nn、优化器 ADAM: 100秒 后台cudnn -优化器L-BFGS: 124秒 后台cudnn -优化器ADAMI就:107秒 后台cudnn -cudnn_autotune -优化器L-BFGS: 109秒 后台cudnn -cudnn_autotune -优化器ADAM: 91秒
而在GTX 1080上,相同基准下时间更快:
后端nn -优化器L-BFGS: 56秒 后台nn -优化器 ADAM: 38秒 后台cudn能创n -优化器L-BFGS: 40秒 后台cudnn -优化器ADAM:40秒 后台cudnn -cudnn_autotune -优化器 lbfgs: 23秒 后台cudnn -cudnn_autotune -优化器ADAM: 24秒
结合当下1080卡的售价,不得不说,这样的门槛,对于机器学习来说,造复已经很香了。
默认情况下,neural-style-pt使用后端进行卷积,L-BFGS进行优化。但会使用大量的内存,可以通过以下方法来减少内存的使用。
使用cuDNN,添加-backend cudnn来使用cuDNN后端。而使用ADAM时,添加-optimizer adam来使用A杂艺DAM而不是L-BFGS。
在默认设置下,neural-style-pt在系统上使用了大约3.7GB的GPU内存;切换到ADAM和cuDNN可以将GPU内存占用减少到大约1GB。
如何上手试玩
安装neural-style-pt,首先要准备好Pytorch。
然后,使用下方一句话指令就术作能安装已经训练好的模型:
python models/download_models.py
安装完以后,上手试玩也很简单,一行代码就能实现:
python neural_style.py -style_image-content_im品!age
如果要载入多种风格,需要分隔不同的图片文件名:
-style_image starry_night.jpg,the_scream.jpg
注意,图片名称要包含完整的地址路径。
基本操作就是这些。
neural-style-pt还有一点强大10的功能,就是可以使用多个不同的计算设备来处理高分辨率图像。
不同的设备会输出不同网络层的计算结果。
你可以用-gpu指令控制使用哪些GPU和CPU设备,你也可以用-multidevice_strategy控制如何在不同设备上分割层。
例如,在一个有四个GPU的服务器中,指令“-gp80u 0,1,2,3”,指按顺序在GPU 0、1、2和3上进行处理。
同时给出 -multidevice_strategy 3,6,12指令,表示前两层应该在GPU 0上计算,第3到5层应该在GPU 1上计算,第6到11层应该在GPU 2上计算,其余的层应该在GPU 3上计算。
根据你的需求调整显卡-multidevice_strategy,可以达到输出的最大分辨率。
下面是一张4016x2213分辨率图像,是在使用8个Tesla K80 GPU的服务器上生成的:
1080显卡入门,还能“分布式”计算,这么酷炫好玩低门槛的风格迁移网络,赶快来试试吧~
传送门:
https://gi就能thub.com/ProGamerGov/neural-style-pt
Tags:
上一篇:标签: 冷酸灵 医研 小童 厨邦
下一篇:数据可视化,我习惯于用这些工具
相关文章
标签: 货拉拉 市场监管总局 反垄断整改 平台抽成
热点云梦级6月18日云梦级消息,据央视新闻报道,前期,市场监管总局依据《中华人民共和国反垄断法》公开约谈货拉拉,要求其停止利用算法不合理压低货运价格、利用平台规则实施强制独家车贴等行为,全面开展自查整改,...
【热点】
阅读更多Scale AI 起诉前员工与新雇主 Mercor:指控盗取百份机密文件牵涉核心客户争夺
热点数据训练平台巨头 Scale AI 于周三对前销售员工 Eugene Ling 及其新东家、AI 初创公司 Mercor 提起诉讼,指控二者涉嫌窃取机密信息,意图非法争夺 Scale 的核心客户资源。...
【热点】
阅读更多标签: 蘑菇车联 自动驾驶巴士 付强 新质生产力
热点云梦级3月5日云梦级消息,2026 年是 “十五五” 规划开局之年,培育发展新质生产力成为经济社会高质量发展的重要战略支点。交通作为国民经济大动脉,是新质生产力培育的关键应用场景,自动驾驶技术则是公共...
【热点】
阅读更多
热门文章
最新文章
友情链接
- 标签: 康师傅
- https://www.wou.edu.my/?s=谷歌霸屏软件【tg:seogoogle987】,WVG
- https://www.navylookout.com/?ID=nSBR6Ivdu6lZg1yr2SDs30Lo5sTs76yJ&s=谷歌霸屏软件【tg:seogoogle987】,D9B
- https://hsmoa.com/search?query=谷歌霸屏软件【tg:seogoogle987】mBG
- https://www.xvideos.com/tags/谷歌霸屏软件【tg:seogoogle987】,vyE
- https://www.yr.no/en/search?q=谷歌霸屏软件【tg:seogoogle987】,TE3
- https://www.tailoy.com.pe/catalogsearch/result/?q=谷歌霸屏软件【tg:seogoogle987】,j1Q
- https://www.yidian51.com/taobao/谷歌霸屏软件【tg:seogoogle987】,y0X
- https://www.rea.govt.nz/search?searchterm=谷歌霸屏软件【tg:seogoogle987】,tda
- https://www.temu.com/search_result.html?search_key=谷歌霸屏软件【tg:seogoogle987】Z6V
- https://www.lneg.pt/en/?s=谷歌霸屏软件【tg:seogoogle987】,CVe
- https://www.thealexandrian.net/?s=谷歌霸屏软件【tg:seogoogle987】,RgE
- https://www.losgatoschamber.com/list/search?action=SEARCH&q=谷歌霸屏软件【tg:seogoogle987】,1hL
- https://www.metalmensales.com/?action=QUERY&s=谷歌霸屏软件【tg:seogoogle987】,5F1
- https://www.maafushidive.com?collections?vendors?q=谷歌霸屏软件【tg:seogoogle987】,qy9
- https://www.flickr.com/photos/tags/谷歌霸屏软件【tg:seogoogle987】CWP
- https://www.wattpad.com/search/谷歌霸屏软件【tg:seogoogle987】lPk
- https://www.wellbees.com/catalogsearch/result/?action=CHECK&q=谷歌霸屏软件【tg:seogoogle987】,djR
- https://www.pacific-lifestyle.co.uk/search?sort=alphabetical&term=谷歌霸屏软件【tg:seogoogle987】,LVI
- https://www.lindseymedicalsupply.com/search/谷歌霸屏软件【tg:seogoogle987】,IcI
- https://www.teamlab.art/pt/?submit=谷歌霸屏软件【tg:seogoogle987】,rHo
- https://www.u-bourgogne.fr/?cat=117&s=谷歌霸屏软件【tg:seogoogle987】,lcn
- https://www.kingston.gov.uk/site-search/results/?q=谷歌霸屏软件【tg:seogoogle987】,2gb
- https://www.nextavenue.org/?action=QUERY&s=谷歌霸屏软件【tg:seogoogle987】,aYY
- https://www.zisha.com/shop/list.shtml?wap_keyword=谷歌霸屏软件【tg:seogoogle987】,Wun
- https://www.ncetm.org.uk/search?action=CHECK&q=谷歌霸屏软件【tg:seogoogle987】,dEc
- https://www.localfootdoc.com/?s=谷歌霸屏软件【tg:seogoogle987】,jM8
- https://www.samen-maier.at/search/谷歌霸屏软件【tg:seogoogle987】,rn6
- https://www.rookwinkel.nl/catalogsearch/result/index/?q=谷歌霸屏软件【tg:seogoogle987】,5fK
- https://www.totolink.vn/search/谷歌霸屏软件【tg:seogoogle987】,LGx
- https://www.lyrics.com/lyrics/kkk3谷歌霸屏软件【tg:seogoogle987】,C5z
- https://www.springfieldlibrary.org/library/?s=谷歌霸屏软件【tg:seogoogle987】,DRJ
- https://www.rotherham.gov.uk/site-search/results/?q=谷歌霸屏软件【tg:seogoogle987】,k8e
- https://store.line.me/search/sticker/ja?q=谷歌霸屏软件【tg:seogoogle987】DuR
- https://www.wheels24.gr/?action=CHECK&s=谷歌霸屏软件【tg:seogoogle987】,w4p
- https://www.qwant.com/?q=谷歌霸屏软件【tg:seogoogle987】,axq
- https://www.valuecolleges.com/?action=QUERY&s=谷歌霸屏软件【tg:seogoogle987】,fgx
- https://www.vet-direct.com/search?cat=72&term=谷歌霸屏软件【tg:seogoogle987】,TJB
- https://www.qylaws.com/search/谷歌霸屏软件【tg:seogoogle987】,QAG
- https://www.mdbg.net/chinese/dictionary?page=worddict&wdrst=0&wdqb=谷歌霸屏软件【tg:seogoogle987】,Ndt
- https://www.remit.co.jp/zh/?s=谷歌霸屏软件【tg:seogoogle987】,JoP
- https://www.sweat.com/collections/vendors?q=谷歌霸屏软件【tg:seogoogle987】,NEP
- https://wydden.com/?ID=r8w9WMSKWkOcmiaFWaUv0dzMdqZWfKtF&s=谷歌霸屏软件【tg:seogoogle987】,GRf
- https://www.sic-info.org/?s=谷歌霸屏软件【tg:seogoogle987】,pvN
- https://www.jusoen.com/addreng.asp?p1=谷歌霸屏软件【tg:seogoogle987】NIp
- https://www.niaogebiji.com/pc/article/search?keyword=谷歌霸屏软件【tg:seogoogle987】,Kad
- https://www.unclefossil.com/search/谷歌霸屏软件【tg:seogoogle987】gad_source=1&gclid=Cj0KCQjw_-GxBhC1ARIsADGgDjsNKplUXa2F6YGlHBK2sHDQ88cgsJBb05DyO99TV9jNq_cT0kGMqyQaAgHQEALw_wcB
- https://www.otakuninjahero.com/en/search/谷歌霸屏软件【tg:seogoogle987】,eNk
- https://www.lee.com/search?q=谷歌霸屏软件【tg:seogoogle987】,Wlg
- https://www.goodreads.com/quotes/tag/谷歌霸屏软件【tg:seogoogle987】ZHd
- https://www.woorden.org/spreekwoord.php?woord=谷歌霸屏软件【tg:seogoogle987】,qMe