MCPcopy Create free account

hub / github.com/apple/ml-4m / types & classes

Types & classes183 in github.com/apple/ml-4m

↓ 15 callersClassMultiModalDatasetFolder
A generic multi-modal dataset loader where the samples are arranged in this way: :: root/modality_a/class_x/xxx.ext root/modality_a/c
fourm/data/multimodal_dataset_folder.py:201
↓ 13 callersClassFourM
4M model. Args: encoder_embeddings: Dict of encoder embedding modules. decoder_embeddings: Dict of decoder embedding modules.
fourm/models/fm.py:54
↓ 13 callersClassFourMViT
Modified 4M model, adapted to behave as a simple RGB-only ViT. Args: img_size (int): Input image size. patch_size (int): Patch si
fourm/models/fm_vit.py:49
↓ 12 callersClassUnifiedDataTransform
fourm/data/modality_transforms.py:67
↓ 11 callersClassTokTransform
fourm/data/modality_transforms.py:602
↓ 9 callersClassRGBTransform
fourm/data/modality_transforms.py:198
↓ 9 callersClassUViT
UViT model = Conditional UNet with Transformer bottleneck blocks and optionalpatching. See https://arxiv.org/abs/2301.11093 for more details.
fourm/vq/models/uvit.py:528
↓ 6 callersClassAugmentOp
fourm/utils/timm/auto_augment.py:319
↓ 6 callersClassRandomCropImageAugmenter
fourm/data/image_augmenter.py:32
↓ 6 callersClassResBlock
A residual block that can optionally change the number of channels. :param channels: the number of input channels. :param emb_channels: t
fourm/vq/models/unet/unet.py:163
↓ 5 callersClassCaptionTransform
fourm/data/modality_transforms.py:755
↓ 5 callersClassCenterCropImageAugmenter
fourm/data/image_augmenter.py:101
↓ 5 callersClassLayerNorm
Subclass torch's LayerNorm to handle fp16.
fourm/utils/clip/model.py:171
↓ 5 callersClassNetLinLayer
A single linear layer which does a 1x1 conv
fourm/vq/percept_losses/lpips.py:122
↓ 5 callersClassPreNorm
fourm/utils/hmr2_utils/hmr2/models/components/pose_transformer.py:32
↓ 5 callersClassTimestepEmbedSequential
A sequential module that passes timestep embeddings to the children that support it as an extra input.
fourm/vq/models/unet/unet.py:88
↓ 4 callersClassCropSettingsTransform
fourm/data/modality_transforms.py:1335
↓ 4 callersClassGenerationSampler
Sampler that wraps a trained 4M model for generation use cases. Implements standard autoregressive, MaskGIT, and ROAR generation schemes with chai
fourm/models/generate.py:323
↓ 4 callersClassMaskTransform
fourm/data/modality_transforms.py:570
↓ 4 callersClassMlp
fourm/vq/models/vit_models.py:145
↓ 4 callersClassSequentialCond
fourm/utils/hmr2_utils/hmr2/models/components/t_cond_mlp.py:41
↓ 4 callersClassUnifiedMasking
fourm/data/masking.py:131
↓ 3 callersClassAttentionBlock
An attention block that allows spatial positions to attend to each other. Originally ported from here, but adapted to the N-d case. https
fourm/vq/models/unet/unet.py:277
↓ 3 callersClassDownsample
A downsampling layer with an optional convolution. :param channels: channels in the inputs and outputs. :param use_conv: a bool determini
fourm/vq/models/unet/unet.py:134
↓ 3 callersClassDropPath
Drop paths (Stochastic Depth) per sample (when applied in main path of residual blocks).
fourm/vq/models/vit_models.py:130
↓ 3 callersClassDropPath
Drop paths (Stochastic Depth) per sample (when applied in main path of residual blocks).
fourm/models/fm_utils.py:78
↓ 3 callersClassGatedMlp
Implements SwiGLU and other gated feed-forward layers from Noam Shazeer's paper: https://arxiv.org/abs/2002.05202
fourm/models/fm_utils.py:129
↓ 3 callersClassIdentityTransform
fourm/data/modality_transforms.py:1352
↓ 3 callersClassMlp
fourm/models/fm_utils.py:111
↓ 3 callersClassModelEma
Model Exponential Moving Average (DEPRECATED) Keep a moving average of everything in the model state_dict (parameters and buffers). This ver
fourm/utils/timm/model_ema.py:16
↓ 3 callersClassNormalTransform
fourm/data/modality_transforms.py:289
↓ 3 callersClassPipelineCond
Pipeline for conditional image generation. This model inherits from `DiffusionPipeline`. Check the superclass documentation for the generic metho
fourm/vq/scheduling/diffusion_pipeline.py:37
↓ 3 callersClassPreTokenizedImageAugmenter
fourm/data/image_augmenter.py:78
↓ 3 callersClassSAMInstanceTransform
fourm/data/modality_transforms.py:384
↓ 3 callersClassToNumpy
fourm/utils/timm/transforms.py:16
↓ 3 callersClassUpsample
An upsampling layer with an optional convolution. :param channels: channels in the inputs and outputs. :param use_conv: a bool determinin
fourm/vq/models/unet/unet.py:103
↓ 3 callersClassViTDecoder
Transformer to map latent features back to images / feature maps. Args: out_channels: Number of output channels. patch_size:
fourm/vq/models/vit_models.py:504
↓ 3 callersClassViTEncoder
Transformer to map images / feature maps to latent features. Args: in_channels: Number of input channels. patch_size: Patch s
fourm/vq/models/vit_models.py:338
↓ 2 callersClassAttention
fourm/utils/hmr2_utils/hmr2/models/components/pose_transformer.py:60
↓ 2 callersClassAttention
fourm/vq/models/uvit.py:129
↓ 2 callersClassAttention
fourm/vq/models/vit_models.py:165
↓ 2 callersClassAttention
fourm/models/fm_utils.py:147
↓ 2 callersClassBlock
fourm/vq/models/vit_models.py:232
↓ 2 callersClassBlock
fourm/models/fm_utils.py:310
↓ 2 callersClassBottleneck
fourm/utils/clip/model.py:15
↓ 2 callersClassConvNeXtBlock
r""" ConvNeXt Block. There are two equivalent implementations: (1) DwConv -> LayerNorm (channels_first) -> 1x1 Conv -> GELU -> 1x1 Conv; all in (N
fourm/vq/models/vit_models.py:298
↓ 2 callersClassCrossAttention
fourm/models/fm_utils.py:182
↓ 2 callersClassDropPath
Drop paths (Stochastic Depth) per sample (when applied in main path of residual blocks).
fourm/vq/models/uvit.py:88
↓ 2 callersClassDropTokenDropout
fourm/utils/hmr2_utils/hmr2/models/components/pose_transformer.py:209
↓ 2 callersClassEmptyAugmenter
fourm/data/image_augmenter.py:181
↓ 2 callersClassFeedForward
fourm/utils/hmr2_utils/hmr2/models/components/pose_transformer.py:45
↓ 2 callersClassHumanPoseTransform
fourm/data/modality_transforms.py:1009
↓ 2 callersClassMetadataTransform
fourm/data/modality_transforms.py:843
↓ 2 callersClassMlp
fourm/vq/models/uvit.py:103
↓ 2 callersClassNoImageAugmenter
fourm/data/image_augmenter.py:61
↓ 2 callersClassNormAttention
fourm/models/fm_utils.py:222
↓ 2 callersClassQKVAttention
A module which performs QKV attention and splits in a different order.
fourm/vq/models/unet/unet.py:377
↓ 2 callersClassSMPL
fourm/utils/hmr2_utils/hmr2/models/smpl_wrapper.py:16
↓ 2 callersClassSmoothedValue
Track a series of values and provide access to smoothed values over a window or the global series average.
fourm/utils/logger.py:34
↓ 2 callersClassTransformer
fourm/utils/clip/model.py:209
↓ 2 callersClassZeroTokenDropout
fourm/utils/hmr2_utils/hmr2/models/components/pose_transformer.py:228
↓ 1 callersClassActivationStatsHook
Iterates through each of `model`'s modules and matches modules using unix pattern matching based on `hook_fn_locs` and registers `hook_fn` to the
fourm/utils/timm/model.py:46
↓ 1 callersClassAdaptiveLayerNorm1D
fourm/utils/hmr2_utils/hmr2/models/components/t_cond_mlp.py:12
↓ 1 callersClassAttention
fourm/utils/hmr2_utils/hmr2/models/backbones/vit.py:94
↓ 1 callersClassAttentionPool2d
fourm/utils/clip/model.py:61
↓ 1 callersClassAugMixAugment
AugMix Transform Adapted and improved from impl here: https://github.com/google-research/augmix/blob/master/imagenet.py From paper: 'AugMix:
fourm/utils/timm/auto_augment.py:721
↓ 1 callersClassAutoAugment
fourm/utils/timm/auto_augment.py:506
↓ 1 callersClassBlock
fourm/utils/hmr2_utils/hmr2/models/backbones/vit.py:133
↓ 1 callersClassBlock
fourm/vq/models/uvit.py:226
↓ 1 callersClassBottleneckBlock
fourm/vq/models/mlp_models.py:19
↓ 1 callersClassBottleneckMLP
fourm/vq/models/mlp_models.py:75
↓ 1 callersClassCLIP
fourm/utils/clip/model.py:308
↓ 1 callersClassCaptionEmbTransform
fourm/data/modality_transforms.py:796
↓ 1 callersClassColorPaletteTransform
fourm/data/modality_transforms.py:1174
↓ 1 callersClassControlNetAdapterEmbedding
fourm/vq/models/controlnet.py:29
↓ 1 callersClassControlNetConditioningEmbedding
fourm/vq/models/controlnet.py:65
↓ 1 callersClassControlnetCond
fourm/vq/models/controlnet.py:102
↓ 1 callersClassCrossAttention
fourm/utils/hmr2_utils/hmr2/models/components/pose_transformer.py:94
↓ 1 callersClassCrossAttention
fourm/vq/models/uvit.py:175
↓ 1 callersClassCrossAttention
fourm/vq/models/vit_models.py:200
↓ 1 callersClassDDIMSchedulerOutput
Output class for the scheduler's step function output. Args: prev_sample (`torch.FloatTensor` of shape `(batch_size, num_channels, h
fourm/vq/scheduling/scheduling_ddim.py:34
↓ 1 callersClassDDPMSchedulerOutput
Output class for the scheduler's step function output. Args: prev_sample (`torch.FloatTensor` of shape `(batch_size, num_channels, h
fourm/vq/scheduling/scheduling_ddpm.py:33
↓ 1 callersClassDecoderBlock
fourm/vq/models/uvit.py:256
↓ 1 callersClassDecoderBlock
fourm/models/fm_utils.py:337
↓ 1 callersClassDepthTransform
fourm/data/modality_transforms.py:245
↓ 1 callersClassDetectionTransform
fourm/data/modality_transforms.py:625
↓ 1 callersClassDiVAE
DiVAE ("Diffusion VQ-VAE") model = simple encoder + diffusion decoder with a discrete bottleneck, inspired by https://arxiv.org/abs/2206.00386.
fourm/vq/vqvae.py:498
↓ 1 callersClassDropPath
Drop paths (Stochastic Depth) per sample (when applied in main path of residual blocks).
fourm/utils/hmr2_utils/hmr2/models/backbones/vit.py:64
↓ 1 callersClassEmptyDataset
Empty dataset
fourm/utils/generation_datasets/empty_dataset.py:17
↓ 1 callersClassFrequencyEmbedder
fourm/utils/hmr2_utils/hmr2/models/components/t_cond_mlp.py:185
↓ 1 callersClassGroupNorm32
fourm/vq/models/unet/nn.py:30
↓ 1 callersClassHybridEmbed
CNN Feature Map Embedding Extract feature map from CNN, flatten, project to embedding dim.
fourm/utils/hmr2_utils/hmr2/models/backbones/vit.py:184
↓ 1 callersClassImageEncoderEmbedding
Embedding module for spatial inputs, like images or feature maps. Creates tokens from patches over the image. This adapter / embedding differ
fourm/models/encoder_embeddings.py:214
↓ 1 callersClassLPIPS
fourm/vq/percept_losses/lpips.py:66
↓ 1 callersClassLoRAWrapper
Low-Rank Adaptation Wrapper for linear layers. See https://arxiv.org/abs/2106.09685 Args: linear: nn.Linear layer to wrap
fourm/models/lora_utils.py:44
↓ 1 callersClassMemcodes
fourm/vq/quantizers/quantize_memcodes.py:25
↓ 1 callersClassMeshRenderer
fourm/utils/hmr2_utils/hmr2/utils/mesh_renderer.py:49
↓ 1 callersClassMixtureDataset
fourm/data/unified_datasets.py:524
↓ 1 callersClassMlp
fourm/utils/hmr2_utils/hmr2/models/backbones/vit.py:77
↓ 1 callersClassModifiedResNet
A ResNet class that is similar to torchvision's but contains the following changes: - There are now 3 "stem" convolutions as opposed to 1, wi
fourm/utils/clip/model.py:100
next →1–100 of 183, ranked by callers