Giter Site home page Giter Site logo

zhengjun-ai / moirephotorestoration-mcnn Goto Github PK

View Code? Open in Web Editor NEW
84.0 3.0 13.0 450 KB

This is an unofficial reproduction of paper Moir´e Photo Restoration Using Multiresolution Convolutional Neural Networks.(PyTorch)

License: MIT License

Python 100.00%
pytorch-implementation moire-pattern unofficial

moirephotorestoration-mcnn's Introduction

MoirePhotoRestoration-MCNN

This is an unofficial reproduction of paper Moir´e Photo Restoration Using Multiresolution Convolutional Neural Networks.(PyTorch)

First of all, you need to prepare the whole dataset of this paper, which is around 100G.
dataset download link : https://drive.google.com/drive/folders/109cAIZ0ffKLt34P7hOMKUO14j3gww2UC
another download link : https://huggingface.co/datasets/zxbsmk/TIP-2018

Requirements

  • torch >= 1.6.0
  • torchvision >= 0.7.0
  • pillow >= 7.2.0
  • GPU >= 3G

Training

Before starting to train the model, you need to run a script to clean the training set as shown below.
All hyper-parameters follow the instructions of the paper, so you don't need to change them.W

However, you should change the path of datasets to match your local environment.

python utils.py
python train.py --dataset /data_new/zxbsmk/moire/trainData --save ./model

Testing

Get PSNR of the testing set.

python test.py

Dataset

psnr distribution <12 12~14 14~17 17~20 20~22 22~24 >24
training set 72 2318 29816 37089 21195 15102 12856
testing set 8 227 2951 3809 2069 1463 1324
total 80 2545 32767 40898 23264 16565 14180

We can see that low quality image pairs whose PSNR is lower than 12 still exist in the dataset, which is against the author's declaration.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.