Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cvlab-kaist/VideoMaMa
/ functions
Functions
168 in github.com/cvlab-kaist/VideoMaMa
⨍
Functions
168
◇
Types & classes
20
Method
__init__
( self, sample_size: Optional[int] = None, in_channels: int = 8, out_channels:
src/unet_spatio_temporal_condition.py:576
Method
__init__
Initialize SAM2 video tracker Args: checkpoint_path: Path to SAM2 checkpoint config_file: Path to SA
demo/sam2_wrapper.py:22
Method
__init__
Initialize SAM2 video tracker Args: checkpoint_path: Path to SAM2 checkpoint config_file: Path to SA
demo/sam2_wrapper_hf.py:36
Method
__init__
Initialize SAM controller Args: SAM_checkpoint: Path to SAM2 checkpoint model_type: SAM2 model confi
demo/tools/interact_tools.py:26
Method
__init__
Initialize SAM2 segmenter Args: SAM_checkpoint: Path to SAM2 checkpoint model_type: SAM2 model confi
demo/tools/base_segmenter.py:15
Method
__len__
Returns the number of videos to generate in one epoch.
dataloader/synthetic_on_the_fly.py:157
Method
__len__
(self)
dataloader/vos.py:61
Method
__len__
(self)
dataloader/synthetic.py:111
Method
_compute_padding
(kernel_size)
pipeline_svd_mask.py:991
Method
_encode_image_vae
(self, image: torch.Tensor, device: Union[str, torch.device])
pipeline_svd_mask.py:711
Method
_encode_vae_image
( self, image: torch.Tensor, device: Union[str, torch.device],
pipeline_svd_mask.py:137
Method
_encode_vae_image
( self, image: torch.Tensor, device: Union[str, torch.device],
pipeline_svd_mask.py:458
Method
_filter2d
(input_tensor, kernel)
pipeline_svd_mask.py:1002
Method
_gaussian
(window_size, sigma)
pipeline_svd_mask.py:1015
Method
_gaussian_blur2d
(input_tensor, kernel_size, sigma)
pipeline_svd_mask.py:1025
Method
_set_gradient_checkpointing
(self, module, value=False)
src/unet_spatio_temporal_condition.py:325
Method
_set_gradient_checkpointing
(self, module, value=False)
src/unet_spatio_temporal_condition.py:703
Function
all_mask
(mask)
inference_onestep_folder.py:214
Function
all_mask
(mask)
dataloader/augmentations.py:267
Method
attn_processors
r""" Returns: `dict` of attention processors: A dictionary containing all attention processors used in the model with
src/unet_spatio_temporal_condition.py:251
Method
attn_processors
(self)
src/unet_spatio_temporal_condition.py:672
Function
augment_to_polygon_preserve_all_parts
Converts all parts of a mask to simplified polygons, preserving all disconnected components. The level of simplification is controlled by
dataloader/augmentations.py:154
Function
clear_clicks
Clear all clicks and reset to original first frame
demo/app.py:243
Function
dilate_mask
(mask)
inference_onestep_folder.py:223
Function
dilate_mask
(mask)
dataloader/augmentations.py:276
Method
enable_forward_chunking
Sets the attention processor to use [feed forward chunking](https://huggingface.co/blog/reformer#2-chunked-feed-forward-layers).
src/unet_spatio_temporal_condition.py:330
Method
enable_forward_chunking
(self, chunk_size: Optional[int] = None, dim: int = 0)
src/unet_spatio_temporal_condition.py:706
Function
erode_mask
(mask)
inference_onestep_folder.py:217
Function
erode_mask
(mask)
dataloader/augmentations.py:270
Function
export_to_gif
Export a list of frames to a GIF. Args: - frames (list): List of frames (as numpy arrays or PIL Image objects). - output_gif_path (s
train.py:245
Method
first_frame_click
Generate mask from clicks on first frame Args: image: np.ndarray, (H, W, 3), RGB image points: np.nd
demo/tools/interact_tools.py:38
Method
fn_recursive_add_processors
( name: str, module: torch.nn.Module, processors: Dict[str, AttentionProce
src/unet_spatio_temporal_condition.py:260
Method
fn_recursive_add_processors
(name: str, module: torch.nn.Module, processors: Dict[str, AttentionProcessor])
src/unet_spatio_temporal_condition.py:674
Method
fn_recursive_attn_processor
(name: str, module: torch.nn.Module, processor)
src/unet_spatio_temporal_condition.py:299
Method
fn_recursive_attn_processor
(name: str, module: torch.nn.Module, processor)
src/unet_spatio_temporal_condition.py:687
Method
fn_recursive_feed_forward
(module: torch.nn.Module, chunk_size: int, dim: int)
src/unet_spatio_temporal_condition.py:349
Method
fn_recursive_feed_forward
(module: torch.nn.Module, chunk_size: int, dim: int)
src/unet_spatio_temporal_condition.py:710
Method
forward
(self, x)
train.py:111
Method
forward
(self, input, target, weight=None)
src/matting_loss.py:83
Method
forward
(self, logit, label, mask=None)
src/matting_loss.py:158
Method
forward
r""" The [`UNetSpatioTemporalConditionModel`] forward method. Args: sample (`torch.Tensor`): The noisy in
src/unet_spatio_temporal_condition.py:359
Method
forward
( self, sample: torch.Tensor, timestep: Union[torch.Tensor, float, int], encod
src/unet_spatio_temporal_condition.py:718
Function
generate_video
Generates a video by layering foregrounds over a background.
data_pipeline/generate_synthetic.py:31
Method
get_first_frame_mask
Get mask for first frame only (for preview) Args: frame: np.ndarray, (H, W, 3), uint8 RGB frame poin
demo/sam2_wrapper_hf.py:119
Function
get_prompt
Convert click input to prompt format Args: click_state: [[points], [labels]] click_input: JSON string "[[x, y, label]]"
demo/app.py:106
Method
hook_fn
(self, module, input, output)
train.py:91
Function
latent_to_tensor
(latents, vae, num_frames, decode_chunk_size=8)
train.py:278
Function
load_model_hook
(models, input_dir)
train.py:934
Function
load_sam2_tracker
Load SAM2 video tracker with pretrained weights Args: checkpoint_path: Path to SAM2 checkpoint (if None, uses default location)
demo/sam2_wrapper_hf.py:169
Function
load_video
Load video and extract first frame for mask generation
demo/app.py:131
Function
load_videomama_pipeline
Load VideoMaMa pipeline with pretrained weights Args: base_model_path: Path to SVD base model (if None, uses default) un
demo/videomama_wrapper_hf.py:65
Function
none_mask
(mask)
inference_onestep_folder.py:211
Function
none_mask
(mask)
dataloader/augmentations.py:264
Function
occlude_mask
(mask)
inference_onestep_folder.py:188
Function
occlude_mask
(mask)
dataloader/augmentations.py:241
Method
prepare_latents
( self, batch_size: int, num_frames: int, height: int,
pipeline_svd_mask.py:512
Function
propagate_masks
Propagate first frame mask through entire video using SAM2
demo/app.py:255
Function
rand_log_normal
Draws samples from an lognormal distribution.
train.py:118
Method
reset_image
Reset the current image
demo/tools/base_segmenter.py:41
Function
restart
Reset all states
demo/app.py:410
Function
run_videomama_with_sam2
Run SAM2 propagation and VideoMaMa inference together
demo/app.py:282
Function
sam_refine
Add click and update mask on first frame Args: video_state: Dictionary with video data point_prompt: "Positive" or "Nega
demo/app.py:167
Function
save_model_hook
(models, weights, output_dir)
train.py:917
Method
set_default_attn_processor
Disables custom attention processors and sets the default attention implementation.
src/unet_spatio_temporal_condition.py:312
Method
set_default_attn_processor
(self)
src/unet_spatio_temporal_condition.py:697
Method
set_image
Set the current image for segmentation
demo/tools/base_segmenter.py:37
Method
track_video
Track object through video using SAM2 Args: frames: List of numpy arrays, [(H,W,3)]*n, uint8 RGB frames
demo/sam2_wrapper_hf.py:53
Function
videomama
Run VideoMaMa inference on video frames with mask conditioning Args: pipeline: VideoInferencePipeline instance frames_np
demo/videomama_wrapper_hf.py:22
← previous
101–168 of 168, ranked by callers