import sys
sys.path.append("..")
from segment_anything import sam_model_registry, SamAutomaticMaskGenerator, SamPredictor
sam_checkpoint = "sam_vit_h_4b8939.pth"
model_type = "vit_h"
**device = "cuda"**
RuntimeError:在您的系统上找不到 NVIDIA 驱动程序。请检查您是否拥有 NVIDIA GPU 并从 http://www.nvidia.com/Download/index.aspx
安装了驱动程序如何避免这种情况?
import sys
sys.path.append("..")
from segment_anything import sam_model_registry, SamAutomaticMaskGenerator, SamPredictor
sam_checkpoint = "sam_vit_h_4b8939.pth"
model_type = "vit_h"
**device = "cuda"**
RuntimeError:在您的系统上找不到 NVIDIA 驱动程序。请检查您是否拥有 NVIDIA GPU 并从 http://www.nvidia.com/Download/index.aspx
安装了驱动程序如何避免这种情况?在 Google 的 Colab 中奔跑。
您可能没有在运行时启用 GPU。
在 Google Colab 上,选择
Runtime
> Change Runtime Type
并将 Hardware Accelerator
设置为 GPU
。