bytetrack / app.py
Ahsen Khaliq
Update app.py
8969b51
raw history blame
No virus
1.16 kB
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=1RE5vaKHYt_TL0cXNn6FmjO7aZx3sVfVA")
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)
#os.system("python onnx_inference.py -i "+video)
#os.system("ls .")
return image.name
title = "Anime2Sketch"
description = "demo for Anime2Sketch. 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/2104.05703'>Adversarial Open Domain Adaption for Sketch-to-Photo Synthesis</a> | <a href='https://github.com/Mukosame/Anime2Sketch'>Github Repo</a></p>"
gr.Interface(
inference,
gr.inputs.Image(type="file"),
gr.outputs.Image(type="file"),
title=title,
description=description,
article=article,
enable_queue=True
).launch(debug=True)