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

关于文章中with perceptual loss,以及数据集中GT Mean #39

Open
climberwu opened this issue Nov 12, 2024 · 5 comments
Open

关于文章中with perceptual loss,以及数据集中GT Mean #39

climberwu opened this issue Nov 12, 2024 · 5 comments

Comments

@climberwu
Copy link

请问,论文中的with perceptual loss是如何使用呢,数据集中GT Mean是在哪里获取呢???

@Fediory
Copy link
Owner

Fediory commented Nov 14, 2024

请参考measure.py中的这段代码。
mean_restored = cv2.cvtColor(im1, cv2.COLOR_RGB2GRAY).mean()
mean_target = cv2.cvtColor(im2, cv2.COLOR_RGB2GRAY).mean()
im1 = np.clip(im1 * (mean_target/mean_restored), 0, 255)
这只是一个measure trick,目的是为了将图像亮度与GT矫正后,来对比颜色细节和结构信息。

@Fediory
Copy link
Owner

Fediory commented Nov 14, 2024

对于Perceptual Loss,请参考train.py中的
P_loss = PerceptualLoss({'conv1_2': 1, 'conv2_2': 1,'conv3_4': 1,'conv4_4': 1}, perceptual_weight = P_weight ,criterion='mse').cuda()

@Fediory
Copy link
Owner

Fediory commented Nov 14, 2024

因为LOLv1数据集包含更少的图片,因此一些细微的亮度差异会导致指标大幅波动。我们更建议在LOLv1上使用GT mean,而其它数据集中保持原本的测试标准。

@climberwu
Copy link
Author

大佬,请问您的论文里面有对每个数据集的都是进行了normal和GT mean进行实验,这两个是输入哪个超参数进行训练呢???
我训练得到的结果都是nromal的结果,暂时无法进行GT mean进行实验,想向您请教一下

@Fediory
Copy link
Owner

Fediory commented Nov 14, 2024

GT mean是一个指标测试选项,所以只需要在measure.py中使用GT mean就可以。
python measure.py --lol --use_GT_mean

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

2 participants