hujiecpp commited on
Commit
7c3f682
·
1 Parent(s): aca8922

init project

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. modules/croco/models/__pycache__/blocks.cpython-312.pyc +0 -0
  2. modules/croco/models/__pycache__/croco.cpython-312.pyc +0 -0
  3. modules/croco/models/__pycache__/dpt_block.cpython-312.pyc +0 -0
  4. modules/croco/models/__pycache__/masking.cpython-312.pyc +0 -0
  5. modules/croco/models/__pycache__/pos_embed.cpython-312.pyc +0 -0
  6. modules/croco/models/curope/__pycache__/__init__.cpython-312.pyc +0 -0
  7. modules/croco/models/curope/__pycache__/curope2d.cpython-312.pyc +0 -0
  8. modules/dust3r/__pycache__/__init__.cpython-312.pyc +0 -0
  9. modules/dust3r/__pycache__/image_pairs.cpython-312.pyc +0 -0
  10. modules/dust3r/__pycache__/inference.cpython-312.pyc +0 -0
  11. modules/dust3r/__pycache__/model.cpython-312.pyc +0 -0
  12. modules/dust3r/__pycache__/optim_factory.cpython-312.pyc +0 -0
  13. modules/dust3r/__pycache__/patch_embed.cpython-312.pyc +0 -0
  14. modules/dust3r/__pycache__/post_process.cpython-312.pyc +0 -0
  15. modules/dust3r/__pycache__/viz.cpython-312.pyc +0 -0
  16. modules/dust3r/cloud_opt/__pycache__/__init__.cpython-312.pyc +0 -0
  17. modules/dust3r/cloud_opt/__pycache__/base_opt.cpython-312.pyc +0 -0
  18. modules/dust3r/cloud_opt/__pycache__/commons.cpython-312.pyc +0 -0
  19. modules/dust3r/cloud_opt/__pycache__/init_im_poses.cpython-312.pyc +0 -0
  20. modules/dust3r/cloud_opt/__pycache__/modular_optimizer.cpython-312.pyc +0 -0
  21. modules/dust3r/cloud_opt/__pycache__/optimizer.cpython-312.pyc +0 -0
  22. modules/dust3r/cloud_opt/__pycache__/pair_viewer.cpython-312.pyc +0 -0
  23. modules/dust3r/cloud_opt/modular_optimizer.py +6 -4
  24. modules/dust3r/heads/__pycache__/__init__.cpython-312.pyc +0 -0
  25. modules/dust3r/heads/__pycache__/dpt_head.cpython-312.pyc +0 -0
  26. modules/dust3r/heads/__pycache__/linear_head.cpython-312.pyc +0 -0
  27. modules/dust3r/heads/__pycache__/postprocess.cpython-312.pyc +0 -0
  28. modules/dust3r/utils/__pycache__/__init__.cpython-312.pyc +0 -0
  29. modules/dust3r/utils/__pycache__/device.cpython-312.pyc +0 -0
  30. modules/dust3r/utils/__pycache__/geometry.cpython-312.pyc +0 -0
  31. modules/dust3r/utils/__pycache__/image.cpython-312.pyc +0 -0
  32. modules/dust3r/utils/__pycache__/misc.cpython-312.pyc +0 -0
  33. modules/dust3r/utils/__pycache__/path_to_croco.cpython-312.pyc +0 -0
  34. modules/mast3r/__pycache__/__init__.cpython-312.pyc +0 -0
  35. modules/mast3r/__pycache__/catmlp_dpt_head.cpython-312.pyc +0 -0
  36. modules/mast3r/__pycache__/model.cpython-312.pyc +0 -0
  37. modules/mast3r/utils/__pycache__/__init__.cpython-312.pyc +0 -0
  38. modules/mast3r/utils/__pycache__/path_to_dust3r.cpython-312.pyc +0 -0
  39. modules/mobilesamv2/__pycache__/__init__.cpython-312.pyc +0 -0
  40. modules/mobilesamv2/__pycache__/automatic_mask_generator.cpython-312.pyc +0 -0
  41. modules/mobilesamv2/__pycache__/build_sam.cpython-312.pyc +0 -0
  42. modules/mobilesamv2/__pycache__/predictor.cpython-312.pyc +0 -0
  43. modules/mobilesamv2/modeling/__pycache__/__init__.cpython-312.pyc +0 -0
  44. modules/mobilesamv2/modeling/__pycache__/common.cpython-312.pyc +0 -0
  45. modules/mobilesamv2/modeling/__pycache__/image_encoder.cpython-312.pyc +0 -0
  46. modules/mobilesamv2/modeling/__pycache__/mask_decoder.cpython-312.pyc +0 -0
  47. modules/mobilesamv2/modeling/__pycache__/prompt_encoder.cpython-312.pyc +0 -0
  48. modules/mobilesamv2/modeling/__pycache__/sam.cpython-312.pyc +0 -0
  49. modules/mobilesamv2/modeling/__pycache__/transformer.cpython-312.pyc +0 -0
  50. modules/mobilesamv2/promt_mobilesamv2/__pycache__/__init__.cpython-312.pyc +0 -0
