dvlab-research / SNR-Aware-Low-Light-Enhance

This is the official implementation for the paper "SNR-aware low-light image enhancement" in CVPR2022
168 stars 20 forks source link

I found there is an error when training #7

Open Ixiaohuihuihui opened 1 year ago

Ixiaohuihuihui commented 1 year ago

Hi, when I run this project, I found that sou_img = util.tensor2img(visuals['LQ'][2]) save_img = np.concatenate([sou_img, rlt_img, ill_img, gt_img, rlt_img3, rlt_img2], axis=0)

should be sou_img = util.tensor2img(visuals['LQ'])
save_img = np.concatenate([sou_img, rlt_img, ill_img, gt_img, rlt_img3, rlt_img2], axis=0)

Otherwise, their shapes will not match. The sou_img is [600, 400], not [600, 400, 3]. The error report is File "<__array_function__ internals>", line 6, in concatenate ValueError: all the input arrays must have same number of dimensions, but the array at index 0 has 2 dimension(s) and the array at index 1 has 3 dimension.

xiaogang00 commented 1 year ago

Thanks for your kind advice and we have fixed this.

Ixiaohuihuihui commented 1 year ago

And I have another question: how to test real images which did not contain gt images?

xiaogang00 commented 1 year ago

Hello:
If there are no gt images, you should re-write the dataloader script which requires no gt images.