MCPcopy Create free account

hub / github.com/ByteDance-Seed/Depth-Anything-3 / functions

Functions731 in github.com/ByteDance-Seed/Depth-Anything-3

↓ 1 callersMethod_process_results
Process model results into structured data. Args: target_dir: Directory containing results prediction: Model
src/depth_anything_3/app/modules/model_inference.py:216
↓ 1 callersMethod_process_video
Process video file and extract frames. Args: input_video: Path to input video file target_dir_images: Target
src/depth_anything_3/app/modules/file_handlers.py:155
↓ 1 callersMethod_project_with_stable_colors
X: (N,D) where N = H*W Returns PCs_raw: (N,3) using stable basis (fixed or Procrustes-aligned)
src/depth_anything_3/utils/pca_utils.py:207
↓ 1 callersFunction_rand_pose
()
src/depth_anything_3/utils/pose_align.py:302
↓ 1 callersFunction_ransac_align_sim3
( pose_ref, pose_est, sub_n=None, inlier_thresh=None, max_iters=10, random_state=None )
src/depth_anything_3/utils/pose_align.py:111
↓ 1 callersMethod_resize_image
(self, img: Image.Image, target_size: int, method: str)
src/depth_anything_3/utils/io/input_processor.py:316
↓ 1 callersMethod_resize_longest_side
(self, img: Image.Image, target_size: int)
src/depth_anything_3/utils/io/input_processor.py:324
↓ 1 callersMethod_resize_shortest_side
(self, img: Image.Image, target_size: int)
src/depth_anything_3/utils/io/input_processor.py:336
↓ 1 callersMethod_resolve_sequential
(self, sequential: bool | None, num_workers: int)
src/depth_anything_3/utils/io/input_processor.py:117
↓ 1 callersMethod_rotate_features
Performs feature rotation by splitting and recombining feature dimensions. Args: x: Input tensor to rotate. Returns:
src/depth_anything_3/model/dinov2/layers/rope.py:121
↓ 1 callersMethod_run_model_forward
Run model forward pass.
src/depth_anything_3/api.py:367
↓ 1 callersMethod_run_parallel
( self, *, image: list[np.ndarray | Image.Image | str], exts_list: list[np.nda
src/depth_anything_3/utils/io/input_processor.py:134
↓ 1 callersMethod_sample_frames
Sample frames if scene has more than max_frames. Uses fixed random seed (42) for reproducibility. Args: scene_d
src/depth_anything_3/bench/evaluator.py:427
↓ 1 callersMethod_save_predictions_cache
Save predictions data to predictions.npz for caching. Args: target_dir: Directory to save the cache predicti
src/depth_anything_3/app/modules/model_inference.py:177
↓ 1 callersFunction_schedule_task_cleanup
Schedule task cleanup in background.
src/depth_anything_3/services/backend.py:437
↓ 1 callersMethod_setup_event_handlers
Set up all event handlers for the application. Args: demo: Gradio Blocks interface All other arguments: Grad
src/depth_anything_3/app/gradio_app.py:304
↓ 1 callersMethod_setup_example_scene_handlers
Set up example scene handlers.
src/depth_anything_3/app/gradio_app.py:537
↓ 1 callersMethod_setup_navigation_handlers
Set up navigation handlers for measure tab.
src/depth_anything_3/app/gradio_app.py:487
↓ 1 callersMethod_setup_visualization_handlers
Set up visualization update handlers.
src/depth_anything_3/app/gradio_app.py:457
↓ 1 callersMethod_should_filter_image
Check if image should be filtered out based on known problematic views.
src/depth_anything_3/bench/datasets/eth3d.py:166
↓ 1 callersFunction_sqrt_positive_part
Returns torch.sqrt(torch.max(0, x)) but with a zero subgradient where x is 0.
src/depth_anything_3/utils/geometry.py:189
↓ 1 callersFunction_sqrt_positive_part
Returns torch.sqrt(torch.max(0, x)) but with a zero subgradient where x is 0.
src/depth_anything_3/model/utils/transform.py:155
↓ 1 callersMethod_stack_batch
(self, processed_images: list[torch.Tensor])
src/depth_anything_3/utils/io/input_processor.py:213
↓ 1 callersMethod_unify_batch_shapes
Center-crop all tensors to the smallest H, W; adjust intrinsics' cx, cy accordingly.
src/depth_anything_3/utils/io/input_processor.py:180
↓ 1 callersMethod_unpack_results
results: List[Tuple[torch.Tensor, Tuple[H, W], Optional[np.ndarray], Optional[np.ndarray]]] -> processed_images, out_sizes, out_intri
src/depth_anything_3/utils/io/input_processor.py:165
↓ 1 callersMethod_validate_and_pack_meta
( self, images: list[np.ndarray | Image.Image | str], extrinsics: np.ndarray | None,
src/depth_anything_3/utils/io/input_processor.py:120
↓ 1 callersMethodabsolute_to_sequential_transforms
Convert absolute pose sequence back to sequential relative transforms T_0, T_1, T_2, ... -> S_01, S_12, S_23, ...
da3_streaming/loop_utils/sim3loop.py:100
↓ 1 callersFunctionaccumulate_sim3_transforms
Accumulate adjacent SIM(3) transforms into transforms from the initial frame to each subsequent frame. Args: transforms: list, each
da3_streaming/loop_utils/sim3utils.py:28
↓ 1 callersFunctionactivate_head_gs
Process network output to extract GS params and density values. Density could be view-dependent as SH coefficient Args: out: Ne
src/depth_anything_3/model/utils/head_utils.py:25
↓ 1 callersMethodall
Run complete evaluation pipeline: inference + evaluation. Args: api: DepthAnything3 API instance Returns:
src/depth_anything_3/bench/evaluator.py:121
↓ 1 callersFunctionapply_color_map
( x: torch.Tensor, # " *batch" color_map: str = "inferno", )
src/depth_anything_3/utils/visualize.py:102
↓ 1 callersFunctionapply_color_map_to_image
( image: torch.Tensor, # "*batch height width" color_map: str = "inferno", )
src/depth_anything_3/utils/visualize.py:115
↓ 1 callersFunctionapply_metric_scaling
Apply metric scaling to depth based on camera intrinsics. Args: depth: Input depth tensor intrinsics: Camera intrinsics tens
src/depth_anything_3/utils/alignment.py:118
↓ 1 callersFunctionapply_sim3_direct_torch
PyTorch SIM3 point_maps: (b, h, w, 3) numpy array s: scalar or (b,) array R: (3, 3) or (b, 3, 3) numpy array t: (3,) or (b, 3) nu
da3_streaming/loop_utils/alignment_torch.py:207
↓ 1 callersFunctionbatch_align_poses_umeyama
(ext_ref: torch.Tensor, ext_est: torch.Tensor)
src/depth_anything_3/utils/pose_align.py:50
↓ 1 callersFunctionbuild_group_list
(root_dir: str)
src/depth_anything_3/services/gallery.py:641
↓ 1 callersFunctionbuild_group_list
Build list of groups from gallery directory.
src/depth_anything_3/services/backend.py:490
↓ 1 callersFunctionbuild_group_manifest
(root_dir: str, group: str)
src/depth_anything_3/services/gallery.py:668
↓ 1 callersFunctionbuild_group_manifest
Build manifest for a specific group.
src/depth_anything_3/services/backend.py:518
↓ 1 callersMethodbuild_loop_constraints
Build loop closure constraints
da3_streaming/loop_utils/sim3loop.py:123
↓ 1 callersFunctionbuild_pair_index
Build indices for all possible pairs of frames. Args: N: Number of frames B: Batch size Returns: i1, i2: Indice
src/depth_anything_3/bench/utils.py:291
↓ 1 callersFunctioncam_quat_xyzw_to_world_quat_wxyz
(cam_quat_xyzw, c2w)
src/depth_anything_3/model/utils/transform.py:184
↓ 1 callersFunctioncamera_space_to_world_space
Convert camera space points to world space points. Args: camera_space_points (torch.Tensor): Camera space points with shape (b, v, h
src/depth_anything_3/utils/geometry.py:382
↓ 1 callersFunctioncamray_to_caminfo
Args: camray: (B, S, num_patches_y, num_patches_x, 6) confidence: (B, S, num_patches_y, num_patches_x) Returns: R: (B
src/depth_anything_3/utils/ray_utils.py:435
↓ 1 callersFunctioncompare_translation_by_angle
Normalize the translation vectors and compute the angle between them. Args: t_gt: Ground truth translation vectors t: Predic
src/depth_anything_3/bench/utils.py:407
↓ 1 callersFunctioncompute_alignment_mask
Compute mask for depth alignment based on confidence and depth thresholds. Args: depth_conf: Depth confidence tensor non_sky
src/depth_anything_3/utils/alignment.py:68
↓ 1 callersFunctioncompute_chunk_scale_advanced
method: 'auto', 'ransac', 'weighted'
da3_streaming/loop_utils/sim3utils.py:1107
↓ 1 callersFunctioncompute_optimal_rotation_intrinsics_batch
Args: rays_origin (torch.Tensor): (B, N, 3) rays_target (torch.Tensor): (B, N, 3) z_threshold (float): Threshold for z va
src/depth_anything_3/utils/ray_utils.py:20
↓ 1 callersFunctioncompute_sim3_ab
(S_a, S_b)
da3_streaming/loop_utils/sim3utils.py:534
↓ 1 callersFunctioncopy_file
(src_path, dst_dir)
da3_streaming/da3_streaming.py:862
↓ 1 callersMethodcreate_3d_viewer_section
Create the 3D viewer component. Returns: 3D model viewer component
src/depth_anything_3/app/modules/ui_components.py:66
↓ 1 callersMethodcreate_acknowledgements_section
Create the acknowledgements section. Returns: Acknowledgements HTML component
src/depth_anything_3/app/modules/ui_components.py:468
↓ 1 callersFunctioncreate_app
Create FastAPI application with model backend.
src/depth_anything_3/services/backend.py:559
↓ 1 callersMethodcreate_app
Create and configure the Gradio application. Returns: Configured Gradio Blocks interface
src/depth_anything_3/app/gradio_app.py:158
↓ 1 callersMethodcreate_description_section
Create the description section. Returns: Description HTML component
src/depth_anything_3/app/modules/ui_components.py:457
↓ 1 callersMethodcreate_display_control_section
Create the display control section (options for visualization). Returns: Tuple of display control components including b
src/depth_anything_3/app/modules/ui_components.py:233
↓ 1 callersMethodcreate_example_scene_grid
Create the example scene grid. Args: scenes: List of scene information dictionaries Returns: List o
src/depth_anything_3/app/modules/ui_components.py:403
↓ 1 callersMethodcreate_example_scenes_section
Create the example scenes section. Returns: List of scene information dictionaries
src/depth_anything_3/app/modules/ui_components.py:387
↓ 1 callersMethodcreate_header_section
Create the header section with logo and title. Returns: Header HTML component
src/depth_anything_3/app/modules/ui_components.py:446
↓ 1 callersMethodcreate_inference_control_section
Create the inference control section (before inference). Returns: Tuple of (process_res_method_dropdown, infer_gs, ref_v
src/depth_anything_3/app/modules/ui_components.py:198
↓ 1 callersMethodcreate_measure_section
Create the measurement section. Returns: A tuple of (prev_measure_btn, measure_view_selector, next_measure_btn, measure_
src/depth_anything_3/app/modules/ui_components.py:138
↓ 1 callersMethodcreate_nvs_video
Create the 3DGS rendered video display component and info message. Returns: Tuple of (video component, info message comp
src/depth_anything_3/app/modules/ui_components.py:82
↓ 1 callersFunctioncreate_point_cloud
(npz_folder, pose_file, output_ply, conf_threshold_coef, sample_ratio=1.0)
da3_streaming/npz_output_process.py:22
↓ 1 callersFunctioncreate_ring_transforms
Generate a ring of Sim3 transforms with rotation, adding slight rotational noise
da3_streaming/loop_utils/sim3loop.py:323
↓ 1 callersMethodcreate_upload_section
Create the upload section with video, images, and gallery components. Returns: A tuple of Gradio components: (input_vide
src/depth_anything_3/app/modules/ui_components.py:36
↓ 1 callersMethoddebug
(self, *args, **kwargs)
src/depth_anything_3/utils/logger.py:70
↓ 1 callersFunctiondepth_to_point_cloud_optimized_torch
(depth, intrinsics, extrinsics, device=None)
da3_streaming/loop_utils/alignment_torch.py:256
↓ 1 callersFunctiondetect_input_type
Detect input type from path. Returns: - "image": Single image file - "images": Directory containing images - "video"
src/depth_anything_3/cli.py:57
↓ 1 callersFunctiondrop_path
(x, drop_prob: float = 0.0, training: bool = False)
src/depth_anything_3/model/dinov2/layers/drop_path.py:15
↓ 1 callersFunctionestimate_memory_requirement
Heuristic estimate for memory usage (GB) based on image count and resolution. This mirrors the simple policy used by the backend service so other
src/depth_anything_3/utils/memory.py:110
↓ 1 callersFunctionestimate_sim3
(source_points, target_points)
da3_streaming/loop_utils/sim3utils.py:59
↓ 1 callersFunctioneuler_to_matrix
( rotations: torch.Tensor, # "*batch 3" pattern: str, )
src/depth_anything_3/utils/camera_trj_helpers.py:246
↓ 1 callersMethodeval_pose
Evaluate camera pose estimation accuracy. Args: scene: Scene identifier result_path: Path to .npz file conta
src/depth_anything_3/bench/dataset.py:74
↓ 1 callersFunctionexample_usage
()
da3_streaming/loop_utils/sim3loop.py:351
↓ 1 callersFunctionexport
( prediction: Prediction, export_format: str, export_dir: str, **kwargs, )
src/depth_anything_3/utils/export/__init__.py:25
↓ 1 callersFunctionexport_ply
( means: Tensor, # "gaussian 3" scales: Tensor, # "gaussian 3" rotations: Tensor, # "gaussian 4
src/depth_anything_3/utils/gsply_helpers.py:39
↓ 1 callersFunctionexport_to_colmap
( prediction: Prediction, export_dir: str, image_paths: list[str], conf_thresh_percentile: flo
src/depth_anything_3/utils/export/colmap.py:28
↓ 1 callersFunctionexport_to_feat_vis
Export feature visualization with PCA. Args: prediction: Model prediction containing feature maps export_dir: Directory to export
src/depth_anything_3/utils/export/feat_vis.py:26
↓ 1 callersFunctionexport_to_gs_ply
( prediction: Prediction, export_dir: str, gs_views_interval: Optional[ int ] = 1, #
src/depth_anything_3/utils/export/gs.py:33
↓ 1 callersFunctionexport_to_mini_npz
( prediction: Prediction, export_dir: str, )
src/depth_anything_3/utils/export/npz.py:54
↓ 1 callersFunctionexport_to_npz
( prediction: Prediction, export_dir: str, )
src/depth_anything_3/utils/export/npz.py:23
↓ 1 callersFunctionextri_intri_to_pose_encoding
Convert camera extrinsics and intrinsics to a compact pose encoding.
src/depth_anything_3/model/utils/transform.py:19
↓ 1 callersMethodfit_reference
Fit global mean/V3 and initialize percentiles from a reference set. frames: ndarray (T,H,W,D) or list of (H,W,D)
src/depth_anything_3/utils/pca_utils.py:167
↓ 1 callersMethodforward
Forward pass through the model. Args: image: Input batch with shape ``(B, N, 3, H, W)`` on the model device.
src/depth_anything_3/api.py:100
↓ 1 callersMethodfuse3d
Fuse per-view depth maps into a single point cloud. Args: scene: Scene identifier result_path: Path to .npz
src/depth_anything_3/bench/dataset.py:125
↓ 1 callersFunctiongallery
()
src/depth_anything_3/services/gallery.py:759
↓ 1 callersFunctiongenerate_rotation_coordinate_frame
Generate a coordinate frame where the Y direction is normal to the plane defined by unit vectors a and b. The other axes are arbitrary.
src/depth_anything_3/utils/camera_trj_helpers.py:214
↓ 1 callersFunctiongenerate_wobble_transformation
( radius: torch.Tensor, # "*#batch" t: torch.Tensor, # " time_step" num_rotations: int = 1,
src/depth_anything_3/utils/camera_trj_helpers.py:409
↓ 1 callersFunctionget_acknowledgements_html
Generate the acknowledgements section HTML. Returns: str: HTML string for the acknowledgements
src/depth_anything_3/app/css_and_html.py:481
↓ 1 callersFunctionget_all_models
Scans all YAML files in the configs directory and returns a sorted dictionary where: - Keys are model names (YAML filenames without the .yaml
src/depth_anything_3/registry.py:19
↓ 1 callersMethodget_chunk_indices
(self)
da3_streaming/da3_streaming.py:308
↓ 1 callersFunctionget_conf_thresh
( prediction: Prediction, sky_mask: np.ndarray, conf_thresh: float, conf_thresh_percentile: fl
src/depth_anything_3/utils/export/glb.py:35
↓ 1 callersMethodget_data
Collect per-view image paths, intrinsics/extrinsics, and GT masks. Args: scene: Scene identifier (e.g., "scan1")
src/depth_anything_3/bench/datasets/dtu.py:93
↓ 1 callersFunctionget_description_html
Generate the main description and getting started HTML. Returns: str: HTML string for the description
src/depth_anything_3/app/css_and_html.py:428
↓ 1 callersFunctionget_env_log_level
()
src/depth_anything_3/utils/logger.py:32
↓ 1 callersFunctionget_extrinsic_from_camray
(camray, conf, patch_size_y, patch_size_x, training=False)
src/depth_anything_3/utils/ray_utils.py:506
↓ 1 callersFunctionget_fov
(intrinsics: torch.Tensor)
src/depth_anything_3/utils/geometry.py:316
↓ 1 callersFunctionget_gradio_theme
Get the configured Gradio theme with adaptive tech colors. Returns: gr.themes.Base: Configured Gradio theme
src/depth_anything_3/app/css_and_html.py:538
↓ 1 callersFunctionget_header_html
Generate the main header HTML with logo and title. Args: logo_base64 (str, optional): Base64 encoded logo image Returns:
src/depth_anything_3/app/css_and_html.py:361
↓ 1 callersMethodget_intermediate_layers
( self, x: torch.Tensor, n: Union[int, Sequence] = 1, # Layers or n last layers to ta
src/depth_anything_3/model/dinov2/vision_transformer.py:372
← previousnext →301–400 of 731, ranked by callers