vcs-python-repository/YOLO python/generate-predictions.py

14 lines
583 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
2024-04-16 17:26:17 -07:00
for i in model.predict("D:\Projects\FaceTrackingCamerav3\Raymond.mp4", save=True, save_frames=True, save_txt=True, conf=0.5, stream=True):
2024-04-13 17:01:16 -07:00
continue