field-fusion / app.py
Coddieharsh's picture
football analysis using CV skills
55fe523
import gradio as gr
import requests
import os
# Download video from Google Drive
video_path = "output_video.avi"
if not os.path.exists(video_path):
print("Downloading video...")
file_id = "1wTchos7ReXpUz1dJU-Bu2f04G9KvDp16"
url = f"https://drive.google.com/uc?export=download&id={file_id}&confirm=t"
response = requests.get(url, stream=True)
with open(video_path, 'wb') as f:
for chunk in response.iter_content(chunk_size=8192):
f.write(chunk)
print("Download complete!")
with gr.Blocks(title="Field Fusion") as demo:
gr.Markdown("""
# ⚽ Field Fusion - Football Match Analysis
**Football analysis with 91% detection mAP and 94% tracking accuracy**
βœ… YOLOv8 player detection β€’ βœ… ByteTrack tracking β€’ βœ… Team classification β€’ βœ… Possession stats
[πŸ“‚ View Full Project on GitHub](https://github.com/HarshTomar1234/Field_Fusion)
""")
gr.Video(value=video_path, label="Field Fusion Analysis Demo", autoplay=True)
demo.launch()