- 博客(9)
- 收藏
- 关注
原创 用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
转载 cuda10.0 + tf115
https://blog.youkuaiyun.com/wzyaiwl/article/details/107697278
2021-05-21 10:44:29
189
原创 jupyter notebook后台运行
1.后台运行 nohup jupyter notebook --allow-root > jupyter.log 2>&1 & 2.ssh连接 ssh -N -f -L localhost:8888:127.0.0.1:8888 user@服务器端ip 3.结束进程 ps -a 找到jupyter进程id kill -9 pid
2021-05-20 09:54:53
2154
转载 将conda环境添加到jupyter notebook中
在jupyter notebook中添加conda环境 source activate 虚拟环境名 conda install ipykernel python -m ipykernel install --user --name 虚拟环境名 --display-name "自定义名字“ jupyter kernelspec list #查看当前notebook中所具有的kernel 删除conda环境 jupyter kernelspec remove 'python myenv' #删除配置
2021-05-18 21:12:06
320
原创 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
原创 参数列表及所代表的含义
参数 含义 备注 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
原创 处理内容图像
处理内容图像 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
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