woo525 / ParamISP

[CVPR 2024] Official PyTorch implementation of "ParamISP"
40 stars 2 forks source link

RAISE dataset #3

Open HLImg opened 1 month ago

HLImg commented 1 month ago

Hello, could you provide code to extract the color matrix from NEF files in the RAISE dataset?

HLImg commented 1 month ago

There are some issues with the Bayer pattern interpretation. For instance, when I load a file named r000da54ft using rawpy, I receive the following information:

color_desc: RGBG
raw_pattern: [[3, 2],[0, 1]]

If we interpret this as the sequence (RGB), the Bayer pattern becomes:

[[1, 2], [0, 1]]

However, after loading the metadata file RAISE/r000da54ft/metadata.pt you provided, the Bayer pattern appears as [2, 1, 1, 0]

Additionally, when I use exiftool to read this NEF file, I obtain:

CFAPattern: '[Green,Blue][Red,Green]'
CFAPattern2: '1 2 0 1'
XiaMu799 commented 3 weeks ago

Hello, The paper mentioned the demosaicing algorithm of CanoNet may differ from that of the target camera ISP. Nonetheless, such discrepancy is compensated by the subsequent LocalNet. I was wondering how do you handle paired data sets? I see that RAISE data sets don't exist in pairs, how do you get RGB images?

HLImg commented 3 weeks ago

xis The Raise dataset provides paired data, with the raw images in NEF format and the RGB images in TIF(F) format.

"File": "r0a2e85f0t", "NEF": "http://193.205.194.113/RAISE/NEF/r0a2e85f0t.NEF", "TIFF": "http://193.205.194.113/RAISE/TIFF/r0a2e85f0t.TIF"
XiaMu799 commented 3 weeks ago

Hello, I am very glad to receive your reply. I would like to continue to communicate with you. I used exiftool to output all the metadata, and found that there were no parameters such as white_level and camera_matrix. How did you solve the problem?

HLImg commented 3 weeks ago

Hello, I am very glad to receive your reply. I would like to continue to communicate with you. I used exiftool to output all the metadata, and found that there were no parameters such as white_level and camera_matrix. How did you solve the problem?

I am currently using rawpy to load the raw data, which provides the white balance settings (WBs) and color correction matrices (CCMs). However, for some files that lack these values, I am substituting them with sample data from the author

XiaMu799 commented 2 weeks ago

Hello, I am very glad to receive your reply. I would like to continue to communicate with you. I used exiftool to output all the metadata, and found that there were no parameters such as white_level and camera_matrix. How did you solve the problem?

I am currently using rawpy to load the raw data, which provides the white balance settings (WBs) and color correction matrices (CCMs). However, for some files that lack these values, I am substituting them with sample data from the author

Hello, may I ask you have reproduced the effect in the paper, I see RAW image and RGB image size does not correspond, may I ask you how to solve? In what way did you crop the data set?

HLImg commented 2 weeks ago

Hello, I am very glad to receive your reply. I would like to continue to communicate with you. I used exiftool to output all the metadata, and found that there were no parameters such as white_level and camera_matrix. How did you solve the problem?

I am currently using rawpy to load the raw data, which provides the white balance settings (WBs) and color correction matrices (CCMs). However, for some files that lack these values, I am substituting them with sample data from the author

Hello, may I ask you have reproduced the effect in the paper, I see RAW image and RGB image size does not correspond, may I ask you how to solve? In what way did you crop the data set?

It seems I can reproduce this work, but there are a few issues that need to be double-checked. Regarding the size discrepancy, it’s possible that the correct dataset was not downloaded, or the RGB image may have been rotated.

XiaMu799 commented 2 weeks ago

Hello, I am very glad to receive your reply. I would like to continue to communicate with you. I used exiftool to output all the metadata, and found that there were no parameters such as white_level and camera_matrix. How did you solve the problem?

I am currently using rawpy to load the raw data, which provides the white balance settings (WBs) and color correction matrices (CCMs). However, for some files that lack these values, I am substituting them with sample data from the author

