Comments (3)
Additional, I use cv2.PSNR.
from deepupe.
Is the testing data from our link? At first, you should use adobe5k default option to process the data, and try use our matlab psnr code and SSIM code from Wang zhou's homepage.
I have managed to run the code and I test on the same test datasets, only to find disappointing result. Is there anyone encoutering the same problem.
Listed is my results:
共 500 张测试图片
平均结果 :
PSNR : 12.240499250275413 ====> 22.88365191146186
SSIM : 0.6161701658815372 ====> 0.7980569710290214
test images is the same( Adobe FiveK 4500-5000 )
My config is also:
python 2.7
tensorflow-gpu=1.1.0
cuda8.0
from deepupe.
I changed my code to compute psnr.
In OpenCV:
PSNR = 10 * log10( range / mse of all 3 channels )
In your codes:
PSNR = Mean( 10 * log10( range / mse of one channel) for 3 channels)
The result is so amazing:
共 500 张图像
1 a4844-kme_0393.jpg 25.909085943496024 29.921717892553414
2 a4726-DSC_0120.jpg 22.63510845360183 27.363339705226107
......
500 a4891-DSC_0069.jpg 24.064769515852085 29.045309176387974
opencv_psnr : 22.88365191146186
mean_psnr : 28.895108206611532
The difference between different calculations is so great!
Which is more authoritative?
Test images I use may be different with yours on resolution, therefore, 30 is possible
My codes is listed below:
import os
import cv2
import numpy
# generated images dir
dir_name = './DeepUPE/23/'
names = os.listdir(dir_name)
print('共 ', len(names), ' 张图像')
def compute_mean(a, b):
mse = numpy.square(a - b)
mse_3 = [mse[:, :, i].mean() for i in range(3)]
psnr_3 = [10 * numpy.log10(255 * 255 / it) for it in mse_3]
return numpy.mean(psnr_3)
opencv_psnr = 0
mean_psnr = 0
for i, it in enumerate(names):
# l = cv2.imread('./bad/' + it)
r = cv2.imread('./normal/' + it)
e = cv2.imread(dir_name + it)
a = cv2.PSNR(r, e)
opencv_psnr += a
b = compute_mean(r, e)
mean_psnr += b
print(i + 1, it, a, b)
opencv_psnr /= (i + 1)
mean_psnr /= (i + 1)
print('opencv_psnr : ', opencv_psnr)
print('mean_psnr : ', mean_psnr)
from deepupe.
Related Issues (20)
- realease of dataset HOT 2
- 关于test数据集?
- Color Loss
- Tensorflow only use CPU version, so how should i modify the makefile? HOT 1
- I got an error when i run the run.py HOT 1
- Does not work HOT 1
- Installation Guide HOT 6
- Another reconstruction loss? HOT 1
- No op named BilateralSliceApply in defined operations. HOT 1
- 只能在Linux下运行么?(does it run on Linux? )
- Fatal error: third_party/array/array.h: No such file or directory HOT 3
- Would you please release the training code and the dataset?
- Could you please release the training code and the dataset?
- Can i get access to training code HOT 2
- brightness adjustment
- brightness adjust
- The download link for the test data is unaccessible
- 测试数据集链接
- make
- Where can find the color loss?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deepupe.