在colab上运行style-transfer
1, 打开chrome浏览器,输入以下网址,打开风格转换主文件
可能会有点慢,因为要加载的环境较多。打开后界面如下:
2, 修改设置,使用GPU
3, 导入依赖文件
因为15_Style_Transfer.ipynb依赖vgg16模型,需要导入github上的整个项目文件到colab缓存。
点击“+代码”,输入以下命令
!git clone https://github.com/Hvass-Labs/TensorFlow-Tutorials.git
运行完毕后,可以看到当前目录下多了个TensorFlow-Tutorials子目录。
4, 切换工作目录
为了当前笔记本文件能正确找到vgg16.py文件,需要切换当前目录到TensorFlow-Tutorials目录。
5, 运行
光标定位到imports段,按ctrl+F10,运行其后所有代码。整个过程需要约3分钟左右。其中绝大部分时间花在vgg16模型文件的下载上,共550M大小。
部分输出如下:
tf.__version__
'1.13.0-rc2'
6, 如何合成一张自己的图片?
首先,将图片上传网络,记下地址,然后采用wget下载到当前目录
!wget https://files-cdn.cnblogs.com/files/jackkwok/me.bmp
然后,修改content_filename 为刚导入的文件。
由于照片尺寸较大,达5M多,因此运行时间稍长。
CPU times: user 1min 2s, sys: 31.8 s, total: 1min 34s
Wall time: 2min
在colab上运行style-transfer的更多相关文章
- 课程四(Convolutional Neural Networks),第四 周(Special applications: Face recognition & Neural style transfer) —— 2.Programming assignments:Art generation with Neural Style Transfer
Deep Learning & Art: Neural Style Transfer Welcome to the second assignment of this week. In thi ...
- fast neural style transfer图像风格迁移基于tensorflow实现
引自:深度学习实践:使用Tensorflow实现快速风格迁移 一.风格迁移简介 风格迁移(Style Transfer)是深度学习众多应用中非常有趣的一种,如图,我们可以使用这种方法把一张图片的风格“ ...
- [C4W4] Convolutional Neural Networks - Special applications: Face recognition & Neural style transfer
第四周:Special applications: Face recognition & Neural style transfer 什么是人脸识别?(What is face recogni ...
- 神经风格转换Neural Style Transfer a review
原文:http://mp.weixin.qq.com/s/t_jknoYuyAM9fu6CI8OdNw 作者:Yongcheng Jing 等 机器之心编译 风格迁移是近来人工智能领域内的一个热门研究 ...
- DeepLearning.ai-Week4-Deep Learning & Art: Neural Style Transfer
1 - Task Implement the neural style transfer algorithm Generate novel artistic images using your alg ...
- Perceptual Losses for Real-Time Style Transfer and Super-Resolution and Super-Resolution 论文笔记
Perceptual Losses for Real-Time Style Transfer and Super-Resolution and Super-Resolution 论文笔记 ECCV 2 ...
- pytorch实现style transfer
说是实现,其实并不是我自己实现的 亮出代码:https://github.com/yunjey/pytorch-tutorial/tree/master/tutorials/03-advanced/n ...
- 在Linux服务器上运行Jupyter notebook server教程
在Linux服务器上运行Jupyter notebook server教程 很多deep learning教程都推荐在jupyter notebook运行python代码,方便及时交互.但只在本地运行 ...
- 在Web上运行Linux—js/linux模拟器
一个叫Fabrice Bellard 的程序员写了一段Javascript在Web浏览器中启动Linux(原网页,我把这个网页iframe在了下面),目前,你只能使用Firefox 4和Chrome ...
随机推荐
- download file by python in google colab
https://stackoverflow.com/questions/15352668/download-and-decompress-gzipped-file-in-memory You need ...
- 一步一步学Silverlight 2系列(30):使用Transform实现更炫的效果(下)
概述 Silverlight 2 Beta 1版本发布了,无论从Runtime还是Tools都给我们带来了很多的惊喜,如支持框架语言Visual Basic, Visual C#, IronRuby, ...
- 扩展KMP(占位)
先放代码. #include<cstdio> #include<iostream> #include<cstring> using namespace std; ; ...
- webpack项目调试以及独立打包配置文件
webpack项目调试 -sourcemap webpack配置提供了devtool这个选项,如果设置为 ‘#source-map’,则可以生成.map文件,在chrome浏览器中调试的时候可以显示源 ...
- VS2010中编写x64汇编的具体方法
编写涉及系统特性的一些底层程序,特别是ShellCode,不可避免地要采用直接编写汇编代码的方式. 在目标平台为x86模式时,可以直接使用内联汇编,这个很多人都比较熟悉了,也非常地方便. 但是当目标平 ...
- codeforces 724D
注意到要字典序最小,从而变为水题. 从a选到z,每次必然是先看选部分当前字符x是否能满足覆盖,若不能则选上所有的字母x,不然break,输出答案. 进行26次dp即可. #include <cs ...
- View Programming Guide for iOS ---- iOS 视图编程指南(五)---Animations
Animations Animations provide fluid visual transitions between different states of your user inter ...
- python学习笔记7-异常处理
1 写弄成了读 1 try: fh = open("testfile", "r") fh.write("This is my test file fo ...
- git提交历史不显示自己账户的问题
其实这个问题本身也不大好描述.还是上图好了 问题就如同途中倒数第二次提交.明明就是我提交的,却不显示我的账号.个人页面也不反映这次提交. 后来发现问题所在,要想正确显示,必须要把对这个项目的邮箱设 ...
- POJ3616【基础DP】
//因为同一点结束的时间段会有多个,这里没考虑: //无限wa: const int N=1e6+7; int b[N]; LL a[N]; LL dp[N]; struct asd{ int s; ...