Closed wyf0912 closed 2 years ago
Thank you so much for helping us to find the issue. I have fixed most of them. Here are the explanations:
niqe
function provided by Matlab is different from original paper. We use the original implementations here as reference.6.9872, 9.1040
for JPG and PNG of your images. The fixed results is 6.8501, 8.8417
. The differences now are caused by minor different behaviors of fundamental operators. You may check latest results with our latest codes. The images you provided is a corner case in which large regions (>96x96) are completely white. For the Matlab codes, they simply ignore such regions. But we do not ignore these regions in our previous version, and occasionally take these regions as good
regions. This makes our results much better (lower values) than Matlab results.
The previous version works well for images without such plain regions. And the latest version does the same as Matlab and ignore these plain regions.
This is because of the data type. NIQE requires double float, (i.e. float 64) while previous version use float64 for cpu and float32 for GPU, which is the default type of cuda tensor in pytorch.
All data types are cast to float64 now. It produces the same results for GPU and CPU.
As you know, JPG and PNG have different values, leading to different results. The same applies to matlab.
Thanks a lot for your prompt reply! It seems that it works well now
Hi Chaofeng,
Thanks for your great work. I meet some problems when using the NIQE metric. It seems that the NIQE results evaluated on JPG and PNG have a large difference and are different from Matlab.
In addition, the NIQE values of the same image evaluated on CPU and GPU also has a large difference.
The output is
I also test the NIQE of saved JPG and PNG images using MATLAB, and the NIQE are 8.3841 and 8.6096.
In addition, it seems that the results of the evaluation on CPU and GPU also have a huge difference.
Do you have any advice on it? Thank you!