Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export Your Images to SRGB #39

Closed
JeremyAlain opened this issue Dec 27, 2018 · 12 comments
Closed

Export Your Images to SRGB #39

JeremyAlain opened this issue Dec 27, 2018 · 12 comments

Comments

@JeremyAlain
Copy link

Okay so it took me another few hours to figure that one out. I know that in a previous issue #38 we talked about exporting your images from Lightroom in ProPhotoRGB. This comes from the fact that the on the website of the Adobe 5K dataset (https://data.csail.mit.edu/graphics/fivek/) they say that they provide the images in ProPhotoRGB format.

BUT...when I use pro photo RGB my images look like this:
bildschirmfoto 2018-12-27 um 21 47 52

And the original label looks like this:
bildschirmfoto 2018-12-27 um 21 48 33

So after training the supervised model I get a very nice PSNR, but unfortunately the images look very strange...So even though Adobe says they use ProPhotoRGB images, in my case this does not work. I don't know if this is general or if this is specific to my case(as another user from #38 says he uses ProPhotoRGB). After googling around one also finds that sRGB is a format which makes the image independent of the screen...so that doesn't sound too bad an intuition why one should use it. Maybe try both.

@JeremyAlain
Copy link
Author

Oh and what I mean my images look like this is...
i do
image = cv2.imread(myimage, -1)
cv2.imwrit('foolocation', image)

So this is not somehow the output of the model....really just importing and exporting the image makes it look strange.

@JustinhoCHN
Copy link

So have you trained with sRGB photos? What's the output looks like?

@JeremyAlain
Copy link
Author

Okay so I dont have time to really do a perfect comparison, but I think these images should illustrate what I mean(althought they are not from the same epoch)
here is the ProphotoRGb output(after 27 epochs):
bildschirmfoto 2018-12-29 um 11 32 52

then here we have the srgb output (after 13.5 epochs):
bildschirmfoto 2018-12-29 um 11 33 05

and here we have the original
bildschirmfoto 2018-12-29 um 11 33 11

One can already see that the srgb output has the same bluish tones as the original.

ALSO VERY IMPORTANT:
with the srgb I am finally able to perfectly match the results that they report in the paper for the supervised learning. I get a PSNR of 23.74(they report 23.8)
With the proPhotoRGB I got a PSNR of 25.x (I dont remember exactly anymore)...so that indicates that they were not using this dataset.

@nothinglo
Copy link
Owner

@JeremyAlain Thanks a lot for your reply. I will add this to the README. Thanks again.

@JustinhoCHN
Copy link

Thanks for your post, maybe I should export them to sRGB and train from scratch. @JeremyAlain

@JustinhoCHN
Copy link

qq 20190102110752
Ground Truth / sRGB / ProPhotoRGB epoch: 89
Yeah, the sRGB result is more realistic.

@HuiZeng
Copy link

HuiZeng commented May 29, 2019

Okay so it took me another few hours to figure that one out. I know that in a previous issue #38 we talked about exporting your images from Lightroom in ProPhotoRGB. This comes from the fact that the on the website of the Adobe 5K dataset (https://data.csail.mit.edu/graphics/fivek/) they say that they provide the images in ProPhotoRGB format.

BUT...when I use pro photo RGB my images look like this:
bildschirmfoto 2018-12-27 um 21 47 52

And the original label looks like this:
bildschirmfoto 2018-12-27 um 21 48 33

So after training the supervised model I get a very nice PSNR, but unfortunately the images look very strange...So even though Adobe says they use ProPhotoRGB images, in my case this does not work. I don't know if this is general or if this is specific to my case(as another user from #38 says he uses ProPhotoRGB). After googling around one also finds that sRGB is a format which makes the image independent of the screen...so that doesn't sound too bad an intuition why one should use it. Maybe try both.

Hi, this is because your monitor actually explain the images in ProPhoto color space using the sRGB cotor space. The difference between them can be found here (https://en.wikipedia.org/wiki/Gamut). You need to convert the color space from ProPhoto to sRGB to view the image correctly.

@JeremyAlain
Copy link
Author

Thanks a lot for the clarification. I was wrong then. @nothinglo, maybe change the Readme again

@Oktai15
Copy link

Oktai15 commented Jul 3, 2019

@JeremyAlain could you provide archive with right "original" and "expert C" images?

@TriLoo
Copy link

TriLoo commented Aug 25, 2019

Could you please tell me how to convert the image from ProPhoto RGB to sRGB color space ?

@HuiZeng

@HuiZeng
Copy link

HuiZeng commented Aug 25, 2019

Could you please tell me how to convert the image from ProPhoto RGB to sRGB color space ?

@HuiZeng

This can be achieved by first convert ProPhoto RGB to CIE XYZ then convert the CIE XYZ to sRGB. The conversion matrix can be found here http://brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html.

@TriLoo
Copy link

TriLoo commented Aug 25, 2019

Thanks for your advice. I choose to export as sRGB from Lightroom directly. @HuiZeng

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants