DY112 / LSMI-dataset

[ICCV'21] Large Scale Multi-Illuminant (LSMI) Dataset for Developing White Balance Algorithm under Mixed Illumination
https://www.dykim.me/projects/lsmi
58 stars 3 forks source link

bug in preprocess_data.py #4

Closed aamircs closed 1 year ago

aamircs commented 2 years ago

in preprocess data file all the obtained output image are black in color it's not the white balanced image which we need for training the model

DY112 commented 2 years ago

Hi, @aamircs, thank you for your interest about our work. The result image files of preprocessing code are not the general image, but the RAW tiff image. So the range of pixel value will be 1023~16383, which is the bit depth of the camera which was used to capture the scene.

aamircs commented 2 years ago

Thanks for your quick response but my issue is that, when we run 2_preprocess_data.py a galaxy_512 folder is generated in which there are 3 sub folder train,test,val. All the ground truth images inside the folders ( For eg: Place1003_13_gt) are complete black..Also the mask images are all black..Can you guide us about this issue ?

On Tue, 20 Sep, 2022, 5:10 pm Dongyoung Kim, @.***> wrote:

Hi, @aamircs https://github.com/aamircs, thank you for your interest about our work. The result image files of preprocessing code are not the general image, but the RAW tiff image. So the range of pixel value will be 1023~16383, which is the bit depth of the camera which was used to capture the scene.

— Reply to this email directly, view it on GitHub https://github.com/DY112/LSMI-dataset/issues/4#issuecomment-1252230656, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKTJDVPC7IRHYMWOSZU4G4DV7GPCLANCNFSM6AAAAAAQQ6SJG4 . You are receiving this because you were mentioned.Message ID: @.***>

DY112 commented 2 years ago

I mean, all that black images are not complete black(0) , but they have 0-1023 or 0-16383 RAW values. If you open that image files with cv2.imread function with the flag cv2.IMREAD_UNCHANGED, you can find that nonzero values are in there. Since they are saved as lossless tiff format, general image viewer can not represent them properly to display. If you want to see the scene content, please refer visualize.py and visualization process in 1_make_mixture_map.py.

However, the visualization process distorts the linear raw values and transforms them into sRGB format, so it is not suitable for use in experiments.

https://github.com/DY112/LSMI-dataset/blob/ade6a99556522ec91b3783c2a45a43549707c70f/1_make_mixture_map.py#L418