modules/croco/models/__pycache__/blocks.cpython-312.pyc CHANGED
Binary files a/modules/croco/models/__pycache__/blocks.cpython-312.pyc and b/modules/croco/models/__pycache__/blocks.cpython-312.pyc differ
 
modules/croco/models/__pycache__/croco.cpython-312.pyc CHANGED
Binary files a/modules/croco/models/__pycache__/croco.cpython-312.pyc and b/modules/croco/models/__pycache__/croco.cpython-312.pyc differ
 
modules/croco/models/__pycache__/dpt_block.cpython-312.pyc CHANGED
Binary files a/modules/croco/models/__pycache__/dpt_block.cpython-312.pyc and b/modules/croco/models/__pycache__/dpt_block.cpython-312.pyc differ
 
modules/croco/models/__pycache__/masking.cpython-312.pyc CHANGED
Binary files a/modules/croco/models/__pycache__/masking.cpython-312.pyc and b/modules/croco/models/__pycache__/masking.cpython-312.pyc differ
 
modules/croco/models/__pycache__/pos_embed.cpython-312.pyc CHANGED
Binary files a/modules/croco/models/__pycache__/pos_embed.cpython-312.pyc and b/modules/croco/models/__pycache__/pos_embed.cpython-312.pyc differ
 
modules/croco/models/curope/__pycache__/__init__.cpython-312.pyc CHANGED
Binary files a/modules/croco/models/curope/__pycache__/__init__.cpython-312.pyc and b/modules/croco/models/curope/__pycache__/__init__.cpython-312.pyc differ
 
modules/croco/models/curope/__pycache__/curope2d.cpython-312.pyc CHANGED
Binary files a/modules/croco/models/curope/__pycache__/curope2d.cpython-312.pyc and b/modules/croco/models/curope/__pycache__/curope2d.cpython-312.pyc differ
 
modules/dust3r/__pycache__/__init__.cpython-312.pyc CHANGED
Binary files a/modules/dust3r/__pycache__/__init__.cpython-312.pyc and b/modules/dust3r/__pycache__/__init__.cpython-312.pyc differ
 
modules/dust3r/__pycache__/image_pairs.cpython-312.pyc CHANGED
Binary files a/modules/dust3r/__pycache__/image_pairs.cpython-312.pyc and b/modules/dust3r/__pycache__/image_pairs.cpython-312.pyc differ
 
modules/dust3r/__pycache__/inference.cpython-312.pyc CHANGED
Binary files a/modules/dust3r/__pycache__/inference.cpython-312.pyc and b/modules/dust3r/__pycache__/inference.cpython-312.pyc differ
 
modules/dust3r/__pycache__/model.cpython-312.pyc CHANGED
Binary files a/modules/dust3r/__pycache__/model.cpython-312.pyc and b/modules/dust3r/__pycache__/model.cpython-312.pyc differ
 
modules/dust3r/__pycache__/optim_factory.cpython-312.pyc CHANGED
Binary files a/modules/dust3r/__pycache__/optim_factory.cpython-312.pyc and b/modules/dust3r/__pycache__/optim_factory.cpython-312.pyc differ
 
modules/dust3r/__pycache__/patch_embed.cpython-312.pyc CHANGED
Binary files a/modules/dust3r/__pycache__/patch_embed.cpython-312.pyc and b/modules/dust3r/__pycache__/patch_embed.cpython-312.pyc differ
 
