MCPcopy Create free account

hub / github.com/Yukun-Huang/DreamCube / functions

Functions331 in github.com/Yukun-Huang/DreamCube

↓ 1 callersFunctionconvert_rgbd_cube_to_3dgs
Given an equirectangular RGB-D image, back-project each pixel to a 3D point and compute the corresponding 3D Gaussian covariance so that the
utils/pano_to_3d.py:795
↓ 1 callersFunctionconvert_rgbd_cube_to_mesh
Converts panoramic RGBD data (image, distance, rays) into an Open3D mesh. Args: rgb: Input RGB image tensor (M, H, W, 3), uint8 or f
utils/pano_to_3d.py:616
↓ 1 callersFunctionconvert_rgbd_equi_to_3dgs
Given an equirectangular RGB-D image, back-project each pixel to a 3D point and compute the corresponding 3D Gaussian covariance so that the
utils/pano_to_3d.py:245
↓ 1 callersFunctionconvert_rgbd_equi_to_mesh
Converts panoramic RGBD data (image, distance, rays) into an Open3D mesh. Args: image: Input RGB image tensor (H, W, 3), uint8 or fl
utils/pano_to_3d.py:80
↓ 1 callersFunctionconvert_to_one_hot
将权重矩阵转换为 one-hot 形式。对于每个像素,选择最大权重对应的索引位置为 1,其他位置为 0。 :param weights: 形状为 [B, 4, H, W] 的权重矩阵 :return: 转换后的 one-hot 矩阵,形状为 [B, 4, H, W]
models/multiplane_sync_legacy.py:41
↓ 1 callersFunctionconvert_to_one_hot
将权重矩阵转换为 one-hot 形式。对于每个像素,选择最大权重对应的索引位置为 1,其他位置为 0。 :param weights: 形状为 [B, 4, H, W] 的权重矩阵 :return: 转换后的 one-hot 矩阵,形状为 [B, 4, H, W]
models/multiplane_sync/sync_conv2d.py:34
↓ 1 callersFunctionconvert_to_two_hot
将输入的权重矩阵中每个位置上最小的两个值置0,然后重新归一化。 :param weights: 输入的权重矩阵,形状为 [B, 4, H, W] :return: 处理后的权重矩阵,形状为 [B, 4, H, W]
models/multiplane_sync/sync_conv2d.py:59
↓ 1 callersFunctioncreate_cam2global_matrix
( height: int, width: int, fov_x: float, skew: float = 0.0, dtype: torch.dtype = torch.flo
external/equilib/equi2pers/torch.py:21
↓ 1 callersFunctioncreate_cam2global_matrix
( height: int, width: int, fov_x: float, skew: float = 0.0, dtype: np.dtype = np.dtype(np.
external/equilib/equi2pers/numpy.py:18
↓ 1 callersFunctioncreate_equi_grid
( h_out: int, w_out: int, w_face: int, batch: int, dtype: torch.dtype = torch.float32,
external/equilib/cube2equi/torch.py:172
↓ 1 callersFunctioncreate_equi_grid
( h_out: int, w_out: int, w_face: int, batch: int, dtype: np.dtype = np.dtype(np.float32),
external/equilib/cube2equi/numpy.py:150
↓ 1 callersFunctioncreate_global2camera_rotation_matrix
Rotation from global (world) to camera coordinates - camera coordinate has the z-axis as forward and x- and y-axis for image. - when we rotat
external/equilib/numpy_utils/rotation.py:16
↓ 1 callersFunctioncreate_global2camera_rotation_matrix
Rotation from global (world) to camera coordinates
external/equilib/torch_utils/rotation.py:10
↓ 1 callersFunctioncreate_gradio_demo
()
app.py:404
↓ 1 callersFunctioncreate_grid
Create coordinate grid with height and width NOTE: primarly used for equi2pers `z-axis` scale is `1` params: - height (int) - w
external/equilib/numpy_utils/grid.py:8
↓ 1 callersFunctioncreate_grid
Create coordinate grid with height and width `z-axis` scale is `1` params: - height (int) - width (int) - batch (Optional[int])
external/equilib/torch_utils/grid.py:10
↓ 1 callersFunctioncreate_intrinsic_matrix
Create intrinsic matrix params: - height, width (int) - fov_x (float): make sure it's in degrees - skew (float): 0.0 - dtype (np.
external/equilib/numpy_utils/intrinsic.py:6
↓ 1 callersFunctioncreate_intrinsic_matrix
Create intrinsic matrix params: - height, width (int) - fov_x (float): make sure it's in degrees - skew (float): 0.0 - dtype (tor
external/equilib/torch_utils/intrinsic.py:13
↓ 1 callersFunctioncreate_normalized_grid
Create coordinate grid with height and width NOTE: primarly used for equi2equi params: - height (int) - width (int) - batch (Opt
external/equilib/numpy_utils/grid.py:53
↓ 1 callersFunctioncreate_normalized_grid
Create coordinate grid with height and width NOTE: primarly used for equi2equi params: - height (int) - width (int) - batch (Opt
external/equilib/torch_utils/grid.py:63
↓ 1 callersFunctioncreate_rotation_matrix
Create Rotation Matrix params: - roll, pitch, yaw (float): in radians - z_down (bool): flips pitch and yaw directions - dtype (np.dty
external/equilib/numpy_utils/rotation.py:38
↓ 1 callersFunctioncreate_rotation_matrix
Create Rotation Matrix params: - roll, pitch, yaw (float): in radians - z_down (bool): flips pitch and yaw directions - dtype (torch.
external/equilib/torch_utils/rotation.py:27
↓ 1 callersFunctioncreate_xyz_grid
xyz coordinates of the faces of the cube
external/equilib/numpy_utils/grid.py:100
↓ 1 callersFunctioncreate_xyz_grid
xyz coordinates of the faces of the cube
external/equilib/torch_utils/grid.py:119
↓ 1 callersFunctioncrop_to_fov
Crops an image to simulate reduced horizontal and vertical field of views (FOV) based on angles. Parameters: - image: PIL.Image.Imag
utils/cube.py:131
↓ 1 callersFunctioncube2equi
params: - cubemap - cube_format (str): ("dice", "horizon", "dict", "list") - height, width (int): output size - mode (str): "bili
external/equilib/cube2equi/base.py:73
↓ 1 callersFunctioncube_h2dice
(cube_h: torch.Tensor)
external/equilib/equi2cube/torch.py:57
↓ 1 callersFunctioncube_h2dice
(cube_h: np.ndarray)
external/equilib/equi2cube/numpy.py:45
↓ 1 callersFunctioncube_h2dict
(cube_h: torch.Tensor)
external/equilib/equi2cube/torch.py:42
↓ 1 callersFunctioncube_h2dict
(cube_h: np.ndarray)
external/equilib/equi2cube/numpy.py:30
↓ 1 callersFunctioncube_h2list
(cube_h: torch.Tensor)
external/equilib/equi2cube/torch.py:28
↓ 1 callersFunctioncube_h2list
(cube_h: np.ndarray)
external/equilib/equi2cube/numpy.py:22
↓ 1 callersFunctioncube_list2h
(cube_list)
external/py360convert/utils.py:181
↓ 1 callersFunctioncube_sync_conv2d_processor
(self, enable_rot_inv=False, rot_inv_mode='avg', cube_padding_impl='cuda')
models/multiplane_sync_legacy.py:348
↓ 1 callersFunctioncube_sync_conv2d_processor
(self, rot_inv_mode='none', enable_cube_padding=True)
models/multiplane_sync/processors_videocrafter2.py:81
↓ 1 callersFunctioncube_sync_conv2d_processor_for_vae
(self, rot_inv_mode='none', enable_cube_padding=True)
models/multiplane_sync/processors_videocrafter2.py:329
↓ 1 callersFunctioncube_sync_gn_processor
(self)
models/multiplane_sync/processors_videocrafter2.py:254
↓ 1 callersFunctioncube_sync_gn_processor_for_vae
(self)
models/multiplane_sync/processors_videocrafter2.py:502
↓ 1 callersFunctiondeg2rad
Function that converts angles from degrees to radians
external/equilib/torch_utils/intrinsic.py:8
↓ 1 callersMethoddenormalize
Args: normalized_depth: [B, ...], torch.FloatTensor, [-1.0, 1.0] min_value: [B,], torch.FloatTensor, [0.0, +inf]
utils/depth.py:638
↓ 1 callersFunctiondepth_to_z_distance
将深度图从直线距离转换为z距离。 :param depth_map: 输入深度图,形状为 (..., H, W, 1) 的 np.ndarray :param fov_x: 相机的水平视场角(单位:度)。 :param fov_y: 相机的垂直视场角(单位:度)。
utils/depth.py:664
↓ 1 callersFunctiondice2horizon
(dices: torch.Tensor)
external/equilib/cube2equi/torch.py:22
↓ 1 callersFunctiondice2horizon
(dices: np.ndarray)
external/equilib/cube2equi/numpy.py:20
↓ 1 callersFunctiondict2horizon
(dicts: List[Dict[str, torch.Tensor]])
external/equilib/cube2equi/torch.py:42
↓ 1 callersFunctiondict2horizon
(dicts: List[Dict[str, np.ndarray]])
external/equilib/cube2equi/numpy.py:37
↓ 1 callersFunctionequi2cube
params: - equi (np.ndarray, torch.Tensor) - rot (dict, list[dict]): {"roll", "pitch", "yaw"} - w_face (int): cube face width - cu
external/equilib/equi2cube/base.py:78
↓ 1 callersFunctionequi2equi
params: - src - rots - mode (str): interpolation mode, defaults to "bilinear" - z_down (bool) - height, width (optional int):
external/equilib/equi2equi/base.py:59
↓ 1 callersFunctionequi2pers
params: - equi - rots - height, width (int): perspective size - fov_x (float): perspective image fov of x-axis - z_down (bool
external/equilib/equi2pers/base.py:87
↓ 1 callersMethodexport_depth_to_16bit_png
( depth: Union[np.ndarray, torch.Tensor, List[np.ndarray], List[torch.Tensor]], val_min: float
utils/depth.py:431
↓ 1 callersFunctiongenerate_cubemap_triangles
Generate triangle indices for a closed cube mesh from a CubeMap of shape [6, H, W]. Returns: [N, 3] triangle index tensor
utils/pano_to_3d.py:518
↓ 1 callersFunctionget_K
(fov, height, width)
utils/camera.py:96
↓ 1 callersFunctionget_K_R
(fov, theta, phi, height, width)
utils/camera.py:115
↓ 1 callersFunctionget_R
(theta, phi)
utils/camera.py:107
↓ 1 callersFunctionget_bounding_fov
( equi: ArrayLike, rots: Rot, height: int, width: int, fov_x: float, skew: float = 0.0
external/equilib/equi2pers/base.py:168
↓ 1 callersFunctionget_dice_mask
Args: L: cube face length, int Returns: mask: np.ndarray, (3L, 4L), uint8
utils/cube.py:182
↓ 1 callersFunctionhas_same_layout
utils/ops/resample_padding.cpp:8
↓ 1 callersFunctioninference
Inference function for the DreamCube model. Args: cube_rgbs (torch.Tensor): Input RGB images of shape (B, M, C, H, W). cube_d
app.py:233
↓ 1 callersFunctioninterp2d
(q00, q10, q01, q11, dy, dx)
external/equilib/grid_sample/numpy/bilinear.py:12
↓ 1 callersFunctionlist2horizon
(lists: List[List[np.ndarray]])
external/equilib/cube2equi/numpy.py:47
↓ 1 callersFunctionmap_pers_coords
(wfov, theta, phi, h, w, output_type:str='xyz', normalize:bool=False)
utils/pers.py:146
↓ 1 callersMethodmasked_min_max
计算掩码为True的元素, 对应的最大值和最小值。 参数: input_tensor (torch.Tensor): 形状为 [B, ...] 的输入张量。 mask (torch.Tensor): 形状为 [B, ...] 的布尔
utils/depth.py:577
↓ 1 callersFunctionmatmul
(m: torch.Tensor, R: torch.Tensor)
external/equilib/equi2cube/torch.py:78
↓ 1 callersFunctionmatmul
(m: np.ndarray, R: np.ndarray, method: str = "faster")
external/equilib/equi2cube/numpy.py:64
↓ 1 callersFunctionmatmul
(m: torch.Tensor, R: torch.Tensor)
external/equilib/equi2equi/torch.py:16
↓ 1 callersFunctionmatmul
(m: np.ndarray, R: np.ndarray, method: str = "faster")
external/equilib/equi2equi/numpy.py:11
↓ 1 callersFunctionnan_to_num
(input, nan=0.0, posinf=None, neginf=None, *, out=None)
utils/ops/misc.py:48
↓ 1 callersFunctionnearest
Nearest Neighbor Interpolation Merit of using this nearest instead is that the grid doesn't need to be a cuda tensor. Although it is a little
external/equilib/grid_sample/torch/nearest.py:8
↓ 1 callersFunctionnearest
Nearest Neightbor Sampling
external/equilib/grid_sample/numpy/nearest.py:8
↓ 1 callersFunctionnormalize
(vec)
utils/camera.py:5
↓ 1 callersMethodpad_image
(image: torch.Tensor, align: int)
utils/depth.py:110
↓ 1 callersFunctionpers2pers
Args: image: np.ndarray, [H, W, C]
utils/pers.py:97
↓ 1 callersFunctionpostprocess_depth
Postprocess the generated images. Args: depths: (bs, m, h, w, 1), np.float32 Returns: dict: postprocessed depths in diffe
app.py:79
↓ 1 callersFunctionpostprocess_rgb
Postprocess the generated images. Args: images: (bs, m, h, w, 3), np.uint8 Returns: dict: postprocessed images in differe
app.py:64
↓ 1 callersMethodprepare_cube_latents
( self, cube_rgbs, cube_depths, cube_masks, dtype, device, normalize_scale, is_training=False,
models/dreamcube.py:87
↓ 1 callersFunctionprepare_inputs
( image: Union[Image.Image, str], depth: Union[Image.Image, str], prompts: List[str], device:
app.py:176
↓ 1 callersFunctionprepare_positions
( height: int, width: int, cameras: dict, dtype: torch.dtype, device: torch.device, ou
utils/pers.py:205
↓ 1 callersFunctionrandom_sample_spherical
(n)
utils/camera.py:9
↓ 1 callersMethodrelease
(self)
utils/video.py:72
↓ 1 callersFunctionresample_padding
r"""Resample padding function. Replaces padded regions of cube faces with content from neighboring faces. Args: x: Inpu
utils/ops/resample_padding.py:39
↓ 1 callersMethodresize_antialias
( image: torch.Tensor, size: Tuple[int, int], mode: str, is_aa: Optional[bool] = None )
utils/depth.py:73
↓ 1 callersMethodresize_to_max_edge
(image: torch.Tensor, max_edge_sz: int, mode: str)
utils/depth.py:89
↓ 1 callersFunctionrotate_patches
对 [B, C, K, K, H, W] 形状的 patches 进行 2D 旋转 :param patches: Tensor, shape [B, C, K, K, H, W] :param theta: Tensor, shape [H, W], 角度(弧度制)
models/multiplane_sync_legacy.py:130
↓ 1 callersFunctionrotate_patches
对 [B, C, K, K, H, W] 形状的 patches 进行 2D 旋转 :param patches: Tensor, shape [B, C, K, K, H, W] :param theta: Tensor, shape [H, W], 角度(弧度制)
models/multiplane_sync/sync_conv2d.py:153
↓ 1 callersFunctionrotate_patches_by_shifts
patches: [B, C, K, K, H, W] theta: int
models/multiplane_sync/sync_conv2d.py:197
↓ 1 callersFunctionrotation_invariant_kernels
参数: weight (torch.Tensor): 输入的卷积核权重,形状为 [C_in, C_out, K, K] 返回: torch.Tensor: 旋转后的卷积核权重,形状相同。
models/multiplane_sync_legacy.py:18
↓ 1 callersFunctionrun_example
( prompt_front: str, prompt_right: str, prompt_back: str, prompt_left: str, prompt_top: st
app.py:303
↓ 1 callersFunctionskybox_sample_camera
(skybox_order: str = 'equilib', extend: bool = False, degree: bool = False)
utils/camera.py:68
↓ 1 callersMethodvae_decode
(self, latents: torch.Tensor)
models/dreamcube.py:67
↓ 1 callersMethodvae_encode
(self, images: torch.Tensor)
models/dreamcube.py:61
↓ 1 callersMethodvisualize_depth
Visualizes depth maps, such as predictions of the `MarigoldDepthPipeline`. Args: depth (`Union[PIL.Image.Image, np.ndarr
utils/depth.py:366
↓ 1 callersMethodwrite
(self, image: Union[Image.Image, np.ndarray])
utils/video.py:53
↓ 1 callersFunctionz_distance_to_depth
将z距离图转换为直线距离。 :param z_distance: 输入 z 距离图,形状为 (..., H, W, 1) 的 np.ndarray :param fov_x: 相机的水平视场角(单位:度)。 :param fov_y: 相机的垂直视场角(单位:度)
utils/depth.py:708
FunctionPYBIND11_MODULE
utils/ops/resample_padding.cpp:77
Method__call__
( self, cube_rgbs: Optional[torch.FloatTensor], cube_depths: Optional[torch.FloatTenso
models/dreamcube.py:159
Method__call__
(self, cubemap: CubeMaps, **kwargs)
external/equilib/cube2equi/base.py:61
Method__call__
(self, equi: ArrayLike, rots: Rot, **kwargs)
external/equilib/equi2cube/base.py:65
Method__call__
(self, equi: ArrayLike, rots: Rot, **kwargs)
external/equilib/equi2pers/base.py:57
Method__call__
(self, src: ArrayLike, rots: Rot, **kwargs)
external/equilib/equi2equi/base.py:48
Method__init__
(self, faces, cube_format, as_horizon=True)
utils/cube.py:289
Method__init__
( self, do_normalize: bool = True, do_range_check: bool = True, )
utils/depth.py:23
← previousnext →101–200 of 331, ranked by callers