Spaces:
Sleeping
Sleeping
Update demo_support/utils.py
Browse files- demo_support/utils.py +3 -3
demo_support/utils.py
CHANGED
@@ -165,8 +165,8 @@ def render_pc(pc):
|
|
165 |
rgb = (pc[:, 3:] * 255).astype(numpy.uint8)
|
166 |
g = go.Scatter3d(
|
167 |
x=pc[:, 0], y=pc[:, 1], z=pc[:, 2],
|
168 |
-
mode='markers',
|
169 |
-
marker=dict(size=2, color=[f'rgb({rgb[i, 0]}, {rgb[i, 1]}, {rgb[i, 2]})' for i in range(len(pc))]),
|
170 |
)
|
171 |
fig = go.Figure(data=[g])
|
172 |
fig.update_layout(scene_camera=dict(up=dict(x=0, y=1, z=0)))
|
@@ -174,7 +174,7 @@ def render_pc(pc):
|
|
174 |
yaxis = dict(showgrid = False,showticklabels = False),
|
175 |
zaxis = dict(showgrid = False,showticklabels = False)
|
176 |
))
|
177 |
-
fig.update_scenes(aspectmode="
|
178 |
col1, col2 = st.columns(2)
|
179 |
with col1:
|
180 |
st.plotly_chart(fig, use_container_width=True)
|
|
|
165 |
rgb = (pc[:, 3:] * 255).astype(numpy.uint8)
|
166 |
g = go.Scatter3d(
|
167 |
x=pc[:, 0], y=pc[:, 1], z=pc[:, 2],
|
168 |
+
#mode='markers',
|
169 |
+
#marker=dict(size=2, color=[f'rgb({rgb[i, 0]}, {rgb[i, 1]}, {rgb[i, 2]})' for i in range(len(pc))]),
|
170 |
)
|
171 |
fig = go.Figure(data=[g])
|
172 |
fig.update_layout(scene_camera=dict(up=dict(x=0, y=1, z=0)))
|
|
|
174 |
yaxis = dict(showgrid = False,showticklabels = False),
|
175 |
zaxis = dict(showgrid = False,showticklabels = False)
|
176 |
))
|
177 |
+
fig.update_scenes(aspectmode="cube")
|
178 |
col1, col2 = st.columns(2)
|
179 |
with col1:
|
180 |
st.plotly_chart(fig, use_container_width=True)
|