如何从 scikit-image 导入分水岭函数?

Dar*_*van 4 python image scikit-image python-napari

使用 Napari 图像分析 GUI 运行 Allen Cell Segmenter(Napari github 或 Allen Cell 论坛没有响应,我想我会在这里尝试),当我尝试运行分水岭切割功能时,出现以下错误:

ImportError:无法从“skimage.morphology”导入名称“watershed”(C:\Users\Murryadmin\anaconda3\envs\napari-env\lib\site-packages\skimage\morphology_ init _.py

c:\users\murryadmin\anaconda3\envs\napari-env\lib\site-packages\aicssegmentation\core\utils.py(449)watershed_wrapper() -> 从 skimage.morphology 导入分水岭、膨胀、球

有人对此有任何潜在的解决办法吗?

谢谢

Jua*_*uan 9

在 0.17 版本中,分水岭从 skimage.morphology 移至 skimage.segmentation。在0.17和0.18中,有一个从形态学到分割中新函数的指针,但在0.19中被删除了。Allen Cell Segmenter 需要更新以匹配更现代的 scikit-image 版本,因此如果我是您,我会在他们的 GitHub 存储库中提出问题。

降级到 scikit-image 0.18 可以修复 Allen Cell Segmenter 本身,但不幸的是,napari 需要 0.19+。