I have trained a yolov8 model on Colab. The model is saved as best.pt
and last.pt
in /content/runs/detect/train2/weights
I want to apply the model to a live webcam video with jupyter notebook. (since colab does not support local webcam).
I downloaded both best.pt
and last.pt
files and added them to a file in the jupyter environment but when trying to load that model OSError occurs.
OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect:
import os
cd D:\ML
from ultralytics import YOLO
model = YOLO('D:\\ML\runsColab\RunsDetectTrain2\best.pt')
This is my code to load the saved model. Here's the actual location of these two files.
Any help would be highly appreciated.