Giter VIP home page Giter VIP logo

srgb-real-noise-synthesizing's Introduction

sRGB Real Noise Synthesizing with Neighboring Correlation-Aware Noise Model (CVPR'23)

This is the official inplementation of CVPR 2023 paper sRGB Real Noise Synthesizing with Neighboring Correlation-Aware Noise Model.

Abstract

Modeling and synthesizing real noise in the standard RGB (sRGB) domain is challenging due to the complicated noise distribution. While most of the deep noise generators proposed to synthesize sRGB real noise using an end-to-end trained model, the lack of explicit noise modeling degrades the quality of their synthesized noise. In this work, we propose to model the real noise as not only dependent on the underlying clean image pixel intensity, but also highly correlated to its neighboring noise realization within the local region. Correspondingly, we propose a novel noise synthesizing framework by explicitly learning its neighboring correlation on top of the signal dependency. With the proposed noise model, our framework greatly bridges the distribution gap between synthetic noise and real noise. We show that our generated “real” sRGB noisy images can be used for training supervised deep denoisers, thus to improve their real denoising results with a large margin, comparing to the popular classic denoisers or the deep denoisers that are trained on other sRGB noise generators.

For more details, please refer to our original paper.

baseline

Setup

Requirements

  • PyTorch 1.13.1
  • CUDA 11.7
  • Python 3.9
  • opencv 4.7.0
  • numpy 1.21.5

Directory

Descriptions of code directory.

sRGB-Noise-Synthesis
|-- data
|-- data_preparation
|-- Datasets
    |-- SIDD_Medium_Srgb_Parts
    |-- SIDD_Medium_Crop
|-- models
|-- options
|-- pretrain
|-- saves
|-- test
    |-- imgs
    |-- saves
|-- utils

Pretrained models

Download pretrained checkpoints here and place them into /pretrain/ folder.

Google drive: | Camera name | IP | G4 | GP | N6 | S6 |

Quick test

Test our noise synthesis pipeline with pre-trained models

  1. place noisy-clean image pairs into /test/imgs/ folder. Name noisy image as noisy.png, clean image as clean.png.
  2. Run the code as python main_test.py --cam_name IP --NeCA_type S. You can also control detail test configurations (e.g. cam_name: IP/GP/G4/N6/S6, NecA_type: S/W).
  3. Images are saved in /test/saves/ folder.

Train

  1. Download SIDD-Medium sRGB part at here.
  2. Use Crop_SIDD.py to crop images into 512×512 patches.
  3. Run the code as
python main_train_jointly.py --dir_save './saves/noise_syn/' --train_img_dir './Datasets/SIDD_Medium_Crop/' --data_prep_dir './data_preparation/' --not_aug --patch_size 96 --cam_name GP --batch_size 16 --num_workers 8 --verbose --epochs 5000 --gpu_ids 0 --joint_start_epoch 50 --seperate_train --gan_mode wgangp --test_epoch 5 --lr_decay_2 80 

Results

Visual results

Denoising performance on SIDD/DND benchmark

Reference

Our implementation is based on KAIR, CycleGAN. We would like to thank them.

Citation

@InProceedings{Fu_2023_CVPR,
    author    = {Fu, Zixuan and Guo, Lanqing and Wen, Bihan},
    title     = {sRGB Real Noise Synthesizing With Neighboring Correlation-Aware Noise Model},
    booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
    month     = {June},
    year      = {2023},
    pages     = {1683-1691}
}

srgb-real-noise-synthesizing's People

Contributors

xuan611 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

srgb-real-noise-synthesizing's Issues

Question about training code

Hello. Thank you for providing the code. I have a question about your code, specifically in main_train_jointly.py. Why is camera_name being used? Do we need to train separately for each camera name? I thought we could train the noise altogether since we have the Gain Estimation network. Also, there seems to be an issue with the parameters of the lr_scheduler's MultiStepLR. The milestones of the MultiStep LR should be a list, but the current code has a single integer value, which would cause the training to not work. Could you please provide the actual milestones values used in the paper's experiments?

SIDD and DND benchmark code

Hello. The NeCA model has been trained separately for each device type, with distinct generator and denoiser models for each. However, there is no information about device types in the SIDD and DND benchmarks, and especially in the case of DND, the device types are not consistent. How were the experimental results in Table 2 conducted? I'm inquiring whether you can provide the relevant code.

lr scheduler?

Dear author, thanks for updating your code. I found that the updated lr scheduler milestone is set to 1000000 while the maximum epoch is set to 5000, which is confusing to me as the lr scheduler seems to be meaningless in this case.

Evaluation and comparison

Hi, this work impressed me a lot, and thanks for sharing the code! I have the following questions, and it would be appreciated if you could answer them.

  1. Did you analyze the impact of the number of parameters on the performance (especially when comparing with C2N and Flow-sRGB)? It's okay to compare like that since the architectures are different, but it would be more convincing if you mentioned the model size.
  2. In Sec. 4.2 Preparation: Notably, the gain factors used for evaluation are estimated by GENet from the noisy images paired with the clean images, as they cannot be set to random values for evaluation. If I understood correctly, the predicted noisy image and the noisy image for noise level estimation share the same clean signal. If you choose another noise patch with the same ISO level as the target noisy patch, I am interested in the performance. In other words, I am curious about the robustness of GENet when estimating noise level.
  3. Besides KL, the intensity vs. variance (see Flow-sRGB) curves are important characteristics of noise modeling in sRGB space. Do you have a plan to visualize them?

Many thanks again, and waiting forward to your reply!

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.