File size: 1,189 Bytes
4548d35
b739466
bf6ee5d
9d828e1
bf6ee5d
4548d35
f379292
 
4548d35
 
3f9359c
 
 
 
bf6ee5d
3f9359c
 
 
 
2b47a0d
3f9359c
bf6ee5d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import os
os.system('gdown https://drive.google.com/uc?id=1hv0xwdbdf-Ym06Hpjy6wKyIklNmKmB99')
import gradio as gr


def greet(vid):
    os.rename(vid, 'temp.mp4')
    os.system("python demos/general.py --weights kapao_s_coco.pt --start 0 --end 2 --gif --fps --vid temp.mp4")
    return 'flash_mob_inference_kapao_s_coco.gif'
    
title = "Kapao"
description = "Gradio demo for Kapao: an efficient multi-person human pose estimation model that detects keypoints and poses as objects and fuses the detections to predict human poses. To use it, simply upload your video, 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/2111.08557' target='_blank'>Rethinking Keypoint Representations: Modeling Keypoints and Poses as Objects for Multi-Person Human Pose Estimation</a> | <a href='https://github.com/wmcnally/kapao' target='_blank'>Github Repo</a></p>"


iface = gr.Interface(fn=greet,inputs="video", outputs=gr.outputs.Image(type="file", label="output"), enable_queue=True, title=title,
    description=description,
    article=article,
    examples=[
        ["dance2.mp4"]
    ])
iface.launch()