MCPcopy Create free account

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

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

↓ 1 callersMethodinit_ss_decoder
(self, ss_decoder_config_path, ss_decoder_ckpt_path)
sam3d_objects/pipeline/inference_pipeline.py:353
↓ 1 callersMethodinit_ss_encoder
(self, ss_encoder_config_path, ss_encoder_ckpt_path)
sam3d_objects/pipeline/inference_pipeline.py:336
↓ 1 callersMethodinit_ss_generator
(self, ss_generator_config_path, ss_generator_ckpt_path)
sam3d_objects/pipeline/inference_pipeline.py:306
↓ 1 callersMethodinit_ss_preprocessor
(self, ss_preprocessor, ss_generator_config_path)
sam3d_objects/pipeline/inference_pipeline.py:300
↓ 1 callersMethodinitialize_weights
(self)
sam3d_objects/model/backbone/tdfy_dit/models/mm_latent.py:32
↓ 1 callersMethodinitialize_weights
(self)
sam3d_objects/model/backbone/tdfy_dit/models/sparse_structure_flow.py:185
↓ 1 callersMethodinitialize_weights
(self)
sam3d_objects/model/backbone/tdfy_dit/models/mot_sparse_structure_flow.py:109
↓ 1 callersMethodinitialize_weights
(self)
sam3d_objects/model/backbone/tdfy_dit/models/structured_latent_flow.py:236
↓ 1 callersMethodinitialize_weights
(self)
sam3d_objects/model/backbone/tdfy_dit/models/structured_latent_vae/decoder_rf.py:55
↓ 1 callersMethodinitialize_weights
(self)
sam3d_objects/model/backbone/tdfy_dit/models/structured_latent_vae/decoder_gs.py:59
↓ 1 callersMethodinitialize_weights
(self)
sam3d_objects/model/backbone/tdfy_dit/models/structured_latent_vae/decoder_mesh.py:147
↓ 1 callersMethodinitialize_weights
(self)
sam3d_objects/model/backbone/tdfy_dit/models/structured_latent_vae/encoder.py:54
↓ 1 callersMethodinitialize_weights
(self)
sam3d_objects/model/backbone/dit/embedder/pointmap.py:78
↓ 1 callersMethodinner_forward
(self, x, t, is_cond, strength, *args_cond, **kwargs_cond)
sam3d_objects/model/backbone/generator/classifier_free_guidance.py:108
↓ 1 callersMethodinner_forward
( self, x: torch.Tensor, B: int, H: int, W: int )
sam3d_objects/model/backbone/dit/embedder/pointmap.py:185
↓ 1 callersMethodinstance_pose_to_pose_target
( instance_pose: InstancePose, pose_target_convention: str, normalize: bool = False )
sam3d_objects/data/dataset/tdfy/pose_target.py:739
↓ 1 callersFunctionintrinsics_to_projection
OpenCV intrinsics to OpenGL perspective matrix Args: intrinsics (torch.Tensor): [3, 3] OpenCV intrinsics matrix near (float)
sam3d_objects/model/backbone/tdfy_dit/renderers/gaussian_render.py:37
↓ 1 callersFunctionintrinsics_to_projection
OpenCV intrinsics to OpenGL perspective matrix Args: intrinsics (torch.Tensor): [3, 3] OpenCV intrinsics matrix near (float)
sam3d_objects/model/backbone/tdfy_dit/renderers/octree_renderer.py:12
↓ 1 callersFunctioninverse_sigmoid
(x)
sam3d_objects/model/backbone/tdfy_dit/representations/gaussian/general_utils.py:20
↓ 1 callersFunctionis_near_image_border
Check if the mask touches the image border within a given thickness.
sam3d_objects/pipeline/layout_post_optimization_utils.py:39
↓ 1 callersFunctionis_occluded_by_others
Efficient occlusion detection using depth map and internal/external edges.
sam3d_objects/pipeline/layout_post_optimization_utils.py:50
↓ 1 callersMethodk1
(self, dynamics_fn, x_t, t, dt, *args, **kwargs)
sam3d_objects/model/backbone/generator/flow_matching/solver.py:100
↓ 1 callersMethodk2
(self, dynamics_fn, x_t, t, dt, k1, *args, **kwargs)
sam3d_objects/model/backbone/generator/flow_matching/solver.py:103
↓ 1 callersMethodk3
(self, dynamics_fn, x_t, t, dt, k2, *args, **kwargs)
sam3d_objects/model/backbone/generator/flow_matching/solver.py:107
↓ 1 callersMethodk4
(self, dynamics_fn, x_t, t, dt, k3, *args, **kwargs)
sam3d_objects/model/backbone/generator/flow_matching/solver.py:111
↓ 1 callersFunctionload_3db_mesh
Load 3DB mesh and convert from OpenGL to PyTorch3D coordinates.
notebook/mesh_alignment.py:20
↓ 1 callersFunctionload_and_simplify_mesh
(Mesh, device, target_triangles=5000)
sam3d_objects/pipeline/layout_post_optimization_utils.py:312
↓ 1 callersFunctionload_focal_length_from_json
Load focal length from JSON file.
notebook/mesh_alignment.py:153
↓ 1 callersFunctionload_mask
(path)
notebook/inference.py:351
↓ 1 callersFunctionload_mask_for_alignment
Load mask image as numpy array.
notebook/mesh_alignment.py:146
↓ 1 callersFunctionload_masks
(folder_path, indices_list=None, extension=".png")
notebook/inference.py:364
↓ 1 callersFunctionload_model_from_checkpoint
( model: Union[pl.LightningModule, torch.nn.Module], checkpoint_path: str, strict: bool = True,
sam3d_objects/model/io.py:146
↓ 1 callersFunctionload_sharded_checkpoint
(path: str, device: Optional[str])
sam3d_objects/model/io.py:136
↓ 1 callersFunctionload_single_mask
(folder_path, index=0, extension=".png")
notebook/inference.py:359
↓ 1 callersFunctionlocate
(path: str)
sam3d_objects/config/utils.py:18
↓ 1 callersMethodmap_input_keys
(self, item, condition_input_mapping)
sam3d_objects/pipeline/inference_pipeline.py:785
↓ 1 callersMethodmerge_latent_share_transformer
(self, latent_dict)
sam3d_objects/model/backbone/tdfy_dit/models/mot_sparse_structure_flow.py:256
↓ 1 callersMethodmerge_mask_to_rgba
(self, image, mask)
notebook/inference.py:94
↓ 1 callersFunctionmesh_from_pointmap
Create a mesh from pointmap and image. Returns: faces, vertices, vertex_colors, vertex_uvs: Mesh components
sam3d_objects/utils/visualization/image_mesh.py:24
↓ 1 callersMethodmm_scale_dot_product_attention
(self, q, k, v)
sam3d_objects/model/backbone/tdfy_dit/modules/attention/modules.py:310
↓ 1 callersFunctionnormalize_pointmap_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:741
↓ 1 callersFunctionnormalized_gaussian
(scene_gs, in_place=False, outlier_percentile=None)
notebook/inference.py:218
↓ 1 callersFunctiono3d_plane_estimation
(points)
sam3d_objects/pipeline/inference_utils.py:901
↓ 1 callersFunctiono3d_to_tensor
(pcd)
sam3d_objects/pipeline/layout_post_optimization_utils.py:386
↓ 1 callersMethodoverride_slat_generator_cfg_config
( self, slat_generator, cfg_strength=5, inference_steps=25, rescale_t=
sam3d_objects/pipeline/inference_pipeline.py:447
↓ 1 callersMethodoverride_ss_generator_cfg_config
( self, ss_generator, cfg_strength=7, inference_steps=25, rescale_t=3,
sam3d_objects/pipeline/inference_pipeline.py:420
↓ 1 callersFunctionparametrize_mesh
Parametrize a mesh to a texture space, using xatlas. Args: vertices (np.array): Vertices of the mesh. Shape (V, 3). faces (n
sam3d_objects/model/backbone/tdfy_dit/utils/postprocessing_utils.py:346
↓ 1 callersFunctionpatchify
Patchify a tensor. Args: x (torch.Tensor): (N, C, *spatial) tensor patch_size (int): Patch size
sam3d_objects/model/backbone/tdfy_dit/modules/spatial.py:17
↓ 1 callersFunctionpixel_shuffle_3d
3D pixel shuffle.
sam3d_objects/model/backbone/tdfy_dit/modules/spatial.py:5
↓ 1 callersMethodpointmap_to_mesh
Args: pointmap: (H, W, 3) tensor of point coordinates image: (H, W, 3) tensor of image
sam3d_objects/utils/visualization/scene_visualizer.py:215
↓ 1 callersMethodpointmap_to_pointcloud
Args: pointmap: (H, W, 3) tensor of point coordinates image: (H, W, 3) tensor of image
sam3d_objects/utils/visualization/scene_visualizer.py:198
↓ 1 callersMethodpose_target_to_instance_pose
(pose_target: PoseTarget, normalize: bool = False)
sam3d_objects/data/dataset/tdfy/pose_target.py:731
↓ 1 callersFunctionpostprocess_mesh
Postprocess a mesh by simplifying, removing invisible faces, and removing isolated pieces. Args: vertices (np.array): Vertices of th
sam3d_objects/model/backbone/tdfy_dit/utils/postprocessing_utils.py:275
↓ 1 callersFunctionprepare_rgb_for_supervision
Prepare RGB ground truth image for supervision by handling format conversion and resizing. Args: rgb_gt: Ground truth RGB image [3,
sam3d_objects/pipeline/layout_post_optimization_utils.py:789
↓ 1 callersFunctionprocess_3db_alignment
Complete pipeline for aligning 3DB mesh to MoGe scale.
notebook/mesh_alignment.py:168
↓ 1 callersMethodproject_input
( self, latents_dict: Dict, )
sam3d_objects/model/backbone/tdfy_dit/models/mot_sparse_structure_flow.py:230
↓ 1 callersMethodproject_output
(self, output: Dict)
sam3d_objects/model/backbone/tdfy_dit/models/mot_sparse_structure_flow.py:247
↓ 1 callersFunctionprune_sparse_structure
( coord_batch, max_neighbor_axes_dist=1, )
sam3d_objects/pipeline/inference_utils.py:608
↓ 1 callersFunctionquat_wxyz_to_euler_XYZ
Convert PyTorch3D quaternions (w,x,y,z) to SciPy-style Euler angles with sequence 'XYZ' (extrinsic, radians). Works with batch dims. Arg
sam3d_objects/pipeline/inference_utils.py:825
↓ 1 callersFunctionradical_inverse
(base, n)
sam3d_objects/model/backbone/tdfy_dit/utils/random_utils.py:7
↓ 1 callersFunctionrembg
Remove the background from an image using a mask. For pointmaps, sets background regions to NaN. This function follows the standard tran
sam3d_objects/data/dataset/tdfy/img_and_mask_transforms.py:181
↓ 1 callersFunctionremove_small_regions
Remove small disconnected regions (floating points) from the mask. Keeps all regions with area >= min_area.
sam3d_objects/pipeline/layout_post_optimization_utils.py:26
↓ 1 callersFunctionrender
Render the scene. Background tensor (bg_color) must be on GPU!
sam3d_objects/model/backbone/tdfy_dit/renderers/gaussian_render.py:65
↓ 1 callersFunctionrender
Render the scene. Background tensor (bg_color) must be on GPU!
sam3d_objects/model/backbone/tdfy_dit/renderers/octree_renderer.py:40
↓ 1 callersFunctionrender_pt3d_texture
(texture, uv, uv_dr=None)
sam3d_objects/model/backbone/tdfy_dit/utils/postprocessing_utils.py:518
↓ 1 callersMethodreplace_keys
(config, key_mapping)
sam3d_objects/config/utils.py:110
↓ 1 callersFunctionresize_and_make_square
Create image and mask transforms based on configuration. Returns: dict: {"img_transform": img_transform, "mask_transform": mask_tran
sam3d_objects/data/dataset/tdfy/img_and_mask_transforms.py:199
↓ 1 callersMethodresize_input
(self, xyz: torch.Tensor)
sam3d_objects/model/backbone/dit/embedder/pointmap.py:103
↓ 1 callersFunctionresnet_img_normalization
(x)
sam3d_objects/data/dataset/tdfy/img_processing.py:97
↓ 1 callersFunctionresolution_blur
Blur the input image by applying upsample(downsample(x)). Args: image (torch.Tensor): Image tensor of shape (C, H, W), float32, with
sam3d_objects/data/dataset/tdfy/img_and_mask_transforms.py:893
↓ 1 callersFunctionrestore_gs_transform
Restore Gaussian to its original state using backup data.
sam3d_objects/pipeline/layout_post_optimization_utils.py:972
↓ 1 callersFunctionright_broadcasting
(arr, target)
sam3d_objects/data/utils.py:188
↓ 1 callersMethodrun
Parameters: - image (Image): The input image to be processed. - seed (int, optional): The random seed for reproducibility. De
sam3d_objects/pipeline/inference_pipeline.py:469
↓ 1 callersFunctionrun_ICP
(source_points_mesh, source_points, target_points, threshold)
sam3d_objects/pipeline/layout_post_optimization_utils.py:390
↓ 1 callersFunctionrun_alignment
( Point_Map, mask, mesh, center, faces_idx, textures, renderer, device, al
sam3d_objects/pipeline/layout_post_optimization_utils.py:170
↓ 1 callersFunctionrun_gs_ICP
Run ICP alignment on Gaussian positions. Similar to run_ICP but for GS.
sam3d_objects/pipeline/layout_post_optimization_utils.py:725
↓ 1 callersFunctionrun_gs_alignment
Manual alignment between Gaussian positions and point cloud. Similar to run_alignment but for GS.
sam3d_objects/pipeline/layout_post_optimization_utils.py:632
↓ 1 callersFunctionrun_gs_render_compare_rgb_mask
Args: gaussian: Gaussian splatting object center: Center point for rotation renderer: GS renderer intrinsics: Cam
sam3d_objects/pipeline/layout_post_optimization_utils.py:991
↓ 1 callersMethodrun_post_optimization
(self, mesh_glb, intrinsics, pose_dict, layout_input_dict)
sam3d_objects/pipeline/inference_pipeline_pointmap.py:320
↓ 1 callersMethodrun_post_optimization_GS
(self, gs_input, intrinsics, pose_dict, layout_input_dict, backend="gsplat")
sam3d_objects/pipeline/inference_pipeline_pointmap.py:349
↓ 1 callersFunctionrun_render_compare
(mesh, center, renderer, mask, device)
sam3d_objects/pipeline/layout_post_optimization_utils.py:413
↓ 1 callersMethodsave_ply
(self, path)
sam3d_objects/model/backbone/tdfy_dit/representations/gaussian/gaussian_model.py:136
↓ 1 callersFunctionset_attention_backend
()
sam3d_objects/pipeline/inference_pipeline.py:11
↓ 1 callersFunctionset_child
(obj: Any, value: Any, *keys: Iterable[Any])
sam3d_objects/data/utils.py:116
↓ 1 callersMethodsetup_functions
(self)
sam3d_objects/model/backbone/tdfy_dit/representations/gaussian/gaussian_model.py:45
↓ 1 callersMethodsetup_functions
(self)
sam3d_objects/model/backbone/tdfy_dit/representations/octree/octree_dfs.py:183
↓ 1 callersMethodsolve
(self, dynamics_fn, x_init, times, *args, **kwargs)
sam3d_objects/model/backbone/generator/flow_matching/solver.py:40
↓ 1 callersFunctionsparse_cube2verts
(coords, feats, training=True)
sam3d_objects/model/backbone/tdfy_dit/representations/mesh/utils_cube.py:69
↓ 1 callersFunctionsparse_serialized_scaled_dot_product_self_attention
Apply serialized scaled dot product self attention to a sparse tensor. Args: qkv (SparseTensor): [N, *, 3, H, C] sparse tensor conta
sam3d_objects/model/backbone/tdfy_dit/modules/sparse/attention/serialized_attn.py:151
↓ 1 callersFunctionsparse_unbind
Unbind a sparse tensor along a dimension. Args: input (SparseTensor): Sparse tensor to unbind. dim (int): Dimension to unbin
sam3d_objects/model/backbone/tdfy_dit/modules/sparse/basic.py:513
↓ 1 callersFunctionsparse_windowed_scaled_dot_product_self_attention
Apply windowed scaled dot product self attention to a sparse tensor. Args: qkv (SparseTensor): [N, *, 3, H, C] sparse tensor contain
sam3d_objects/model/backbone/tdfy_dit/modules/sparse/attention/windowed_attn.py:79
↓ 1 callersMethodsplit_latent_share_transformer
(self, output_latents)
sam3d_objects/model/backbone/tdfy_dit/models/mot_sparse_structure_flow.py:273
↓ 1 callersMethodstep
(self, dynamics_fn, x_t, t, dt, *args, **kwargs)
sam3d_objects/model/backbone/generator/flow_matching/solver.py:30
↓ 1 callersFunctionstrip_lowerdiag
(L)
sam3d_objects/model/backbone/tdfy_dit/representations/gaussian/general_utils.py:69
↓ 1 callersFunctionstrip_symmetric
(sym)
sam3d_objects/model/backbone/tdfy_dit/representations/gaussian/general_utils.py:81
↓ 1 callersMethodtimestep_embedding
Create sinusoidal timestep embeddings. Args: t: a 1-D Tensor of N indices, one per batch element. These
sam3d_objects/model/backbone/tdfy_dit/models/sparse_structure_flow.py:36
↓ 1 callersMethodtimestep_embedding
Create sinusoidal timestep embeddings. Args: t: a 1-D Tensor of N indices, one per batch element. These
sam3d_objects/model/backbone/tdfy_dit/models/timestep_embedder.py:25
↓ 1 callersMethodto_input
(self, x)
sam3d_objects/model/backbone/tdfy_dit/models/mm_latent.py:47
↓ 1 callersMethodto_invariant
(cls, pose_target: PoseTarget)
sam3d_objects/data/dataset/tdfy/pose_target.py:613
↓ 1 callersMethodto_output
(self, h)
sam3d_objects/model/backbone/tdfy_dit/models/mm_latent.py:53
← previousnext →301–400 of 784, ranked by callers