快速分割任意模型 (FastSAM)是一个 CNN 分割任意模型,仅使用 SAM 作者发布的 SA-1B 数据集的 2% 进行训练。FastSAM 实现了与 SAM 方法相当的性能,但运行速度提高了 50 倍。
该镜像适配与RTX40系列、3090、3080ti、P40
推理模式分为Everything mode、Box prompt (xywh)以及Points prompt
请下载预训练的权重检查点。将它放在/workspace/FastSAM-main/checkpoint文件夹中。(目前已经存放在该目录下,为FastSAM-x.pt); 运行下面的命令来推理,得到的结果保存在/workspaceFastSAM-main/output1/下;
cd /workspace/FastSAM-main
python Inference.py --model_path /workspace/FastSAM-main/checkpoint/FastSAM-x.pt --img_path /workspace/FastSAM-main/images/dogs.jpg
请下载预训练的权重检查点。将它放在/workspace/FastSAM-main/checkpoint文件夹中。(目前已经存放在该目录下,为FastSAM-x.pt); 运行下面的命令来推理,得到的结果保存在/workspaceFastSAM-main/output1/下;
cd /workspace/FastSAM-main
python Inference.py --model_path /workspace/FastSAM-main/checkpoint/FastSAM-x.pt --img_path /workspace/FastSAM-main/images/dogs.jpg --box_prompt "[[570,200,230,400]]"
请下载预训练的权重检查点。将它放在/workspace/FastSAM-main/checkpoint文件夹中。(目前已经存放在该目录下,为FastSAM-x.pt); 运行下面的命令来推理,得到的结果保存在/workspaceFastSAM-main/output1/下;
cd /workspace/FastSAM-main
python Inference.py --model_path /workspace/FastSAM-main/checkpoint/FastSAM-x.pt --img_path /workspace/FastSAM-main/images/dogs.jpg --point_prompt "[[520,360],[620,300]]" --point_label "[1,0]"