tennis-vision / app.py
Coddieharsh's picture
Tennis match analysis demo
bcb6a6d
Raw History Blame Contribute Delete
939 Bytes
import gradio as gr
import urllib.request
import os
# Download video if not exists
video_path = "output_video.mp4"
if not os.path.exists(video_path):
print("Downloading video...")
urllib.request.urlretrieve(
"https://raw.githubusercontent.com/HarshTomar1234/Tennis-Vision/main/output_videos/output_video.mp4",
video_path
)
print("Download complete!")
with gr.Blocks(title="Tennis Vision") as demo:
gr.Markdown("""
# 🎾 Tennis Vision match analysis using CV skills
**Tennis match analysis with 95% player detection and real-time ball tracking**
βœ… YOLOv8 player detection β€’ βœ… Custom ball tracking β€’ βœ… Shot classification (12 types) β€’ βœ… Mini-court visualization
[πŸ“‚ View Full Project on GitHub](https://github.com/HarshTomar1234/Tennis-Vision)
""")
gr.Video(value=video_path, label="Tennis Vision Analysis Demo", autoplay=True)
demo.launch()