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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in ERGAS #2497

Closed
yc-cui opened this issue Apr 12, 2024 · 2 comments 路 Fixed by #2498
Closed

Bug in ERGAS #2497

yc-cui opened this issue Apr 12, 2024 · 2 comments 路 Fixed by #2498
Assignees
Labels
bug / fix Something isn't working help wanted Extra attention is needed v1.3.x

Comments

@yc-cui
Copy link

yc-cui commented Apr 12, 2024

馃悰 Bug

It should be divided by the ratio, rather than multiplied by the ratio, otherwise it will amplify the correct indicator by the square of the ratio.

ergas_score = 100 * ratio * torch.sqrt(torch.sum((rmse_per_band / mean_target) ** 2, dim=1) / c)

For reference, below is a correct implementation by matlab:

https://github.com/liangjiandeng/DLPan-Toolbox/blob/main/02-Test-toolbox-for-traditional-and-DL(Matlab)/Quality_Indices/ERGAS.m#L32

@yc-cui yc-cui added bug / fix Something isn't working help wanted Extra attention is needed labels Apr 12, 2024
Copy link

Hi! thanks for your contribution!, great first issue!

@Mdmdma
Copy link

Mdmdma commented May 24, 2024

Hi this bug fix enables correct behavior, but now the documentation is not consistent with the source paper. In the source paper the ratio is <1 the way it is stated here it is supposed to be >1. I do not think this is a issue, but maybe noteworthy in the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug / fix Something isn't working help wanted Extra attention is needed v1.3.x
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants