-
大小: 19.51MB文件类型: .zip金币: 1下载: 0 次发布日期: 2023-06-26
- 语言: 其他
- 标签: 图像降噪 GAN tensorflow
资源简介
使用tensorflow框架写的生成对抗网络用于图像降噪,降噪效果在测试集上表现非常好,可以参看https://blog.csdn.net/xiaoxifei/article/details/82498705 记载的效果
代码片段和文件信息
import tensorflow as tf
import tensorflow.contrib.slim as slim
from utils import *
def conv_layer(input_image ksize in_channels out_channels stride scope_name activation_function=lrelu reuse=False):
with tf.variable_scope(scope_name):
filter = tf.Variable(tf.random_normal([ksize ksize in_channels out_channels] stddev=0.03))
output = tf.nn.conv2d(input_image filter strides=[1 stride stride 1] padding=‘SAME‘)
output = slim.batch_norm(output)
if activation_function:
output = activation_function(output)
return output filter
def residual_layer(input_image ksize in_channels out_channels stride scope_name):
with tf.variable_scope(scope_name):
output filter = conv_layer(input_image ksize in_channels out_channels stride scope_name+“_conv1“)
output filter = conv_layer(output ksize out_channels out_channels stride scope_name+“_conv2“)
output = tf.add(output tf.identity(input_image))
return output filter
def transpose_deconvolution_layer(input_tensor used_weights new_shape stride scope_name):
with tf.varaible_scope(scope_name):
output = tf.nn.conv2d_transpose(input_tensor used_weights output_shape=new_shape strides=[1 stride stride 1] padding=‘SAME‘)
output = tf.nn.relu(output)
return output
def resize_deconvolution_layer(input_tensor new_shape scope_name):
with tf.variable_scope(scope_name):
output = tf.image.resize_images(input_tensor (new_shape[1] new_shape[2]) method=1)
output unused_weights = conv_layer(output 3 new_shape[3]*2 new_shape[3] 1 scope_name+“_deconv“)
return output
def deconvolution_layer(input_tensor new_shape scope_name):
return resize_deconvolution_layer(input_tensor new_shape scope_name)
def output_between_zero_and_one(output):
output +=1
return output/2
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-05-02 20:22 ImageDenoisingGAN-master\
文件 974091 2017-05-02 20:22 ImageDenoisingGAN-master\Project Proposal with summary of papers reviewed.pdf
文件 3740 2017-05-02 20:22 ImageDenoisingGAN-master\README.md
文件 1922 2017-05-02 20:22 ImageDenoisingGAN-master\conv_helper.py
目录 0 2017-05-02 20:22 ImageDenoisingGAN-master\libs\
目录 0 2017-05-02 20:22 ImageDenoisingGAN-master\libs\__pycache__\
文件 21634 2017-05-02 20:22 ImageDenoisingGAN-master\libs\__pycache__\utils.cpython-34.pyc
文件 21604 2017-05-02 20:22 ImageDenoisingGAN-master\libs\__pycache__\utils.cpython-35.pyc
文件 7777 2017-05-02 20:22 ImageDenoisingGAN-master\libs\__pycache__\vgg16.cpython-34.pyc
文件 7748 2017-05-02 20:22 ImageDenoisingGAN-master\libs\__pycache__\vgg16.cpython-35.pyc
文件 21009 2017-05-02 20:22 ImageDenoisingGAN-master\libs\utils.py
文件 9215 2017-05-02 20:22 ImageDenoisingGAN-master\libs\vgg16.py
文件 614 2017-05-02 20:22 ImageDenoisingGAN-master\main.py
文件 1487 2017-05-02 20:22 ImageDenoisingGAN-master\model.py
文件 14686038 2017-05-02 20:22 ImageDenoisingGAN-master\paper.pdf
文件 2063825 2017-05-02 20:22 ImageDenoisingGAN-master\result1.PNG
文件 1382910 2017-05-02 20:22 ImageDenoisingGAN-master\result2.png
文件 1284448 2017-05-02 20:22 ImageDenoisingGAN-master\result3.PNG
目录 0 2017-05-02 20:22 ImageDenoisingGAN-master\static\
目录 0 2017-05-02 20:22 ImageDenoisingGAN-master\static\css\
文件 442 2017-05-02 20:22 ImageDenoisingGAN-master\static\css\4-col-portfolio.css
文件 146010 2017-05-02 20:22 ImageDenoisingGAN-master\static\css\bootstrap.css
文件 121200 2017-05-02 20:22 ImageDenoisingGAN-master\static\css\bootstrap.min.css
目录 0 2017-05-02 20:22 ImageDenoisingGAN-master\static\fonts\
文件 20127 2017-05-02 20:22 ImageDenoisingGAN-master\static\fonts\glyphicons-halflings-regular.eot
文件 108738 2017-05-02 20:22 ImageDenoisingGAN-master\static\fonts\glyphicons-halflings-regular.svg
文件 45404 2017-05-02 20:22 ImageDenoisingGAN-master\static\fonts\glyphicons-halflings-regular.ttf
文件 23424 2017-05-02 20:22 ImageDenoisingGAN-master\static\fonts\glyphicons-halflings-regular.woff
文件 18028 2017-05-02 20:22 ImageDenoisingGAN-master\static\fonts\glyphicons-halflings-regular.woff2
目录 0 2017-05-02 20:22 ImageDenoisingGAN-master\static\js\
文件 69707 2017-05-02 20:22 ImageDenoisingGAN-master\static\js\bootstrap.js
............此处省略9个文件信息
- 上一篇:VS2005番茄助手
- 下一篇:vs网站+vs一般处理程序+图片缩略类库
评论
共有 条评论