为什么将l*a*b的ab除以110以在-1和1之间标准化它?
A>试图解释Pix2Pix研究的图像着色策略。 这个问题仅参考本文。
在数据集“制作数据集和数据加载器”部分中,在__getItem__方法内,将图像转换为l*a*b后,它们将张量的一部分划分为50并减去1。 1作为l的范围从0到100。
但是AB值除以110,这很奇怪,因为AB值在-128到128范围内。据我所知,AB应除以128,以将其值带到-1和1之间。 1。
如果有人了解这背后的逻辑,请花点时间告诉我。
This article tries to explain image colorizing strategy of pix2pix research.
This question references this article only.
In the dataset 'Making Dataset and DataLoaders' section, inside __getitem__ method, after converting the image to L*a*b, they divide L part of the tensor by 50 and subtract 1. This will surely bring the L values between -1 and 1 as L ranges from 0 to 100.
But ab values are divided by 110, which is strange, as ab values range from -128 to 128. As of my understanding, ab should be divided by 128 to bring its values between -1 and 1.
If anyone understands the logic behind this, please take the time to tell me.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
理论上A和B没有有限,但由于实际原因通常被夹住。
wikipedia
我认为110的来源是此 MATLAB实现,
但是,我认为这不适合跳过。彩色的震动,因此这可能是一个错误。
2 : http://ai.stanford.edu/~ruzon/~ruzon/software/rgblab.html scikit。
Theoriticaly a and b are not bounded but often clamped for practical reason.
from wikipedia
I think that the source of the 110 is this Matlab implementation
However, I assume that this DOESN'T hold for the skimage.color implemneation so it may be a mistake.
2: http://ai.stanford.edu/~ruzon/software/rgblab.html scikit.