代码运行过程中报错:ImportError: cannot import name 'compare_ssim' from 'skimage.measure'
scikit-image升级后改变了库函数的结构,函数 skimage.measure.compare_ssim已经被 skimage.metrics.structural_similarity 取代。
只需要将:
from skimage.measure import compare_ssim
修改为:
from skimage.metrics import structural_similarity
参考:Is there a way to import compare_ssim for python IDLE? - Stack Overflow