Neural Style Transfer for Fluid Sim
dorya
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
用tensorflow实现cv2.blur
blur_size = 3 # 读取图像 img = np.ones((1,5, 5, 8), dtype=np.float32) # 通道数为8 mean_filter = tf.ones((blur_size, blur_size, 1, 8), dtype=tf.float32) / (blur_size * blur_size) 原文链接:https://blog.youkuaiyun.com/Strive_For_Future/article/details/108576989 ...原创 2021-06-01 20:50:29 · 266 阅读 · 0 评论 -
Styler类的变量
rng rng是numpy数组的随机种子 self.rng = np.random.RandomState(self.seed) graph ???这里的图并没有使用inception网络 self.graph = tf.Graph() # 这里使用graph_def作为inception网络 with tf.gfile.GFile(self.model_path, 'rb') as f: graph_def = tf.GraphDef() graph_def.ParseFr.原创 2020-12-21 15:24:32 · 144 阅读 · 0 评论 -
参数列表及所代表的含义
参数 含义 备注 d 所有帧的密度场 shape: [n_frames, 200, 300, 200] v 所有帧的速度场 shape: [n_frames, 200, 300, 200, 3] lr 学习率 像素的归一化和值作为初始学习率的权重,每一帧图像使用一个学习率 mask 掩码 对密度场用指定的sigma进行高斯过滤 (content_target) 内容图像 将内容图像裁切成密度场x和y轴的形状 (style_target) 风格图像 将风格图像裁切成密度场x...原创 2020-12-19 17:17:01 · 1272 阅读 · 1 评论 -
处理速度场
为x轴添加一行0元素 vx = np.dstack((v,np.zeros((v.shape[0],v.shape[1],1,v.shape[3])))) 设原速度场数组v的shape为[200, 300, 200, 3],dstack以后shape为[200, 300, 201, 3]. 小测试:原数组为 [[[[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]], [[13, 14, 15, 16], [17, 18, 19, 20], .原创 2020-12-19 10:11:57 · 650 阅读 · 2 评论 -
加载密度场
读取文件路径和保存文件路径 # set file path format d_path_format = os.path.join(args.data_dir, 'd', '%03d.npz') # directories for some visual results d_dir = os.path.join(args.log_dir, 'd') # original 预留密度场和???列表 把所有密度场一次性全部读取入列表中,??? d = [] d_img_amount = [] 读取.原创 2020-12-18 22:55:43 · 319 阅读 · 0 评论 -
处理内容图像
处理内容图像 from PIL import Image import numpy as np 读取图像,并转化为float类型。 content_target = np.float32(Image.open(config.content_target)) 去掉图像的透明度通道。 有的图像格式除了RGB通道外,还有透明度通道。因此,去掉图像最后一维的最后一列。 图像的维度:[Height, Width, RGB] # remove alpha channel if content_target.原创 2020-12-18 18:31:30 · 199 阅读 · 1 评论
分享