MCPcopy Create free account

hub / github.com/UVA-Computer-Vision-Lab/OmniShotCut / functions

Functions95 in github.com/UVA-Computer-Vision-Lab/OmniShotCut

↓ 18 callersFunctionprint
(*args, **kwargs)
omnishotcut/util/misc.py:62
↓ 7 callersMethodto
(self, device)
omnishotcut/util/misc.py:36
↓ 6 callersMethodwith_pos_embed
(self, tensor, pos: Optional[Tensor])
omnishotcut/architecture/transformer.py:235
↓ 4 callersMethod__init__
(self, d_model=512, nhead=8, num_encoder_layers=6, num_decoder_layers=6, dim_feedforward=2048
omnishotcut/architecture/transformer.py:37
↓ 3 callersMethod__init__
(self, backbone, position_embedding)
omnishotcut/architecture/backbone.py:102
↓ 3 callersFunctionload_model
(checkpoint_path: str)
omnishotcut/engine.py:32
↓ 2 callersFunction_from_hwc_uint8
(img: np.ndarray, keep_batch_dim: bool)
omnishotcut/datasets/compression_utils.py:46
↓ 2 callersFunction_get_activation_fn
Return an activation function given a string
omnishotcut/architecture/transformer.py:22
↓ 2 callersFunction_get_clones
(module, N)
omnishotcut/architecture/transformer.py:17
↓ 2 callersFunction_to_hwc_uint8
(x: torch.Tensor)
omnishotcut/datasets/compression_utils.py:18
↓ 2 callersFunction_to_uint8_rgb
(frame: np.ndarray)
omnishotcut/util/visualization.py:34
↓ 2 callersFunctionbuild_backbone
(args)
omnishotcut/architecture/backbone.py:118
↓ 2 callersFunctionbuild_transformer
(args)
omnishotcut/architecture/transformer.py:299
↓ 2 callersFunctionescape_html
(x)
app.py:55
↓ 2 callersFunctionis_dist_avail_and_initialized
()
omnishotcut/util/misc.py:70
↓ 2 callersFunctionjpeg_compress_tensor
(tensor_frames: torch.Tensor)
omnishotcut/datasets/compression_utils.py:58
↓ 2 callersFunctionmerge_predictions
(pred_boundary_full, pred_boundary, duplicate_tolerance=2)
omnishotcut/engine.py:130
↓ 2 callersFunctionnested_tensor_from_tensor_list
(tensor_list: List[Tensor], split=True)
omnishotcut/datasets/utils.py:24
↓ 2 callersFunctionnew_canvas
()
omnishotcut/util/visualization.py:114
↓ 2 callersFunctionsingle_video_inference
(video_path, model, model_args, overlap_window_length)
omnishotcut/engine.py:150
↓ 2 callersFunctionsplit_videos
(video, chunk_size, overlap_size)
omnishotcut/engine.py:69
↓ 2 callersFunctionvisualize_concated_frames
( frames: np.ndarray, out_dir: str, highlight_ranges_closed: Optional[List[Tuple[int, int]]],
omnishotcut/util/visualization.py:78
↓ 2 callersMethodwith_pos_embed
(self, tensor, pos: Optional[Tensor])
omnishotcut/architecture/transformer.py:172
↓ 1 callersMethod__init__
(self, input_dim, hidden_dim, output_dim, num_layers)
omnishotcut/architecture/model.py:22
↓ 1 callersMethod_add_compression
(self, img, compression_choice)
omnishotcut/datasets/transforms.py:141
↓ 1 callersMethod_add_gaussian_noise
img: [C,H,W] float, assumed in [0,1] (or at least bounded) sigma: std of Gaussian noise in same scale as img
omnishotcut/datasets/transforms.py:129
↓ 1 callersFunction_build_closed_boundary_color_maps
( ranges_closed: List[Tuple[int, int]], T: int, palette: List[Tuple[int, int, int]], end_exclu
omnishotcut/util/visualization.py:52
↓ 1 callersMethod_fix_blur_kernel
(k: int)
omnishotcut/datasets/transforms.py:116
↓ 1 callersFunction_frame_idx_to_mmss
(frame_idx: int, fps: float)
omnishotcut/util/visualization.py:22
↓ 1 callersFunction_load_font
(font_size: int)
omnishotcut/util/visualization.py:45
↓ 1 callersFunction_max_by_axis
(the_list)
omnishotcut/datasets/utils.py:14
↓ 1 callersMethod_reset_parameters
(self)
omnishotcut/architecture/transformer.py:59
↓ 1 callersFunction_run_on_numpy
Run inference on a pre-loaded numpy array (T, H, W, 3). Returns (ranges, intra_labels, inter_labels).
omnishotcut/engine.py:265
↓ 1 callersMethod_sample_color_jitter_params
(b, c, s, h)
omnishotcut/datasets/transforms.py:85
↓ 1 callersMethod_set_aux_loss
(self, outputs_intra_class, outputs_inter_class, outputs_shot_class)
omnishotcut/architecture/model.py:123
↓ 1 callersFunction_to_4d_video_tensor
Inputs: [N, H, W, 3] in range [0, 255] Returns: float tensor [N, C, H, W] in [0, 1]
omnishotcut/datasets/transforms.py:12
↓ 1 callersFunctionalign_segments_to_crop
segments: list of (start, end, intra_label, inter_label) in global frame indices, [start, end) returns: ab: list of (start2, end2) in
omnishotcut/datasets/dataloader.py:22
↓ 1 callersFunctionbuild_position_encoding
(args)
omnishotcut/architecture/position_encoding.py:62
↓ 1 callersFunctionconvert_item
(item)
inference.py:29
↓ 1 callersMethoddecompose
(self)
omnishotcut/util/misc.py:47
↓ 1 callersFunctiondump_list_of_dict
Save list[dict] as JSON. Convert pred_intra_labels / pred_inter_labels from int to string.
inference.py:23
↓ 1 callersFunctionformat_dict
(d, level)
inference.py:46
↓ 1 callersMethodforward_post
(self, src, src_mask: Optional[Tensor] = None,
omnishotcut/architecture/transformer.py:175
↓ 1 callersMethodforward_post
(self, tgt, memory, tgt_mask: Optional[Tensor] = None, memory_mask:
omnishotcut/architecture/transformer.py:238
↓ 1 callersMethodforward_pre
(self, src, src_mask: Optional[Tensor] = None, src_key_padding_mask: O
omnishotcut/architecture/transformer.py:190
↓ 1 callersMethodforward_pre
(self, tgt, memory, tgt_mask: Optional[Tensor] = None, memory_mask: Op
omnishotcut/architecture/transformer.py:261
↓ 1 callersFunctionget_rank
()
omnishotcut/util/misc.py:84
↓ 1 callersFunctionis_main_process
()
omnishotcut/util/misc.py:90
↓ 1 callersFunctionlist_sample_videos
(asset_dir: str = "__assets__", max_samples: int = 8)
app.py:140
↓ 1 callersFunctionparse_args
()
inference.py:74
↓ 1 callersFunctionprepare_gallery
(page_paths: List[str])
app.py:67
↓ 1 callersFunctionprepare_result_table
( pred_ranges: List[List[int]], pred_intra_labels: List[int], pred_inter_labels: List[
app.py:76
↓ 1 callersFunctionsetup_for_distributed
This function disables printing when not in master process
omnishotcut/util/misc.py:55
↓ 1 callersFunctionwebp_compress_tensor
(tensor_frames: torch.Tensor)
omnishotcut/datasets/compression_utils.py:81
Method__call__
Returns normalized float tensor [T, C, H, W]
omnishotcut/datasets/transforms.py:163
Method__getitem__
(self, idx)
omnishotcut/datasets/dataloader.py:142
Method__init__
(self, model, model_args)
omnishotcut/__init__.py:23
Method__init__
(self, encoder_layer, num_layers, norm=None)
omnishotcut/architecture/transformer.py:87
Method__init__
(self, decoder_layer, num_layers, norm=None, return_intermediate=False)
omnishotcut/architecture/transformer.py:112
Method__init__
(self, d_model, nhead, dim_feedforward=2048, dropout=0.1, activation="relu", normalize_before
omnishotcut/architecture/transformer.py:155
Method__init__
(self, d_model, nhead, dim_feedforward=2048, dropout=0.1, activation="relu", normalize_before
omnishotcut/architecture/transformer.py:215
Method__init__
(self, n)
omnishotcut/architecture/backbone.py:28
Method__init__
(self, backbone: nn.Module, train_backbone: bool, num_channels: int, return_interm_layers: bool)
omnishotcut/architecture/backbone.py:60
Method__init__
(self, name: str, train_backbone: bool, return_interm_layers: bool,
omnishotcut/architecture/backbone.py:90
Method__init__
Initializes the model. Parameters: backbone: torch module of the backbone to be used. See backbone.py transformer: to
omnishotcut/architecture/model.py:39
Method__init__
(self, num_pos_feats=64, num_frames = 200, temperature=10000, normalize=False, scale=None)
omnishotcut/architecture/position_encoding.py:19
Method__init__
( self, set_type: str = "train", horizontal_flip_prob: float = 0.5, vertical_f
omnishotcut/datasets/transforms.py:42
Method__init__
(self, args, set_type)
omnishotcut/datasets/dataloader.py:70
Method__init__
(self, tensors, mask: Optional[Tensor])
omnishotcut/util/misc.py:32
Method__len__
(self)
omnishotcut/datasets/dataloader.py:138
Method__repr__
(self)
omnishotcut/util/misc.py:50
Method_load_from_state_dict
(self, state_dict, prefix, local_metadata, strict, missing_keys, unexpected_keys
omnishotcut/architecture/backbone.py:35
Method_rand_factor
(x)
omnishotcut/datasets/transforms.py:88
Functionbuild
(args, set_type)
omnishotcut/datasets/dataloader.py:265
Functionbuild_dataset
(set_type, args)
omnishotcut/datasets/__init__.py:6
Functionbuild_model
(args)
omnishotcut/architecture/model.py:134
Functionclear_demo_outputs
()
app.py:216
Functioncollate_fn
(batch)
omnishotcut/datasets/utils.py:61
Methodforward
(self, src, mask, query_embed, pos_embed)
omnishotcut/architecture/transformer.py:64
Methodforward
(self, src, mask: Optional[Tensor] = None, src_key_padding_mask: Optional[Tens
omnishotcut/architecture/transformer.py:93
Methodforward
(self, tgt, memory, tgt_mask: Optional[Tensor] = None, memory_mask: Optional[T
omnishotcut/architecture/transformer.py:119
Methodforward
(self, src, src_mask: Optional[Tensor] = None, src_key_padding_mask: Optional[
omnishotcut/architecture/transformer.py:204
Methodforward
(self, tgt, memory, tgt_mask: Optional[Tensor] = None, memory_mask: Optional[T
omnishotcut/architecture/transformer.py:284
Methodforward
(self, x)
omnishotcut/architecture/backbone.py:45
Methodforward
(self, tensor_list: NestedTensor)
omnishotcut/architecture/backbone.py:76
Methodforward
(self, tensor_list: NestedTensor)
omnishotcut/architecture/backbone.py:105
Methodforward
(self, x)
omnishotcut/architecture/model.py:28
Methodforward
The forward expects a NestedTensor, which consists of: - samples.tensor: batched images, of shape [batch_size x 3 x H x W]
omnishotcut/architecture/model.py:67
Methodforward
(self, tensor_list: NestedTensor)
omnishotcut/architecture/position_encoding.py:31
Functionget_world_size
()
omnishotcut/util/misc.py:78
Methodinference
Run shot cut detection on a video. Args: video: str file path | np.ndarray (T,H,W,3) uint8 RGB | torch.Tensor (T,H,W,3)
omnishotcut/__init__.py:27
Functioninit_distributed_mode
(args)
omnishotcut/util/misc.py:94
Functionload
Load model weights and return an OmniShotCutModel instance. checkpoint_path can be: - a local file path → load directly (filename ignored)
omnishotcut/__init__.py:75
Functionpad_to_length
(x, N, pad_value=(1.0, 0.0))
omnishotcut/datasets/dataloader.py:56
Functionrun_demo
(video_file)
app.py:161