Result nan
arvisioncode opened this issue · 3 comments
Hello,
I have been doing tests with the clipiqa_single_image_demo.py
and the "test degradation attributes" and sometimes the result is nan.
It is true that for some images it returns scores, but usually not.
python demo/clipiqa_single_image_demo.py --config configs/clipiqa/clipiqa_attribute_test.py --checkpoint checkpoint/iter_80000.pth --file_path dataset/img.jpg
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
['Quality', 'Brightness', 'Sharpness', 'Noisiness', 'Colorfulness', 'Contrast', 'Quality']
[0.9892578 0.98876953 0.99853516 0.06488037 0.7416992 0.66796875]
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
['Quality', 'Brightness', 'Sharpness', 'Noisiness', 'Colorfulness', 'Contrast', 'Quality']
[nan nan nan nan nan nan]
Do you know why this can be and how to fix it?
Hi.
I did not meet such a problem before.
You may check the input if there is nan.
Thanks.
The image is similar to the one that gives good scores. In the code, I just modify the clipiqa_single_image_demo.py
as mentioned before and the attribute_list to ['Quality', 'Brightness', 'Sharpness', 'Noisiness', 'Colorfulness', 'Contrast']
in the clipiqa_single_image_demo.py
Does the entry have to have some special characteristic, such as a minimum size?
Resize from (674, 1069, 3) to (1289, 2048, 3) solves the problem