MCPcopy Create free account

hub / github.com/Chuhanxx/helping_hand_for_egocentric_videos / functions

Functions394 in github.com/Chuhanxx/helping_hand_for_egocentric_videos

↓ 69 callersMethodto
(self, device)
model/box_utils.py:387
↓ 17 callersMethodupdate
(self, val, n=1, history=0, step=5)
utils/train_utils.py:115
↓ 11 callersFunctionsim_matrix
added eps for numerical stability
model/metric.py:363
↓ 9 callersMethodwith_pos_embed
(self, tensor, pos: Optional[Tensor])
model/tfm_decoder.py:385
↓ 7 callersFunctionbox_cxcywh_to_xyxy
(x)
utils/box_ops.py:9
↓ 6 callersMethod__init__
(self, in_features, hidden_features=None, out_features=None, act_layer=nn.GELU, drop=0.)
model/LaviLa.py:176
↓ 6 callersMethod__init__
(self, input_dim, hidden_dim, output_dim, num_layers)
model/tfm_decoder.py:99
↓ 6 callersMethod__init__
(self, embed_dim: int, # vision image_resolution: int,
model/openai_model.py:276
↓ 6 callersFunctioninit_video_transform_dict
(input_res=224, center_crop=256, randcrop_scale=(0.5, 1.0),
data_loader/transforms.py:38
↓ 5 callersMethod_get_caption
(self, sample)
data_loader/EgoClip_EgoMCQ_dataset.py:161
↓ 5 callersFunctionmap
Returns mAP, weighted mAP, and AP array
model/metric.py:267
↓ 5 callersFunctionsample_frames
(num_frames, vlen, sample='rand', fix_start=None)
base/base_dataset.py:178
↓ 4 callersFunctionCLIP_OPENAI_TIMESFORMER_LARGE
( num_frames=4, timesformer_gated_xattn=False, drop_path_rate=0, timesformer_freeze_space=False, tempe
model/LaviLa.py:114
↓ 4 callersMethod_make_layer
(self, planes, blocks, stride=1)
model/openai_model.py:140
↓ 4 callersFunction_valid_all_gather
wrapper fn for all_gather, handle 1-gpu training as well.
utils/train_utils.py:51
↓ 4 callersFunction_valid_all_gather
wrapper fn for all_gather, handle 1-gpu training as well.
run/test_EgoMCQ.py:146
↓ 4 callersMethodadd_data
(self, name, value, step, data_type='scalar')
utils/tensorboard_utils.py:130
↓ 4 callersFunctioninflate_positional_embeds
( current_model_state_dict, new_state_dict, num_frames=4, load_temporal_fix='bilinear', name =
run/test_egtea.py:46
↓ 4 callersFunctionread_json
(fname)
utils/utils.py:246
↓ 4 callersFunctionvideo_loader_by_frames
(root, vid, frame_ids)
data_loader/Egtea.py:82
↓ 3 callersMethod__init__
(self, ordering)
data_loader/lavila_transforms.py:19
↓ 3 callersMethod__init__
(self, dataset_name, text_params, video_params,
data_loader/data_loader.py:58
↓ 3 callersMethod__init__
(self, dataset, batch_size, shuffle, validation_split, num_workers, collate_fn=default_collate)
base/base_data_loader.py:12
↓ 3 callersMethod_get_video_frames
(self, video_fp, video_sec, bound_sec, boxes=None, pred=False)
data_loader/EgoClip_EgoMCQ_dataset.py:122
↓ 3 callersMethod_get_video_path
(self, sample)
data_loader/EgoClip_EgoMCQ_dataset.py:106
↓ 3 callersMethod_get_video_path
(self, sample)
base/base_dataset.py:74
↓ 3 callersFunctioncalculate_DCG
Calculates the Discounted Cumulative Gain (DCG) between two modalities for the first modality. DCG = \sum_{i=1}^k \frac{rel_i}{log_2(i +
utils/nDCG.py:3
↓ 3 callersFunctioncalculate_nDCG
Calculates the normalised Discounted Cumulative Gain (nDCG) between two modalities for the first modality using the Discounted Cumulative Gai
utils/nDCG.py:92
↓ 3 callersFunctiondataset_loader
(dataset_name, text_params, video_params, data_dir,
data_loader/data_loader.py:9
↓ 3 callersFunctiondraw_bbox
( tensor, bboxes, width=2, texts=None, norm=True, mean=[123.675, 116.28, 103.53],
utils/utils.py:110
↓ 3 callersFunctionegomcq_accuracy_metrics
(preds, labels, types)
model/metric.py:209
↓ 3 callersFunctionget_frame_ids
(start_frame, end_frame, num_segments=32, jitter=True)
data_loader/Egtea.py:67
↓ 3 callersFunctionget_frame_ids
(start_frame, end_frame, num_segments=32, jitter=True)
base/base_dataset.py:207
↓ 3 callersFunctionimg_denorm
(tensor, mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225],
utils/utils.py:97
↓ 3 callersFunctioninit_transform_dict
(input_res=224, center_crop=256, randcrop_scale=(0.5, 1.0),
data_loader/transforms.py:9
↓ 3 callersMethodload_hand_object_box
(self, sample)
data_loader/EgoClip_EgoMCQ_dataset.py:79
↓ 3 callersMethodpreload
(self)
utils/data_utils.py:14
↓ 3 callersMethodrun
(self)
utils/data_utils.py:138
↓ 3 callersFunctionsample_frames_start_end
(num_frames, start, end, sample='rand', fix_start=None)
base/base_dataset.py:221
↓ 3 callersFunctionsave_runtime_checkpoint
(state, filename, rm_history=True)
utils/train_utils.py:192
↓ 2 callersMethod__init__
(self, max_prefetch=1)
utils/data_utils.py:158
↓ 2 callersFunction_get_activation_fn
Return an activation function given a string
model/tfm_decoder.py:487
↓ 2 callersMethod_get_caption
(self, sample)
base/base_dataset.py:77
↓ 2 callersFunction_get_image_size
Returns image size as [w, h]
utils/custom_transforms.py:10
↓ 2 callersMethod_get_rephrased_caption
(self, sample, video_sec, caption)
data_loader/EgoClip_EgoMCQ_dataset.py:173
↓ 2 callersMethod_get_src_permutation_idx
(self, indices)
model/box_utils.py:186
↓ 2 callersFunction_transform
(n_px)
model/openai_clip.py:89
↓ 2 callersFunctionattn
(q, k, v)
model/LaviLa.py:194
↓ 2 callersFunctionbytes_to_unicode
Returns list of utf-8 byte and a corresponding list of unicode strings. The reversible bpe codes work on unicode strings. This means you
model/tokenizer.py:29
↓ 2 callersFunctioncalculate_IDCG
Calculates the Ideal Discounted Cumulative Gain (IDCG) which is the value of the Discounted Cumulative Gain (DCG) for a perfect retrieval, i.
utils/nDCG.py:74
↓ 2 callersFunctioncalculate_k_counts
Works out the maximum number of allowed retrievals when working out the Discounted Cumulative Gain. For each query the DCG only uses the firs
utils/nDCG.py:44
↓ 2 callersFunctioncenter_plus_twohori_crops
Crop the given image into four tiled borders and the central crop.
utils/custom_transforms.py:67
↓ 2 callersFunctioncompute_box_loss
( box_type, criterion, detr_out, target_boxes, target_classes, all_image_size, n_querie
model/box_utils.py:445
↓ 2 callersFunctioncrop_boxes
Crop the boxes given the crop parameters. Args: boxes (array): boxes to crop, in pixels crop parameters (int): [y1,x1,h,w]
utils/box_ops.py:107
↓ 2 callersFunctiondatetime2sec
(str)
data_loader/EpicKitchens_MIR_dataset.py:17
↓ 2 callersMethoddecode
(self, tokens)
model/tokenizer.py:142
↓ 2 callersFunctiondraw_box_on_clip
(bbox, frames, word=None, name='bbox', color=None)
utils/utils.py:146
↓ 2 callersMethodencode
(self, text)
model/tokenizer.py:134
↓ 2 callersMethodencode_image
(self, image, use_checkpoint=False, apply_project=True)
model/LaviLa.py:650
↓ 2 callersMethodencode_text
(self, text, use_checkpoint=False)
model/LaviLa.py:660
↓ 2 callersMethodextract_noun
(self,sample, caption)
data_loader/EgoClip_EgoMCQ_dataset.py:200
↓ 2 callersFunctiongenerate_label_map
(action_idx_file)
data_loader/Egtea.py:232
↓ 2 callersMethodget_logger
(self, name, verbosity=2)
utils/parse_config.py:118
↓ 2 callersMethodget_loss
(self, loss, outputs, targets, indices, num_boxes, box_type, **kwargs)
model/box_utils.py:198
↓ 2 callersFunctionget_pairs
Return set of symbol pairs in a word. Word is represented as tuple of symbols (symbols being variable-length strings).
model/tokenizer.py:51
↓ 2 callersMethodget_stat
get gpu stats, return as dictionary for logging
utils/tensorboard_utils.py:67
↓ 2 callersFunctionis_dist_avail_and_initialized
()
model/box_utils.py:368
↓ 2 callersFunctionload_hand_boxes
(hand_info, ind, box_type = 'hand_dets')
utils/box_ops.py:93
↓ 2 callersMethodlog
(self, string)
utils/utils.py:61
↓ 2 callersFunctionmkdir
create a single empty directory if it didn't exist Parameters: path (str) -- a single directory path
utils/utils.py:238
↓ 2 callersFunctionpatch_device
(module)
model/openai_clip.py:152
↓ 2 callersFunctionpatch_float
(module)
model/openai_clip.py:176
↓ 2 callersFunctionremap_keys
(clip_state_dict, transformer_layers=12)
model/LaviLa.py:19
↓ 2 callersFunctionsplit_detr_out
(detr_out,start=0, end=2)
model/box_utils.py:433
↓ 2 callersFunctionuniform_crop
Perform uniform spatial sampling on the images and corresponding boxes. Args: images (tensor): images to perform uniform crop. The di
data_loader/lavila_transforms.py:76
↓ 2 callersFunctionverbose
(metrics, name="TEST")
run/test_EgoMCQ.py:138
↓ 2 callersFunctionvisualise_path
:param pred: (P, 2) Tensor where P is the number of predictions, and 2 is the (i,j) coordinate :param target: (T, 2) Tensor where T is the nu
utils/visualisation.py:8
↓ 2 callersMethodwith_pos_embed
(self, tensor, pos: Optional[Tensor])
model/tfm_decoder.py:317
↓ 1 callersMethod__init__
(self, temperature=0.07, noun=True, verb=True)
model/loss.py:9
↓ 1 callersMethod__init__
Create the criterion. Parameters: num_classes: number of object categories, omitting the special no-object category m
model/box_utils.py:105
↓ 1 callersMethod__iter__
(self)
utils/data_utils.py:199
↓ 1 callersFunction_download
(url: str, root: str)
model/openai_clip.py:53
↓ 1 callersMethod_fix_temporal_samples
(self)
base/base_dataset.py:88
↓ 1 callersMethod_get_batch_fmtstr
(self, num_batches)
utils/train_utils.py:186
↓ 1 callersFunction_get_by_path
Access a nested object in tree by sequence of keys.
utils/parse_config.py:164
↓ 1 callersMethod_get_caption
(self, idx, sample)
data_loader/EpicKitchens_MIR_dataset.py:86
↓ 1 callersFunction_get_clones
(module, N)
model/tfm_decoder.py:482
↓ 1 callersMethod_get_gpu_ids
Get the unmasked real GPU IDs.
utils/tensorboard_utils.py:33
↓ 1 callersMethod_get_gpu_stat_keys
Get the GPU stats keys.
utils/tensorboard_utils.py:20
↓ 1 callersMethod_get_gpu_stats
Run nvidia-smi to get the gpu stats
utils/tensorboard_utils.py:40
↓ 1 callersFunction_get_opt_name
(flags)
utils/parse_config.py:152
↓ 1 callersMethod_get_train_item
(self, item)
data_loader/EgoClip_EgoMCQ_dataset.py:245
↓ 1 callersMethod_get_val_item
(self, item)
data_loader/EgoClip_EgoMCQ_dataset.py:296
↓ 1 callersMethod_get_video_lens
(self)
base/base_dataset.py:80
↓ 1 callersMethod_get_video_path
(self, sample, high_res =False)
data_loader/EpicKitchens_MIR_dataset.py:79
↓ 1 callersMethod_load_metadata
(self)
base/base_dataset.py:70
↓ 1 callersFunction_max_by_axis
(the_list)
model/box_utils.py:424
↓ 1 callersMethod_prepare_device
setup GPU device if available, move model into configured device
base/base_trainer.py:137
↓ 1 callersMethod_prepare_device
setup GPU device if available, move model into configured device
base/base_trainer.py:380
↓ 1 callersMethod_reset_parameters
(self)
model/tfm_decoder.py:71
next →1–100 of 394, ranked by callers