from ultralytics import YOLO Load a pretrained YOLO11n model model =…
- User
from ultralytics import YOLO
Load a pretrained YOLO11n model
model = YOLO("D:\yolov8\yolov8n.pt")
Define path to the image file
source = "D:\yolov8\images\ace.jpg"
Run inference on the source
results = model(source) # list of Results objects
- Assistant
- User
PS F:\yolo8v> & f:/yolo8v/.venv/Scripts/python.exe f:/yolo8v/runs/detect/predict/yol.py F:\yolo8v.venv\Lib\site-packages\torch\cuda_init_.py:210: UserWarning: Found GPU0 NVIDIA GeForce GTX 760 which is of cuda capability 3.0. PyTorch no longer supports this GPU because it is too old. The minimum cuda capability supported by this library is 3.7.
warnings.warn( An error occurred: CUDA error: no kernel image is available for execution on the device CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1 Compile with
TORCH_USE_CUDA_DSAto enable device-side assertions. - Assistant
The error messages you are receiving indicate that the version of PyTorch you are using no longer supports your NVIDIA GeForce GTX 760 GPU due to its low CUDA capability (3.0). PyTorch has increased its requirements over time, and now it generally requires a minimum CUDA capability of 3.7 or higher.