图像艺术化-基于TensorFlow和PyTorch
Posted 人工智能学研社
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了图像艺术化-基于TensorFlow和PyTorch相关的知识,希望对你有一定的参考价值。
深度学习之图像艺术化
原图
![图像艺术化-基于TensorFlow和PyTorch](https://image.cha138.com/20210502/f43be21440cf4f8f91b1e3fc8f474a4f.jpg)
Style
![图像艺术化-基于TensorFlow和PyTorch](https://image.cha138.com/20210502/a775df152d7c47ce99a92c47f6af75d0.jpg)
艺术图
![图像艺术化-基于TensorFlow和PyTorch](https://image.cha138.com/20210502/0a8c0a44134648eb8b057ae44b144648.jpg)
原图
![图像艺术化-基于TensorFlow和PyTorch](https://image.cha138.com/20210502/4f3afc71f1a3444e82e4ad4a3c5f165b.jpg)
Style
![图像艺术化-基于TensorFlow和PyTorch](https://image.cha138.com/20210502/c54882ec6c794363adc9633ab39d13ae.jpg)
艺术图
先看一下图像艺术化的原理
![图像艺术化-基于TensorFlow和PyTorch](https://image.cha138.com/20210502/eecc6e82265d4013a79bedca7d69a7b4.jpg)
下面是基于TensorFlow的代码:
![图像艺术化-基于TensorFlow和PyTorch](https://image.cha138.com/20210502/9016fa78698a414ebb7295a1e3e8b763.jpg)
![图像艺术化-基于TensorFlow和PyTorch](https://image.cha138.com/20210502/4995126aafb347268eb374fdae3766eb.jpg)
![图像艺术化-基于TensorFlow和PyTorch](https://image.cha138.com/20210502/dbc073601cd344479367416f6f308418.jpg)
#导入库
import numpy as np
import tensorflow as tf
import scipy.io as sio
from PIL import Image
import matplotlib.pyplot as plt
人工智能学研社
人工智能学研社为广大好友提供最完整的机器学习、深度学习原理和案例源码,欢迎大家关注获取更多技术干货。
小编微信
以上是关于图像艺术化-基于TensorFlow和PyTorch的主要内容,如果未能解决你的问题,请参考以下文章
基于图像和文本特征的 TensorFlow 训练模型,具有多类输出
新书深度学习图像识别技术:基于TensorFlow Object Detection API和OpenVINO™ 工具套件
水果图像识别:基于 Arduino 和 TensorFlow Lite Micro