Seokju Cho commited on
Commit
e11cc45
·
1 Parent(s): 0922558

add examples

Browse files
Files changed (1) hide show
  1. app.py +22 -3
app.py CHANGED
@@ -287,7 +287,7 @@ with gr.Blocks() as demo:
287
  gr.Markdown("# LocoTrack Demo")
288
  gr.Markdown("This is an interactive demo for LocoTrack. For more details, please refer to the [GitHub repository](https://github.com/KU-CVLAB/LocoTrack) or the [paper](https://arxiv.org/abs/2407.15420).")
289
 
290
- gr.Markdown("## First step: Choose the model size and upload your video")
291
  with gr.Row():
292
  with gr.Accordion("Your video input", open=True) as video_in_drawer:
293
  model_size_selection = gr.Radio(
@@ -296,8 +296,27 @@ with gr.Blocks() as demo:
296
  value="small",
297
  )
298
  video_in = gr.Video(label="Video Input", format="mp4")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
299
 
300
- gr.Markdown("## Second step: Add query points to track")
301
  with gr.Row():
302
 
303
  with gr.Column():
@@ -327,7 +346,7 @@ with gr.Blocks() as demo:
327
  loop=True,
328
  )
329
 
330
- video_in.upload(
331
  fn = preprocess_video_input,
332
  inputs = [video_in, model_size_selection],
333
  outputs = [
 
287
  gr.Markdown("# LocoTrack Demo")
288
  gr.Markdown("This is an interactive demo for LocoTrack. For more details, please refer to the [GitHub repository](https://github.com/KU-CVLAB/LocoTrack) or the [paper](https://arxiv.org/abs/2407.15420).")
289
 
290
+ gr.Markdown("## First step: Choose the model size, upload your video or select an example video, and click submit.")
291
  with gr.Row():
292
  with gr.Accordion("Your video input", open=True) as video_in_drawer:
293
  model_size_selection = gr.Radio(
 
296
  value="small",
297
  )
298
  video_in = gr.Video(label="Video Input", format="mp4")
299
+ with gr.Row():
300
+ example = gr.Examples(
301
+ label="Example Vidoes",
302
+ examples=[
303
+ ["./examples/bmx-bumps.mp4"],
304
+ ["./examples/bmx-trees.mp4"],
305
+ ["./examples/breakdance-flare.mp4"],
306
+ ["./examples/breakdance.mp4"],
307
+ ["./examples/dance-jump.mp4"],
308
+ ["./examples/horsejump-high.mp4"],
309
+ ["./examples/libby.mp4"],
310
+ ["./examples/motocross-jump.mp4"],
311
+ ["./examples/parkour.mp4"],
312
+ ],
313
+ inputs=[video_in],
314
+ examples_per_page=3
315
+ )
316
+ submit = gr.Button("Submit", scale=0)
317
+
318
 
319
+ gr.Markdown("## Second step: Add query points to the video, and click track.")
320
  with gr.Row():
321
 
322
  with gr.Column():
 
346
  loop=True,
347
  )
348
 
349
+ submit.click(
350
  fn = preprocess_video_input,
351
  inputs = [video_in, model_size_selection],
352
  outputs = [