File size: 1,296 Bytes
4ba17b3
 
 
 
9c02460
4ba17b3
706f673
2bb13f8
706f673
 
 
 
641ce46
 
 
 
 
 
 
 
 
706f673
 
 
 
b3a0c58
 
641ce46
b3a0c58
641ce46
b3a0c58
641ce46
 
 
b3a0c58
706f673
 
 
 
b3a0c58
706f673
 
 
b3a0c58
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import altair as alt
import numpy as np
import pandas as pd
import streamlit as st
import os

# Set your video directory here
VIDEO_FOLDER = "./src/synthda_falling_realreal/"

st.set_page_config(layout="centered")
st.title("AutoSynthDa Pose Interpolation Viewer")

st.markdown("""
# AutoSynthDa Interpolation Viewer

AutoSynthDa blends two input motion videos to **generate kinematically coherent, synthetic action videos**.

Move the slider to explore how motion changes from one input to another. 

View code and try the code on Colab at github.com/nvidia/synthda
""")

# Slider for selecting weight
weight = st.slider("Interpolation Weight", 0.0, 1.0, step=0.1)

# Label logic
if weight == 0.0:
    st.success("Showing: Input Video 1 (No interpolation)")
elif weight == 1.0:
    st.success("Showing: Input Video 2 (No interpolation)")
else:
    w2 = round(1.0 - weight, 1)
    st.info(f"Generating motion by blending {weight:.1f} of Input Video 1 and {w2:.1f} of Input Video 2")


# Construct filename based on weight (rounded to one decimal for file matching)
filename = f"videos_generated_{weight:.1f}.mp4"
video_path = os.path.join(VIDEO_FOLDER, filename)

# Show video
if os.path.exists(video_path):
    st.video(video_path)
else:
    st.error(f"No video found for weight = {weight:.1f}")