这个报错我是这样解决的,虽然pycharm显示该包没有使用,但是我只能按照我现在的导包设置及代码设置记录下来!
我是注释了原来的导包设置
# from skimage import measure
from skimage.metrics import structural_similarity as compare_ssim
from skimage.metrics import peak_signal_noise_ratio as compare_psnr
import skimage.measure as measure
原来报错函数修改为红框的名字即可!
原来报错的函数从measure.compare_ssim
或skimage.measure
改成了skimage.metrics.structural_similarity
ssim_list = [skimage.metrics.structural_similarity(dehaze_list_np[ind], gt_list_np[ind], data_range=1, channel_axis=2) for ind in range(len(dehaze_list))]
注意,当前我用的SCIkit-image版本为0.23.2