bytetrack / app.py
Ahsen Khaliq
Update app.py
08e02d1
import os
import gradio as gr
os.system("pip3 install cython_bbox gdown 'git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI'")
os.system("pip3 install -v -e .")
os.system("gdown https://drive.google.com/uc?id=1P4mY0Yyd3PPTybgZkjMYhFri88nTmJX5")
def inference(image):
os.system("python3 tools/demo_track.py image -f exps/example/mot/yolox_x_mix_det.py -c ./bytetrack_x_mot17.pth.tar --save_result --device 'cpu' --path "+image.name)
return "out.jpg"
title = "Bytetrack"
description = "Gradio demo for ByteTrack: Multi-Object Tracking by Associating Every Detection Box. To use it, simply upload your image, or click one of the examples to load them. Read more at the links below."
article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2110.06864' target='_blank'> ByteTrack: Multi-Object Tracking by Associating Every Detection Box </a> | <a href='https://github.com/ifzhang/ByteTrack' target='_blank'>Github Repo</a></p>"
examples=[['paint.jpeg']]
gr.Interface(
inference,
gr.inputs.Image(type="file"),
gr.outputs.Image(type="file"),
title=title,
description=description,
article=article,
enable_queue=True,
examples=examples
).launch(debug=True)