Giter Site home page Giter Site logo

ffnet's Introduction

FFNet

Joint Demosaicing and Denoising with Frequency Domain Features

Contents

  1. Environment
  2. Train
  3. Test
  4. Dataset
  5. Other

Environment

python=3.8 numpy=1.21.2 opencv-python=4.5.5.64
pillow=8.4.0 numba=0.55.1 scikit-image=0.18.3
pytorch=1.10.0 torchvision=0.11.1 cudatoolkit=11.3

Train

train JDD:

python train.py --phase train --task JDnDm --model FFNet --in_type noisy_rgb

train DM:

python train.py --phase train --task DM --model FFNet-DM-B --in_type rgb

If you want to train other model, please change --model "your model name". The model weights will be saved in ./logs/.../checkpoint/xxx.pth folder.

Test

Our pretrain models in Google drive.

For JDD:

To test FFNet, run the command below:

python jdd_test.py --phase test --model FFNet --test_path dataset/JDnDm/test/ --pretrain logs/JDnDm/DIV2K/model_FFNet-in_type_noisy_rgb-C_64-B_32-Patch_128-Epoch_200/checkpoint/model_FFNet-in_type_noisy_rgb-C_64-B_32-Patch_128-Epoch_200_checkpoint_best.pth

For DM:

To test FFNet-DM-B, run the command below:

python dm_test.py --phase test --model FFNet-DM-B --test_path dataset/JDnDm/test/ --pretrain logs/JDnDm/DIV2K/model_FFNet-DM-B-in_type_rgb-C_64-B_32-Patch_128-Epoch_200/checkpoint/model_FFNet-DM-B-in_type_rgb-C_64-B_32-Patch_128-Epoch_200_checkpoint_best.pth 

The test logs will be saved in ./logs/.../xxx_test.log folder and results will be saved in ./logs/.../results/... folder.

Dataset

Download DIV2K train dataset and Kodak, McMaster and Urban100 test datasets (you can also download test datasets in our Google Drive).

You can obtain the train subdataset from BasicSR by scipts/data_preparation/extract_subimages.py (only extract HR images).

The data folder should be like the format below:

dataset
├─ DIV2K
│ ├─ train     % 32592 images
│ │ ├─ DIV2K_train_HR_sub
│ │ |  ├─ xxxx.png
│ │ |  ├─ ...
│ | |
| | |
│ ├─ valid     % 4152 images
│ │ ├─ DIV2K_valid_HR_sub
│ │ |  ├─ xxxx.png
│ │ |  ├─ ...
|
|
├─ JDnDM
│ ├─ test
| │ ├─ Kodak     
| │ │ ├─ xxxx.png
│ | | ├─ ......
│ │ |
| | |
│ | ├─ McMaster
│ │ | ├─ xxxx.png
│ │ | ├─ ......
| | |
| | |
│ | ├─ Urban100   
│ │ | ├─ xxxx.png
│ │ | ├─ ......
...

Other

For JDD: JDNDMSR, CDLNet.

For DM: IRCNN, DPIR, RSTCANet.

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.