kaifz commited on
Commit
12cbc75
·
1 Parent(s): 8b3d0f7

test-final

Browse files
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:da576876524c55864094c59bbe99313a167797d312af80eb3666bac7b0a77b34
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

  • SHA256: 11456b9ce9029fa0ed7527ad41efba11bb26552bec2470e7ea76dde89e0c828e
  • Pointer size: 131 Bytes
  • Size of remote file: 289 kB

Git LFS Details

  • SHA256: 77b3cfbc740682e220917dbc11f617077f5f1b7f3897565aa233ae20961b4e63
  • Pointer size: 131 Bytes
  • Size of remote file: 290 kB
src/experiments/log/temp/0001.png CHANGED

Git LFS Details

  • SHA256: 1004a96994e767b8bc4cf65402ff339500e4f8fb147863ab65a39d4d828202c4
  • Pointer size: 131 Bytes
  • Size of remote file: 289 kB

Git LFS Details

  • SHA256: cd667b7ce224a604ce20103753e79faa3d94deb1ac01d3ac2530c78df454430f
  • Pointer size: 131 Bytes
  • Size of remote file: 290 kB
src/experiments/log/temp/0002.png CHANGED

Git LFS Details

  • SHA256: 87a9f831a0ddf866e50446be340e01009256dfe64618f0c9a1d0256b71601daf
  • Pointer size: 131 Bytes
  • Size of remote file: 289 kB

Git LFS Details

  • SHA256: 7d97b92f82aa2a4c2ab2ecdbafb27265f2b8246c41ae48906a2694f1baa234b5
  • Pointer size: 131 Bytes
  • Size of remote file: 290 kB
src/experiments/log/temp/0003.png CHANGED

Git LFS Details

  • SHA256: b7d2e986c5bfe920d2e3d0fdcf81d7d3d0968f4de65bbd98b79931a852eba665
  • Pointer size: 131 Bytes
  • Size of remote file: 289 kB

Git LFS Details

  • SHA256: a53ec2eb51510a425e94d6c77cfffe523b3d7b58d3f55f9c9971bb0860df14ba
  • Pointer size: 131 Bytes
  • Size of remote file: 290 kB
src/experiments/log/temp/0004.png CHANGED

Git LFS Details

  • SHA256: 9806bc97e1eaf12e7f8fb6bf8b2218c9ddd59446e1ec19db1cbe9df2e3e7e2b6
  • Pointer size: 131 Bytes
  • Size of remote file: 289 kB

Git LFS Details

  • SHA256: 0cc56f75c675a58ec61e482d5e9cf532e7880b33f9ed43248c75e62134aa897d
  • Pointer size: 131 Bytes
  • Size of remote file: 290 kB
src/experiments/log/temp/0005.png CHANGED

Git LFS Details

  • SHA256: 39da1a7f34fe222ea5e2d2c1ca5ae2a0b57b3b7b3f20d05814fd0467f774e50a
  • Pointer size: 131 Bytes
  • Size of remote file: 290 kB

Git LFS Details

  • SHA256: 25eb614538d6665089a9abf3acd61117645ecf8087e96aaf89cd9a0236f222bc
  • Pointer size: 131 Bytes
  • Size of remote file: 289 kB
src/experiments/log/temp/0006.png CHANGED

Git LFS Details

  • SHA256: 94aec7a81308466c70d03fed54eafe6a61dcaa586da999d309a9d964677c1929
  • Pointer size: 131 Bytes
  • Size of remote file: 290 kB

Git LFS Details

  • SHA256: 4f138c4c08e933e41e4545fd75d3b400fbe8c5f51cab29b6113c09d43fdc6a8f
  • Pointer size: 131 Bytes
  • Size of remote file: 289 kB
src/experiments/log/temp/0007.png CHANGED

