MCPcopy Create free account

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

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

↓ 2 callersMethod_make_projection_net
( self, input_embed_dim, output_embed_dim: int, multiplier: int, )
sam3d_objects/model/backbone/dit/embedder/embedder_fuser.py:102
↓ 2 callersMethod_normalize_pointmap
( self, pointmap: torch.Tensor, mask: torch.Tensor, pointmap_normalizer: Callable,
sam3d_objects/data/dataset/tdfy/preprocessor.py:55
↓ 2 callersMethod_preprocess_image_mask_pointmap
Apply joint transforms with priority: triple transforms > dual transforms.
sam3d_objects/data/dataset/tdfy/preprocessor.py:158
↓ 2 callersMethod_process_image_mask_pointmap_mess
Extended version that handles pointmaps
sam3d_objects/data/dataset/tdfy/preprocessor.py:75
↓ 2 callersMethod_reshape_chs
( x: Union[SparseTensor, torch.Tensor], shape: Tuple[int, ...] )
sam3d_objects/model/backbone/tdfy_dit/modules/sparse/attention/modules.py:101
↓ 2 callersMethod_rotary_embedding
(self, x: torch.Tensor, phases: torch.Tensor)
sam3d_objects/model/backbone/tdfy_dit/modules/attention/modules.py:40
↓ 2 callersFunction_zeros_like
(struct)
sam3d_objects/model/backbone/generator/classifier_free_guidance.py:10
↓ 2 callersFunctionapply_gs_transform_inplace
Apply transformation to Gaussian Splatting object IN-PLACE for efficiency. Returns backup data to restore later.
sam3d_objects/pipeline/layout_post_optimization_utils.py:882
↓ 2 callersFunctionapply_transform
(mesh, center, quat, translation, scale)
sam3d_objects/pipeline/layout_post_optimization_utils.py:238
↓ 2 callersFunctionbuild_args_batch_extractor
(args_mapping: ArgsType)
sam3d_objects/data/utils.py:128
↓ 2 callersFunctionbuild_kwargs_batch_extractor
(kwargs_mapping: KwargsType)
sam3d_objects/data/utils.py:135
↓ 2 callersMethodcamera
Args: quaternion: (4,) tensor of quaternion translation: (3,) tensor of translation
sam3d_objects/utils/visualization/scene_visualizer.py:152
↓ 2 callersFunctioncamera_to_pytorch3d_camera
R3 camera space --> PyTorch3D camera space Also needed for pointmaps
sam3d_objects/pipeline/inference_pipeline_pointmap.py:26
↓ 2 callersFunctioncheck_occlusion
Main function to check different types of occlusion for a given mask and 3D point map.
sam3d_objects/pipeline/layout_post_optimization_utils.py:96
↓ 2 callersMethodcompute_pointmap
(self, image, pointmap=None)
sam3d_objects/pipeline/inference_pipeline_pointmap.py:262
↓ 2 callersFunctioncosine_anealing
(optimizer, step, total_steps, start_lr, end_lr)
sam3d_objects/model/backbone/tdfy_dit/utils/postprocessing_utils.py:506
↓ 2 callersFunctioncrop_around_mask_with_padding
( loaded_image: torch.Tensor, mask: torch.Tensor, box_size_factor: float = 1.6, padding_factor
sam3d_objects/data/dataset/tdfy/img_and_mask_transforms.py:262
↓ 2 callersMethoddecode_slat
Decode the structured latent. Args: slat (sp.SparseTensor): The structured latent. formats (List[str]): The
sam3d_objects/pipeline/inference_pipeline.py:591
↓ 2 callersFunctiondecompose_transform
Returns: scale: (..., 3) tensor of scale factors rotation: (..., 3, 3) tensor of rotation matrices translation: (..., 3)
sam3d_objects/data/dataset/tdfy/transforms_3d.py:33
↓ 2 callersFunctionfind_class_or_callable_from_target
( target: TargetType, )
sam3d_objects/config/utils.py:78
↓ 2 callersMethodforward
(self, x: torch.Tensor)
sam3d_objects/model/backbone/tdfy_dit/modules/norm.py:7
↓ 2 callersMethodforward
(self, input: SparseTensor)
sam3d_objects/model/backbone/tdfy_dit/modules/sparse/nonlinearity.py:10
↓ 2 callersMethodfrom_scaling
(self, scales)
sam3d_objects/model/backbone/tdfy_dit/representations/gaussian/gaussian_model.py:108
↓ 2 callersMethodget_condition_input
(self, condition_embedder, input_dict, input_mapping)
sam3d_objects/pipeline/inference_pipeline.py:628
↓ 2 callersFunctionget_defomed_verts
(v_pos: torch.Tensor, deform: torch.Tensor, res)
sam3d_objects/model/backbone/tdfy_dit/representations/mesh/utils_cube.py:88
↓ 2 callersFunctionget_dense_attrs
(coords: torch.Tensor, feats: torch.Tensor, res: int, sdf_init=True)
sam3d_objects/model/backbone/tdfy_dit/representations/mesh/utils_cube.py:79
↓ 2 callersFunctionget_mask
Extract a mask from either the alpha channel of an RGB image or a depth image. Args: rgb_image: Tensor of shape (B, C, H, W) or (C,
sam3d_objects/data/dataset/tdfy/img_and_mask_transforms.py:139
↓ 2 callersFunctionget_optimizer
(stage)
sam3d_objects/pipeline/layout_post_optimization_utils.py:423
↓ 2 callersFunctionhammersley_sequence
(dim, n, num_samples)
sam3d_objects/model/backbone/tdfy_dit/utils/random_utils.py:23
↓ 2 callersMethodinit_slat_decoder_gs
( self, slat_decoder_gs_config_path, slat_decoder_gs_ckpt_path )
sam3d_objects/pipeline/inference_pipeline.py:367
↓ 2 callersMethodinit_ss_condition_embedder
( self, ss_generator_config_path, ss_generator_ckpt_path )
sam3d_objects/pipeline/inference_pipeline.py:394
↓ 2 callersMethodinner_forward
(self, x, t, is_cond, strength, strength_pm, *args_cond, **kwargs_cond)
sam3d_objects/model/backbone/generator/classifier_free_guidance.py:180
↓ 2 callersMethodis_mm_dit
(self, model_name="ss_generator")
sam3d_objects/pipeline/inference_pipeline.py:619
↓ 2 callersFunctionload_image
(path)
notebook/inference.py:344
↓ 2 callersFunctionnormalize_mesh_verts
(verts)
sam3d_objects/pipeline/inference_utils.py:721
↓ 2 callersFunctionpad_to_square
(image, value=0)
sam3d_objects/data/dataset/tdfy/img_processing.py:45
↓ 2 callersFunctionplot_tdfy_scene
Main function to visualize Cameras, Meshes, Pointclouds, and RayBundle. Plots input Cameras, Meshes, Pointclouds, and RayBundle data into nam
sam3d_objects/utils/visualization/plotly/plot_scene.py:89
↓ 2 callersMethodpostprocess_slat_output
( self, outputs, with_mesh_postprocess, with_texture_baking, use_vertex_color )
sam3d_objects/pipeline/inference_pipeline.py:536
↓ 2 callersFunctionrecursive_fn_factory
(fn)
sam3d_objects/pipeline/inference_pipeline_pointmap.py:44
↓ 2 callersMethodrefine_scale
(self, revised_scale)
sam3d_objects/pipeline/inference_pipeline_pointmap.py:248
↓ 2 callersMethodrender
Render the gausssian. Args: gaussian : gaussianmodule extrinsics (torch.Tensor): (4, 4) camera extrinsics
sam3d_objects/model/backbone/tdfy_dit/renderers/gaussian_render.py:246
↓ 2 callersFunctionrender_multiview
(sample, resolution=512, nviews=30)
sam3d_objects/model/backbone/tdfy_dit/utils/render_utils.py:181
↓ 2 callersFunctionset_seed
(seed=100)
sam3d_objects/pipeline/layout_post_optimization_utils.py:302
↓ 2 callersFunctionsparse_batch_broadcast
Broadcast a 1D tensor to a sparse tensor along the batch dimension then perform an operation. Args: input (torch.Tensor): 1D tensor
sam3d_objects/model/backbone/tdfy_dit/modules/sparse/basic.py:456
↓ 2 callersFunctionsparse_scaled_dot_product_attention
Apply scaled dot product attention to a sparse tensor. Args: qkv (SparseTensor): A [N, *, 3, H, C] sparse tensor containing Qs, Ks,
sam3d_objects/model/backbone/tdfy_dit/modules/sparse/attention/full_attn.py:23
↓ 2 callersFunctionsphere_hammersley_sequence
(n, num_samples, offset=(0, 0), remap=False)
sam3d_objects/model/backbone/tdfy_dit/utils/random_utils.py:27
↓ 2 callersFunctionsplit_rgba
Split a 4-channel RGBA image into a 3-channel RGB image and a 1-channel mask. Args: rgba_image: A 4-channel RGBA image. Returns
sam3d_objects/data/dataset/tdfy/img_and_mask_transforms.py:124
↓ 2 callersFunctionstate_dict_fn
(state_dict)
sam3d_objects/model/io.py:88
↓ 1 callersFunctionUNNORMALIZE
(mean, std)
sam3d_objects/data/dataset/tdfy/img_and_mask_transforms.py:23
↓ 1 callersFunction__from_env
()
sam3d_objects/model/backbone/tdfy_dit/modules/attention/__init__.py:9
↓ 1 callersFunction__from_env
()
sam3d_objects/model/backbone/tdfy_dit/modules/sparse/__init__.py:11
↓ 1 callersFunction__from_env
()
sam3d_objects/model/backbone/tdfy_dit/modules/sparse/conv/__init__.py:8
↓ 1 callersMethod__init__
(self, num_groups, num_channels, eps=1e-5, affine=True)
sam3d_objects/model/backbone/tdfy_dit/modules/sparse/norm.py:16
↓ 1 callersMethod__init__
(self, dim: int, heads: int)
sam3d_objects/model/backbone/tdfy_dit/modules/sparse/attention/modules.py:17
↓ 1 callersMethod__init__
( self, in_channels, out_channels, kernel_size, stride=1, dila
sam3d_objects/model/backbone/tdfy_dit/modules/sparse/conv/conv_spconv.py:10
↓ 1 callersMethod__init__
( self, channels: int, num_heads: int, mlp_ratio: float = 4.0, attn_mo
sam3d_objects/model/backbone/tdfy_dit/modules/sparse/transformer/modulated.py:16
↓ 1 callersMethod__init__
( self, in_channels: int, model_channels: int, cond_channels: int, out
sam3d_objects/model/backbone/tdfy_dit/models/mot_sparse_structure_flow.py:20
↓ 1 callersMethod__init__
( self, resolution: int, model_channels: int, latent_channels: int, nu
sam3d_objects/model/backbone/tdfy_dit/models/structured_latent_vae/decoder_gs.py:16
↓ 1 callersMethod__init__
( self, resolution: int, in_channels: int, model_channels: int, latent
sam3d_objects/model/backbone/tdfy_dit/models/structured_latent_vae/encoder.py:14
↓ 1 callersMethod__init__
(self, vertices, faces, vertex_attrs=None, res=64)
sam3d_objects/model/backbone/tdfy_dit/representations/mesh/cube2mesh.py:10
↓ 1 callersMethod__init__
( self, input_size: int = 224, repo_or_dir: str = "facebookresearch/dinov2", d
sam3d_objects/model/backbone/dit/embedder/dino.py:11
↓ 1 callersMethod__merge_sparse_cache
(self, other: "SparseTensor")
sam3d_objects/model/backbone/tdfy_dit/modules/sparse/basic.py:332
↓ 1 callersFunction_add_mesh_trace
Adds a trace rendering a Meshes object to the passed in figure, with a given name and in a specific subplot. Args: fig: plotly f
sam3d_objects/utils/visualization/plotly/plot_scene.py:492
↓ 1 callersMethod_apply_force_drop
(self, kwarg_names: List[str], tokens: List[torch.Tensor])
sam3d_objects/model/backbone/dit/embedder/embedder_fuser.py:154
↓ 1 callersMethod_build_dropout_distribution
Build the probability distribution for dropout configurations. Returns: dropout_configs: List of sets containing
sam3d_objects/model/backbone/dit/embedder/embedder_fuser.py:121
↓ 1 callersMethod_build_perturbation
(self)
sam3d_objects/model/backbone/tdfy_dit/models/structured_latent_vae/decoder_gs.py:65
↓ 1 callersMethod_calc_layout
(self)
sam3d_objects/model/backbone/tdfy_dit/models/structured_latent_vae/decoder_rf.py:61
↓ 1 callersMethod_calc_layout
(self)
sam3d_objects/model/backbone/tdfy_dit/models/structured_latent_vae/decoder_gs.py:75
↓ 1 callersMethod_calc_layout
(self)
sam3d_objects/model/backbone/tdfy_dit/representations/mesh/cube2mesh.py:70
↓ 1 callersMethod_cfg_step
(self, y_cond, y_uncond, strength)
sam3d_objects/model/backbone/generator/classifier_free_guidance.py:102
↓ 1 callersMethod_cfg_step
(self, y_cond, y_uncond, y_pm, strength, strength_pm)
sam3d_objects/model/backbone/generator/classifier_free_guidance.py:174
↓ 1 callersMethod_clip_pointmap
(self, pointmap: torch.Tensor, mask: torch.Tensor)
sam3d_objects/pipeline/inference_pipeline_pointmap.py:222
↓ 1 callersMethod_compile
(self)
sam3d_objects/pipeline/inference_pipeline.py:207
↓ 1 callersMethod_compute_hutchinson_divergence
(self, velocity, x_t, z_samples)
sam3d_objects/model/backbone/generator/flow_matching/model.py:300
↓ 1 callersMethod_compute_reg_loss
Regularizer L_dev as in Equation 8
sam3d_objects/model/backbone/tdfy_dit/representations/mesh/flexicubes/flexicubes.py:111
↓ 1 callersMethod_compute_scale_and_shift
(self, pointmap: torch.Tensor, mask: torch.Tensor)
sam3d_objects/data/dataset/tdfy/img_and_mask_transforms.py:536
↓ 1 callersMethod_compute_vd
Computes the location of dual vertices as described in Section 4.2
sam3d_objects/model/backbone/tdfy_dit/representations/mesh/flexicubes/flexicubes.py:251
↓ 1 callersFunction_create_default_camera_trajectory
Creates a default camera trajectory, rotating around the scene in a circle. Args: num_frames: Number of frames in the trajectory
sam3d_objects/utils/visualization/plotly/save_scene.py:65
↓ 1 callersMethod_dropout_modalities
(self, kwarg_names: List[str], tokens: List[torch.Tensor])
sam3d_objects/model/backbone/dit/embedder/embedder_fuser.py:168
↓ 1 callersFunction_fill_holes
Rasterize a mesh from multiple views and remove invisible faces. Also includes postprocessing to: 1. Remove connected components that
sam3d_objects/model/backbone/tdfy_dit/utils/postprocessing_utils.py:23
↓ 1 callersFunction_fix_gaussian_alignment
(scene_gs, in_place=False)
notebook/inference.py:197
↓ 1 callersMethod_forward
(self, x: SparseTensor)
sam3d_objects/model/backbone/tdfy_dit/modules/sparse/transformer/blocks.py:69
↓ 1 callersMethod_forward
(self, x: SparseTensor, mod: torch.Tensor, context: torch.Tensor)
sam3d_objects/model/backbone/tdfy_dit/modules/sparse/transformer/blocks.py:144
↓ 1 callersMethod_forward
(self, x: SparseTensor, mod: torch.Tensor)
sam3d_objects/model/backbone/tdfy_dit/modules/sparse/transformer/modulated.py:60
↓ 1 callersMethod_forward
( self, x: SparseTensor, mod: torch.Tensor, context: torch.Tensor )
sam3d_objects/model/backbone/tdfy_dit/modules/sparse/transformer/modulated.py:152
↓ 1 callersMethod_forward
(self, x: torch.Tensor)
sam3d_objects/model/backbone/tdfy_dit/modules/transformer/blocks.py:110
↓ 1 callersMethod_forward
(self, x: torch.Tensor, context: torch.Tensor)
sam3d_objects/model/backbone/tdfy_dit/modules/transformer/blocks.py:179
↓ 1 callersMethod_forward
(self, x: torch.Tensor, mod: torch.Tensor)
sam3d_objects/model/backbone/tdfy_dit/modules/transformer/modulated.py:55
↓ 1 callersMethod_forward
(self, x: torch.Tensor, mod: torch.Tensor, context: torch.Tensor)
sam3d_objects/model/backbone/tdfy_dit/modules/transformer/modulated.py:141
↓ 1 callersMethod_forward
(self, x: torch.Tensor, mod: torch.Tensor, context: torch.Tensor)
sam3d_objects/model/backbone/tdfy_dit/modules/transformer/modulated.py:283
↓ 1 callersMethod_forward_last_layer
(self, input_img)
sam3d_objects/model/backbone/dit/embedder/dino.py:95
↓ 1 callersFunction_gen_fig_with_subplots
Takes in the number of objects to be plotted and generate a plotly figure with the appropriate number and orientation of titled subplots.
sam3d_objects/utils/visualization/plotly/plot_scene.py:456
↓ 1 callersMethod_generate_noise_tensor
(self, x_shape, x_device)
sam3d_objects/model/backbone/generator/flow_matching/model.py:92
↓ 1 callersFunction_get_caller_arg_name
(argnum=0, parent_frame=1)
sam3d_objects/data/utils.py:204
↓ 1 callersMethod_get_case_id
Obtains the ID of topology cases based on cell corner occupancy. This function resolves the ambiguity in the Dual Marching Cubes (DM
sam3d_objects/model/backbone/tdfy_dit/representations/mesh/flexicubes/flexicubes.py:145
↓ 1 callersMethod_get_phases
(self, indices: torch.Tensor)
sam3d_objects/model/backbone/tdfy_dit/modules/attention/modules.py:34
↓ 1 callersMethod_get_scale_and_shift
(self, pointmap: torch.Tensor, mask: torch.Tensor)
sam3d_objects/data/dataset/tdfy/img_and_mask_transforms.py:628
↓ 1 callersMethod_get_scale_and_shift
(self, pointmap: torch.Tensor, mask: torch.Tensor)
sam3d_objects/data/dataset/tdfy/img_and_mask_transforms.py:719
↓ 1 callersMethod_identify_surf_cubes
Identifies grid cubes that intersect with the underlying surface by checking if the signs at all corners are not identical.
sam3d_objects/model/backbone/tdfy_dit/representations/mesh/flexicubes/flexicubes.py:213
↓ 1 callersMethod_identify_surf_edges
Identifies grid edges that intersect with the underlying surface by checking for opposite signs. As each edge can be shared by multi
sam3d_objects/model/backbone/tdfy_dit/representations/mesh/flexicubes/flexicubes.py:188
← previousnext →101–200 of 784, ranked by callers