File size: 1,173 Bytes
4548d35
528cf18
bf6ee5d
 
4548d35
52719ed
4548d35
 
3f9359c
 
 
 
bf6ee5d
3f9359c
 
 
 
 
 
bf6ee5d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import os
os.system('gdown https://drive.google.com/uc?id=1hv0xwdbdf-Ym06Hpjy6wKyIklNmKmB99')  # kapao_s_coco.pt
import gradio as gr

def greet(vid):
    os.system("python demos/general.py --weights kapao_s_coco.pt --start 0 --end 2 --gif --fps --vid "+vid)
    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=[
        ["example.mp4"]
    ])
iface.launch()