Spaces:
Sleeping
Sleeping
Commit
Β·
531d444
1
Parent(s):
261c04c
football analysis using cv skills
Browse files- app.py +8 -7
- requirements.txt.txt +2 -1
app.py
CHANGED
|
@@ -1,14 +1,15 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
-
import
|
| 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 |
-
|
| 10 |
-
"https://
|
| 11 |
-
video_path
|
|
|
|
| 12 |
)
|
| 13 |
print("Download complete!")
|
| 14 |
|
|
@@ -18,7 +19,7 @@ with gr.Blocks(title="Field Fusion") as demo:
|
|
| 18 |
|
| 19 |
**Football analysis with 91% detection mAP and 94% tracking accuracy**
|
| 20 |
|
| 21 |
-
β
YOLOv8 player detection β’ β
ByteTrack
|
| 22 |
|
| 23 |
[π View Full Project on GitHub](https://github.com/HarshTomar1234/Field_Fusion)
|
| 24 |
""")
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
import gdown
|
| 3 |
import os
|
| 4 |
|
| 5 |
+
# Download video from Google Drive if not exists
|
| 6 |
video_path = "output_video.avi"
|
| 7 |
if not os.path.exists(video_path):
|
| 8 |
+
print("Downloading video from Google Drive...")
|
| 9 |
+
gdown.download(
|
| 10 |
+
"https://drive.google.com/uc?id=1wTchos7ReXpUz1dJU-Bu2f04G9KvDp16",
|
| 11 |
+
video_path,
|
| 12 |
+
quiet=False
|
| 13 |
)
|
| 14 |
print("Download complete!")
|
| 15 |
|
|
|
|
| 19 |
|
| 20 |
**Football analysis with 91% detection mAP and 94% tracking accuracy**
|
| 21 |
|
| 22 |
+
β
YOLOv8 player detection β’ β
ByteTrack tracking β’ β
Team classification β’ β
Possession stats
|
| 23 |
|
| 24 |
[π View Full Project on GitHub](https://github.com/HarshTomar1234/Field_Fusion)
|
| 25 |
""")
|
requirements.txt.txt
CHANGED
|
@@ -1 +1,2 @@
|
|
| 1 |
-
gradio
|
|
|
|
|
|
| 1 |
+
gradio
|
| 2 |
+
gdown
|