|
import gradio as gr |
|
from reid_processor import process_reid_video |
|
import os |
|
|
|
|
|
iface = gr.Interface( |
|
fn=process_reid_video, |
|
inputs=gr.Video(label="Upload a 15-second football video (e.g., 720p"), |
|
outputs=[ |
|
gr.Video( |
|
label="Processed Video with Re-identified Players", |
|
format="mp4" |
|
) |
|
], |
|
title="Football Player Re-identification in a Single Feed", |
|
description=( |
|
"Upload a 15-second football video (e.g., 720p). " |
|
"This application uses a fine-tuned YOLOv11 model to detect players and then " |
|
"tracks them, ensuring consistent IDs even if players temporarily leave and re-enter the frame. " |
|
"The output video will show players boxed with their unique, persistent IDs." |
|
), |
|
examples=[], |
|
allow_flagging="auto", |
|
live=False |
|
) |
|
|
|
|
|
if __name__ == "__main__": |
|
print("Launching Gradio app...") |
|
iface.launch(show_api=False) |