Giter Club home page Giter Club logo

cvf-sid_pytorch's Introduction

CVF-SID_PyTorch

This repository contains the official code to reproduce the results from the paper:

CVF-SID: Cyclic multi-Variate Function for Self-Supervised Image Denoising by Disentangling Noise from Image (CVPR 2022)

[arXiv] [presentation]

    

## Installation Clone this repository into any place you want. ``` git clone https://github.com/Reyhanehne/CVF-SID_PyTorch.git cd CVF-SID_PyTorch ``` ### Dependencies * Python 3.8.5 * PyTorch 1.7.1 * numpy * Pillow * torchvision * scipy

Expriments

Reults of the SIDD validation dataset

         

To train and evaluate the model directly please visit [SIDD](https://www.eecs.yorku.ca/~kamel/sidd/benchmark.php) website or [Drive](https://drive.google.com/drive/folders/1cG6uCUZcBMzulkw6g9ImBOIxy_cLtiLo?usp=sharing) and download the original `Noisy sRGB data` and `Ground-truth sRGB data` from `SIDD Validation Data and Ground Truth` and place them in `data/SIDD_Small_sRGB_Only` folder.

Pretrained model

Download config.json and model_best.pth from this link and save them in models/CVF_SID/SIDD_Val/ folder.

NOTE: The pretrained model is updated at March. 9th 2022.

You can now go to src folder and test our CVF-SID by:

python test.py --device 0 --config ../models/CVF_SID/SIDD_Val/config.json --resume ../models/CVF_SID/SIDD_Val/model_best.pth

or you can train it by yourself as follows:

python train.py --device 0 --config config_SIDD_Val.json --tag SIDD_Val

Citation

If you find our code or paper useful, please consider citing:

@inproceedings{Neshatavar2022CVFSIDCM,
  title={CVF-SID: Cyclic multi-Variate Function for Self-Supervised Image Denoising by Disentangling Noise from Image},
  author={Reyhaneh Neshatavar and Mohsen Yavartanoo and Sanghyun Son and Kyoung Mu Lee},
  booktitle={IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
  year={2022}
}

cvf-sid_pytorch's People

Contributors

myavartanoo avatar reyhanehne avatar

Stargazers

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

Watchers

 avatar

cvf-sid_pytorch's Issues

Is the noise zero-mean condition necessary

Hello, I would like to know if the noise is not zero-mean, if only part of the code needs to be modified to converge or the method can only be run under the assumption of zero-mean noise;

What is the matrix c denote?

Hello,I would like to ask,what is the matrix c below denote?
image
It would be appreciate if you could explain the meaning of std below:
image

Running program error

PS E:\githubProjects\CVF-SID_PyTorch\src> python test.py --device 0 --config ../models/CVF_SID/SIDD_Val/config.json --resume ../models/CVF_SID/SIDD_Val/model_best.pth
Traceback (most recent call last):
File "test.py", line 11, in
from torch.distributed.optim import DistributedOptimizer
File "D:\python3.8\lib\site-packages\torch\distributed\optim_init_.py", line 8, in
from .optimizer import DistributedOptimizer
File "D:\python3.8\lib\site-packages\torch\distributed\optim\optimizer.py", line 8, in
from torch.distributed.rpc import RRef
ImportError: cannot import name 'RRef' from 'torch.distributed.rpc' (D:\python3.8\lib\site-packages\torch\distributed\rpc_init_.py)

why we need groung truth?

Hello, I would like to ask, why it is mentioned in the paper that we do not need a clean image for self-supervised denoising, but the ground truth is required in the code?

Inquiry about the signal-independent noise map calculated in the code and the setup of single image training

Hi, it's me again! I am really interested in your work!
But I have found some questions about the technical detail.

According to figure 3a of the paper, you feed the signal-independent noise map with signal-dependent noise map into the network again and expect to get . I have some questions about this part.

  1. Why we need to feed the signal-dependent noise map as well? Why not just feed the signal-independent noise map and expect to get .
  2. According to the provided source code, it seems the signal-dependent noise map wasn't fed into the network?
    noise_w3, noise_b3, clean3 = self.model(padr_crop((noise_b)))

Apart from this, can you share more detail about the setup of single image training? For example, the hyperparameters you have used (epochs, learning rate, etc) for the image shown in the appendix.

Thank you so much!

How do you deal with the SIDD-Medium Dataset

Hello!
Thank you for your amazing job!
Could you release your detail information about the processing of SIDD-Medium Dataset?
There are only 320 noisy images in this dataset, so did you crop them in many patches before training (e.g. overlap, patch size), and then cropped these patches into 40*40 in training iter/epoch?
Or what's the length of your trainloader? Is ==320 or >>320 ?
Thank you in advance!

Question of the performance on SIDD validation dataset

Thanks for sharing the source code and the pre-trained model on SIDD validation dataset. I tested the provided pre-trained model on SIDD validation dataset and only got 34.14/0.855 (SPNR/SSIM).
image

Moreover, I tried to train the denoiser ( CVF-SID (S) ) on SIDD validation dataset directly, and I can only get 34.05/0.847.

I am using the same versions of python and pytorch as yours. I would like to know if I missed something important.

The test code doesn't work

I followed the steps you provided but the test code doesn't work as expected
After I executed the commands:
python test.py --device 0 --config ../models/CVF_SID/SIDD_Val/config.json --resume ../models/CVF_SID/SIDD_Val/model_best.pth
It returns the network structure and these are the last two lines:
Loading checkpoint: ../models/CVF_SID/SIDD_Val/model_best.pth
Checkpoint loaded. Resume training from epoch 501
And the program ends here and output nothing.

I think there's something wrong with the config or the code?

A question about test result

Hello, I want to know how to modify the test code to realize my demand, produce the denoised images. Could you tell me the solution? thx.

how to update self.train_metrics in a training epoch?

self.train_metrics = MetricTracker('Total_loss', writer=self.writer)
I am puzzled by how to maintain the values of self.train_metrics in trainer.py?
I did not find the implementation of the self.train_metrics.update() in your coding

DND数据集

Dear Author:I am not able to get the DND benchmark dataset at the moment. Can you please share the dnd benchmark dataset zip package with me?

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.