pose.py 657 B

123456789101112
  1. from ultralytics import YOLO
  2. # Load an official or custom model
  3. #model = YOLO('yolov8s.pt') # Load an official Detect model
  4. #model = YOLO('yolov8s-seg.pt') # Load an official Segment model
  5. model = YOLO('yolov8s-pose.pt') # Load an official Pose model
  6. #model = YOLO('path/to/best.pt') # Load a custom trained model
  7. # Perform tracking with the model
  8. results = model.predict(source=0, show=True) #
  9. #results = model.track(source="https://www.youtube.com/watch?v=6n5d1C1Alh4", show=True) # Tracking with default tracker
  10. #results = model.track(source="https://youtu.be/LNwODJXcvt4", show=True, tracker="bytetrack.yaml") # Tracking with ByteTrack tracker