Git LFS Details

  • SHA256: 83499cda333830834b88059283aad389d52d2d4e7b171518bb498d5caa847bb7
  • Pointer size: 131 Bytes
  • Size of remote file: 290 kB

Git LFS Details

  • SHA256: 39e47213f688d7e8322c52cdcb90515ee2f3b948f4bcaa310a010892aba12bd8
  • Pointer size: 131 Bytes
  • Size of remote file: 289 kB
src/experiments/log/temp/0008.png CHANGED

Git LFS Details

  • SHA256: d6a408586985bbac39ba40acb2d4f4ec859157b429ecccf794844cf0a9f5efcf
  • Pointer size: 131 Bytes
  • Size of remote file: 290 kB

Git LFS Details

  • SHA256: 8574795142c6738e04e34467f5fe6f42fc6132b681483608bebc8ed814eebba0
  • Pointer size: 131 Bytes
  • Size of remote file: 289 kB
src/experiments/log/temp/0009.png CHANGED

Git LFS Details

  • SHA256: c0346bb096cbf89297b20fc93ca9d2c4ace328231eab1ed225175ceba06f18c0
  • Pointer size: 131 Bytes
  • Size of remote file: 290 kB

Git LFS Details

  • SHA256: e3dbe50211cfa3b861b3ae4d1695cfda3a886f4f710870e6134d7ff7d0beb990
  • Pointer size: 131 Bytes
  • Size of remote file: 289 kB
src/experiments/log/temp/0010.png CHANGED

Git LFS Details

  • SHA256: 43ea224b2bf8dd24e4b0bd5a9e7f5f5db041f89cdfb9281d5ed9b3f5cd98d0cf
  • Pointer size: 131 Bytes
  • Size of remote file: 290 kB

Git LFS Details

  • SHA256: 37dbc2cb4ebdb788971f1676d3f86c0d51ea8b058fa709bbec16347a20e593f5
  • Pointer size: 131 Bytes
  • Size of remote file: 289 kB
src/experiments/log/temp/0011.png CHANGED

Git LFS Details

  • SHA256: 28abd277a392e3388dfc52ef568756761c7c11f5c5ae53e8fa78ff721067ce96
  • Pointer size: 131 Bytes
  • Size of remote file: 290 kB

Git LFS Details

  • SHA256: 111c751c5c68bc9f5343c3ccbd87ac0549fcedec5246dc47a985ed1f777afb99
  • Pointer size: 131 Bytes
  • Size of remote file: 289 kB
src/experiments/log/temp/0012.png CHANGED

Git LFS Details

  • SHA256: 727674ea075279239340b6965acfb83842a43fdd4eb6c0a51eca570060b8e612
  • Pointer size: 131 Bytes
  • Size of remote file: 290 kB

Git LFS Details

  • SHA256: 0f412dfad710635fd79c080705b470155a738eb7b143fe739bc6303be1ab57db
  • Pointer size: 131 Bytes
  • Size of remote file: 289 kB
src/experiments/log/temp/0013.png CHANGED

Git LFS Details

  • SHA256: 7616e6af30d23cdb22762d4abcea747f6d764ffc758fc791ebe4f3080ce7da45
  • Pointer size: 131 Bytes
  • Size of remote file: 289 kB

Git LFS Details

  • SHA256: 7b5ee00ff589b68b25ed014038a08a28d5214ca328ea53705b63c7a5d74093dd
  • Pointer size: 131 Bytes
  • Size of remote file: 289 kB
src/experiments/log/temp/0014.png CHANGED

Git LFS Details

  • SHA256: da6e4014b7cb38c77c140d48188c1d769d3adb5876e4bed7a3d973084696e008
  • Pointer size: 131 Bytes
  • Size of remote file: 289 kB

Git LFS Details

  • SHA256: f40c996ebbd4ef62355d3e6bfe4c97ba07d1184d06b108444658fb367e55cdff
  • Pointer size: 131 Bytes
  • Size of remote file: 289 kB