MCPcopy Create free account

hub / github.com/GeWu-Lab/AnyTouch2 / functions

Functions813 in github.com/GeWu-Lab/AnyTouch2

↓ 131 callersFunctionprint
(*args, **kwargs)
util/misc.py:176
↓ 38 callersMethodload
Loads a checkpoint from a given file into state. Args: state: a mapping contaning model, optimizer and lr scheduler p
sparsh/tactile_ssl/trainer/trainer.py:566
↓ 33 callersMethodmax
(self)
util/misc.py:70
↓ 25 callersFunctionget_pylogger
Initializes multi-GPU-friendly python command line logger.
sparsh/tactile_ssl/utils/logging.py:19
↓ 16 callersMethodupdate
(self, val, n=1)
sparsh/tactile_ssl/utils/__init__.py:208
↓ 15 callersMethodload_state_dict
(self, state_dict)
util/misc.py:276
↓ 15 callersMethodupdate
(self, **kwargs)
util/misc.py:91
↓ 12 callersFunctionget_resize_transform
(img_size, is_anytouch=False, is_t3=False, sensor='digit', is_train=False, is_unitouch=False, input_diff=False
sparsh/tactile_ssl/data/digit/utils.py:79
↓ 9 callersMethodforward_features
(self, x, masks=None)
sparsh/tactile_ssl/model/vision_transformer.py:341
↓ 7 callersFunctioncopy_linear
(hf_linear, pt_linear)
CLIP-B-16/convert_open_clip_to_hf.py:48
↓ 6 callersMethodstate_dict
(self)
util/misc.py:273
↓ 6 callersFunctiontrunc_normal_
(tensor, mean=0.0, std=1.0, a=-2.0, b=2.0)
sparsh/tactile_ssl/utils/tensors.py:44
↓ 5 callersMethod__init__
(self, config, num_frames, add_time_attn, tube_size, loads_from_clip=False, now_sensor='gelsight')
sparsh/tactile_ssl/model/point_mae.py:1422
↓ 5 callersMethod__init__
(self, start_index=1)
sparsh/tactile_ssl/downstream_task/utils_forcefield/layers/Reassemble.py:23
↓ 5 callersFunctionapply_masks
:param x: tensor of shape [B (batch-size), N (num-patches), D (feature-dim)] :param masks: list of tensors containing indices of patches in [
sparsh/tactile_ssl/utils/__init__.py:25
↓ 5 callersFunctioncompute_diff
(img1, img2, offset=0.0)
sparsh/tactile_ssl/data/digit/utils.py:51
↓ 5 callersFunctionimg_logger
(wandb, global_step, predictions, X=None, label="train")
sparsh/tactile_ssl/utils/logging.py:105
↓ 5 callersFunctionpatches_to_image
Reconstruct an image from patches of a given size and stride. Args: x: Patch tensor of shape (B, patch_size * patch_size, C).
sparsh/tactile_ssl/utils/__init__.py:156
↓ 5 callersMethodstep
(self)
sparsh/tactile_ssl/utils/masking.py:86
↓ 4 callersMethodinit_weights
(self)
sparsh/tactile_ssl/model/vision_transformer.py:244
↓ 4 callersFunctionload_bin_image
(io_buf)
sparsh/tactile_ssl/data/digit/utils.py:167
↓ 4 callersMethodlog_every
(self, iterable, print_freq, header=None)
util/misc.py:123
↓ 4 callersFunctionpatchify_image
imgs: (N, 3, H, W) x: (N, L, patch_size**2 *3)
sparsh/tactile_ssl/utils/tensors.py:49
↓ 4 callersMethodprepare_tokens_with_masks
(self, x, masks=None)
sparsh/tactile_ssl/model/vision_transformer.py:300
↓ 4 callersMethodreset
(self)
sparsh/tactile_ssl/utils/__init__.py:200
↓ 4 callersMethodsynchronize_between_processes
(self)
util/misc.py:116
↓ 4 callersFunctionupdate_moving_average
(ma_model, current_model, beta)
sparsh/tactile_ssl/utils/ema.py:12
↓ 3 callersMethod__init__
(self, embed_dim, num_heads, mlp_ratio, depth, norm_layer, init_std, qkv_bias, complete_block, classes=3)
model/linear_probe.py:128
↓ 3 callersMethod__init__
( self, cfgs_mask, crop_size=(224, 224), num_frames=16, patch_size=(16
sparsh/tactile_ssl/utils/masking.py:60
↓ 3 callersMethod__init__
(self, in_channels, out_channels, use_refl=True)
sparsh/tactile_ssl/downstream_task/utils_forcefield/layers/Head.py:47
↓ 3 callersMethod_get_labels
We use the slip horizon labels to debounce fast switches in slip events, which is likely noise if there is atleast one slip event in
sparsh/tactile_ssl/data/vision_based_slip_probes.py:141
↓ 3 callersMethod_register_signal
(signum: _SIGNUM, handlers: _HANDLER)
sparsh/tactile_ssl/utils/signal_connector.py:176
↓ 3 callersFunctiondrop_add_residual_stochastic_depth
( xs: List[Tensor], residual_func: Callable[[List[Tensor]], Tensor], sample_drop_ratio: float = 0.
model/layers/decoder_block.py:143
↓ 3 callersFunctiondrop_add_residual_stochastic_depth
( xs: List[Tensor], residual_func: Callable[[List[Tensor]], Tensor], sample_drop_ratio: float = 0.
sparsh/tactile_ssl/model/layers/decoder_block.py:146
↓ 3 callersFunctionget_bg_img
(config, sensor_type, dataset_name, remove_bg=True)
sparsh/tactile_ssl/data/digit/utils.py:144
↓ 3 callersMethodget_digit_image
(self)
sparsh/tactile_ssl/data/vision_based_interactive.py:124
↓ 3 callersMethodget_gelsight_image
(self)
sparsh/tactile_ssl/data/vision_based_interactive.py:132
↓ 3 callersMethodinterpolate_pos_encoding
(self, img_shape, img_dtype, device)
sparsh/tactile_ssl/model/vision_transformer.py:252
↓ 3 callersFunctionis_dist_avail_and_initialized
()
util/misc.py:187
↓ 3 callersFunctionload_sample_from_buf
(io_buf, img_bg=None, enhance=False, is_anytouch=False, sensor='digit', convert=False, is_train=False, is_forc
sparsh/tactile_ssl/data/digit/utils.py:180
↓ 3 callersFunctionparse_args
()
config_probe.py:3
↓ 3 callersFunctionplot_correlation
(forces_gt, forces_pred)
sparsh/tactile_ssl/utils/plotting_forces.py:21
↓ 3 callersFunctionplot_forces_error
(forces_gt, forces_pred, n_bins=100, n_std=3)
sparsh/tactile_ssl/utils/plotting_forces.py:58
↓ 3 callersMethodsoftmax_center_teacher
(self, teacher_output, teacher_temp)
sparsh/tactile_ssl/loss/dino_loss.py:28
↓ 3 callersMethodupdate_center
(self, teacher_output)
sparsh/tactile_ssl/loss/dino_loss.py:78
↓ 2 callersMethod__init__
( self, dim: int, num_heads: int = 8, qkv_bias: bool = False, proj_bia
model/layers/attention.py:38
↓ 2 callersMethod__init__
( self, dim: int, num_heads: int = 8, qkv_bias: bool = False, proj_bia
sparsh/tactile_ssl/model/layers/attention.py:41
↓ 2 callersMethod__init__
( self, img_size: Union[int, Tuple[int, int]] = 224, patch_size: Union[int, Tuple[int,
sparsh/tactile_ssl/model/layers/patch_embed.py:51
↓ 2 callersMethod__init__
( self, config: DictConfig, dataset_name: str, )
sparsh/tactile_ssl/data/vision_based_force_probes.py:28
↓ 2 callersMethod_format_iterable
Adds values as postfix string to progressbar. Args: prog_bar: a progressbar (on global rank zero) or an iterable (every other ran
sparsh/tactile_ssl/trainer/trainer.py:738
↓ 2 callersMethod_get_tactile_images
(self, idx_trajectory, idx_sample)
sparsh/tactile_ssl/data/vision_based_slip_probes.py:162
↓ 2 callersMethod_get_tactile_images
(self, idx_trajectory, idx_sample_o)
sparsh/tactile_ssl/data/vision_based_forces_slip_probes.py:201
↓ 2 callersMethod_has_already_handler
(signum: _SIGNUM)
sparsh/tactile_ssl/utils/signal_connector.py:172
↓ 2 callersMethod_init_weights
(self, m)
sparsh/tactile_ssl/algorithm/vjepa.py:126
↓ 2 callersMethod_normalize_image
Rescale image pixels to span range [0, 1]
sparsh/tactile_ssl/test/demo_t1_forcefield.py:52
↓ 2 callersMethod_plot_tactile_clip
(self, clip)
sparsh/tactile_ssl/data/vision_based_grasp_probes.py:60
↓ 2 callersMethod_process_image
(self, tactile_image)
sparsh/tactile_ssl/data/vision_based_interactive.py:111
↓ 2 callersMethod_sample_block_mask
(self, height, width, b_size, acceptable_regions=None)
sparsh/tactile_ssl/algorithm/ijepa.py:156
↓ 2 callersMethod_sample_block_mask
(self, height, width, b_size, acceptable_regions=None)
sparsh/tactile_ssl/algorithm/dinov2.py:241
↓ 2 callersMethod_sample_block_mask
(self, height, width, b_size, acceptable_regions=None)
sparsh/tactile_ssl/algorithm/dino.py:227
↓ 2 callersMethod_sample_block_size
(self, height, width, scale, aspect_ratio_scale)
sparsh/tactile_ssl/algorithm/ijepa.py:137
↓ 2 callersMethod_sample_block_size
(self, height, width, scale)
sparsh/tactile_ssl/algorithm/dinov2.py:225
↓ 2 callersMethod_sample_block_size
(self, height, width, scale)
sparsh/tactile_ssl/algorithm/dino.py:211
↓ 2 callersMethodadd_meter
(self, name, meter)
util/misc.py:120
↓ 2 callersFunctioncopy_layers
(hf_layers, pt_layers)
CLIP-B-16/convert_open_clip_to_hf.py:65
↓ 2 callersFunctiondrop_add_residual_stochastic_depth
( x: Tensor, residual_func: Callable[[Tensor], Tensor], sample_drop_ratio: float = 0.0, )
model/layers/block.py:114
↓ 2 callersFunctiondrop_add_residual_stochastic_depth
( x: Tensor, residual_func: Callable[[Tensor], Tensor], sample_drop_ratio: float = 0.0, )
sparsh/tactile_ssl/model/layers/block.py:117
↓ 2 callersFunctiondrop_add_residual_stochastic_depth_list
( x_list: List[Tensor], residual_func: Callable[[Tensor, Any], Tensor], sample_drop_ratio: float =
model/layers/block.py:185
↓ 2 callersFunctiondrop_add_residual_stochastic_depth_list
( x_list: List[Tensor], residual_func: Callable[[Tensor, Any], Tensor], sample_drop_ratio: float =
sparsh/tactile_ssl/model/layers/block.py:188
↓ 2 callersMethodembed
(self, xs: List[torch.Tensor])
sparsh/tactile_ssl/model/multimodal_transformer.py:190
↓ 2 callersFunctionenhance_image
(img, brightness=255, contrast=127)
sparsh/tactile_ssl/data/digit/utils.py:232
↓ 2 callersFunctionevaluate
(data_loader, model, device, args, epoch)
train/probe_touchd_engine.py:116
↓ 2 callersFunctionevaluate
(data_loader, model, device, args)
train/probe_objbench_engine.py:93
↓ 2 callersMethodforward
(self, x: Tensor)
model/layers/attention.py:57
↓ 2 callersMethodforward
(self, x: Tensor)
sparsh/tactile_ssl/model/layers/attention.py:60
↓ 2 callersMethodforward
(self, x: torch.Tensor, mode="normal_shear")
sparsh/tactile_ssl/downstream_task/forcefield_sl.py:170
↓ 2 callersMethodforward_encoder
(self, x=None, points=None, points_num=None, sensor_type=None, data_type = None, use_mask = True)
sparsh/tactile_ssl/model/point_mae.py:615
↓ 2 callersFunctionget_1d_sincos_pos_embed_from_grid
embed_dim: output dimension for each position pos: a list of positions to be encoded: size (M,) out: (M, D)
model/util/pos_embed.py:49
↓ 2 callersFunctionget_1d_sincos_pos_embed_from_grid
embed_dim: output dimension for each position pos: a list of positions to be encoded: size (M,) out: (M, D)
sparsh/tactile_ssl/model/util/pos_embed.py:49
↓ 2 callersFunctionget_1d_sincos_pos_embed_from_grid
embed_dim: output dimension for each position pos: a list of positions to be encoded: size (M,) out: (M, D)
util/pos_embed.py:49
↓ 2 callersFunctionget_2d_sincos_pos_embed
grid_size: int of the grid height and width return: pos_embed: [grid_size*grid_size, embed_dim] or [1+grid_size*grid_size, embed_dim] (w/
sparsh/tactile_ssl/model/util/pos_embed.py:20
↓ 2 callersFunctionget_attn_bias_and_cat
this will perform the index select, cat the tensors, and provide the attn_bias from cache
model/layers/block.py:161
↓ 2 callersFunctionget_attn_bias_and_cat
this will perform the index select, cat the tensors, and provide the attn_bias from cache
sparsh/tactile_ssl/model/layers/block.py:164
↓ 2 callersMethodget_codebook_indices
(self)
model/layers/gumbel_vector_quantizer.py:97
↓ 2 callersMethodget_codebook_indices
(self)
sparsh/tactile_ssl/model/layers/gumbel_vector_quantizer.py:97
↓ 2 callersMethodget_masks_img
(self, masks)
sparsh/tactile_ssl/algorithm/ijepa.py:196
↓ 2 callersMethodget_model_inputs
(self)
sparsh/tactile_ssl/data/vision_based_interactive.py:150
↓ 2 callersFunctionget_path_images
(config, dataset_name)
sparsh/tactile_ssl/data/digit/utils.py:41
↓ 2 callersFunctionget_world_size
()
util/misc.py:195
↓ 2 callersFunctiongradient
Calculate gradient in data. Args: data (Tensor): input data with shape (B, C, H, W). stride (int): stride for distance of calcula
sparsh/tactile_ssl/downstream_task/utils_forcefield/ssl_utils.py:76
↓ 2 callersMethodinit_weights
(self)
sparsh/tactile_ssl/model/multimodal_transformer.py:159
↓ 2 callersFunctionis_dist_avail_and_initialized
()
utils.py:38
↓ 2 callersFunctionis_dist_avail_and_initialized
()
sparsh/tactile_ssl/model/utils.py:38
↓ 2 callersFunctionload_data
(data_dir: str, nominal_freq: int)
sparsh/scripts/slip_labelling.py:15
↓ 2 callersFunctionload_dataset_forces
(config, dataset_name, sensor)
sparsh/tactile_ssl/data/digit/utils.py:270
↓ 2 callersFunctionload_feeling_success
(config, dataset_name)
sparsh/tactile_ssl/data/digit/utils.py:275
↓ 2 callersFunctionload_pickle_dataset
(file_dataset)
sparsh/tactile_ssl/data/digit/utils.py:162
↓ 2 callersMethodlog_metrics
(self, outputs, step, trainer_instance=None, label="train")
sparsh/tactile_ssl/downstream_task/forcefield_sl.py:274
↓ 2 callersMethodlog_metrics
(self, outputs, step, trainer_instance=None, label="train")
sparsh/tactile_ssl/downstream_task/pose_sl.py:234
↓ 2 callersMethodlog_metrics
(self, outputs, step, trainer_instance=None, label="train")
sparsh/tactile_ssl/downstream_task/textile_sl.py:144
next →1–100 of 813, ranked by callers