Spaces:
Sleeping
Sleeping
Commit
Β·
261c04c
1
Parent(s):
7528cb7
soccer analysis using cv skills
Browse files- app.py +28 -0
- requirements.txt.txt +1 -0
app.py
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
import urllib.request
|
| 3 |
+
import os
|
| 4 |
+
|
| 5 |
+
# Download video if not exists
|
| 6 |
+
video_path = "output_video.avi"
|
| 7 |
+
if not os.path.exists(video_path):
|
| 8 |
+
print("Downloading video...")
|
| 9 |
+
urllib.request.urlretrieve(
|
| 10 |
+
"https://raw.githubusercontent.com/HarshTomar1234/Field_Fusion/main/output_videos/output_video.avi",
|
| 11 |
+
video_path
|
| 12 |
+
)
|
| 13 |
+
print("Download complete!")
|
| 14 |
+
|
| 15 |
+
with gr.Blocks(title="Field Fusion") as demo:
|
| 16 |
+
gr.Markdown("""
|
| 17 |
+
# β½ Field Fusion - Football Match Analysis
|
| 18 |
+
|
| 19 |
+
**Football analysis with 91% detection mAP and 94% tracking accuracy**
|
| 20 |
+
|
| 21 |
+
β
YOLOv8 player detection β’ β
ByteTrack multi-object tracking β’ β
Team classification β’ β
Ball possession stats
|
| 22 |
+
|
| 23 |
+
[π View Full Project on GitHub](https://github.com/HarshTomar1234/Field_Fusion)
|
| 24 |
+
""")
|
| 25 |
+
|
| 26 |
+
gr.Video(value=video_path, label="Field Fusion Analysis Demo", autoplay=True)
|
| 27 |
+
|
| 28 |
+
demo.launch()
|
requirements.txt.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
gradio
|