fourson/Polarization-Aware-Low-Light-Image-Enhancement

程序运行存在错误

670555467 opened this issue · 3 comments

RGB图像 InferDataLoader

灰度图像 GrayInferDataLoader

偏振图像 RealGrayInferDataLoader

我在使用our_gray.pth,并设置为RealGrayInferDataLoader时,会提示下面的这个错误。
L1 = cv2.imread(os.path.join(self.L1_dir, Li_file_name), -1)[:, :, None].transpose(2, 0, 1) # [0, 65535] uint16
ValueError: axes don't match array
但是在设置为InferDataLoader和GrayInferDataLoader时都可以运行。请问这种情况该怎么解决呢

Could you please tell me the data type you process? If you use RealGrayInferDataLoader, the input data type should be uint16, and the shape should be (H, W) so that "L1 = cv2.imread(os.path.join(self.L1_dir, Li_file_name), -1)[:, :, None].transpose(2, 0, 1) # [0, 65535] uint16" should output a tensor with a shape of (1, H, W).
And RealGrayInferDataLoader is only used for downstream applications. The images should be captured by a real grayscale pol-camera.

Thank you for your reply. The input of the model is the data type of your test set. I just load your trained model Ours directly_ Gray.pth, the above error will appear.

If you use our test dataset you should not use the RealGrayInferDataLoader. Note that it is only used for downstream applications.