Segment Any Medical-Model (SAMM): A 3D Slicer integration to Meta's SAM. 实践
论文: https://arxiv.org/abs/2304.05622
项目: https://github.com/bingogome/samm
系统:windows 10
下载 https://download.slicer.org/
下载 git https://git-scm.com/download/win
直接下载两个压缩包,放到你想放的目录中,并解压。
https://github.com/bingogome/samm/archive/refs/heads/main.zip
https://github.com/facebookresearch/segment-anything/archive/refs/heads/main.zip
cd segment-anything-main/ pip install -e . pip install opencv-python matplotlib onnxruntime onnx -i https://pypi.tuna.tsinghua.edu.cn/simple/
安装报错:
pip install pycocotools -i https://pypi.tuna.tsinghua.edu.cn/simple/
错误:
building 'pycocotools._mask' extension error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/ ---------------------------------------- ERROR: Failed building wheel for pycocotools
解决:
conda install pycocotools -c conda-forge
预训练模型 2.4G:https://dl.fbaipublicfiles.com/segment_anything/sam_vit_h_4b8939.pth
slicer.util.pip_install("pyyaml") slicer.util.pip_install("pyzmq")
3D slicer -> Developer Tools→ Extension Wizard。
Extension Tools-> Select Extension-> 导入 samm/samm 文件夹。
目前问题: 我加载图像后
python .\samm-python-terminal\sam_server.py
我输出的和 DEMO 的不一样呀??我什么结果也没得到。可能我没有 GPU 的问题?
我把下面这行改为了 cpu。sam_server.py 的 36 行。
self.device = "cpu"
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 单线程的Redis速度为什么快?
· SQL Server 2025 AI相关能力初探
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 展开说说关于C#中ORM框架的用法!