yzxing87 / Invertible-ISP

[CVPR2021] Invertible Image Signal Processing
MIT License
338 stars 38 forks source link

Bug in preprocessing code #15

Open harskish opened 1 year ago

harskish commented 1 year ago

The preprocessing code contains the following lines:

if camera_name == 'Canon EOD 5D':
    raw_img = np.maximum(raw_img - 127.0, 0)

The string literal is incorrect, it should be Canon_EOS_5D (with an 'S' and underscores). As a result, the Canon data has not been correctly shifted. The network has most likely learned to correct for this on its own, but I still thought I'd let you know.

Keep in mind that fixing the typo without releasing a new pretrained model will probably result in broken outputs.

yzxing87 commented 1 year ago

Hey, thanks for pointing out this bug. I just checked the 'legacy codes' on my disk. The camera_name in my local data_preprocessing is 'Canon EOS 5D', and the corresponding text file is 'Canon EOS 5D_xxxx.txt'. Thus I think it should be a typo in that line when we cleaned up the codes. As for the pre-trained model, I need to double-check if it is trained with my legacy codes or the released codes. I will update it accordingly.

Thanks again for helping us find the bug!