-1

I am trying to run a yolov8 model on my Raspberry Pi and have installed ultralytics using pip3 install ultralytics command. But whenever I try to import YOLO in Thonny using from ultralytics import YOLO my terminal just outputs Process ended with exit code -4. Can anyone help me resolve this issue?

from ultralytics import YOLO

model = YOLO("best.pt") #my trained yolov8 model
model.predict(source = 0, show = True)

Process ended with exit code -4

Robert
  • 7,394
  • 40
  • 45
  • 64

1 Answers1

0

It's the latest version of Torch that is the problem. You can fix it by installing version 1.12.0 instead.

pip3 install torch==1.12.0 torchvision==0.13.0 torchaudio==0.12.0
Andrej
  • 2,743
  • 2
  • 11
  • 28
Jorge
  • 1
  • 1