-
Notifications
You must be signed in to change notification settings - Fork 215
add ssim psnr metric #1282
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
base: develop
Are you sure you want to change the base?
add ssim psnr metric #1282
Conversation
Thanks for your contribution! |
- `resolution`:调整图片的分辨率 | ||
|
||
|
||
## 参考 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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): |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
改成SSIM and PSNR感觉就行,这个计算和Paddle也关系不大
add ssim and psnr metric