vcs-python-repository/YOLO python/basic-tracking.py

14 lines
627 B
Python
Raw Normal View History

2024-04-13 17:01:16 -07:00
from ultralytics import YOLO
# Load an official or custom model
# model = YOLO('yolov8n.pt') # Load an official Detect model
model = YOLO('yolov8s.pt') # Load an official Detect model
# model = YOLO('yolov8n-seg.pt') # Load an official Segment model
# model = YOLO('yolov8n-pose.pt') # Load an official Pose model
# model = YOLO('path/to/best.pt') # Load a custom trained model
# Run inference on 'bus.jpg' with arguments
for i in model.predict('D:\Projects\FaceTrackingCamerav3\YOLO python\kevin-center-camera-position.mp4', show=True, save=True, save_frames=True, save_txt=True, conf=0.5, stream=True):
continue