简体   繁体   English

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

[英]How can I import watershed function from scikit-image?

Using Napari Image Analysis GUI to run the Allen Cell Segmenter (no response in Napari github or Allen Cell Forum, thought I'd try here) and getting the following error when I attempt to run the watershed for cutting function:使用 Napari 图像分析 GUI 运行 Allen Cell Segmenter(在 Napari github 或 Allen Cell 论坛中没有响应,我想我会在这里尝试)并在我尝试运行分水岭进行切割功能时出现以下错误:

ImportError: cannot import name 'watershed' from 'skimage.morphology' (C:\Users\Murryadmin\anaconda3\envs\napari-env\lib\site-packages\skimage\morphology_ init _.py) 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() -> from skimage.morphology import watershed, dilation, ball c:\users\murryadmin\anaconda3\envs\napari-env\lib\site-packages\aicssegmentation\core\utils.py(449)watershed_wrapper() -> 从 skimage.morphology 导入分水岭、膨胀、球

Anyone have any potential fixes for this?有人对此有任何潜在的解决方法吗?

Thanks谢谢

watershed was moved from skimage.morphology to skimage.segmentation in version 0.17.在 0.17 版中,分水岭从 skimage.morphology 移至 skimage.segmentation。 There was a pointer from morphology to the new function in segmentation in 0.17 and 0.18, but it was removed in 0.19.在 0.17 和 0.18 中有一个从形态学指向分割中新功能的指针,但在 0.19 中被删除了。 The Allen Cell Segmenter needs to be updated to match the more modern scikit-image version, so I would raise an issue in their GitHub repository if I were you. Allen Cell Segmenter 需要更新以匹配更现代的 scikit-image 版本,所以如果我是你,我会在他们的 GitHub 存储库中提出问题。

Downgrading to scikit-image 0.18 could fix the Allen Cell Segmenter itself, but unfortunately napari requires 0.19+.降级到 scikit-image 0.18 可以修复 Allen Cell Segmenter 本身,但不幸的是 napari 需要 0.19+。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM