方法一(不推荐):
新版本的skimage的内置程序被重置了,可以卸载scikit-image之后重装一个旧版本。
pip uninstall scikit-image
pip install scikit-image==0.15.0 -U -i https://pypi.tuna.tsinghua.edu.cn/simple
原文链接:https://blog.csdn.net/qq_43065990/article/details/116782936
方法二:
新版本API:
from skimage.metrics import structural_similarity as compare_ssim
structural_similarity:
skimage.metrics.structural_similarity(im1, im2, *, win_size=None, gradient=False, data_range=None, channel_axis=None, multichannel=False, gaussian_weights=False, full=False, **kwargs)