Davidsv's picture
Upload folder using huggingface_hub
8f31e1e verified
raw
history blame contribute delete
428 Bytes
#!/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)