modules/dust3r/__pycache__/post_process.cpython-312.pyc CHANGED
Binary files a/modules/dust3r/__pycache__/post_process.cpython-312.pyc and b/modules/dust3r/__pycache__/post_process.cpython-312.pyc differ
 
modules/dust3r/__pycache__/viz.cpython-312.pyc CHANGED
Binary files a/modules/dust3r/__pycache__/viz.cpython-312.pyc and b/modules/dust3r/__pycache__/viz.cpython-312.pyc differ
 
modules/dust3r/cloud_opt/__pycache__/__init__.cpython-312.pyc CHANGED
Binary files a/modules/dust3r/cloud_opt/__pycache__/__init__.cpython-312.pyc and b/modules/dust3r/cloud_opt/__pycache__/__init__.cpython-312.pyc differ
 
modules/dust3r/cloud_opt/__pycache__/base_opt.cpython-312.pyc CHANGED
Binary files a/modules/dust3r/cloud_opt/__pycache__/base_opt.cpython-312.pyc and b/modules/dust3r/cloud_opt/__pycache__/base_opt.cpython-312.pyc differ
 
modules/dust3r/cloud_opt/__pycache__/commons.cpython-312.pyc CHANGED
Binary files a/modules/dust3r/cloud_opt/__pycache__/commons.cpython-312.pyc and b/modules/dust3r/cloud_opt/__pycache__/commons.cpython-312.pyc differ
 
modules/dust3r/cloud_opt/__pycache__/init_im_poses.cpython-312.pyc CHANGED
Binary files a/modules/dust3r/cloud_opt/__pycache__/init_im_poses.cpython-312.pyc and b/modules/dust3r/cloud_opt/__pycache__/init_im_poses.cpython-312.pyc differ
 
modules/dust3r/cloud_opt/__pycache__/modular_optimizer.cpython-312.pyc CHANGED
Binary files a/modules/dust3r/cloud_opt/__pycache__/modular_optimizer.cpython-312.pyc and b/modules/dust3r/cloud_opt/__pycache__/modular_optimizer.cpython-312.pyc differ
 
modules/dust3r/cloud_opt/__pycache__/optimizer.cpython-312.pyc CHANGED
Binary files a/modules/dust3r/cloud_opt/__pycache__/optimizer.cpython-312.pyc and b/modules/dust3r/cloud_opt/__pycache__/optimizer.cpython-312.pyc differ
 
modules/dust3r/cloud_opt/__pycache__/pair_viewer.cpython-312.pyc CHANGED
Binary files a/modules/dust3r/cloud_opt/__pycache__/pair_viewer.cpython-312.pyc and b/modules/dust3r/cloud_opt/__pycache__/pair_viewer.cpython-312.pyc differ
 
modules/dust3r/cloud_opt/modular_optimizer.py CHANGED
@@ -127,17 +127,19 @@ class ModularPointCloudOptimizer (BasePCOptimizer):
127
  def get_depthmaps(self):
128
  return [d.exp() for d in self.im_depthmaps]
129
 
 
 
 
 
130
  def depth_to_pts3d(self):
131
  # Get depths and projection params if not provided
132
  focals = self.get_focals()
133
  pp = self.get_principal_points()
134
  im_poses = self.get_im_poses()
135
  depth = self.get_depthmaps()
136
-
137
- # convert focal to (1,2,H,W) constant field
138
- def focal_ex(i): return focals[i][..., None, None].expand(1, *focals[i].shape, *self.imshapes[i])
139
  # get pointmaps in camera frame
140
- rel_ptmaps = [depthmap_to_pts3d(depth[i][None], focal_ex(i), pp=pp[i:i+1])[0] for i in range(im_poses.shape[0])]
141
  # project to world frame
142
  return [geotrf(pose, ptmap) for pose, ptmap in zip(im_poses, rel_ptmaps)]
143
 
 
127
  def get_depthmaps(self):
128
  return [d.exp() for d in self.im_depthmaps]
129
 
130
+ def focal_ex(self, focals, i):
131
+ # convert focal to (1,2,H,W) constant field
132
+ return focals[i][..., None, None].expand(1, *focals[i].shape, *self.imshapes[i])
133
+
134
  def depth_to_pts3d(self):
