Closed itsxmeow closed 3 years ago
diff --git a/utils.py b/utils.py index af2ecb3..4f8af86 100644 --- a/utils.py +++ b/utils.py @@ -2,7 +2,8 @@ import numpy as np import matplotlib.pyplot as plt import cv2 import random -from skimage.measure import compare_ssim as sk_cpt_ssim +#from skimage.measure import compare_ssim as sk_cpt_ssim +from skimage import measure import torch from torchvision import utils @@ -26,7 +27,8 @@ def cpt_ssim(img, img_gt, normalize=False): img = (img - img.min()) / (img.max() - img.min() + 1e-9) img_gt = (img_gt - img_gt.min()) / (img_gt.max() - img_gt.min() + 1e-9) - SSIM = sk_cpt_ssim(img, img_gt, data_range=1.0) + #SSIM = sk_cpt_ssim(img, img_gt, data_range=1.0) + SSIM = measure.compare_ssim(img, img_gt, data_range=1.0) return SSIM
@bluestories, thanks for your feedback! I will be updating this part shortly!
@bluestories, this bug has been fixed! Thanks again! I'm closing this issue, pls let me know if there is any other problem.