I was trying to run YOLOv8 using visual code studio. Installed ultralytics and ran yolo predict model=yolov8n.pt source='https://ultralytics.com/images/bus.jpg'
on the vs code terminal.
However the output i received was
2 persons, 1 bicycle, 5 cars, 10 motorcycles, 73 boats, 3 stop signs, 1 dog, 10 horses, 10 cows, 32 bears, 1 giraffe, 63 umbrellas, 6 handbags, 9 frisbees, 15 snowboards, 5 surfboards, 12 knifes, 5 beds, 37 dining tables
which are clearly not part of this picture.
When i first installed ultralytics and tried running torch there was a missing dependency error. fbgemm.ddl
was missing. Later when i installed vs_BuildTools this issue was resolved. Then i proceeded to run the code in a virtual environment where a program using torch ran without any errors. Then i proceeded to type this code snippet and encountered this problem. I also tried running using command prompt and jupyter notebook but the same issue persists.
I also did check if the versions are compatible, which they are. I haven’t installed cuda yet is it because of that or are there any other issues which i am not aware of? Somebody please help.
2
Answers
I was facing same problem with yolov8n.pt model. I tried with downgrading ultralytics version from 8.2.70 to 8.2.60. The issue is resolved now.
This is a known bug with inference using CPU on Windows for
PyTorch 2.4.0
: Bug TicketCommon issues are:
fbgemm.dll
Here are the recommended fixes:
PyTorch 2.4.0
when using CPU)PyTorch
(WARNING: might be unstable)