Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hi~Great work and some questions #10

Open
lm1603898577 opened this issue Jan 22, 2025 · 1 comment
Open

Hi~Great work and some questions #10

lm1603898577 opened this issue Jan 22, 2025 · 1 comment

Comments

@lm1603898577
Copy link

Hi~The Spring Festival is approaching, which brings joy. However, I still have a question I'd like to ask.
When we run our own dataset, we are unable to obtain excessive image data information. Therefore, I need to manually preset the ISP module. Here, I notice that our inference code has a section for noise calibration.

"exifdata = json.loads(subprocess.run(['exiftool', '-j', RawPath], stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True).stdout)[0]
noise_profile = torch.tensor([float(x) for x in exifdata.get('NoiseProfile', None).split()])"

My question is divided into two parts. In the paper, I did not see the application of this part. The paper specifies the establishment of a noise model and the separation of estimated noise from the data for model input. So, why is there still model input in the Inference section, and what is its purpose?
Secondly, if I don't have this part, how can I run the model? Is it supported, and what impacts might there be?
Thank you very much for your answer. I appreciate your attention and wish you a happy holiday!

@Lyricccco
Copy link
Collaborator

Lyricccco commented Jan 31, 2025

Hi, wish you also have a nive Spring Festival Holiday! 😃 Sorry for the late response.
I’d be happy to clarify your questions:

  1. About 'unable to obtain excessive image data information'

    From my experience, most standard RAW files (e.g. .DNG .ARW) contain EXIF metadata that can be read by ExifTool (please see our INSTALL.md for installation). This metadata often includes ISP parameters and noise parameters, which are typically calibrated by the camera manufacturer. If you are using an industrial camera or a device that outputs only pure RAW data without embedded metadata, you would indeed need to manually specify these parameters.

  2. About the “noise profile” not being explicitly mentioned in the paper

    While the paper might not detail the specific implementation for reading noise profiles, DualDn employs a pre-defined noise model (Gaussian-Poisson) during training. This model relies on two noise parameters—often referred to as shot noise (k) and read noise (sigma)—which we extract from each image’s EXIF data. Consequently, the inference code also reads these parameters using ExifTool to ensure consistency with the noise model used during training.

    Additional: DualDn does not strictly require a single, fixed noise model. While our work employs a Gaussian-Poisson model as a general-purpose solution, we actively encourage researchers and practitioners to use their own noise models to train DualDn.

  3. Running the model without noise parameters

    Most commercial cameras (smartphones, DSLRs) include pre-calibrated noise parameters within their metadata. If your images lack these parameters, you have two primary options:

    • Calibrate Noise Parameters: Use a noise-model calibration method to derive k and sigma for your specific camera.

    • Manual Presets: If calibration isn’t feasible, you can manually specify reasonable defaults. For instance, you might keep the read noise (sigma) fixed and adjust the shot noise (k) within the range of [0.0001 – 0.03]. In practice, many users find that k ≈ 0.01 works well for moderate noise levels, while higher values can help handle more severe noise. I have tested a particularly noisy image using k equals to 0.05, and it works so well. So, there’s definitely room to experiment and tune these parameters based on your specific dataset or conditions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants