test-final
Browse files- app.py +47 -0
- src/experiments/log/gs/temp/form_video.mp4 +0 -0
- src/experiments/log/gs/temp/gs_pred.splat +1 -1
- src/experiments/log/temp/0000.png +2 -2
- src/experiments/log/temp/0001.png +2 -2
- src/experiments/log/temp/0002.png +2 -2
- src/experiments/log/temp/0003.png +2 -2
- src/experiments/log/temp/0004.png +2 -2
- src/experiments/log/temp/0005.png +2 -2
- src/experiments/log/temp/0006.png +2 -2
- src/experiments/log/temp/0007.png +2 -2
- src/experiments/log/temp/0008.png +2 -2
- src/experiments/log/temp/0009.png +2 -2
- src/experiments/log/temp/0010.png +2 -2
- src/experiments/log/temp/0011.png +2 -2
- src/experiments/log/temp/0012.png +2 -2
- src/experiments/log/temp/0013.png +2 -2
- src/experiments/log/temp/0014.png +2 -2
app.py
CHANGED
@@ -904,6 +904,8 @@ class DynamicsVisualizer:
|
|
904 |
[0., w / 2 * 1.0, h / 2],
|
905 |
[0., 0., 1.]],
|
906 |
)
|
|
|
|
|
907 |
self.update_camera(k, w2c, w, h)
|
908 |
|
909 |
n_particles = self.cfg.sim.n_particles
|
@@ -1016,6 +1018,39 @@ class DynamicsVisualizer:
|
|
1016 |
self.torch_device = torch_devices[0]
|
1017 |
os.system('rm -rf ' + str(root / 'log/temp/*'))
|
1018 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1019 |
self.preprocess_metadata = preprocess_metadata
|
1020 |
self.state = state
|
1021 |
self.params = params
|
@@ -1187,6 +1222,18 @@ class DynamicsVisualizer:
|
|
1187 |
|
1188 |
with gr.Row():
|
1189 |
gr.Markdown('### Project page: [https://kywind.github.io/pgnd](https://kywind.github.io/pgnd)')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1190 |
|
1191 |
with gr.Row():
|
1192 |
|
|
|
904 |
[0., w / 2 * 1.0, h / 2],
|
905 |
[0., 0., 1.]],
|
906 |
)
|
907 |
+
self.metadata = {}
|
908 |
+
self.config = {}
|
909 |
self.update_camera(k, w2c, w, h)
|
910 |
|
911 |
n_particles = self.cfg.sim.n_particles
|
|
|
1018 |
self.torch_device = torch_devices[0]
|
1019 |
os.system('rm -rf ' + str(root / 'log/temp/*'))
|
1020 |
|
1021 |
+
w = 640
|
1022 |
+
h = 480
|
1023 |
+
center = (0, 0, 0.1)
|
1024 |
+
distance = 0.7
|
1025 |
+
elevation = 20
|
1026 |
+
azimuth = 180.0
|
1027 |
+
target = np.array(center)
|
1028 |
+
theta = 90 + azimuth
|
1029 |
+
z = distance * math.sin(math.radians(elevation))
|
1030 |
+
y = math.cos(math.radians(theta)) * distance * math.cos(math.radians(elevation))
|
1031 |
+
x = math.sin(math.radians(theta)) * distance * math.cos(math.radians(elevation))
|
1032 |
+
origin = target + np.array([x, y, z])
|
1033 |
+
|
1034 |
+
look_at = target - origin
|
1035 |
+
look_at /= np.linalg.norm(look_at)
|
1036 |
+
up = np.array([0.0, 0.0, 1.0])
|
1037 |
+
right = np.cross(look_at, up)
|
1038 |
+
right /= np.linalg.norm(right)
|
1039 |
+
up = np.cross(right, look_at)
|
1040 |
+
w2c = np.eye(4)
|
1041 |
+
w2c[:3, 0] = right
|
1042 |
+
w2c[:3, 1] = -up
|
1043 |
+
w2c[:3, 2] = look_at
|
1044 |
+
w2c[:3, 3] = origin
|
1045 |
+
w2c = np.linalg.inv(w2c)
|
1046 |
+
|
1047 |
+
k = np.array(
|
1048 |
+
[[w / 2 * 1.0, 0., w / 2],
|
1049 |
+
[0., w / 2 * 1.0, h / 2],
|
1050 |
+
[0., 0., 1.]],
|
1051 |
+
)
|
1052 |
+
self.update_camera(k, w2c, w, h)
|
1053 |
+
|
1054 |
self.preprocess_metadata = preprocess_metadata
|
1055 |
self.state = state
|
1056 |
self.params = params
|
|
|
1222 |
|
1223 |
with gr.Row():
|
1224 |
gr.Markdown('### Project page: [https://kywind.github.io/pgnd](https://kywind.github.io/pgnd)')
|
1225 |
+
|
1226 |
+
with gr.Row():
|
1227 |
+
gr.Markdown(' '.join([
|
1228 |
+
'Instructions:\n',
|
1229 |
+
'- Click the "Reset" button to initialize the simulation with the predicted video and Gaussian splats. Due to compute limitations of Huggingface Space, each run may take a prolonged period (up to 30 seconds).\n',
|
1230 |
+
'- Use the buttons to move the gripper in the x, y, z directions. The gripper will move for a fixed length per click. The predicted video and Gaussian splats will be updated accordingly.\n',
|
1231 |
+
'- X-Y plane is the table surface, and Z is the height.\n',
|
1232 |
+
'- The predicted video from the previous step to the current step will be shown in the "Predicted video" section.\n',
|
1233 |
+
'- The Gaussian splats after the current step will be shown in the "Predicted Gaussians" section.\n',
|
1234 |
+
'- The simulation results may deviate from the initial shape due to accumulative prediction artifacts. Click the "Reset" button to reset the simulation state and reinitialize the predicted video and Gaussian splats.\n',
|
1235 |
+
]))
|
1236 |
+
|
1237 |
|
1238 |
with gr.Row():
|
1239 |
|
src/experiments/log/gs/temp/form_video.mp4
CHANGED
Binary files a/src/experiments/log/gs/temp/form_video.mp4 and b/src/experiments/log/gs/temp/form_video.mp4 differ
|
|
src/experiments/log/gs/temp/gs_pred.splat
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 7675392
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:111f09eae16a77a8e63af83f4adcb78c21ac301113a18fae10bcaa89432aff5f
|
3 |
size 7675392
|
src/experiments/log/temp/0000.png
CHANGED
![]() |
Git LFS Details
|
![]() |
Git LFS Details
|
src/experiments/log/temp/0001.png
CHANGED
![]() |
Git LFS Details
|
![]() |
Git LFS Details
|
src/experiments/log/temp/0002.png
CHANGED
![]() |
Git LFS Details
|
![]() |
Git LFS Details
|
src/experiments/log/temp/0003.png
CHANGED
![]() |
Git LFS Details
|
![]() |
Git LFS Details
|
src/experiments/log/temp/0004.png
CHANGED
![]() |
Git LFS Details
|
![]() |
Git LFS Details
|
src/experiments/log/temp/0005.png
CHANGED
![]() |
Git LFS Details
|
![]() |
Git LFS Details
|
src/experiments/log/temp/0006.png
CHANGED
![]() |
Git LFS Details
|
![]() |
Git LFS Details
|
src/experiments/log/temp/0007.png
CHANGED
![]() |
Git LFS Details
|
![]() |
Git LFS Details
|
src/experiments/log/temp/0008.png
CHANGED
![]() |
Git LFS Details
|
![]() |
Git LFS Details
|
src/experiments/log/temp/0009.png
CHANGED
![]() |
Git LFS Details
|
![]() |
Git LFS Details
|
src/experiments/log/temp/0010.png
CHANGED
![]() |
Git LFS Details
|
![]() |
Git LFS Details
|
src/experiments/log/temp/0011.png
CHANGED
![]() |
Git LFS Details
|
![]() |
Git LFS Details
|
src/experiments/log/temp/0012.png
CHANGED
![]() |
Git LFS Details
|
![]() |
Git LFS Details
|
src/experiments/log/temp/0013.png
CHANGED
![]() |
Git LFS Details
|
![]() |
Git LFS Details
|
src/experiments/log/temp/0014.png
CHANGED
![]() |
Git LFS Details
|
![]() |
Git LFS Details
|