生成对抗网络降噪算法


使用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-masterProject Proposal with summary of papers reviewed.pdf
     文件        3740  2017-05-02 20:22  ImageDenoisingGAN-masterREADME.md
     文件        1922  2017-05-02 20:22  ImageDenoisingGAN-masterconv_helper.py
     目录           0  2017-05-02 20:22  ImageDenoisingGAN-masterlibs
     目录           0  2017-05-02 20:22  ImageDenoisingGAN-masterlibs\__pycache__
     文件       21634  2017-05-02 20:22  ImageDenoisingGAN-masterlibs\__pycache__utils.cpython-34.pyc
     文件       21604  2017-05-02 20:22  ImageDenoisingGAN-masterlibs\__pycache__utils.cpython-35.pyc
     文件        7777  2017-05-02 20:22  ImageDenoisingGAN-masterlibs\__pycache__vgg16.cpython-34.pyc
     文件        7748  2017-05-02 20:22  ImageDenoisingGAN-masterlibs\__pycache__vgg16.cpython-35.pyc
     文件       21009  2017-05-02 20:22  ImageDenoisingGAN-masterlibsutils.py
     文件        9215  2017-05-02 20:22  ImageDenoisingGAN-masterlibsvgg16.py
     文件         614  2017-05-02 20:22  ImageDenoisingGAN-mastermain.py
     文件        1487  2017-05-02 20:22  ImageDenoisingGAN-mastermodel.py
     文件    14686038  2017-05-02 20:22  ImageDenoisingGAN-masterpaper.pdf
     文件     2063825  2017-05-02 20:22  ImageDenoisingGAN-master
esult1.PNG
     文件     1382910  2017-05-02 20:22  ImageDenoisingGAN-master
esult2.png
     文件     1284448  2017-05-02 20:22  ImageDenoisingGAN-master
esult3.PNG
     目录           0  2017-05-02 20:22  ImageDenoisingGAN-masterstatic
     目录           0  2017-05-02 20:22  ImageDenoisingGAN-masterstaticcss
     文件         442  2017-05-02 20:22  ImageDenoisingGAN-masterstaticcss4-col-portfolio.css
     文件      146010  2017-05-02 20:22  ImageDenoisingGAN-masterstaticcssootstrap.css
     文件      121200  2017-05-02 20:22  ImageDenoisingGAN-masterstaticcssootstrap.min.css
     目录           0  2017-05-02 20:22  ImageDenoisingGAN-masterstaticfonts
     文件       20127  2017-05-02 20:22  ImageDenoisingGAN-masterstaticfontsglyphicons-halflings-regular.eot
     文件      108738  2017-05-02 20:22  ImageDenoisingGAN-masterstaticfontsglyphicons-halflings-regular.svg
     文件       45404  2017-05-02 20:22  ImageDenoisingGAN-masterstaticfontsglyphicons-halflings-regular.ttf
     文件       23424  2017-05-02 20:22  ImageDenoisingGAN-masterstaticfontsglyphicons-halflings-regular.woff
     文件       18028  2017-05-02 20:22  ImageDenoisingGAN-masterstaticfontsglyphicons-halflings-regular.woff2
     目录           0  2017-05-02 20:22  ImageDenoisingGAN-masterstaticjs
     文件       69707  2017-05-02 20:22  ImageDenoisingGAN-masterstaticjsootstrap.js
............此处省略9个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)