Invertible-ISP icon indicating copy to clipboard operation
Invertible-ISP copied to clipboard

Bug in preprocessing code

Open harskish opened this issue 1 year ago • 1 comments

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.

harskish avatar Oct 07 '22 10:10 harskish

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!

yzxing87 avatar Oct 07 '22 11:10 yzxing87