123456789101112 |
- from ultralytics import YOLO
- # Load model
- model = YOLO('yolov8m-face.pt')
- #model = YOLO('path/to/best.pt') # Load a custom trained model
- # Perform tracking with the model
- results = model.predict(source=0, show=True) #
- #results = model.track(source="https://www.youtube.com/watch?v=6n5d1C1Alh4", show=True) # Tracking with default tracker
- #results = model.track(source="https://youtu.be/LNwODJXcvt4", show=True, tracker="bytetrack.yaml") # Tracking with ByteTrack tracker
|