track.py 338 B

123456789101112
  1. import warnings
  2. warnings.filterwarnings('ignore')
  3. from ultralytics import YOLO
  4. if __name__ == '__main__':
  5. model = YOLO('yolov8n.pt') # select your model.pt path
  6. model.track(source='video.mp4',
  7. imgsz=640,
  8. project='runs/track',
  9. name='exp',
  10. save=True
  11. )