Skip to content

Latest commit

 

History

History
75 lines (47 loc) · 3.18 KB

README.md

File metadata and controls

75 lines (47 loc) · 3.18 KB

SRCNN--Using Tensorflow 2.0

作为一个简单的论文复现,用于了解 Tensorflow 同时也更加深入了解卷积神经网络。

Prerequisites

  • Tensorflow > 2.0
    也是想着通过这个项目去尝试使用 Tensorflow 2.0 然后复现一下超分辨比较经典的论文 SRCNN .

Usage

For training, python trains.py
For testing, python trains.py 但是需要注释一些内容

Problems

  • 因为使用的是 cifar10的数据集,会出现的问题就是它的图像数据的大小是 32*32 的, 所以没有做一些放大缩小的操作获取对应的 High Resolution Image -> Low Resolution Image 的操作。

  • 做的 KerasTensorflow 的训练并没有像 Pytorch 一样使用 tqdm 模块去做一些操作。

  • pytorch 要非常注意一点就是它的 Tensor 和 tensorflow 或者 keras 不一样,可能 tensorflow keras 是以 Size * H * W * Cpytorch 是以 Size * C * H * W 的方式去计算的,所以使用的数据需要通过 torch.permute 的 方式修改数据格式。

Result

做一个 result table :

Dataset Epochs Module Method psnr
cifar10 500 SRCNN tensorflow 56.0
cifar10 500 SRCNN keras 25.9
cifar10 500 SRCNN pytorch 26.49

tensorflow 可能是因为数据集的问题导致 psnr 的计算会出现一些小的问题

因为数据集的使用问题,所以模型的训练是没有意义的。
出于对cifar数据集的一个不了解,它是3232的,但是我将它 bicubic 放大成了 128128 作为 ground true。
然后训练数据 从 3232 resize 到 3232 用邻近插值,然后又 bicubic 放大成 128*128 作为训练数据,这个是无效的训练。 所以训练效果直接爆炸。
后续也不因数据集问题做更多的尝试和改进。整个内容当作对 tensorflow > 2.0 的一个入门尝试。

References

👇是对markdown使用的一些了解

This repository is implementation of the "Image Super-Resolution Using Deep Convolutional Networks".

Train

The 91-image, Set5 dataset converted to HDF5 can be downloaded from the links below.

Dataset Scale Type Link
91-image 2 Train Download
91-image 3 Train Download
91-image 4 Train Download
Set5 2 Eval Download
Set5 3 Eval Download
Set5 4 Eval Download