Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/YuqingWang1029/CubiD
/ functions
Functions
90 in github.com/YuqingWang1029/CubiD
⨍
Functions
90
◇
Types & classes
11
↓ 66 callers
Function
print
(*args, **kwargs)
util/misc.py:172
↓ 9 callers
Method
state_dict
(self)
util/misc.py:269
↓ 6 callers
Method
load_state_dict
(self, state_dict)
util/misc.py:272
↓ 4 callers
Method
__init__
( self, encoder_name='facebook/dinov2-with-registers-base', encoder_size=224,
rae.py:197
↓ 4 callers
Method
encode
Encode with proper resize and normalization
rae.py:260
↓ 3 callers
Function
create_rae
Create and initialize fixed RAE model
rae.py:401
↓ 3 callers
Function
evaluate
(model_without_ddp, rae, ema_params, args, epoch, batch_size=16, log_writer=None, cfg=1.0, use_em
engine.py:98
↓ 3 callers
Method
forward_decoder
Decode encoder output to predictions.
models/cubid.py:260
↓ 3 callers
Method
forward_encoder
Encode masked continuous tokens.
models/cubid.py:230
↓ 3 callers
Function
is_dist_avail_and_initialized
()
util/misc.py:183
↓ 3 callers
Method
max
(self)
util/misc.py:66
↓ 3 callers
Method
update
(self, **kwargs)
util/misc.py:87
↓ 2 callers
Function
center_crop_arr
Center cropping implementation from ADM. https://github.com/openai/guided-diffusion/blob/8fb3ad9197f16bbc40620447b2742e13458d2831/guided_diff
util/crop.py:5
↓ 2 callers
Method
decode
Decode with proper denormalization and clamping
rae.py:288
↓ 2 callers
Function
get_1d_sincos_pos_embed_from_grid
(embed_dim, pos)
rae.py:39
↓ 2 callers
Function
get_world_size
()
util/misc.py:191
↓ 2 callers
Method
log_every
(self, iterable, print_freq, header=None)
util/misc.py:119
↓ 2 callers
Function
setup_for_distributed
This function disables printing when not in master process
util/misc.py:166
↓ 2 callers
Method
update
(self, value, n=1)
util/misc.py:33
↓ 1 callers
Method
_init_gaussian_quantization
Initialize Gaussian-based quantization bins.
models/cubid.py:121
↓ 1 callers
Method
_truncated_normal_mean
Compute mean of truncated normal distribution in [a, b].
models/cubid.py:140
↓ 1 callers
Method
add_meter
(self, name, meter)
util/misc.py:116
↓ 1 callers
Function
cache_latents
Cache RAE latents to disk.
main_cache.py:24
↓ 1 callers
Function
center_crop_arr
Center crop matching official implementation
rae.py:430
↓ 1 callers
Function
get_2d_sincos_pos_embed
(embed_dim, grid_size, add_cls_token=False)
rae.py:20
↓ 1 callers
Function
get_2d_sincos_pos_embed_from_grid
(embed_dim, grid)
rae.py:32
↓ 1 callers
Function
get_args_parser
()
main_cubid.py:32
↓ 1 callers
Function
get_args_parser
()
main_cache.py:57
↓ 1 callers
Function
get_grad_norm_
(parameters, norm_type: float = 2.0)
util/misc.py:276
↓ 1 callers
Function
get_rank
()
util/misc.py:197
↓ 1 callers
Method
initialize_weights
(self)
rae.py:134
↓ 1 callers
Method
initialize_weights
Initialize model weights.
models/cubid.py:158
↓ 1 callers
Function
is_main_process
()
util/misc.py:203
↓ 1 callers
Method
load_decoder
Load decoder weights
rae.py:315
↓ 1 callers
Function
load_image
Load and preprocess image
rae.py:447
↓ 1 callers
Method
load_stats
Load normalization statistics
rae.py:374
↓ 1 callers
Function
main
(args)
main_cubid.py:169
↓ 1 callers
Function
main
(args)
main_cache.py:103
↓ 1 callers
Method
mask_by_order_3d
Create 3D mask based on order.
models/cubid.py:318
↓ 1 callers
Method
noising
Add noise during training
rae.py:254
↓ 1 callers
Method
patchify
Convert image features to patch sequence.
models/cubid.py:197
↓ 1 callers
Method
quantize
Quantize continuous values to discrete indices.
models/cubid.py:180
↓ 1 callers
Method
random_channel_masking
Apply random per-element masking across spatial and channel dimensions.
models/cubid.py:222
↓ 1 callers
Method
sample_mask_ratio
Sample mask ratio from truncated Gaussian.
models/cubid.py:218
↓ 1 callers
Method
sample_orders_3d
Generate random ordering for 3D (spatial+channel) sampling.
models/cubid.py:307
↓ 1 callers
Method
sample_tokens
Generate tokens via iterative unmasking.
models/cubid.py:327
↓ 1 callers
Function
save_on_master
(*args, **kwargs)
util/misc.py:207
↓ 1 callers
Method
synchronize_between_processes
(self)
util/misc.py:112
↓ 1 callers
Function
train_one_epoch
(model, rae, model_params, ema_params, data_loader: Iterable, optimize
engine.py:31
↓ 1 callers
Method
unpatchify
(self, x)
rae.py:143
↓ 1 callers
Method
unpatchify
Convert patch sequence back to image features.
models/cubid.py:207
↓ 1 callers
Function
update_ema
Update target parameters to be closer to those of source parameters using an exponential moving average.
engine.py:22
Method
__call__
(self, loss, optimizer, clip_grad=None, parameters=None, create_graph=False, update_grad=True)
util/misc.py:253
Method
__getattr__
(self, attr)
util/misc.py:96
Method
__getitem__
Args: index (int): Index Returns: tuple: (sample, target, filename).
util/loader.py:9
Method
__getitem__
Args: index (int): Index Returns: tuple: (moments, target).
util/loader.py:40
Method
__init__
(self, dim, num_heads=8, qkv_bias=True, attn_drop=0., proj_drop=0.)
rae.py:55
Method
__init__
(self, dim, num_heads, mlp_ratio=4., qkv_bias=True, drop=0., attn_drop=0.)
rae.py:81
Method
__init__
( self, in_dim=768, decoder_dim=1152, decoder_depth=28, decoder_heads=
rae.py:103
Method
__init__
(self, model_name='facebook/dinov2-with-registers-base', normalize=True)
rae.py:170
Method
__init__
(self, img_size=256, vae_stride=16, patch_size=1, encoder_embed_dim=1024, encoder_depth=16, e
models/cubid.py:30
Method
__init__
( self, root: str, )
util/loader.py:30
Method
__init__
(self, window_size=20, fmt=None)
util/misc.py:25
Method
__init__
(self, delimiter="\t")
util/misc.py:83
Method
__init__
(self)
util/misc.py:250
Method
__str__
(self)
util/misc.py:73
Method
__str__
(self)
util/misc.py:104
Method
_init_weights
Initialize linear and layernorm weights.
models/cubid.py:168
Function
add_weight_decay
(model, weight_decay=1e-5, skip_list=())
util/misc.py:291
Function
adjust_learning_rate
Decay the learning rate with half-cycle cosine after warmup
util/lr_sched.py:4
Function
all_reduce_mean
(x)
util/misc.py:332
Method
avg
(self)
util/misc.py:57
Function
cubid_base
(**kwargs)
models/cubid.py:427
Function
cubid_huge
(**kwargs)
models/cubid.py:441
Function
cubid_large
(**kwargs)
models/cubid.py:434
Method
forward
(self, x)
rae.py:66
Method
forward
(self, x)
rae.py:92
Method
forward
(self, x)
rae.py:151
Method
forward
(self, x)
rae.py:186
Method
forward
Full forward pass
rae.py:309
Method
forward
Training forward pass with masked prediction loss.
models/cubid.py:284
Method
forward_mae_decoder
(self, x)
models/cubid.py:281
Method
forward_mae_encoder
(self, x, mask, class_embedding)
models/cubid.py:278
Method
global_avg
(self)
util/misc.py:62
Function
init_distributed_mode
(args)
util/misc.py:212
Function
mask_by_order
Create a mask based on the specified order and mask length.
models/cubid.py:19
Method
median
(self)
util/misc.py:52
Function
save_model
(args, epoch, model, model_without_ddp, optimizer, loss_scaler, ema_params=None, epoch_name=None)
util/misc.py:306
Method
synchronize_between_processes
Warning: does not synchronize the deque!
util/misc.py:38
Method
value
(self)
util/misc.py:70