python3.9运行 Stylized Neural Painting 绘画,报错却不会解决
F:\stylized-neural-painting-main>python demo_prog.py --img_path ./test_images/apple.jpg --canvas_color 'white' --max_m_strokes 500 --max_divide 5 --renderer oilpaintbrush --renderer_checkpoint_dir checkpoints_G_oilpaintbrush --net_G zou-fusion-net
Traceback (most recent call last):
File "F:\stylized-neural-painting-main\demo_prog.py", line 7, in <module>
from painter import *
File "F:\stylized-neural-painting-main\painter.py", line 5, in <module>
import utils
File "F:\stylized-neural-painting-main\utils.py", line 4, in <module>
from skimage.measure import compare_ssim as sk_cpt_ssim
ImportError: cannot import name 'compare_ssim' from 'skimage.measure' (F:\Anaconda3\lib\site-packages\skimage\measure\__init__.py)
File "F:\stylized-neural-painting-main\utils.py", line 4, in <module>
from skimage.measure import compare_ssim as sk_cpt_ssim
ImportError: cannot import name 'compare_ssim' from 'skimage.measure' (F:\Anaconda3\lib\site-packages\skimage\measure\__init__.py)
卸载重装skimage,无效
从网上找的答案:
1.将from skimage.measure import compare_ssim
替换成 from skimage import measure
2.将compare_ssim()替换成measure.compare_ssim()
但是不会替换,怎么替换?还有就是替换了,utils.py这个文件就能正常运行下去吗?还望各位大佬不吝赐教,谢谢