SIUN复现

Scale-Iterative Upscaling Network for Image Deblurring

代码链接:GitHub - minyuanye/SIUN: Sharp Image Deblurring

1. 配置环境:tensorflow-gpu 1.4.0+cuda8+cudnn6

2. 数据集:使用自己的成对数据集,我放置的路径如下

修改SIUN-master\code\src\lib\data_producer.py中读取文件的代码如下:

def __traversalDir(self,root):
    for name in os.listdir(root):
        fullPath = os.path.join(root, name)
        if os.path.isdir(fullPath):
            self.__directoryList.append(fullPath)
    for directory in self.__directoryList:
        if directory.endswith('blur'):
            for parent, dirnames, filenames in os.walk(directory):
                for filename in filenames:
                    self.__fileBlurList.append(os.path.join(parent,filename))

修改SIUN-master\code\src\config.py中的文件路径

3. 打开deblur.py文件,修改True或False选择训练、测试、预测等功能。

def getArgs():
    parser = argparse.ArgumentParser()
    parser.add_argument("--train", help="train the model", action="store_true", default=True)
    parser.add_argument("--test", help="test the model", action="store_true", default=False)
    parser.add_argument("--apply", help="use the model", action="store_true", default=False)
    parser.add_argument("--verify", help="verify the model", action="store_true", default=False)
    parser.add_argument("--gpu", help="test device list", default="0")
    parser.add_argument("--file-path", help="file path of the input image")
    parser.add_argument("--dir-path", help="dir path of the input images")
    parser.add_argument("--result-dir", help="deblur result dir of the input images")
    parser.add_argument("--iter", help="iter times", default=0, type=int)
    return parser.parse_args()

  • 9
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值