MCPcopy Create free account

hub / github.com/apple/ml-sharp / functions

Functions179 in github.com/apple/ml-sharp

Method__init__
Initialize LearnedAlignment. Args: steps: Number of steps in the UNet. stride: Effective downsampling of the alignmen
src/sharp/models/alignment.py:46
Method__init__
Initialize MonodepthFeatureExtractor.
src/sharp/models/encoders/monodepth_encoder.py:84
Method__init__
Initialize Sliding Pyramid Network. The framework 1. creates an image pyramid, 2. generates overlapping patches with
src/sharp/models/encoders/spn_encoder.py:39
Method__init__
Initialize ViT from TIMM implementation.
src/sharp/models/encoders/vit_encoder.py:22
Method__init__
Initialize UNet Encoder. Args: dim_in: The number of input channels. width: Width multiplicator of intermediate layer
src/sharp/models/encoders/unet_encoder.py:26
Method__init__
Initialize UNet Decoder. Args: dim_out: The number of output channels. width: Width of last input feature map from en
src/sharp/models/decoders/unet_decoder.py:26
Method__init__
Initialize multiresolution convolutional decoder. Args: dims_encoder: Expected dims at each level from the encoder. d
src/sharp/models/decoders/multires_conv_decoder.py:25
Method_create_block
(dim: int, batch_norm: bool)
src/sharp/models/blocks.py:190
Method_create_disparity_layers
Create multiple disparity layers.
src/sharp/models/initializer.py:152
Method_create_project_upsample_block
( dim_in: int, dim_out: int, upsample_layers: int, dim_interme
src/sharp/models/encoders/spn_encoder.py:85
Method_create_surface_layer
Create multiple surface layers.
src/sharp/models/initializer.py:159
Methodadd_frame
Add a single frame to output.
src/sharp/utils/io.py:173
Methodasdict
Convenience method to convert the class to a dict.
src/sharp/models/presets/vit.py:44
Methodbackward
Compute gradient of clamp with pushback.
src/sharp/utils/math.py:128
Methodclose
Finish writing.
src/sharp/utils/io.py:177
Functioncolorize_alpha
Colorize alpha map.
src/sharp/utils/vis.py:39
Functionconfigure
Configure logger globally. Args: log_level: The desired verbosity level. log_path: The path to write logs to. prefix: The
src/sharp/utils/logging.py:14
Functioncreate_activation_pair
Create activation function and corresponding inverse function. Args: activation_type: The activation type to create. Returns:
src/sharp/utils/math.py:32
Functioncreate_camera_model
Create camera model to simulate general pinhole camera.
src/sharp/utils/camera.py:203
Functioncreate_eye_trajectory
Create eye trajectory for trajectory type.
src/sharp/utils/camera.py:74
Functiondecode_color_space
Decode color space index to color space.
src/sharp/utils/color_space.py:26
Functionencode_color_space
Encode color space to integer.
src/sharp/utils/color_space.py:21
Methodforward
Predict images from gaussians. Args: gaussians: The Gaussians to render. extrinsics: The extrinsics of the camera to
src/sharp/utils/gsplat.py:72
Methodforward
Apply clamp.
src/sharp/utils/math.py:110
Methodforward
Apply residual block.
src/sharp/models/blocks.py:66
Methodforward
Process and fuse input features.
src/sharp/models/blocks.py:172
Methodforward
Optionally align monodepth to ground truth with a local scale map. Args: monodepth: The monodepth model with intermediate feature
src/sharp/models/predictor.py:39
Methodforward
Predict 3D Gaussians. Args: image: The image to process. disparity_factor: Factor to convert depth to disparities.
src/sharp/models/predictor.py:103
Methodforward
Apply mean and std normalization over input image.
src/sharp/models/normalizers.py:36
Methodforward
Apply affine range normalization over input image.
src/sharp/models/normalizers.py:64
Methodforward
Construct Gaussian base values and prepare feature input. Args: image: The image to process. depth: The corresponding
src/sharp/models/initializer.py:127
Methodforward
Decode by projection and fusion of multi-resolution encodings.
src/sharp/models/monodepth.py:92
Methodforward
Process image and return disparity and feature maps.
src/sharp/models/monodepth.py:194
Methodforward
Apply SkipConvBackbone to image.
src/sharp/models/gaussian_decoder.py:107
Methodforward
Run monodepth and fuse features with input image to predict Gaussians. Args: input_features: The input features to use.
src/sharp/models/gaussian_decoder.py:240
Methodforward
Predict deltas for 3D Gaussians. Args: image_features: Image features from decoder. Returns: The predicted d
src/sharp/models/heads.py:39
Methodforward
Compute alignment map.
src/sharp/models/alignment.py:96
Methodforward
Apply projection module.
src/sharp/models/encoders/monodepth_encoder.py:74
Methodforward
Extract multi-resolution features.
src/sharp/models/encoders/monodepth_encoder.py:116
Methodforward
Encode input image into multi-resolution encodings.
src/sharp/models/encoders/base_encoder.py:20
Methodforward
Encode input at multiple resolutions.
src/sharp/models/encoders/spn_encoder.py:205
Methodforward
Override forwarding with intermediate features. Adapted from timm ViT. Returns: Output features and list of features fro
src/sharp/models/encoders/vit_encoder.py:60
Methodforward
Apply UNet Encoder to image. Args: input: The input image. Returns: The output multi-level feature map from
src/sharp/models/encoders/unet_encoder.py:94
Methodforward
Apply UNet to image. Args: features: The input multi-level feature map from encoder. Returns: The output fea
src/sharp/models/decoders/unet_decoder.py:96
Methodforward
Decode the multi-resolution encodings.
src/sharp/models/decoders/multires_conv_decoder.py:97
Methodforward
Decode (multi-resolution) encodings.
src/sharp/models/decoders/base_decoder.py:20
Functionfreeze_norm_layer
Freeze all normalization layers.
src/sharp/utils/module_surgery.py:19
Functionget_supported_image_extensions
Return supported image extensions.
src/sharp/utils/io.py:152
Functionget_supported_video_extensions
Return supported video extensions.
src/sharp/utils/io.py:163
Functionhard_sigmoid_with_pushback
Apply hard sigmoid with pushback. For compatibility reasons, we follow the default PyTorch implementation with a default slope of 1/6:
src/sharp/utils/math.py:170
Methodinternal_resolution
Return the internal image size of the network.
src/sharp/models/monodepth.py:100
Methodinternal_resolution
Internal resolution of the encoder.
src/sharp/models/encoders/monodepth_encoder.py:121
Methodinternal_resolution
Internal resolution of the encoder.
src/sharp/models/encoders/base_encoder.py:23
Methodinternal_resolution
Return the internal image size of the network.
src/sharp/models/encoders/vit_encoder.py:86
Functioninverse_sigmoid
Compute inverse sigmoid.
src/sharp/utils/math.py:57
Functioninverse_softplus
Compute inverse softplus.
src/sharp/utils/math.py:62
Methodis_power_of_two
Check if a number is a power of two.
src/sharp/models/alignment.py:75
FunctionlinearRGB2sRGB
LinearRGB to sRGB conversion function. Reference: https://developer.apple.com/metal/Metal-Shading-Language-Specification.pdf Section 7.7.
src/sharp/utils/color_space.py:61
Functionload_rgb
Load an RGB image.
src/sharp/utils/io.py:29
Functionmain_cli
Run inference for SHARP model.
src/sharp/cli/__init__.py:13
Methodout_width
Compute the output width for UNet decoder.
src/sharp/models/encoders/unet_encoder.py:115
Methodoutput_resolution
Output resolution of Gaussians.
src/sharp/models/predictor.py:199
Functionpredict_cli
Predict Gaussians from input images.
src/sharp/cli/predict.py:76
Functionproject
Project tensor u to unit basis a.
src/sharp/utils/linalg.py:100
Functionquaternion_conj
Get conjugate of a quaternion.
src/sharp/utils/linalg.py:93
Functionquaternion_product
Compute dot product between two quaternions.
src/sharp/utils/linalg.py:81
Functionquaternions_from_rotation_matrices
Convert batch of rotation matrices to quaternions. Args: matrices: The matrices to convert to quaternions. Returns: The quat
src/sharp/utils/linalg.py:41
Functionrelu_with_pushback
Compute relu with pushback.
src/sharp/utils/math.py:181
Functionrender_cli
Predict Gaussians from input images.
src/sharp/cli/render.py:39
Functionrotation_matrices_from_quaternions
Convert batch of quaternions into rotations matrices. Args: quaternions: The quaternions convert to matrices. Returns: The r
src/sharp/utils/linalg.py:14
Functionsave_image
Save image to given path.
src/sharp/utils/io.py:102
Methodset_grad_checkpointing
Enable grad checkpointing.
src/sharp/models/encoders/spn_encoder.py:162
Methodset_grad_checkpointing
Enable grad checkpointing.
src/sharp/models/decoders/multires_conv_decoder.py:93
Functionset_module_eval_mode
(module: nn.Module, _: Any)
src/sharp/utils/module_surgery.py:22
Methodset_screen_extrinsics
Modify the default extrinsics.
src/sharp/utils/camera.py:347
Functionsoftclamp
Clamp tensor to min/max in differentiable way. Args: tensor: The tensor to clamp. min: Pair of threshold to start clamping and va
src/sharp/utils/math.py:75
Methodstride
Effective downsampling stride.
src/sharp/models/gaussian_decoder.py:120
Methodstride
Internal stride of GaussianDensePredictionTransformer.
src/sharp/models/gaussian_decoder.py:265
Functionwrite_renderings
Write rendered color/depth/alpha to files.
src/sharp/utils/gsplat.py:29
← previous101–179 of 179, ranked by callers