chaofengc / IQA-PyTorch

👁️ 🖼️ 🔥PyTorch Toolbox for Image Quality Assessment, including PSNR, SSIM, LPIPS, FID, NIQE, NRQM(Ma), MUSIQ, TOPIQ, NIMA, DBCNN, BRISQUE, PI and more...
https://iqa-pytorch.readthedocs.io/
Other
2.03k stars 177 forks source link

RuntimeError: GET was unable to find an engine to execute this computation #104

Closed cmjkqyl closed 1 year ago

cmjkqyl commented 1 year ago

I installed IQA according to the following code: git clone https://github.com/chaofengc/IQA-PyTorch.git cd IQA-PyTorch pip install -r requirements.txt python setup.py develop

When I run inference_iqa.py the error is as follows: File "/home/gdjt/qyl/lowlight/IQA-PyTorch-main/inference_iqa.py", line 79, in main() File "/home/gdjt/qyl/lowlight/IQA-PyTorch-main/inference_iqa.py", line 53, in main score = iqa_model(img_path, ref_img_path).cpu().item() File "/home/gdjt/anaconda3/envs/iqa-eval/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl return forward_call(args, kwargs) File "/home/gdjt/qyl/lowlight/IQA-PyTorch-main/pyiqa/models/inference_model.py", line 80, in forward output = self.net(target.to(self.device), kwargs) File "/home/gdjt/anaconda3/envs/iqa-eval/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl return forward_call(args, kwargs) File "/home/gdjt/qyl/lowlight/IQA-PyTorch-main/pyiqa/archs/brisque_arch.py", line 165, in forward return brisque( File "/home/gdjt/qyl/lowlight/IQA-PyTorch-main/pyiqa/archs/brisque_arch.py", line 57, in brisque features.append(natural_scene_statistics(x, kernel_size, kernel_sigma)) File "/home/gdjt/qyl/lowlight/IQA-PyTorch-main/pyiqa/archs/brisque_arch.py", line 80, in natural_scene_statistics luma_nrmlzd = normalize_img_with_guass(luma, kernel_size, sigma, padding='same') File "/home/gdjt/qyl/lowlight/IQA-PyTorch-main/pyiqa/archs/func_util.py", line 72, in normalize_img_with_guass mu = imfilter(img, kernel, padding=padding) File "/home/gdjt/qyl/lowlight/IQA-PyTorch-main/pyiqa/matlab_utils/functions.py", line 58, in imfilter return F.conv2d(pad_func(input), weight, bias, stride, dilation=dilation, groups=groups) RuntimeError: GET was unable to find an engine to execute this computation**

I installed and ran it directly from the newly created conda environment. How can I solve this problem?

chaofengc commented 1 year ago

This might because the python version is too high. The dependent packages of Python 3.9 is quite different from 3.8. You may try to new a conda environment with python=3.8

cmjkqyl commented 1 year ago

Thanks for your guidance. It works.