135
  # Get depths and projection params if not provided
136
  focals = self.get_focals()
137
  pp = self.get_principal_points()
138
  im_poses = self.get_im_poses()
139
  depth = self.get_depthmaps()
140
+
 
 
141
  # get pointmaps in camera frame
142
+ rel_ptmaps = [depthmap_to_pts3d(depth[i][None], self.focal_ex(focals, i), pp=pp[i:i+1])[0] for i in range(im_poses.shape[0])]
143
  # project to world frame
144
  return [geotrf(pose, ptmap) for pose, ptmap in zip(im_poses, rel_ptmaps)]
145
 
modules/dust3r/heads/__pycache__/__init__.cpython-312.pyc CHANGED
Binary files a/modules/dust3r/heads/__pycache__/__init__.cpython-312.pyc and b/modules/dust3r/heads/__pycache__/__init__.cpython-312.pyc differ
 
modules/dust3r/heads/__pycache__/dpt_head.cpython-312.pyc CHANGED
Binary files a/modules/dust3r/heads/__pycache__/dpt_head.cpython-312.pyc and b/modules/dust3r/heads/__pycache__/dpt_head.cpython-312.pyc differ
 
modules/dust3r/heads/__pycache__/linear_head.cpython-312.pyc CHANGED
Binary files a/modules/dust3r/heads/__pycache__/linear_head.cpython-312.pyc and b/modules/dust3r/heads/__pycache__/linear_head.cpython-312.pyc differ
 
modules/dust3r/heads/__pycache__/postprocess.cpython-312.pyc CHANGED
Binary files a/modules/dust3r/heads/__pycache__/postprocess.cpython-312.pyc and b/modules/dust3r/heads/__pycache__/postprocess.cpython-312.pyc differ
 
modules/dust3r/utils/__pycache__/__init__.cpython-312.pyc CHANGED
Binary files a/modules/dust3r/utils/__pycache__/__init__.cpython-312.pyc and b/modules/dust3r/utils/__pycache__/__init__.cpython-312.pyc differ
 
modules/dust3r/utils/__pycache__/device.cpython-312.pyc CHANGED
Binary files a/modules/dust3r/utils/__pycache__/device.cpython-312.pyc and b/modules/dust3r/utils/__pycache__/device.cpython-312.pyc differ
 
modules/dust3r/utils/__pycache__/geometry.cpython-312.pyc CHANGED
Binary files a/modules/dust3r/utils/__pycache__/geometry.cpython-312.pyc and b/modules/dust3r/utils/__pycache__/geometry.cpython-312.pyc differ
 
modules/dust3r/utils/__pycache__/image.cpython-312.pyc CHANGED
Binary files a/modules/dust3r/utils/__pycache__/image.cpython-312.pyc and b/modules/dust3r/utils/__pycache__/image.cpython-312.pyc differ
 
modules/dust3r/utils/__pycache__/misc.cpython-312.pyc CHANGED
Binary files a/modules/dust3r/utils/__pycache__/misc.cpython-312.pyc and b/modules/dust3r/utils/__pycache__/misc.cpython-312.pyc differ
 
modules/dust3r/utils/__pycache__/path_to_croco.cpython-312.pyc CHANGED
Binary files a/modules/dust3r/utils/__pycache__/path_to_croco.cpython-312.pyc and b/modules/dust3r/utils/__pycache__/path_to_croco.cpython-312.pyc differ
 
modules/mast3r/__pycache__/__init__.cpython-312.pyc CHANGED
Binary files a/modules/mast3r/__pycache__/__init__.cpython-312.pyc and b/modules/mast3r/__pycache__/__init__.cpython-312.pyc differ
 
modules/mast3r/__pycache__/catmlp_dpt_head.cpython-312.pyc CHANGED
Binary files a/modules/mast3r/__pycache__/catmlp_dpt_head.cpython-312.pyc and b/modules/mast3r/__pycache__/catmlp_dpt_head.cpython-312.pyc differ
 
modules/mast3r/__pycache__/model.cpython-312.pyc CHANGED
Binary files a/modules/mast3r/__pycache__/model.cpython-312.pyc and b/modules/mast3r/__pycache__/model.cpython-312.pyc differ
 
