File size: 428 Bytes
8f31e1e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env python
# Example usage for tennis-racket-yolov11

from ultralytics import YOLO

# Load model from local file
model = YOLO('model.pt')

# Or download from Hugging Face (after upload)
# model = YOLO('hf://YOUR_USERNAME/tennis-racket-yolov11/model.pt')

# Predict on image
results = model.predict('image.jpg', conf=0.3)
results[0].show()

# Predict on video
results = model.predict('video.mp4', conf=0.3, save=True)