MCPcopy Create free account

hub / github.com/facebookresearch/sam-3d-objects / functions

Functions784 in github.com/facebookresearch/sam-3d-objects

↓ 134 callersMethodreshape
(self, *shape)
sam3d_objects/model/backbone/tdfy_dit/modules/sparse/basic.py:265
↓ 111 callersMethodto
(self, dtype: torch.dtype)
sam3d_objects/model/backbone/tdfy_dit/modules/sparse/basic.py:202
↓ 73 callersMethodcpu
(self)
sam3d_objects/model/backbone/tdfy_dit/modules/sparse/basic.py:236
↓ 50 callersMethodreplace
( self, feats: torch.Tensor, coords: Optional[torch.Tensor] = None )
sam3d_objects/model/backbone/tdfy_dit/modules/sparse/basic.py:272
↓ 48 callersMethodfloat
(self)
sam3d_objects/model/backbone/tdfy_dit/modules/sparse/basic.py:250
↓ 40 callersMethoddetach
(self)
sam3d_objects/model/backbone/tdfy_dit/modules/sparse/basic.py:254
↓ 30 callersMethodunbind
(self, dim: int)
sam3d_objects/model/backbone/tdfy_dit/modules/sparse/basic.py:269
↓ 28 callersFunctiontree_tensor_map
(fn, tree, *rest)
sam3d_objects/data/utils.py:58
↓ 26 callersMethodtype
(self, dtype)
sam3d_objects/model/backbone/tdfy_dit/modules/sparse/basic.py:232
↓ 25 callersMethoddim
(self)
sam3d_objects/model/backbone/tdfy_dit/modules/sparse/basic.py:158
↓ 24 callersMethodcuda
(self)
sam3d_objects/model/backbone/tdfy_dit/modules/sparse/basic.py:241
↓ 13 callersMethodwrite
(self, x)
sam3d_objects/model/backbone/tdfy_dit/representations/gaussian/general_utils.py:130
↓ 12 callersMethodload_state_dict
(self, state_dict)
sam3d_objects/model/backbone/tdfy_dit/representations/octree/octree_dfs.py:270
↓ 11 callersMethodfrom_instance_pose
(cls, instance_pose: InstancePose)
sam3d_objects/data/dataset/tdfy/pose_target.py:697
↓ 11 callersMethodnormalize
(self, value: torch.Tensor)
sam3d_objects/data/dataset/tdfy/pose_target.py:780
↓ 11 callersMethodto_instance_pose
(cls, pose_target: PoseTarget)
sam3d_objects/data/dataset/tdfy/pose_target.py:709
↓ 9 callersMethodfrom_xyz
(self, xyz)
sam3d_objects/model/backbone/tdfy_dit/representations/gaussian/gaussian_model.py:115
↓ 9 callersMethodrender
Render the octree. Args: octree (Octree): octree extrinsics (torch.Tensor): (4, 4) camera extrinsics
sam3d_objects/model/backbone/tdfy_dit/renderers/octree_renderer.py:227
↓ 9 callersFunctionsafe_copy_gaussian
Safely copy a Gaussian object, handling tensors with gradients.
sam3d_objects/pipeline/layout_post_optimization_utils.py:838
↓ 8 callersMethod__elemwise__
( self, other: Union[torch.Tensor, "SparseTensor"], op: callable )
sam3d_objects/model/backbone/tdfy_dit/modules/sparse/basic.py:349
↓ 7 callersFunction_apply_metric_to_ssi
Normalize pointmap using Scale-Shift Invariant (SSI) normalization. Args: pointmap: Pointmap tensor of shape (H, W, 3) or (3, H,
sam3d_objects/data/dataset/tdfy/img_and_mask_transforms.py:767
↓ 7 callersFunctionflip_coords_pytorch3d_to_opencv
Flip X,Y coordinates from PyTorch3D to OpenCV convention IN-PLACE. Transforms both positions AND rotations consistently with other transform
sam3d_objects/pipeline/layout_post_optimization_utils.py:1148
↓ 7 callersMethodfrom_rotation
(self, rots)
sam3d_objects/model/backbone/tdfy_dit/representations/gaussian/gaussian_model.py:112
↓ 7 callersMethodget_spatial_cache
Get a spatial cache.
sam3d_objects/model/backbone/tdfy_dit/modules/sparse/basic.py:445
↓ 7 callersMethodinstantiate_and_load_from_pretrained
( self, config, ckpt_path, state_dict_fn=None, state_dict_key="state_d
sam3d_objects/pipeline/inference_pipeline.py:263
↓ 7 callersMethodinverse
Apply inverse remapping to recover original point coordinates.
sam3d_objects/model/backbone/dit/embedder/point_remapper.py:50
↓ 7 callersMethodregister_spatial_cache
Register a spatial cache. The spatial cache can be any thing you want to cache. The registery and retrieval of the cache is b
sam3d_objects/model/backbone/tdfy_dit/modules/sparse/basic.py:434
↓ 6 callersMethod__init__
( self, channels: int, out_channels: Optional[int] = None, norm_type: Literal[
sam3d_objects/model/backbone/tdfy_dit/models/sparse_structure_vae.py:28
↓ 6 callersMethod_apply_transform
(self, input: torch.Tensor, transform)
sam3d_objects/data/dataset/tdfy/preprocessor.py:199
↓ 6 callersFunctioncompose_transform
Args: scale: (..., 3) tensor of scale factors rotation: (..., 3, 3) tensor of rotation matrices translation: (..., 3) ten
sam3d_objects/data/dataset/tdfy/transforms_3d.py:20
↓ 6 callersFunctionlinear_approximation_step
(x_t, dt, velocity)
sam3d_objects/model/backbone/generator/flow_matching/solver.py:9
↓ 6 callersFunctionscaled_dot_product_attention
Apply scaled dot product attention. Args: qkv (torch.Tensor): A [N, L, 3, H, C] tensor containing Qs, Ks, and Vs.
sam3d_objects/model/backbone/tdfy_dit/modules/attention/full_attn.py:42
↓ 5 callersMethod_apply_transform
(self, input: torch.Tensor, transform)
sam3d_objects/pipeline/inference_pipeline.py:772
↓ 5 callersMethod_moduledict_to_dict
(self, module)
sam3d_objects/model/backbone/tdfy_dit/modules/transformer/modulated.py:280
↓ 5 callersMethodconcatenate_tensor
(self, tensor_dict, latent_names)
sam3d_objects/model/backbone/tdfy_dit/modules/attention/modules.py:291
↓ 5 callersMethodfull
(aabb, dim, value, dtype=torch.float32, device=None)
sam3d_objects/model/backbone/tdfy_dit/modules/sparse/basic.py:314
↓ 5 callersFunctionget_child
(obj: Any, *keys: Iterable[Any])
sam3d_objects/data/utils.py:110
↓ 5 callersMethodssi_to_metric
(scale: torch.Tensor, shift: torch.Tensor)
sam3d_objects/data/dataset/tdfy/pose_target.py:375
↓ 5 callersMethodstep
(self, dynamics_fn, x_t, t, dt, *args, **kwargs)
sam3d_objects/model/backbone/generator/flow_matching/solver.py:60
↓ 4 callersMethod_broadcast_postcompose
Assumes scale, rotation, translation are of shape: B, K, C --- B: batch size K: number of obj
sam3d_objects/data/dataset/tdfy/pose_target.py:26
↓ 4 callersMethod_down_sample_img
(img_3chw: torch.Tensor)
sam3d_objects/pipeline/inference_pipeline_pointmap.py:512
↓ 4 callersMethod_linear
( module: nn.Linear, x: Union[SparseTensor, torch.Tensor] )
sam3d_objects/model/backbone/tdfy_dit/modules/sparse/attention/modules.py:92
↓ 4 callersMethod_moduledict_to_dict
(self, module)
sam3d_objects/model/backbone/tdfy_dit/modules/attention/modules.py:275
↓ 4 callersFunctioncompile_wrapper
( fn, *, mode="max-autotune", fullgraph=True, dynamic=False, name=None )
sam3d_objects/pipeline/inference_pipeline_pointmap.py:73
↓ 4 callersFunctioncompute_iou_gs
Compute IoU for GS rendering. Similar to compute_iou but for GS.
sam3d_objects/pipeline/layout_post_optimization_utils.py:1271
↓ 4 callersFunctionget_mask_colors_for_gs
Get efficient white colors for mask rendering with GS. Returns colors tensor compatible with colors_overwrite parameter.
sam3d_objects/pipeline/layout_post_optimization_utils.py:511
↓ 4 callersFunctionget_strength
(strength, interval, t)
sam3d_objects/model/backbone/generator/classifier_free_guidance.py:145
↓ 4 callersFunctionimshow
(image, ax)
notebook/inference.py:382
↓ 4 callersMethodmerge_image_and_mask
( self, image: Union[np.ndarray, Image.Image], mask: Union[None, np.ndarray, Image.Ima
sam3d_objects/pipeline/inference_pipeline.py:571
↓ 4 callersFunctionnorm_layer
Return a normalization layer.
sam3d_objects/model/backbone/tdfy_dit/models/sparse_structure_vae.py:15
↓ 4 callersFunctionpose_decoder
( pose_target_convention, )
sam3d_objects/pipeline/inference_utils.py:465
↓ 4 callersMethodpreprocess_image
( self, image: Union[Image.Image, np.ndarray], preprocessor )
sam3d_objects/pipeline/inference_pipeline.py:796
↓ 4 callersMethodsample_sparse_structure
( self, ss_input_dict: dict, inference_steps=None, use_distillation=False )
sam3d_objects/pipeline/inference_pipeline.py:644
↓ 4 callersMethodseed
(self)
sam3d_objects/model/backbone/generator/base.py:22
↓ 4 callersMethodsolve_iter
(self, dynamics_fn, x_init, times, *args, **kwargs)
sam3d_objects/model/backbone/generator/flow_matching/solver.py:33
↓ 3 callersMethod__cal_layout
(self, coords, batch_size)
sam3d_objects/model/backbone/tdfy_dit/modules/sparse/basic.py:145
↓ 3 callersMethod__cal_shape
(self, feats, coords)
sam3d_objects/model/backbone/tdfy_dit/modules/sparse/basic.py:139
↓ 3 callersMethod__init__
(self, dim: int, heads: int)
sam3d_objects/model/backbone/tdfy_dit/modules/attention/modules.py:15
↓ 3 callersMethod__init__
(self, channels: int, mlp_ratio: float = 4.0)
sam3d_objects/model/backbone/tdfy_dit/modules/transformer/blocks.py:60
↓ 3 callersMethod_generate_noise
(self, x_shape, x_device)
sam3d_objects/model/backbone/generator/flow_matching/model.py:99
↓ 3 callersMethod_linear_interp
Computes the location of zero-crossings on 'edges_x' using linear interpolation with 'edges_weight'.
sam3d_objects/model/backbone/tdfy_dit/representations/mesh/flexicubes/flexicubes.py:224
↓ 3 callersMethod_prepare_t
(self, steps=None)
sam3d_objects/model/backbone/generator/flow_matching/model.py:190
↓ 3 callersMethod_tree_flatten
(self, tree)
sam3d_objects/model/backbone/generator/flow_matching/model.py:291
↓ 3 callersFunctionas_keys
(path: ChildPathType)
sam3d_objects/data/utils.py:102
↓ 3 callersFunctioncompute_iou
(render_mask_obj, mask_obj_gt, threshold=0.5)
sam3d_objects/pipeline/layout_post_optimization_utils.py:340
↓ 3 callersMethodconvert_to_fp16
Convert the torso of the model to float16.
sam3d_objects/model/backbone/tdfy_dit/models/structured_latent_vae/base.py:105
↓ 3 callersMethoddevice
(self)
sam3d_objects/model/backbone/tdfy_dit/modules/sparse/basic.py:198
↓ 3 callersFunctionextract_mask_from_gs_rendering
Extract mask from GS rendering with consistent logic. Returns: mask tensor [H, W]
sam3d_objects/pipeline/layout_post_optimization_utils.py:458
↓ 3 callersFunctionfilter_and_remove_prefix_state_dict_fn
(prefix: str)
sam3d_objects/model/io.py:104
↓ 3 callersMethodforward
(self, input: SparseTensor)
sam3d_objects/model/backbone/tdfy_dit/modules/sparse/norm.py:19
↓ 3 callersFunctionfull_class_name
(klass: Any)
sam3d_objects/config/utils.py:64
↓ 3 callersMethodimage_to_float
(self, image)
sam3d_objects/pipeline/inference_pipeline.py:790
↓ 3 callersFunctionmasked_sdpa
Mimic xFormers' memory_efficient_attention using PyTorch 2.0 scaled_dot_product_attention.
sam3d_objects/model/backbone/tdfy_dit/modules/sparse/attention/masked_sdpa.py:30
↓ 3 callersMethodobject_pointcloud
Args: points_local: (N, 3) tensor of point coordinates colors: (N, 3) tensor of colors
sam3d_objects/utils/visualization/scene_visualizer.py:169
↓ 3 callersMethodpreprocess_image
( self, image: Union[Image.Image, np.ndarray], preprocessor, pointmap=None,
sam3d_objects/pipeline/inference_pipeline_pointmap.py:173
↓ 3 callersFunctionrender_frames
( sample, extrinsics, intrinsics, options={}, colors_overwrite=None, verbose=True,
sam3d_objects/model/backbone/tdfy_dit/utils/render_utils.py:53
↓ 3 callersMethodsample_slat
( self, slat_input: dict, coords: torch.Tensor, inference_steps=25, us
sam3d_objects/pipeline/inference_pipeline.py:723
↓ 3 callersFunctiontensor_to_o3d_pcd
(tensor)
sam3d_objects/pipeline/layout_post_optimization_utils.py:379
↓ 3 callersFunctiontree_reduce_unique
(fn, tree, ensure_unique=True, **kwargs)
sam3d_objects/data/utils.py:233
↓ 3 callersFunctionyaw_pitch_r_fov_to_extrinsics_intrinsics
(yaws, pitchs, rs, fovs)
sam3d_objects/model/backbone/tdfy_dit/utils/render_utils.py:14
↓ 3 callersFunctionzero_module
Zero out the parameters of a module and return it.
sam3d_objects/model/backbone/tdfy_dit/modules/utils.py:53
↓ 2 callersMethod__init__
(self, *args, strength_pm=0.0, **kwargs)
sam3d_objects/model/backbone/generator/classifier_free_guidance.py:164
↓ 2 callersMethod__init__
(self, factor: Union[int, Tuple[int, int, int], List[int]])
sam3d_objects/model/backbone/tdfy_dit/modules/sparse/spatial.py:74
↓ 2 callersMethod__init__
(self, channels: int, mlp_ratio: float = 4.0)
sam3d_objects/model/backbone/tdfy_dit/modules/sparse/transformer/blocks.py:13
↓ 2 callersMethod__init__
( self, channels: int, num_heads: int, mlp_ratio: float = 4.0, attn_mo
sam3d_objects/model/backbone/tdfy_dit/modules/transformer/modulated.py:17
↓ 2 callersMethod__init__
(self, hidden_size, frequency_embedding_size=256)
sam3d_objects/model/backbone/tdfy_dit/models/sparse_structure_flow.py:26
↓ 2 callersMethod__init__
( self, resolution: int, in_channels: int, model_channels: int, cond_c
sam3d_objects/model/backbone/tdfy_dit/models/structured_latent_flow.py:78
↓ 2 callersMethod__init__
( self, resolution: int, model_channels: int, latent_channels: int, nu
sam3d_objects/model/backbone/tdfy_dit/models/structured_latent_vae/decoder_mesh.py:87
↓ 2 callersMethod_create_pointmap_structure
( pointmap: torch.Tensor, image: torch.Tensor, show_pointmap_as_mesh: bool = True,
sam3d_objects/utils/visualization/scene_visualizer.py:125
↓ 2 callersFunction_drop_tensors
Drop any conditioning that are tensors Not using _pytree since we actually want to throw them instead of keeping them.
sam3d_objects/model/backbone/generator/classifier_free_guidance.py:29
↓ 2 callersMethod_fused_pre
( self, x: Union[SparseTensor, torch.Tensor], num_fused: int )
sam3d_objects/model/backbone/tdfy_dit/modules/sparse/attention/modules.py:109
↓ 2 callersMethod_generate_d
Generate shortcut step sizes d with binary-time schedule. This method ensures deterministic behavior for distributed trainin
sam3d_objects/model/backbone/generator/shortcut/model.py:45
↓ 2 callersMethod_generate_t
(self, x1)
sam3d_objects/model/backbone/generator/flow_matching/model.py:146
↓ 2 callersMethod_generate_target
(self, x0, x1)
sam3d_objects/model/backbone/generator/flow_matching/model.py:139
↓ 2 callersMethod_generate_x0
(self, x1)
sam3d_objects/model/backbone/generator/flow_matching/model.py:129
↓ 2 callersMethod_generate_xt
(self, x0, x1, t)
sam3d_objects/model/backbone/generator/flow_matching/model.py:132
↓ 2 callersFunction_get_device
(x)
sam3d_objects/model/backbone/generator/flow_matching/model.py:325
↓ 2 callersMethod_get_dtype
(dtype)
sam3d_objects/pipeline/inference_pipeline.py:838
↓ 2 callersMethod_get_pos_embed
(self, hw)
sam3d_objects/model/backbone/dit/embedder/pointmap.py:95
↓ 2 callersMethod_get_solver
(self, solver_method, solver_kwargs)
sam3d_objects/model/backbone/generator/flow_matching/model.py:80
next →1–100 of 784, ranked by callers