modules/mast3r/utils/__pycache__/__init__.cpython-312.pyc CHANGED
Binary files a/modules/mast3r/utils/__pycache__/__init__.cpython-312.pyc and b/modules/mast3r/utils/__pycache__/__init__.cpython-312.pyc differ
 
modules/mast3r/utils/__pycache__/path_to_dust3r.cpython-312.pyc CHANGED
Binary files a/modules/mast3r/utils/__pycache__/path_to_dust3r.cpython-312.pyc and b/modules/mast3r/utils/__pycache__/path_to_dust3r.cpython-312.pyc differ
 
modules/mobilesamv2/__pycache__/__init__.cpython-312.pyc CHANGED
Binary files a/modules/mobilesamv2/__pycache__/__init__.cpython-312.pyc and b/modules/mobilesamv2/__pycache__/__init__.cpython-312.pyc differ
 
modules/mobilesamv2/__pycache__/automatic_mask_generator.cpython-312.pyc CHANGED
Binary files a/modules/mobilesamv2/__pycache__/automatic_mask_generator.cpython-312.pyc and b/modules/mobilesamv2/__pycache__/automatic_mask_generator.cpython-312.pyc differ
 
modules/mobilesamv2/__pycache__/build_sam.cpython-312.pyc CHANGED
Binary files a/modules/mobilesamv2/__pycache__/build_sam.cpython-312.pyc and b/modules/mobilesamv2/__pycache__/build_sam.cpython-312.pyc differ
 
modules/mobilesamv2/__pycache__/predictor.cpython-312.pyc CHANGED
Binary files a/modules/mobilesamv2/__pycache__/predictor.cpython-312.pyc and b/modules/mobilesamv2/__pycache__/predictor.cpython-312.pyc differ
 
modules/mobilesamv2/modeling/__pycache__/__init__.cpython-312.pyc CHANGED
Binary files a/modules/mobilesamv2/modeling/__pycache__/__init__.cpython-312.pyc and b/modules/mobilesamv2/modeling/__pycache__/__init__.cpython-312.pyc differ
 
modules/mobilesamv2/modeling/__pycache__/common.cpython-312.pyc CHANGED
Binary files a/modules/mobilesamv2/modeling/__pycache__/common.cpython-312.pyc and b/modules/mobilesamv2/modeling/__pycache__/common.cpython-312.pyc differ
 
modules/mobilesamv2/modeling/__pycache__/image_encoder.cpython-312.pyc CHANGED
Binary files a/modules/mobilesamv2/modeling/__pycache__/image_encoder.cpython-312.pyc and b/modules/mobilesamv2/modeling/__pycache__/image_encoder.cpython-312.pyc differ
 
modules/mobilesamv2/modeling/__pycache__/mask_decoder.cpython-312.pyc CHANGED
Binary files a/modules/mobilesamv2/modeling/__pycache__/mask_decoder.cpython-312.pyc and b/modules/mobilesamv2/modeling/__pycache__/mask_decoder.cpython-312.pyc differ
 
modules/mobilesamv2/modeling/__pycache__/prompt_encoder.cpython-312.pyc CHANGED
Binary files a/modules/mobilesamv2/modeling/__pycache__/prompt_encoder.cpython-312.pyc and b/modules/mobilesamv2/modeling/__pycache__/prompt_encoder.cpython-312.pyc differ
 
modules/mobilesamv2/modeling/__pycache__/sam.cpython-312.pyc CHANGED
Binary files a/modules/mobilesamv2/modeling/__pycache__/sam.cpython-312.pyc and b/modules/mobilesamv2/modeling/__pycache__/sam.cpython-312.pyc differ
 
modules/mobilesamv2/modeling/__pycache__/transformer.cpython-312.pyc CHANGED
Binary files a/modules/mobilesamv2/modeling/__pycache__/transformer.cpython-312.pyc and b/modules/mobilesamv2/modeling/__pycache__/transformer.cpython-312.pyc differ
 
modules/mobilesamv2/promt_mobilesamv2/__pycache__/__init__.cpython-312.pyc CHANGED
Binary files a/modules/mobilesamv2/promt_mobilesamv2/__pycache__/__init__.cpython-312.pyc and b/modules/mobilesamv2/promt_mobilesamv2/__pycache__/__init__.cpython-312.pyc differ