Skip to content

Conversation

@liuxiao-guan
Copy link
Contributor

add ssim and psnr metric

@paddle-bot
Copy link

paddle-bot bot commented May 15, 2025

Thanks for your contribution!

@CLAassistant
Copy link

CLAassistant commented May 15, 2025

CLA assistant check
All committers have signed the CLA.

- `resolution`:调整图片的分辨率


## 参考
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里参考的内容是不是不对

@@ -0,0 +1,91 @@
import math
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

文件头部都加下paddle的 copyright吧

def img_psnr(img1, img2):
# [0,1]
# compute mse
# mse = np.mean((img1-img2)**2)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

删除

return result


# test code / using example
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里感觉也可以删除

raise ValueError("Wrong input image dimensions.")


def trans(x):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个函数有啥作用?

@@ -0,0 +1,37 @@
# SSIM and PSNR for PaddlePaddle
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

改成SSIM and PSNR感觉就行,这个计算和Paddle也关系不大

@PaddlePaddle PaddlePaddle locked and limited conversation to collaborators May 28, 2025
@PaddlePaddle PaddlePaddle unlocked this conversation May 28, 2025
@LielinJiang LielinJiang merged commit 6f111d0 into PaddlePaddle:develop May 29, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants