Coddieharsh commited on
Commit
531d444
Β·
1 Parent(s): 261c04c

football analysis using cv skills

Browse files
Files changed (2) hide show
  1. app.py +8 -7
  2. requirements.txt.txt +2 -1
app.py CHANGED
@@ -1,14 +1,15 @@
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
 
@@ -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 multi-object tracking β€’ βœ… Team classification β€’ βœ… Ball possession stats
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