qyp2000 / XPSR

41 stars 1 forks source link

ZeroDivisionError: division by zero #2

Open AIisCool opened 5 months ago

AIisCool commented 5 months ago
python test.py
C:\XPSR\pipelines\pipeline_xpsr.py:41: FutureWarning: Importing `DiffusionPipeline` or `ImagePipelineOutput` from diffusers.pipeline_utils is deprecated. Please import from diffusers.pipelines.pipeline_utils instead.
  from diffusers.pipeline_utils import DiffusionPipeline
2024-07-01 23:05:07,882 INFO: Metric [PSNR] is created.
2024-07-01 23:05:07,882 INFO: Metric [SSIM] is created.
2024-07-01 23:05:08,101 INFO: Metric [FID] is created.
2024-07-01 23:05:09,946 INFO: Metric [MANIQA] is created.
2024-07-01 23:05:10,181 INFO: Metric [LPIPS] is created.
2024-07-01 23:05:11,529 INFO: Metric [CLIPIQA] is created.
2024-07-01 23:05:11,685 INFO: Metric [MUSIQ] is created.
2024-07-01 23:05:12,341 INFO: Metric [DISTS] is created.
2024-07-01 23:05:12,341 INFO: Metric [NIQE] is created.
['ahiq', 'brisque', 'ckdn', 'clipiqa', 'clipiqa+', 'clipiqa+_rn50_512', 'clipiqa+_vitL14_512', 'clipscore', 'cnniqa', 'cw_ssim', 'dbcnn', 'dists', 'entropy', 'fid', 'fsim', 'gmsd', 'hyperiqa', 'ilniqe', 'laion_aes', 'liqe', 'liqe_mix', 'lpips', 'lpips-vgg', 'mad', 'maniqa', 'maniqa-kadid', 'maniqa-koniq', 'maniqa-pipal', 'ms_ssim', 'musiq', 'musiq-ava', 'musiq-koniq', 'musiq-paq2piq', 'musiq-spaq', 'nima', 'nima-koniq', 'nima-spaq', 'nima-vgg16-ava', 'niqe', 'nlpd', 'nrqm', 'paq2piq', 'pi', 'pieapp', 'psnr', 'psnry', 'ssim', 'ssimc', 'stlpips', 'stlpips-vgg', 'topiq_fr', 'topiq_fr-pipal', 'topiq_iaa', 'topiq_iaa_res50', 'topiq_nr', 'topiq_nr-face', 'topiq_nr-flive', 'topiq_nr-spaq', 'tres', 'tres-flive', 'tres-koniq', 'uranker', 'vif', 'vsi']
Loading pretrained model Inception3 from C:\Users\MainUser\.cache\torch\hub\checkpoints\pt_inception-2015-12-05-6726825d.pth
Loading pretrained model MANIQA from C:\Users\MainUser\.cache\torch\hub\checkpoints\ckpt_koniq10k.pt
Loading pretrained model LPIPS from C:\Users\MainUser\.cache\torch\hub\checkpoints\LPIPS_v0.1_alex-df73285e.pth
Loading pretrained model MUSIQ from C:\Users\MainUser\.cache\torch\hub\checkpoints\musiq_koniq_ckpt-e95806b9.pth
Loading pretrained model DISTS from C:\Users\MainUser\.cache\torch\hub\checkpoints\DISTS_weights-f5e65c96.pth
/xpsr/checkpoint-300000
RealSR_CenterCrop
Traceback (most recent call last):
  File "C:\XPSR\test.py", line 832, in <module>
    metrics(args)
  File "C:\XPSR\test.py", line 766, in metrics
    m_psnr = sum(psnr_folder) / len(psnr_folder)
             ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
ZeroDivisionError: division by zero
qyp2000 commented 4 months ago

It seems that you did not generate the image correctly and save it. Please further investigate the error.