MCPcopy Create free account

hub / github.com/cvg/megaflow / functions

Functions254 in github.com/cvg/megaflow

↓ 1 callersFunctionget_frames
Generator that yields (RGB frame, original_shape_tuples, native_fps). If fix_width is provided, resizes the frame preserving aspect ratio before y
demo_flow.py:49
↓ 1 callersMethodget_random_data_slice
Takes full tensors and returns a random temporal slice based on whether the logic is bidirectional. Parameters ----
megaflow/train/flow_trainer.py:68
↓ 1 callersMethodgetitem_helper
(self, index)
megaflow/data/point_utils/pointdataset.py:51
↓ 1 callersMethodinit_weights
(self)
megaflow/model/layers/vision_transformer.py:173
↓ 1 callersMethodinterpolate_pos_encoding
(self, x, w, h)
megaflow/model/layers/vision_transformer.py:180
↓ 1 callersFunctionjs_read
(filename: str)
megaflow/data/datasets.py:23
↓ 1 callersFunctionjson_to_args
Convert JSON configuration file to argparse.Namespace object. Parameters ---------- json_path : str Path to the JSON configuratio
config/parser.py:5
↓ 1 callersFunctionmain
()
demo_track.py:178
↓ 1 callersFunctionmain
()
demo_flow.py:188
↓ 1 callersFunctionmake_colorwheel
Generates a color wheel for optical flow visualization as presented in: Baker et al. "A Database and Evaluation Methodology for Optical F
megaflow/utils/flow_viz.py:21
↓ 1 callersFunctionmerge_flows
(flow1, valid1, flow2, valid2, method="nearest")
megaflow/utils/flow_utils.py:6
↓ 1 callersFunctionmeshgrid2d
(B, Y, X, stack=False, device='cuda', on_chans=False)
megaflow/utils/basic.py:108
↓ 1 callersFunctionnamed_apply
(fn: Callable, module: nn.Module, name="", depth_first=True, include_root=False)
megaflow/model/layers/vision_transformer.py:24
↓ 1 callersFunctionpointflow_loss_func
(flow_preds, trajs_g, valids, vis_g, all_flow_e, seq_len=12, gamma=0.8)
megaflow/train/loss.py:10
↓ 1 callersFunctionposition_grid_to_embed
Convert 2D position grid (HxWx2) to sinusoidal embeddings (HxWxC) Args: pos_grid: Tensor of shape (H, W, 2) containing 2D coordinate
megaflow/model/model_utils.py:117
↓ 1 callersFunctionprocess_sequence
(args, model, device)
demo_track.py:87
↓ 1 callersFunctionprocess_sequence
(args, model, device)
demo_flow.py:99
↓ 1 callersFunctionreadDsp5Disp
(filename)
megaflow/utils/frame_utils.py:138
↓ 1 callersFunctionreadFlo5Flow
(filename)
megaflow/utils/frame_utils.py:124
↓ 1 callersFunctionreadFlow
Read .flo file in Middlebury format
megaflow/utils/frame_utils.py:16
↓ 1 callersFunctionreadPFM
(file)
megaflow/utils/frame_utils.py:38
↓ 1 callersFunctionreduce_masked_mean
(x, mask, dim=None, keepdim=False, broadcast=False)
megaflow/utils/basic.py:140
↓ 1 callersFunctionreplace_invalid_xys_with_nearest
(xys, valids)
megaflow/utils/data.py:8
↓ 1 callersFunctionresize_gtflow
Resize flow_gt and mask to target resolution for loss computation.
megaflow/train/loss.py:138
↓ 1 callersMethodresize_sparse_flow_map
(self, flow, valid, fx=1.0, fy=1.0)
megaflow/utils/augmentor.py:339
↓ 1 callersMethodsave_video
(self, video, filename, writer=None, step=0)
megaflow/utils/visualizer.py:143
↓ 1 callersMethodscratch_forward
Forward pass through the fusion blocks. Args: features (List[Tensor]): List of feature maps from different layers.
megaflow/model/flow_head.py:230
↓ 1 callersFunctionslice_expand_and_flatten
Processes specialized tokens with shape (1, 2, X, C) for multi-frame processing: 1) Uses the first position (index=0) for the first frame onl
megaflow/model/megaflow.py:917
↓ 1 callersFunctionsoft_match_features
(prob, f1)
megaflow/model/flow_head.py:469
↓ 1 callersMethodspatial_transform
(self, imgs, flows, valids)
megaflow/utils/augmentor.py:92
↓ 1 callersMethodspatial_transform
(self, imgs, flows, valids)
megaflow/utils/augmentor.py:373
↓ 1 callersFunctiontry_to_cuda
Try to move the input variable `t` to a cuda device. Args: t: Input. Returns: t_cuda: `t` moved to a cuda device, if su
megaflow/utils/data.py:109
↓ 1 callersMethodvalidation_step_1
Validation step for chairs, sintel, and spring datasets. Parameters ---------- data_blob : tuple[torch.Tensor, torch.Tensor,
megaflow/train/flow_trainer.py:196
↓ 1 callersMethodvalidation_step_2
Validation step for KITTI dataset. Parameters ---------- data_blob : Tuple[torch.Tensor, torch.Tensor, torch.Tensor]
megaflow/train/flow_trainer.py:233
Method__call__
(self, imgs, flows, valids)
megaflow/utils/augmentor.py:268
Method__call__
(self, imgs, flows, valids)
megaflow/utils/augmentor.py:524
Method__call__
Generates spatial positions for a batch of patches. Args: batch_size: Number of samples in the batch. height: Height
megaflow/model/layers/rope.py:39
Method__getitem__
(self, index)
megaflow/data/datasets.py:229
Method__getitem__
(self, index)
megaflow/data/point_utils/tapvid_dataset.py:39
Method__getitem__
(self, index)
megaflow/data/point_utils/tapvid_dataset.py:115
Method__getitem__
(self, index)
megaflow/data/point_utils/tapvid_dataset.py:180
Method__getitem__
(self, index)
megaflow/data/point_utils/pointdataset.py:54
Method__init__
( self, crop_size, min_scale=-0.2, max_scale=0.5, do_flip=True,
megaflow/utils/augmentor.py:13
Method__init__
( self, crop_size, min_scale=-0.2, max_scale=0.5, do_flip=False,
megaflow/utils/augmentor.py:285
Method__init__
( self, save_dir: str = "./results", grayscale: bool = False, pad_value: int =
megaflow/utils/visualizer.py:70
Method__init__
(self, dims, mode="sintel", padding_factor=8)
megaflow/utils/basic.py:77
Method__init__
( self, img_size=518, patch_size=14, embed_dim=1024, depth=24,
megaflow/model/megaflow.py:104
Method__init__
(self, in_channels, **kwargs, )
megaflow/model/model_utils.py:11
Method__init__
(self, in_planes, planes, stride=1, norm_layer=nn.BatchNorm2d)
megaflow/model/layer.py:15
Method__init__
(self, dim, output_dim, layer_scale_init_value=1e-6)
megaflow/model/layer.py:52
Method__init__
(self, input_dim=3, output_dim=256, ratio=1.0, downsample=8, num_blocks=2, initial_dim=64, block_dims=[64, 128
megaflow/model/refine.py:13
Method__init__
(self, corr_channels=324, dim=128)
megaflow/model/refine.py:111
Method__init__
(self, corr_channels, dim=128)
megaflow/model/refine.py:130
Method__init__
(self, corr_channels=324, hdim=128, cdim=128, downsample_factor=8, num_blocks=2, predict_visconf=False, iter_v
megaflow/model/refine.py:150
Method__init__
Init. Args: features (int): number of features
megaflow/model/flow_head.py:330
Method__init__
Init. Args: features (int): number of features
megaflow/model/flow_head.py:375
Method__init__
(self, C)
megaflow/model/flow_head.py:476
Method__init__
Initializes the 2D RoPE module.
megaflow/model/layers/rope.py:79
Method__init__
(self, drop_prob=None)
megaflow/model/layers/drop_path.py:29
Method__init__
( self, dim: int, num_heads: int, mlp_ratio: float = 4.0, qkv_bias: bo
megaflow/model/layers/block.py:28
Method__init__
(self, dim: int, init_values: Union[float, Tensor] = 1e-5, inplace: bool = False)
megaflow/model/layers/layer_scale.py:16
Method__init__
( self, dim: int, num_heads: int = 8, qkv_bias: bool = False, proj_bia
megaflow/model/layers/attention.py:53
Method__init__
( self, in_features: int, hidden_features: Optional[int] = None, out_features:
megaflow/model/layers/mlp.py:17
Method__init__
( self, in_features: int, hidden_features: Optional[int] = None, out_features:
megaflow/model/layers/swiglu_ffn.py:55
Method__init__
( self, img_size: Union[int, Tuple[int, int]] = 224, patch_size: Union[int, Tuple[int,
megaflow/model/layers/patch_embed.py:37
Method__init__
Args: img_size (int, tuple): input image size patch_size (int, tuple): patch size in_chans (int): number
megaflow/model/layers/vision_transformer.py:43
Method__init__
(self)
megaflow/data/datasets.py:33
Method__init__
(self)
megaflow/data/datasets.py:43
Method__init__
(self, aug_params=None, sparse=False, scene_params={})
megaflow/data/datasets.py:48
Method__init__
( self, aug_params=None, split="train", root="datasets/Sintel", dstype
megaflow/data/datasets.py:402
Method__init__
( self, aug_params=None, split="train", root="datasets/FlyingChairs_release/da
megaflow/data/datasets.py:450
Method__init__
( self, aug_params=None, root="datasets/FlyingThings3D", split="train",
megaflow/data/datasets.py:485
Method__init__
( self, aug_params=None, split="train", root="datasets/KITTI", scene_params={} )
megaflow/data/datasets.py:600
Method__init__
( self, aug_params=None, root="datasets/spring", split="train", subsam
megaflow/data/datasets.py:691
Method__init__
(self, aug_params=None, root="datasets/TartanAir", scene_params={})
megaflow/data/datasets.py:794
Method__init__
( self, data_root='datasets/TAP_Vid/tapvid_kinetics', crop_size=(384,512), seq
megaflow/data/point_utils/tapvid_dataset.py:87
Method__init__
( self, data_root='datasets/TAP_Vid/tapvid_rgb_stacking', crop_size=(384,5
megaflow/data/point_utils/tapvid_dataset.py:154
Method__init__
( self, data_root='datasets/TAP_Vid/robotap', crop_size=(384,512),
megaflow/data/point_utils/tapvid_dataset.py:223
Method__init__
( self, data_root, crop_size=(384, 512), seq_len=24, traj_per_sample=7
megaflow/data/point_utils/pointdataset.py:11
Method__init__
( self, data_root='datasets/kubric_au', crop_size=(384, 512),
megaflow/data/point_utils/kubric_movif_dataset.py:15
Method__init__
(self, args: argparse.Namespace)
megaflow/train/flow_trainer.py:32
Method__init__
(self, args: argparse.Namespace)
megaflow/train/track_trainer.py:33
Method__len__
(self)
megaflow/data/datasets.py:397
Method__len__
(self)
megaflow/data/point_utils/tapvid_dataset.py:75
Method__len__
(self)
megaflow/data/point_utils/tapvid_dataset.py:150
Method__len__
(self)
megaflow/data/point_utils/tapvid_dataset.py:216
Method__len__
(self)
megaflow/data/point_utils/tapvid_dataset.py:250
Method__len__
(self)
megaflow/data/point_utils/kubric_movif_dataset.py:236
Method__rmul__
(self, v)
megaflow/data/datasets.py:393
Methodattn_residual_func
(x: Tensor, pos=None)
megaflow/model/layers/block.py:78
Methodattn_residual_func
(x: Tensor, attn_bias=None)
megaflow/model/layers/block.py:207
Functioncollate_fn_train
Collate function for video tracks data. Returns a batch dictionary and a list of flags.
megaflow/utils/data.py:81
Methodconfigure_optimizers
Configure optimizers and learning rate schedulers. Returns ------- Dict[str, Any] Dictionary containing optimizer
megaflow/train/flow_trainer.py:309
Methodconfigure_optimizers
Configure optimizers and learning rate schedulers. Returns ------- Dict[str, Any] Dictionary containing optimizer
megaflow/train/track_trainer.py:204
Functiondataclass_to_cuda_
Move all contents of a dataclass to cuda inplace if supported. Args: batch: Input dataclass. Returns: batch_cuda: `batc
megaflow/utils/data.py:126
Methodf
(*args, **kwargs)
megaflow/model/layers/vision_transformer.py:130
Methodffn_residual_func
(x: Tensor)
megaflow/model/layers/block.py:81
Methodffn_residual_func
(x: Tensor, attn_bias=None)
megaflow/model/layers/block.py:210
Methodflops
(self)
megaflow/model/layers/patch_embed.py:80
Functionflow_tensor_to_image
Used for tensorboard visualization
megaflow/utils/flow_viz.py:136
← previousnext →101–200 of 254, ranked by callers