SAM3使用

1.安装参考

  SAM 3 深度技术解析:从图像分割到三维重建的全链路实践_sam3-CSDN博客

# 创建Python虚拟环境(推荐使用Python 3.10或3.12)
conda create -n sam3 python=3.12 -y
conda activate sam3

# 安装SAM 3核心库(使用国内镜像源)
pip install sam3 -i https://pypi.mirrors.ustc.edu.cn/simple

# 安装PyTorch GPU版本(根据CUDA版本选择)
# CUDA 12.4
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124
# 或 CUDA 12.1
# pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121

# 安装Transformers库
pip install transformers>=4.46.0 -i https://pypi.mirrors.ustc.edu.cn/simple

# 安装图像处理相关依赖
pip install pillow opencv-python matplotlib -i https://pypi.mirrors.ustc.edu.cn/simple

需要注意缺少triton,安装方法:

  pip install triton-windows

2.参考教程

  简单调用:GitHub - little51/sam3-sample: Facebook SAM3例程

  文本提示词:【SAM3教程-1】SAM3 使用文本提示进行图像分割详细步骤与示例【附源码】_sam3分割边缘-CSDN博客

   样本提示点:链接

   多概念:SAM3教程:Meta AI最新图像分割模型完全指南|支持400万概念的开放词汇分割 • Tech Explorer 🚀

   其他参考:SAM1?的使用 链接

3.其它:

手把手教你SAM(segment anything)官方代码本地调用_mob6454cc777577的技术博客_51CTO博客

SAM3模型来了,手把手带你运行SAM3模型代码,SAM3模型初探! - Coding茶水间 - 博客园

SAM3模型来了,手把手带你运行SAM3模型代码,SAM3模型初探! - 知乎

 

posted @ 2025-12-17 16:59  太一吾鱼水  阅读(245)  评论(0)    收藏  举报