SYMBOL INDEX (430 symbols across 62 files) FILE: demo_colmap.py function parse_args (line 42) | def parse_args(): function run_VGGT (line 65) | def run_VGGT(model, images, dtype, resolution=518): function demo_fn (line 93) | def demo_fn(args): function rename_colmap_recons_and_rescale_camera (line 254) | def rename_colmap_recons_and_rescale_camera( FILE: demo_gradio.py function run_model (line 44) | def run_model(target_dir, model) -> dict: function handle_uploads (line 103) | def handle_uploads(input_video, input_images): function update_gallery_on_upload (line 171) | def update_gallery_on_upload(input_video, input_images): function gradio_demo (line 186) | def gradio_demo( function clear_fields (line 259) | def clear_fields(): function update_log (line 266) | def update_log(): function update_visualization (line 273) | def update_visualization( function example_pipeline (line 494) | def example_pipeline( FILE: demo_viser.py function viser_wrapper (line 34) | def viser_wrapper( function apply_sky_segmentation (line 258) | def apply_sky_segmentation(conf: np.ndarray, image_folder: str) -> np.nd... function main (line 321) | def main(): FILE: training/data/augmentation.py function get_image_augmentation (line 11) | def get_image_augmentation( FILE: training/data/base_dataset.py class BaseDataset (line 17) | class BaseDataset(Dataset): method __init__ (line 33) | def __init__( method __len__ (line 57) | def __len__(self): method __getitem__ (line 60) | def __getitem__(self, idx_N): method get_data (line 75) | def get_data(self, seq_index=None, seq_name=None, ids=None, aspect_rat... method get_target_shape (line 95) | def get_target_shape(self, aspect_ratio): method process_one_image (line 115) | def process_one_image( method get_nearby_ids (line 237) | def get_nearby_ids(self, ids, full_seq_num, expand_ratio=None, expand_... FILE: training/data/composed_dataset.py class ComposedDataset (line 21) | class ComposedDataset(Dataset, ABC): method __init__ (line 30) | def __init__(self, dataset_configs: dict, common_config: dict, **kwargs): method __len__ (line 80) | def __len__(self): method __getitem__ (line 85) | def __getitem__(self, idx_tuple): class TupleConcatDataset (line 187) | class TupleConcatDataset(ConcatDataset): method __init__ (line 201) | def __init__(self, datasets, common_config): method __getitem__ (line 214) | def __getitem__(self, idx): FILE: training/data/dataset_util.py function crop_image_depth_and_intrinsic_by_pp (line 26) | def crop_image_depth_and_intrinsic_by_pp( function resize_image_depth_and_intrinsic (line 161) | def resize_image_depth_and_intrinsic( function threshold_depth_map (line 261) | def threshold_depth_map( function depth_to_world_coords_points (line 317) | def depth_to_world_coords_points( function depth_to_cam_coords_points (line 369) | def depth_to_cam_coords_points( function rotate_90_degrees (line 411) | def rotate_90_degrees( function rotate_image_and_depth_rot90 (line 474) | def rotate_image_and_depth_rot90(image, depth_map, clockwise): function adjust_extrinsic_matrix_rot90 (line 507) | def adjust_extrinsic_matrix_rot90(extri_opencv, clockwise): function adjust_intrinsic_matrix_rot90 (line 548) | def adjust_intrinsic_matrix_rot90(intri_opencv, image_width, image_heigh... function adjust_track_rot90 (line 588) | def adjust_track_rot90(track, image_width, image_height, clockwise): function read_image_cv2 (line 616) | def read_image_cv2(path: str, rgb: bool = True) -> np.ndarray: function read_depth (line 653) | def read_depth(path: str, scale_adjustment=1.0) -> np.ndarray: function load_16big_png_depth (line 689) | def load_16big_png_depth(depth_png: str) -> np.ndarray: FILE: training/data/datasets/co3d.py class Co3dDataset (line 67) | class Co3dDataset(BaseDataset): method __init__ (line 68) | def __init__( method get_data (line 162) | def get_data( FILE: training/data/datasets/vkitti.py class VKittiDataset (line 20) | class VKittiDataset(BaseDataset): method __init__ (line 21) | def __init__( method get_data (line 89) | def get_data( FILE: training/data/dynamic_dataloader.py class DynamicTorchDataset (line 17) | class DynamicTorchDataset(ABC): method __init__ (line 18) | def __init__( method get_loader (line 67) | def get_loader(self, epoch): class DynamicBatchSampler (line 94) | class DynamicBatchSampler(Sampler): method __init__ (line 99) | def __init__(self, method set_epoch (line 140) | def set_epoch(self, epoch): method __iter__ (line 151) | def __iter__(self): method __len__ (line 194) | def __len__(self): class DynamicDistributedSampler (line 199) | class DynamicDistributedSampler(DistributedSampler): method __init__ (line 204) | def __init__( method __iter__ (line 224) | def __iter__(self): method update_parameters (line 235) | def update_parameters(self, aspect_ratio, image_num): FILE: training/data/track_util.py function build_tracks_by_depth (line 19) | def build_tracks_by_depth(extrinsics, intrinsics, world_points, depths, ... function get_depth_inside_flag (line 149) | def get_depth_inside_flag(depths, batch_indices, uv_int, proj_depths, re... function sample_positive_tracks (line 161) | def sample_positive_tracks(tracks, tracks_mask, track_num, half_top = Tr... function track_epipolar_check (line 198) | def track_epipolar_check(tracks, extrinsics, intrinsics, use_essential_m... function get_essential_matrix (line 216) | def get_essential_matrix(extrinsic1, extrinsic2): function hat (line 231) | def hat(v: torch.Tensor) -> torch.Tensor: function color_from_xy (line 257) | def color_from_xy(x, y, W, H, cmap_name="hsv"): function get_track_colors_by_position (line 281) | def get_track_colors_by_position( function visualize_tracks_on_images (line 335) | def visualize_tracks_on_images( FILE: training/data/worker_fn.py function is_dist_avail_and_initialized (line 22) | def is_dist_avail_and_initialized(): function get_rank (line 36) | def get_rank(): function get_world_size (line 48) | def get_world_size(): function default_worker_init_fn (line 60) | def default_worker_init_fn(worker_id, num_workers, epoch, seed=0): function get_worker_init_fn (line 102) | def get_worker_init_fn(seed, num_workers, epoch, worker_init_fn=None): FILE: training/launch.py function main (line 13) | def main(): FILE: training/loss.py class MultitaskLoss (line 17) | class MultitaskLoss(torch.nn.Module): method __init__ (line 27) | def __init__(self, camera=None, depth=None, point=None, track=None, **... method forward (line 35) | def forward(self, predictions, batch) -> torch.Tensor: function compute_camera_loss (line 81) | def compute_camera_loss( function camera_loss_single (line 157) | def camera_loss_single(pred_pose_enc, gt_pose_enc, loss_type="l1"): function compute_point_loss (line 199) | def compute_point_loss(predictions, batch, gamma=1.0, alpha=0.2, gradien... function compute_depth_loss (line 239) | def compute_depth_loss(predictions, batch, gamma=1.0, alpha=0.2, gradien... function regression_loss (line 281) | def regression_loss(pred, gt, mask, conf=None, gradient_loss_fn=None, ga... function gradient_loss_multi_scale_wrapper (line 370) | def gradient_loss_multi_scale_wrapper(prediction, target, mask, scales=4... function normal_loss (line 398) | def normal_loss(prediction, target, mask, cos_eps=1e-8, conf=None, gamma... function gradient_loss (line 456) | def gradient_loss(prediction, target, mask, conf=None, gamma=1.0, alpha=... function point_map_to_normal (line 511) | def point_map_to_normal(point_map, mask, eps=1e-6): function filter_by_quantile (line 567) | def filter_by_quantile(loss_tensor, valid_range, min_elements=1000, hard... function torch_quantile (line 606) | def torch_quantile( FILE: training/train_utils/checkpoint.py class DDPCheckpointSaver (line 38) | class DDPCheckpointSaver: method __init__ (line 39) | def __init__( method save_checkpoint (line 52) | def save_checkpoint( function robust_torch_save (line 72) | def robust_torch_save(checkpoint: Dict[str, Any], checkpoint_path: str) ... FILE: training/train_utils/distributed.py function get_machine_local_and_dist_rank (line 12) | def get_machine_local_and_dist_rank(): FILE: training/train_utils/freeze.py function freeze_modules (line 24) | def freeze_modules(model: nn.Module, patterns: List[str], recursive: boo... function _freeze (line 62) | def _freeze(mod: nn.Module, recursive: bool) -> None: function _check_every_pattern_used (line 91) | def _check_every_pattern_used(matched_names: set[str], patterns: List[st... FILE: training/train_utils/general.py function check_and_fix_inf_nan (line 29) | def check_and_fix_inf_nan(input_tensor, loss_name="default", hard_max=100): function get_resume_checkpoint (line 60) | def get_resume_checkpoint(checkpoint_save_dir): class DurationMeter (line 69) | class DurationMeter: method __init__ (line 70) | def __init__(self, name, device, fmt=":f"): method reset (line 76) | def reset(self): method update (line 79) | def update(self, val): method add (line 82) | def add(self, val): method __str__ (line 85) | def __str__(self): function human_readable_time (line 89) | def human_readable_time(time_seconds): class ProgressMeter (line 98) | class ProgressMeter: method __init__ (line 99) | def __init__(self, num_batches, meters, real_meters, prefix=""): method display (line 105) | def display(self, batch): method _get_batch_fmtstr (line 119) | def _get_batch_fmtstr(self, num_batches): class _CopyableData (line 127) | class _CopyableData(Protocol): method to (line 128) | def to(self, device: torch.device, *args: Any, **kwargs: Any): function _is_named_tuple (line 133) | def _is_named_tuple(x) -> bool: function copy_data_to_device (line 137) | def copy_data_to_device(data, device: torch.device, *args: Any, **kwargs... function safe_makedirs (line 197) | def safe_makedirs(path: str): function set_seeds (line 215) | def set_seeds(seed_value, max_epochs, dist_rank): function log_env_variables (line 233) | def log_env_variables(): function is_dist_avail_and_initialized (line 243) | def is_dist_avail_and_initialized(): class AverageMeter (line 252) | class AverageMeter: method __init__ (line 260) | def __init__(self, name: str, device: Optional[torch.device] = None, f... method reset (line 266) | def reset(self): method update (line 273) | def update(self, val, n=1): method __str__ (line 282) | def __str__(self) -> str: method value (line 288) | def value(self) -> float: method average (line 293) | def average(self) -> float: function pretty_int (line 302) | def pretty_int(n: int) -> str: function model_summary (line 313) | def model_summary(model: torch.nn.Module, function get_rank (line 364) | def get_rank(): FILE: training/train_utils/gradient_clip.py class GradientClipper (line 12) | class GradientClipper: method __init__ (line 17) | def __init__(self, configs, *args, **kwargs): method setup_clipping (line 40) | def setup_clipping(self, model: nn.Module) -> None: method __call__ (line 80) | def __call__(self, model: nn.Module) -> Optional[torch.Tensor]: FILE: training/train_utils/logging.py function _cached_log_stream (line 22) | def _cached_log_stream(filename): function setup_logging (line 30) | def setup_logging( FILE: training/train_utils/normalization.py function check_valid_tensor (line 14) | def check_valid_tensor(input_tensor: Optional[torch.Tensor], name: str =... function normalize_camera_extrinsics_and_points_batch (line 27) | def normalize_camera_extrinsics_and_points_batch( FILE: training/train_utils/optimizer.py class OptimizerWrapper (line 20) | class OptimizerWrapper: method __init__ (line 23) | def __init__(self, optimizer: torch.optim.Optimizer, schedulers=None) ... method step (line 33) | def step(self, where: float = 1.0, closure=None): method zero_grad (line 38) | def zero_grad(self, *args, **kwargs): method _validate_optimizer_schedulers (line 41) | def _validate_optimizer_schedulers(self): method step_schedulers (line 51) | def step_schedulers(self, where: float) -> None: function validate_param_group_params (line 64) | def validate_param_group_params(param_groups: List[Dict], model: nn.Modu... function get_full_parameter_name (line 96) | def get_full_parameter_name(module_name: str, param_name: str) -> str: function get_module_cls_to_param_names (line 100) | def get_module_cls_to_param_names(model: nn.Module) -> Dict[type, Set[st... function unix_param_pattern_to_parameter_names (line 111) | def unix_param_pattern_to_parameter_names(filter_param_names: Union[List... function unix_module_cls_pattern_to_parameter_names (line 125) | def unix_module_cls_pattern_to_parameter_names(filter_module_cls_names: ... function _unix_pattern_to_parameter_names (line 142) | def _unix_pattern_to_parameter_names(scheduler_cfg, function set_default_parameters (line 161) | def set_default_parameters(scheduler_cfgs: List[dict], all_parameter_nam... function name_constraints_to_parameters (line 180) | def name_constraints_to_parameters(param_constraints: List[Set[str]], function map_scheduler_cfgs_to_param_groups (line 186) | def map_scheduler_cfgs_to_param_groups(all_scheduler_cfgs: Iterable[List... function construct_optimizer (line 208) | def construct_optimizer(model: nn.Module, function construct_optimizers (line 262) | def construct_optimizers(model: nn.Module, optim_conf) -> Union[List[Opt... FILE: training/train_utils/tb_writer.py class TensorBoardLogger (line 18) | class TensorBoardLogger: method __init__ (line 25) | def __init__( method writer (line 62) | def writer(self) -> Optional[SummaryWriter]: method path (line 67) | def path(self) -> str: method flush (line 71) | def flush(self) -> None: method close (line 76) | def close(self) -> None: method log_dict (line 85) | def log_dict(self, payload: Dict[str, Any], step: int) -> None: method log (line 98) | def log(self, name: str, data: Any, step: int) -> None: method log_visuals (line 111) | def log_visuals( FILE: training/trainer.py class Trainer (line 46) | class Trainer: method __init__ (line 60) | def __init__( method _setup_timers (line 170) | def _setup_timers(self): method _setup_env_variables (line 175) | def _setup_env_variables(self, env_variables_conf: Optional[Dict[str, ... method _setup_torch_dist_and_backend (line 182) | def _setup_torch_dist_and_backend(self, cuda_conf: Dict, distributed_c... method _load_resuming_checkpoint (line 198) | def _load_resuming_checkpoint(self, ckpt_path: str): method _setup_device (line 228) | def _setup_device(self, device: str): method _setup_components (line 239) | def _setup_components(self): method _setup_dataloaders (line 273) | def _setup_dataloaders(self): method _setup_ddp_distributed_training (line 289) | def _setup_ddp_distributed_training(self, distributed_conf: Dict, devi... method save_checkpoint (line 306) | def save_checkpoint(self, epoch: int, checkpoint_names: Optional[List[... method _get_scalar_log_keys (line 359) | def _get_scalar_log_keys(self, phase: str) -> List[str]: method run (line 365) | def run(self): method run_train (line 377) | def run_train(self): method run_val (line 403) | def run_val(self): method val_epoch (line 419) | def val_epoch(self, val_loader): method train_epoch (line 501) | def train_epoch(self, train_loader): method _run_steps_on_batch_chunks (line 638) | def _run_steps_on_batch_chunks( method _apply_batch_repetition (line 692) | def _apply_batch_repetition(self, batch: Mapping) -> Mapping: method _process_batch (line 716) | def _process_batch(self, batch: Mapping): method _step (line 738) | def _step(self, batch, model: nn.Module, phase: str, loss_meters: dict): method _update_and_log_scalars (line 760) | def _update_and_log_scalars(self, data: Mapping, phase: str, step: int... method _log_tb_visuals (line 772) | def _log_tb_visuals(self, batch: Mapping, phase: str, step: int) -> None: function chunk_batch_for_accum_steps (line 823) | def chunk_batch_for_accum_steps(batch: Mapping, accum_steps: int) -> Lis... function is_sequence_of_primitives (line 829) | def is_sequence_of_primitives(data: Any) -> bool: function get_chunk_from_data (line 838) | def get_chunk_from_data(data: Any, chunk_id: int, num_chunks: int) -> Any: FILE: vggt/dependency/distortion.py function _is_numpy (line 14) | def _is_numpy(x: ArrayLike) -> bool: function _is_torch (line 18) | def _is_torch(x: ArrayLike) -> bool: function _ensure_torch (line 22) | def _ensure_torch(x: ArrayLike) -> torch.Tensor: function single_undistortion (line 32) | def single_undistortion(params, tracks_normalized): function iterative_undistortion (line 51) | def iterative_undistortion(params, tracks_normalized, max_iterations=100... function apply_distortion (line 99) | def apply_distortion(extra_params, u, v): FILE: vggt/dependency/np_to_pycolmap.py function batch_np_matrix_to_pycolmap (line 12) | def batch_np_matrix_to_pycolmap( function pycolmap_to_batch_np_matrix (line 148) | def pycolmap_to_batch_np_matrix(reconstruction, device="cpu", camera_typ... function batch_np_matrix_to_pycolmap_wo_track (line 201) | def batch_np_matrix_to_pycolmap_wo_track( function _build_pycolmap_intri (line 293) | def _build_pycolmap_intri(fidx, intrinsics, camera_type, extra_params=No... FILE: vggt/dependency/projection.py function img_from_cam_np (line 12) | def img_from_cam_np( function project_3D_points_np (line 50) | def project_3D_points_np( function project_3D_points (line 105) | def project_3D_points(points3D, extrinsics, intrinsics=None, extra_param... function img_from_cam (line 140) | def img_from_cam(intrinsics, points_cam, extra_params=None, default=0.0): FILE: vggt/dependency/track_modules/base_track_predictor.py class BaseTrackerPredictor (line 15) | class BaseTrackerPredictor(nn.Module): method __init__ (line 16) | def __init__( method forward (line 71) | def forward(self, query_points, fmaps=None, iters=4, return_feat=False... FILE: vggt/dependency/track_modules/blocks.py class BasicEncoder (line 25) | class BasicEncoder(nn.Module): method __init__ (line 26) | def __init__(self, input_dim=3, output_dim=128, stride=4): method _make_layer (line 58) | def _make_layer(self, dim, stride=1): method forward (line 66) | def forward(self, x): class ShallowEncoder (line 90) | class ShallowEncoder(nn.Module): method __init__ (line 91) | def __init__(self, input_dim=3, output_dim=32, stride=1, norm_fn="inst... method _make_layer (line 126) | def _make_layer(self, dim, stride=1): method forward (line 132) | def forward(self, x): function _bilinear_intepolate (line 151) | def _bilinear_intepolate(x, stride, H, W): class EfficientUpdateFormer (line 155) | class EfficientUpdateFormer(nn.Module): method __init__ (line 160) | def __init__( method initialize_weights (line 210) | def initialize_weights(self): method forward (line 224) | def forward(self, input_tensor, mask=None): class CorrBlock (line 264) | class CorrBlock: method __init__ (line 265) | def __init__(self, fmaps, num_levels=4, radius=4, multiple_track_feats... method sample (line 282) | def sample(self, coords): method corr (line 309) | def corr(self, targets): FILE: vggt/dependency/track_modules/modules.py function _ntuple (line 19) | def _ntuple(n): function exists (line 28) | def exists(val): function default (line 32) | def default(val, d): class ResidualBlock (line 39) | class ResidualBlock(nn.Module): method __init__ (line 44) | def __init__(self, in_planes, planes, norm_fn="group", stride=1, kerne... method forward (line 86) | def forward(self, x): class Mlp (line 97) | class Mlp(nn.Module): method __init__ (line 100) | def __init__( method forward (line 124) | def forward(self, x): class AttnBlock (line 133) | class AttnBlock(nn.Module): method __init__ (line 134) | def __init__( method forward (line 155) | def forward(self, x, mask=None): class CrossAttnBlock (line 172) | class CrossAttnBlock(nn.Module): method __init__ (line 173) | def __init__(self, hidden_size, context_dim, num_heads=1, mlp_ratio=4.... method forward (line 190) | def forward(self, x, context, mask=None): FILE: vggt/dependency/track_modules/track_refine.py function refine_track (line 22) | def refine_track( function refine_track_v0 (line 163) | def refine_track_v0( function compute_score_fn (line 302) | def compute_score_fn(query_point_feat, patch_feat, fine_pred_track, srad... function extract_glimpse (line 381) | def extract_glimpse( FILE: vggt/dependency/track_modules/utils.py function get_2d_sincos_pos_embed (line 19) | def get_2d_sincos_pos_embed(embed_dim: int, grid_size: Union[int, Tuple[... function get_2d_sincos_pos_embed_from_grid (line 44) | def get_2d_sincos_pos_embed_from_grid(embed_dim: int, grid: torch.Tensor... function get_1d_sincos_pos_embed_from_grid (line 65) | def get_1d_sincos_pos_embed_from_grid(embed_dim: int, pos: torch.Tensor)... function get_2d_embedding (line 91) | def get_2d_embedding(xy: torch.Tensor, C: int, cat_coords: bool = True) ... function bilinear_sampler (line 125) | def bilinear_sampler(input, coords, align_corners=True, padding_mode="bo... function sample_features4d (line 186) | def sample_features4d(input, coords): FILE: vggt/dependency/track_predict.py function predict_tracks (line 12) | def predict_tracks( function _forward_on_query (line 135) | def _forward_on_query( function _augment_non_visible_frames (line 232) | def _augment_non_visible_frames( FILE: vggt/dependency/vggsfm_tracker.py class TrackerPredictor (line 25) | class TrackerPredictor(nn.Module): method __init__ (line 26) | def __init__(self, **extra_args): method forward (line 58) | def forward( method process_images_to_fmaps (line 106) | def process_images_to_fmaps(self, images): FILE: vggt/dependency/vggsfm_utils.py function build_vggsfm_tracker (line 29) | def build_vggsfm_tracker(model_path=None): function generate_rank_by_dino (line 51) | def generate_rank_by_dino( function farthest_point_sampling (line 118) | def farthest_point_sampling(distance_matrix, num_samples, most_common_fr... function calculate_index_mappings (line 153) | def calculate_index_mappings(query_index, S, device=None): function switch_tensor_order (line 174) | def switch_tensor_order(tensors, order, dim=1): function initialize_feature_extractors (line 189) | def initialize_feature_extractors(max_query_num, det_thres=0.005, extrac... function extract_keypoints (line 227) | def extract_keypoints(query_image, extractors, round_keypoints=True): function predict_tracks_in_chunks (line 255) | def predict_tracks_in_chunks( FILE: vggt/heads/camera_head.py class CameraHead (line 19) | class CameraHead(nn.Module): method __init__ (line 26) | def __init__( method forward (line 73) | def forward(self, aggregated_tokens_list: list, num_iterations: int = ... method trunk_fn (line 95) | def trunk_fn(self, pose_tokens: torch.Tensor, num_iterations: int) -> ... function modulate (line 144) | def modulate(x: torch.Tensor, shift: torch.Tensor, scale: torch.Tensor) ... FILE: vggt/heads/dpt_head.py class DPTHead (line 21) | class DPTHead(nn.Module): method __init__ (line 43) | def __init__( method forward (line 115) | def forward( method _forward_impl (line 172) | def _forward_impl( method _apply_pos_embed (line 249) | def _apply_pos_embed(self, x: torch.Tensor, W: int, H: int, ratio: flo... method scratch_forward (line 261) | def scratch_forward(self, features: List[torch.Tensor]) -> torch.Tensor: function _make_fusion_block (line 299) | def _make_fusion_block(features: int, size: int = None, has_residual: bo... function _make_scratch (line 313) | def _make_scratch(in_shape: List[int], out_shape: int, groups: int = 1, ... class ResidualConvUnit (line 344) | class ResidualConvUnit(nn.Module): method __init__ (line 347) | def __init__(self, features, activation, bn, groups=1): method forward (line 366) | def forward(self, x): class FeatureFusionBlock (line 389) | class FeatureFusionBlock(nn.Module): method __init__ (line 392) | def __init__( method forward (line 432) | def forward(self, *xs, size=None): function custom_interpolate (line 459) | def custom_interpolate( FILE: vggt/heads/head_act.py function activate_pose (line 12) | def activate_pose(pred_pose_enc, trans_act="linear", quat_act="linear", ... function base_pose_act (line 38) | def base_pose_act(pose_enc, act_type="linear"): function activate_head (line 61) | def activate_head(out, activation="norm_exp", conf_activation="expp1"): function inverse_log_transform (line 115) | def inverse_log_transform(y): FILE: vggt/heads/track_head.py class TrackHead (line 12) | class TrackHead(nn.Module): method __init__ (line 18) | def __init__( method forward (line 72) | def forward(self, aggregated_tokens_list, images, patch_start_idx, que... FILE: vggt/heads/track_modules/base_track_predictor.py class BaseTrackerPredictor (line 17) | class BaseTrackerPredictor(nn.Module): method __init__ (line 18) | def __init__( method forward (line 82) | def forward(self, query_points, fmaps=None, iters=6, return_feat=False... FILE: vggt/heads/track_modules/blocks.py class EfficientUpdateFormer (line 19) | class EfficientUpdateFormer(nn.Module): method __init__ (line 24) | def __init__( method initialize_weights (line 80) | def initialize_weights(self): method forward (line 90) | def forward(self, input_tensor, mask=None): class CorrBlock (line 137) | class CorrBlock: method __init__ (line 138) | def __init__(self, fmaps, num_levels=4, radius=4, multiple_track_feats... method corr_sample (line 176) | def corr_sample(self, targets, coords): function compute_corr_level (line 231) | def compute_corr_level(fmap1, fmap2s, C): FILE: vggt/heads/track_modules/modules.py function _ntuple (line 19) | def _ntuple(n): function exists (line 28) | def exists(val): function default (line 32) | def default(val, d): class ResidualBlock (line 39) | class ResidualBlock(nn.Module): method __init__ (line 44) | def __init__(self, in_planes, planes, norm_fn="group", stride=1, kerne... method forward (line 86) | def forward(self, x): class Mlp (line 97) | class Mlp(nn.Module): method __init__ (line 100) | def __init__( method forward (line 124) | def forward(self, x): class AttnBlock (line 133) | class AttnBlock(nn.Module): method __init__ (line 134) | def __init__( method forward (line 156) | def forward(self, x, mask=None): class CrossAttnBlock (line 173) | class CrossAttnBlock(nn.Module): method __init__ (line 174) | def __init__(self, hidden_size, context_dim, num_heads=1, mlp_ratio=4.... method forward (line 192) | def forward(self, x, context, mask=None): FILE: vggt/heads/track_modules/utils.py function get_2d_sincos_pos_embed (line 18) | def get_2d_sincos_pos_embed(embed_dim: int, grid_size: Union[int, Tuple[... function get_2d_sincos_pos_embed_from_grid (line 43) | def get_2d_sincos_pos_embed_from_grid(embed_dim: int, grid: torch.Tensor... function get_1d_sincos_pos_embed_from_grid (line 64) | def get_1d_sincos_pos_embed_from_grid(embed_dim: int, pos: torch.Tensor)... function get_2d_embedding (line 90) | def get_2d_embedding(xy: torch.Tensor, C: int, cat_coords: bool = True) ... function bilinear_sampler (line 124) | def bilinear_sampler(input, coords, align_corners=True, padding_mode="bo... function sample_features4d (line 193) | def sample_features4d(input, coords): FILE: vggt/heads/utils.py function position_grid_to_embed (line 11) | def position_grid_to_embed(pos_grid: torch.Tensor, embed_dim: int, omega... function make_sincos_pos_embed (line 36) | def make_sincos_pos_embed(embed_dim: int, pos: torch.Tensor, omega_0: fl... function create_uv_grid (line 66) | def create_uv_grid( FILE: vggt/layers/attention.py class Attention (line 21) | class Attention(nn.Module): method __init__ (line 22) | def __init__( method forward (line 50) | def forward(self, x: Tensor, pos=None) -> Tensor: class MemEffAttention (line 75) | class MemEffAttention(Attention): method forward (line 76) | def forward(self, x: Tensor, attn_bias=None, pos=None) -> Tensor: FILE: vggt/layers/block.py class Block (line 27) | class Block(nn.Module): method __init__ (line 28) | def __init__( method forward (line 77) | def forward(self, x: Tensor, pos=None) -> Tensor: function drop_add_residual_stochastic_depth (line 101) | def drop_add_residual_stochastic_depth( function get_branges_scales (line 128) | def get_branges_scales(x, sample_drop_ratio=0.0): function add_residual (line 136) | def add_residual(x, brange, residual, residual_scale_factor, scaling_vec... function get_attn_bias_and_cat (line 151) | def get_attn_bias_and_cat(x_list, branges=None): function drop_add_residual_stochastic_depth_list (line 175) | def drop_add_residual_stochastic_depth_list( class NestedTensorBlock (line 198) | class NestedTensorBlock(Block): method forward_nested (line 199) | def forward_nested(self, x_list: List[Tensor]) -> List[Tensor]: method forward (line 239) | def forward(self, x_or_x_list): FILE: vggt/layers/drop_path.py function drop_path (line 14) | def drop_path(x, drop_prob: float = 0.0, training: bool = False): class DropPath (line 26) | class DropPath(nn.Module): method __init__ (line 29) | def __init__(self, drop_prob=None): method forward (line 33) | def forward(self, x): FILE: vggt/layers/layer_scale.py class LayerScale (line 15) | class LayerScale(nn.Module): method __init__ (line 16) | def __init__(self, dim: int, init_values: Union[float, Tensor] = 1e-5,... method forward (line 21) | def forward(self, x: Tensor) -> Tensor: FILE: vggt/layers/mlp.py class Mlp (line 16) | class Mlp(nn.Module): method __init__ (line 17) | def __init__( method forward (line 34) | def forward(self, x: Tensor) -> Tensor: FILE: vggt/layers/patch_embed.py function make_2tuple (line 16) | def make_2tuple(x): class PatchEmbed (line 25) | class PatchEmbed(nn.Module): method __init__ (line 37) | def __init__( method forward (line 65) | def forward(self, x: Tensor) -> Tensor: method flops (line 80) | def flops(self) -> float: FILE: vggt/layers/rope.py class PositionGetter (line 24) | class PositionGetter: method __init__ (line 35) | def __init__(self): method __call__ (line 39) | def __call__(self, batch_size: int, height: int, width: int, device: t... class RotaryPositionEmbedding2D (line 62) | class RotaryPositionEmbedding2D(nn.Module): method __init__ (line 79) | def __init__(self, frequency: float = 100.0, scaling_factor: float = 1... method _compute_frequency_components (line 86) | def _compute_frequency_components( method _rotate_features (line 120) | def _rotate_features(x: torch.Tensor) -> torch.Tensor: method _apply_1d_rope (line 133) | def _apply_1d_rope( method forward (line 154) | def forward(self, tokens: torch.Tensor, positions: torch.Tensor) -> to... FILE: vggt/layers/swiglu_ffn.py class SwiGLUFFN (line 14) | class SwiGLUFFN(nn.Module): method __init__ (line 15) | def __init__( method forward (line 30) | def forward(self, x: Tensor) -> Tensor: class SwiGLUFFNFused (line 54) | class SwiGLUFFNFused(SwiGLU): method __init__ (line 55) | def __init__( FILE: vggt/layers/vision_transformer.py function named_apply (line 24) | def named_apply(fn: Callable, module: nn.Module, name="", depth_first=Tr... class BlockChunk (line 35) | class BlockChunk(nn.ModuleList): method forward (line 36) | def forward(self, x): class DinoVisionTransformer (line 42) | class DinoVisionTransformer(nn.Module): method __init__ (line 43) | def __init__( method init_weights (line 173) | def init_weights(self): method interpolate_pos_encoding (line 180) | def interpolate_pos_encoding(self, x, w, h): method prepare_tokens_with_masks (line 214) | def prepare_tokens_with_masks(self, x, masks=None): method forward_features_list (line 228) | def forward_features_list(self, x_list, masks_list): method forward_features (line 252) | def forward_features(self, x, masks=None): method _get_intermediate_layers_not_chunked (line 273) | def _get_intermediate_layers_not_chunked(self, x, n=1): method _get_intermediate_layers_chunked (line 285) | def _get_intermediate_layers_chunked(self, x, n=1): method get_intermediate_layers (line 299) | def get_intermediate_layers( method forward (line 325) | def forward(self, *args, is_training=True, **kwargs): function init_weights_vit_timm (line 333) | def init_weights_vit_timm(module: nn.Module, name: str = ""): function vit_small (line 341) | def vit_small(patch_size=16, num_register_tokens=0, **kwargs): function vit_base (line 355) | def vit_base(patch_size=16, num_register_tokens=0, **kwargs): function vit_large (line 369) | def vit_large(patch_size=16, num_register_tokens=0, **kwargs): function vit_giant2 (line 383) | def vit_giant2(patch_size=16, num_register_tokens=0, **kwargs): FILE: vggt/models/aggregator.py class Aggregator (line 25) | class Aggregator(nn.Module): method __init__ (line 52) | def __init__( method __build_patch_embed__ (line 143) | def __build_patch_embed__( method forward (line 184) | def forward(self, images: torch.Tensor) -> Tuple[List[torch.Tensor], i... method _process_frame_attention (line 260) | def _process_frame_attention(self, tokens, B, S, P, C, frame_idx, pos=... method _process_global_attention (line 284) | def _process_global_attention(self, tokens, B, S, P, C, global_idx, po... function slice_expand_and_flatten (line 308) | def slice_expand_and_flatten(token_tensor, B, S): FILE: vggt/models/vggt.py class VGGT (line 17) | class VGGT(nn.Module, PyTorchModelHubMixin): method __init__ (line 18) | def __init__(self, img_size=518, patch_size=14, embed_dim=1024, method forward (line 29) | def forward(self, images: torch.Tensor, query_points: torch.Tensor = N... FILE: vggt/utils/geometry.py function unproject_depth_map_to_point_map (line 15) | def unproject_depth_map_to_point_map( function depth_to_world_coords_points (line 47) | def depth_to_world_coords_points( function depth_to_cam_coords_points (line 87) | def depth_to_cam_coords_points(depth_map: np.ndarray, intrinsic: np.ndar... function closed_form_inverse_se3 (line 120) | def closed_form_inverse_se3(se3, R=None, T=None): function project_world_points_to_camera_points_batch (line 175) | def project_world_points_to_camera_points_batch(world_points, cam_extrin... function project_world_points_to_cam (line 204) | def project_world_points_to_cam( function img_from_cam (line 251) | def img_from_cam(cam_intrinsics, cam_points, distortion_params=None, def... function cam_from_img (line 294) | def cam_from_img(pred_tracks, intrinsics, extra_params=None): FILE: vggt/utils/helper.py function randomly_limit_trues (line 10) | def randomly_limit_trues(mask: np.ndarray, max_trues: int) -> np.ndarray: function create_pixel_coordinate_grid (line 33) | def create_pixel_coordinate_grid(num_frames, height, width): FILE: vggt/utils/load_fn.py function load_and_preprocess_images_square (line 13) | def load_and_preprocess_images_square(image_path_list, target_size=1024): function load_and_preprocess_images (line 97) | def load_and_preprocess_images(image_path_list, mode="crop"): FILE: vggt/utils/pose_enc.py function extri_intri_to_pose_encoding (line 11) | def extri_intri_to_pose_encoding( function pose_encoding_to_extri_intri (line 62) | def pose_encoding_to_extri_intri( FILE: vggt/utils/rotation.py function quat_to_mat (line 14) | def quat_to_mat(quaternions: torch.Tensor) -> torch.Tensor: function mat_to_quat (line 47) | def mat_to_quat(matrix: torch.Tensor) -> torch.Tensor: function _sqrt_positive_part (line 106) | def _sqrt_positive_part(x: torch.Tensor) -> torch.Tensor: function standardize_quaternion (line 120) | def standardize_quaternion(quaternions: torch.Tensor) -> torch.Tensor: FILE: vggt/utils/visual_track.py function color_from_xy (line 13) | def color_from_xy(x, y, W, H, cmap_name="hsv"): function get_track_colors_by_position (line 37) | def get_track_colors_by_position(tracks_b, vis_mask_b=None, image_width=... function visualize_tracks_on_images (line 80) | def visualize_tracks_on_images( FILE: visual_util.py function predictions_to_glb (line 18) | def predictions_to_glb( function integrate_camera_into_scene (line 218) | def integrate_camera_into_scene(scene: trimesh.Scene, transform: np.ndar... function apply_scene_alignment (line 263) | def apply_scene_alignment(scene_3d: trimesh.Scene, extrinsics_matrices: ... function get_opengl_conversion_matrix (line 287) | def get_opengl_conversion_matrix() -> np.ndarray: function transform_points (line 304) | def transform_points(transformation: np.ndarray, points: np.ndarray, dim... function compute_camera_faces (line 329) | def compute_camera_faces(cone_shape: trimesh.Trimesh) -> np.ndarray: function segment_sky (line 365) | def segment_sky(image_path, onnx_session, mask_filename=None): function run_skyseg (line 396) | def run_skyseg(onnx_session, input_size, image): function download_file_from_url (line 436) | def download_file_from_url(url, filename):