import os import gradio as gr from glob import glob def get_inputs_components(): return [ gr.Video( label = 'INPUT VIDEO', show_label = True, ), gr.Radio( choices = ['Static Camera', 'Dynamic Camera'], label = 'Camera Status', info = 'If the camera is static, DPVO will be skipped.' ), gr.Number( value = 60, label = 'GPU quota', info = 'Decrease this value if you have insufficient GPU quota left. (Allocating too less may cause wasting of GPU quota while allocating too much won\'t. We suggest to set it as much as possible.)', ), ] def get_outputs_components(): return [ gr.PlayableVideo( label = 'INCAM RESULT', show_label = True, ), gr.PlayableVideo( label = 'GLOBAL RESULT', show_label = True, ), ] def get_examples(): REPO_ROOT = str(os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) return [ [os.path.join(REPO_ROOT, 'examples/cxk.mp4'), 'Static Camera', 120], [os.path.join(REPO_ROOT, 'examples/tennis.mp4'), 'Static Camera', 120], ] def get_desc(): return '''