Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -31,10 +31,6 @@ def show_rendered_image(r,theta,phi):
|
|
| 31 |
|
| 32 |
st.title('3D volumetric rendering with NeRF - A concrete example, Ficus Dataset')
|
| 33 |
|
| 34 |
-
from PIL import Image
|
| 35 |
-
|
| 36 |
-
image = Image.open('./training(3).gif')
|
| 37 |
-
|
| 38 |
import base64
|
| 39 |
|
| 40 |
file = open(r'./training(3).gif', 'rb')
|
|
@@ -48,7 +44,12 @@ st.markdown(
|
|
| 48 |
)
|
| 49 |
|
| 50 |
st.markdown("[NeRF](https://arxiv.org/abs/2003.08934) proposes an ingenious way to synthesize novel views of a scene by modelling the volumetric scene function through a neural network. The network learns to model the volumetric scene, thus generating novel views (images) of the 3D scene that the model was not shown at training time.")
|
| 51 |
-
st.markdown(".gif)")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
st.image(image, caption='Training Steps')
|
| 53 |
st.markdown("## Interactive Demo")
|
| 54 |
|
|
@@ -61,8 +62,8 @@ nerf_loaded = from_pretrained_keras("Alesteba/NeRF_ficus")
|
|
| 61 |
|
| 62 |
# set the values of r theta phi
|
| 63 |
r = 4.0
|
| 64 |
-
theta = st.slider("",min_value=0.0, max_value=360.0, label_visibility="hidden")
|
| 65 |
-
phi = st.slider("", min_value=0.0, max_value=360.0, label_visibility="hidden")
|
| 66 |
# phi = -30.0
|
| 67 |
color, depth = show_rendered_image(r, theta, phi)
|
| 68 |
|
|
|
|
| 31 |
|
| 32 |
st.title('3D volumetric rendering with NeRF - A concrete example, Ficus Dataset')
|
| 33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
import base64
|
| 35 |
|
| 36 |
file = open(r'./training(3).gif', 'rb')
|
|
|
|
| 44 |
)
|
| 45 |
|
| 46 |
st.markdown("[NeRF](https://arxiv.org/abs/2003.08934) proposes an ingenious way to synthesize novel views of a scene by modelling the volumetric scene function through a neural network. The network learns to model the volumetric scene, thus generating novel views (images) of the 3D scene that the model was not shown at training time.")
|
| 47 |
+
# st.markdown(".gif)")
|
| 48 |
+
|
| 49 |
+
st.markdown(
|
| 50 |
+
f'<img src="data:image/gif;base64,{data_url}" alt="cat gif" width=100%>',
|
| 51 |
+
unsafe_allow_html=True,
|
| 52 |
+
)
|
| 53 |
st.image(image, caption='Training Steps')
|
| 54 |
st.markdown("## Interactive Demo")
|
| 55 |
|
|
|
|
| 62 |
|
| 63 |
# set the values of r theta phi
|
| 64 |
r = 4.0
|
| 65 |
+
theta = st.slider("key_1",min_value=0.0, max_value=360.0, label_visibility="hidden")
|
| 66 |
+
phi = st.slider("key_2", min_value=0.0, max_value=360.0, label_visibility="hidden")
|
| 67 |
# phi = -30.0
|
| 68 |
color, depth = show_rendered_image(r, theta, phi)
|
| 69 |
|