Hello, may I ask you have reproduced the effect in the paper, I see RAW image and RGB image size does not correspond, may I ask you how to solve? In what way did you crop the data set?

It seems I can reproduce this work, but there are a few issues that need to be double-checked. Regarding the size discrepancy, it’s possible that the correct dataset was not downloaded, or the RGB image may have been rotated.

Hello, after opening tensorboard, I found that the two clipped RAW and RGB images in val do not correspond, that is, the mismatch in a small range. For example, the RAW image is a few pixels to the left compared with the RGB image, I wonder if you have this problem. The RAW image I read through the exiftool tool is larger than the RGB image, the data I checked said that the size of the RAW image includes some metadata, so it is larger than the RGB image. Finally, have you reproduced its PSNR index?

HLImg commented 1 week ago

Hello, I am very glad to receive your reply. I would like to continue to communicate with you. I used exiftool to output all the metadata, and found that there were no parameters such as white_level and camera_matrix. How did you solve the problem?

I am currently using rawpy to load the raw data, which provides the white balance settings (WBs) and color correction matrices (CCMs). However, for some files that lack these values, I am substituting them with sample data from the author

Hello, may I ask you have reproduced the effect in the paper, I see RAW image and RGB image size does not correspond, may I ask you how to solve? In what way did you crop the data set?

It seems I can reproduce this work, but there are a few issues that need to be double-checked. Regarding the size discrepancy, it’s possible that the correct dataset was not downloaded, or the RGB image may have been rotated.

Hello, after opening tensorboard, I found that the two clipped RAW and RGB images in val do not correspond, that is, the mismatch in a small range. For example, the RAW image is a few pixels to the left compared with the RGB image, I wonder if you have this problem. The RAW image I read through the exiftool tool is larger than the RGB image, the data I checked said that the size of the RAW image includes some metadata, so it is larger than the RGB image. Finally, have you reproduced its PSNR index?

could you provide this data?

XiaMu799 commented 1 week ago

您好,很高兴收到您的回复,希望继续与您交流。我用exiftool输出了所有的metadata,发现没有white_level、camera_matrix等参数,您是怎么解决这个问题的?

我目前使用 rawpy 加载原始数据,它提供了白平衡设置 (WB) 和色彩校正矩阵 (CCM)。但是,对于某些缺少这些值的文件,我会用作者提供的示例数据替换它们

你好,请问您复现了论文中的效果吗,我看到RAW图片和RGB图片大小不对应,请问您是怎么​​解决的?您是用什么方式裁剪数据集的?

看来我可以重现这项工作,但有几个问题需要仔细检查。关于大小差异,可能是没有下载正确的数据集,或者RGB 图像可能已被旋转

你好,打开tensorboard之后,我发现val中裁剪出来的两张RAW和RGB图片并不对应,也就是在很小的范围内不匹配。比如RAW图片比RGB图片往左边偏移了几个像素,不知道你有没有这个问题。我通过exiftool工具读出来的RAW图片比RGB图片要大,我查的资料说RAW图片的大小包括了一些metadata,所以比RGB图片要大。最后你有复现它的PSNR指标吗?

你能提供这些数据吗? For example, for the pair of images r000da54ft, the size of the RAW image read by rawpy is (2868, 4352), while that of the RGB image read by PIL is (2848, 4288, 3). There is a gap in their width and height. How do you deal with it? And how to cut training?

HLImg commented 1 week ago

r000da54ft

Sorry, I overlooked this issue, and my processing also contains errors. Based on the image, the relationship can be described as rgb = raw[10:-10, :-64].

XiaMu799 commented 6 days ago

r000da54ft

Sorry, I overlooked this issue, and my processing also contains errors. Based on the image, the relationship can be described as rgb = raw[10:-10, :-64].

image I output the raw image and find that there is a black edge on the right side of the image. After I realize it to RGB by rawpy, I calculate the distance to remove the black edge and then cut it, and it is symmetric. implements the effect of looking at the image below. However, the PSNR of training is not ideal. What is the PSNR of your training? 073a9ba9340fb0cf22e091ab4efc318