MCPcopy Create free account

hub / github.com/ChenHsing/SVFormer / functions

Functions683 in github.com/ChenHsing/SVFormer

↓ 26 callersMethodreset
Reset the Meter.
timesformer/utils/meters.py:611
↓ 19 callersMethodget
Convenience function for accesssing box coordinates. Returns: a numpy array of shape [N, 4] representing box corners
timesformer/utils/ava_evaluation/np_box_list.py:92
↓ 19 callersMethodget_field
Accesses data associated with the specified field in the box collection. Args: field: a string parameter used to speficy a related field to
timesformer/utils/ava_evaluation/np_box_list.py:100
↓ 13 callersMethodadd_value
Add a new scalar value to the deque.
timesformer/utils/meters.py:221
↓ 12 callersMethodget
Get value by key at specified index (indices) if idx == None, returns value for key at each output index if idx is an integer, return
timesformer/models/features.py:28
↓ 12 callersFunctiontrunc_normal_
r"""Fills the input Tensor with values drawn from a truncated normal distribution. The values are effectively drawn from the normal distributi
timesformer/models/vit_utils.py:57
↓ 11 callersMethodget_win_median
Calculate the current median value of the deque.
timesformer/utils/meters.py:229
↓ 11 callersMethodhas_field
(self, field)
timesformer/utils/ava_evaluation/np_box_list.py:72
↓ 11 callersMethodnum_boxes
Return number of boxes held in collections.
timesformer/utils/ava_evaluation/np_box_list.py:64
↓ 9 callersMethodadd_field
Add data to a specified field. Args: field: a string parameter used to speficy a related field to be accessed. field_data: a numpy ar
timesformer/utils/ava_evaluation/np_box_list.py:75
↓ 9 callersMethodget_masks
Convenience function for accessing masks. Returns: a numpy array of shape [N, height, width] representing masks
timesformer/utils/ava_evaluation/np_box_mask_list.py:67
↓ 9 callersFunctionlaunch_job
Run 'func' on one or more GPUs, specified in cfg Args: cfg (CfgNode): configs. Details can be found in lib/config/default
timesformer/utils/misc.py:272
↓ 8 callersMethoditer_tic
Start to record time.
timesformer/utils/meters.py:628
↓ 8 callersMethodupdate_stats
Update the current stats. Args: top1_err (float): top1 error rate. top5_err (float): top5 error rate.
timesformer/utils/meters.py:646
↓ 7 callersMethod__init__
(self, in_features, hidden_features=None, out_features=None, act_layer=nn.GELU, drop=0.)
timesformer/models/vit.py:46
↓ 7 callersFunction_check_args_tf
(kwargs)
timesformer/datasets/rand_augment.py:58
↓ 7 callersFunctiongather
Gather boxes from BoxList according to indices and return new BoxList. By default, gather returns boxes corresponding to the input index list, as
timesformer/utils/ava_evaluation/np_box_list_ops.py:101
↓ 6 callersMethod__init__
Constructor. Args: categories: A list of dicts, each of which has the following keys - 'id': (required) an integer id uniquely iden
timesformer/utils/ava_evaluation/object_detection_evaluation.py:64
↓ 6 callersMethod_round_width
Round width of filters based on width multiplier.
timesformer/models/video_model_builder.py:672
↓ 6 callersMethodadd_scalars
Add multiple scalars to Tensorboard logs. Args: data_dict (dict): key is a string specifying the tag of value.
timesformer/visualization/tensorboard_vis.py:89
↓ 6 callersFunctionblend
(image1, image2, alpha)
timesformer/datasets/cv2_transform.py:631
↓ 6 callersMethoditer_toc
Stop to record time.
timesformer/utils/meters.py:635
↓ 5 callersMethod__init__
(self, in_features, hidden_features=None, out_features=None, act_layer=nn.GELU, drop=0.)
timesformer/models/bottle.py:41
↓ 5 callersMethod__init__
(self, in_features, hidden_features=None, out_features=None, act_layer=nn.GELU, drop=0.)
timesformer/models/cross_view.py:41
↓ 5 callersFunction_randomly_negate
With 50% prob, negate the value
timesformer/datasets/rand_augment.py:195
↓ 5 callersFunctionget_checkpoint_dir
Get path for storing checkpoints. Args: path_to_job (string): the path to the folder of the current job.
timesformer/utils/checkpoint.py:37
↓ 5 callersMethodget_extra_fields
Return all non-box fields.
timesformer/utils/ava_evaluation/np_box_list.py:68
↓ 5 callersFunctionload_state_dict
(checkpoint_path, use_ema=False)
timesformer/models/helpers.py:24
↓ 5 callersMethodlog_iter_stats
log the stats of the current iteration. Args: cur_epoch (int): the number of current epoch. cur_iter (int): t
timesformer/utils/meters.py:679
↓ 5 callersMethodupdate
(self, model)
timesformer/utils/ema.py:68
↓ 4 callersMethod__init__
ResBlock class constructs redisual blocks. More details can be found in: Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun.
timesformer/models/resnet_helper.py:404
↓ 4 callersFunction_get_param_spatial_crop
Given scale, ratio, height and width, return sampled coordinates of the videos.
timesformer/datasets/video_transform.py:499
↓ 4 callersMethodbackward
(ctx, grad_output)
timesformer/models/operators.py:29
↓ 4 callersFunctionbox_list_to_box_mask_list
Converts a BoxList containing 'masks' into a BoxMaskList. Args: boxlist: An np_box_list.BoxList object. Returns: An np_box_mask_list.Box
timesformer/utils/ava_evaluation/np_box_mask_list_ops.py:33
↓ 4 callersFunctionbuild_model
Builds the video model. Args: cfg (configs): configs that contains the hyper-parameters to build the backbone. Details can be
timesformer/models/build.py:17
↓ 4 callersMethodclose
(self)
timesformer/visualization/tensorboard_vis.py:229
↓ 4 callersMethoddata_toc
(self)
timesformer/utils/meters.py:642
↓ 4 callersFunctiongather
Gather boxes from np_box_mask_list.BoxMaskList according to indices. By default, gather returns boxes corresponding to the input index list, as w
timesformer/utils/ava_evaluation/np_box_mask_list_ops.py:118
↓ 4 callersFunctionget_padding
(kernel_size: int, stride: int = 1, dilation: int = 1, **_)
timesformer/models/vit_utils.py:87
↓ 4 callersFunctiongrayscale
Convert the image to gray scale. Args: image (tensor): image to convert to gray scale. Dimension is `channel` x `height`
timesformer/datasets/cv2_transform.py:635
↓ 4 callersFunctionload_checkpoint
Load the checkpoint from the given file. If inflation is True, inflate the 2D Conv weights from the checkpoint to 3D Conv. Args:
timesformer/utils/checkpoint.py:204
↓ 4 callersFunctionload_config
Given the arguemnts, load and initialize the configs. Args: args (argument): arguments includes `shard_id`, `num_shards`,
timesformer/utils/parser.py:66
↓ 4 callersFunctionscale
Scale the short side of the image to size. Args: size (int): size to scale the image. image (array): image to perform short s
timesformer/datasets/cv2_transform.py:76
↓ 3 callersMethod__init__
(self, feature_info: List[Dict], out_indices: Tuple[int])
timesformer/models/features.py:14
↓ 3 callersMethod__init__
The `__init__` method of any subclass should also contain these arguments. Args: cfg (CfgNode): model buildi
timesformer/models/video_model_builder.py:634
↓ 3 callersFunction_pil_interp
(method)
timesformer/datasets/video_transform.py:33
↓ 3 callersFunctionadd_confusion_matrix
Calculate and plot confusion matrix to a SummaryWriter. Args: writer (SummaryWriter): the SummaryWriter to write the matrix to.
timesformer/visualization/tensorboard_vis.py:234
↓ 3 callersFunctionadd_heatmap
Add heatmap to 2D tensor. Args: tensor (tensor): a 2D tensor. Tensor value must be in [0..1] range. Returns: heatmap (ten
timesformer/visualization/tensorboard_vis.py:407
↓ 3 callersMethodadd_single_ground_truth_image_info
Adds groundtruth for a single image to be used for evaluation. Args: image_id: A unique string/integer identifier for the image. grou
timesformer/utils/ava_evaluation/object_detection_evaluation.py:75
↓ 3 callersFunctionarea
Computes area of boxes. Args: boxes: Numpy array with shape [N, 4] holding N boxes Returns: a numpy array with shape [N*1] representing
timesformer/utils/ava_evaluation/np_box_ops.py:31
↓ 3 callersFunctionarea
Computes area of masks. Args: masks: Numpy array with shape [N, height, width] holding N masks. Masks values are of type np.uint8 and val
timesformer/utils/ava_evaluation/np_mask_ops.py:33
↓ 3 callersFunctionblend
Blend two images with a given weight alpha. Args: images1 (tensor): the first images to be blended, the dimension is `num
timesformer/datasets/transform.py:276
↓ 3 callersFunctionblend
Blend two images with a given weight alpha. Args: images1 (tensor): the first images to be blended, the dimension is
timesformer/datasets/video_transform.py:276
↓ 3 callersFunctioncrop_boxes
Peform crop on the bounding boxes given the offsets. Args: boxes (ndarray or None): bounding boxes to peform crop. The dimension
timesformer/datasets/transform.py:65
↓ 3 callersFunctioneval_epoch
Evaluate the model on the val set. Args: val_loader (loader): data loader to provide validation data. model (model): mode
tools/train_net_emamix.py:454
↓ 3 callersFunctionget_norm
Args: cfg (CfgNode): model building configs, details are in the comments of the config file. Returns: nn.Module:
timesformer/models/batchnorm_helper.py:14
↓ 3 callersFunctionget_start_end_idx
Sample a clip of size clip_size from a video of size video_size and return the indices of the first and last frame of the clip. If clip_idx i
timesformer/datasets/decoder.py:30
↓ 3 callersFunctionload_pretrained
(model, cfg=None, num_classes=1000, in_chans=3, filter_fn=None, img_size=224, num_frames=8, num_patches=196, a
timesformer/models/helpers.py:100
↓ 3 callersMethodlog_epoch_stats
Log the stats of the current epoch. Args: cur_epoch (int): the number of current epoch.
timesformer/utils/meters.py:705
↓ 3 callersFunctionparse_args
Parse the following arguments for a default parser for PySlowFast users. Args: shard_id (int): shard id for the current machine. Star
timesformer/utils/parser.py:12
↓ 3 callersMethodplot_eval
Plot confusion matrices and histograms for eval/test set. Args: preds (tensor or list of tensors): list of predictions.
timesformer/visualization/tensorboard_vis.py:100
↓ 3 callersFunctionset_layer
(model, layer, val)
timesformer/models/helpers.py:331
↓ 3 callersMethodupdate_long_cycle
Before every epoch, check if long cycle shape should change. If it should, update cfg accordingly. Args: cfg
timesformer/utils/multigrid.py:62
↓ 2 callersMethod__init__
The `__init__` method of any subclass should also contain these arguments. Args: dim_in (int): the channel dimension of
timesformer/models/stem_helper.py:203
↓ 2 callersFunction_cfg
(url='', **kwargs)
timesformer/models/vit.py:22
↓ 2 callersFunction_cfg
(url='', **kwargs)
timesformer/models/bottle.py:17
↓ 2 callersFunction_cfg
(url='', **kwargs)
timesformer/models/cross_view.py:17
↓ 2 callersMethod_collect
(self, x)
timesformer/models/features.py:187
↓ 2 callersFunction_copy_extra_fields
Copies the extra fields of boxlist_to_copy_from to boxlist_to_copy_to. Args: boxlist_to_copy_to: BoxList to which extra fields are copied.
timesformer/utils/ava_evaluation/np_box_list_ops.py:572
↓ 2 callersMethod_erase
(self, img, chan, img_h, img_w, dtype)
timesformer/datasets/random_erasing.py:80
↓ 2 callersFunction_get_feature_info
(net, out_indices)
timesformer/models/features.py:126
↓ 2 callersFunction_get_pixels
( per_pixel, rand_color, patch_size, dtype=torch.float32, device="cuda" )
timesformer/datasets/random_erasing.py:11
↓ 2 callersMethod_initialize_detections
(self)
timesformer/utils/ava_evaluation/object_detection_evaluation.py:561
↓ 2 callersFunction_module_list
(module, flatten_sequential=False)
timesformer/models/features.py:112
↓ 2 callersMethod_update
(self, model, update_fn)
timesformer/utils/ema.py:115
↓ 2 callersMethodadd_single_detected_image_info
Adds detections for a single image to be used for evaluation. Args: image_id: A unique string/integer identifier for the image. detec
timesformer/utils/ava_evaluation/object_detection_evaluation.py:86
↓ 2 callersFunctionbuild_trainer
Build training model and its associated tools, including optimizer, dataloaders and meters. Args: cfg (CfgNode): configs. Det
tools/train_net_emamix.py:600
↓ 2 callersFunctioncalculate_and_update_precise_bn
Update the stats in bn layers by calculate the precise stats. Args: loader (loader): data loader to provide training data.
tools/train_net_emamix.py:576
↓ 2 callersFunctioncenter_crop
Perform center crop on input images. Args: size (int): size of the cropped height and width. image (array): the image to perf
timesformer/datasets/cv2_transform.py:457
↓ 2 callersMethodclear
Clears the state to prepare for a fresh evaluation.
timesformer/utils/ava_evaluation/object_detection_evaluation.py:102
↓ 2 callersFunctioncrop_boxes
Peform crop on the bounding boxes given the offsets. Args: boxes (ndarray or None): bounding boxes to peform crop. The dimension
timesformer/datasets/video_transform.py:101
↓ 2 callersMethodevaluate
Evaluates detections and returns a dictionary of metrics.
timesformer/utils/ava_evaluation/object_detection_evaluation.py:97
↓ 2 callersFunctionfilter_scores_greater_than
Filter to keep only boxes and masks with score exceeding a given threshold. This op keeps the collection of boxes and masks whose corresponding sco
timesformer/utils/ava_evaluation/np_box_mask_list_ops.py:395
↓ 2 callersFunctionfilter_scores_greater_than
Filter to keep only boxes with score exceeding a given threshold. This op keeps the collection of boxes whose corresponding scores are greater th
timesformer/utils/ava_evaluation/np_box_list_ops.py:503
↓ 2 callersMethodget_activations
Obtain all activations from layers that we register hooks for. Args: input (tensors, list of tensors): the model input.
timesformer/visualization/utils.py:210
↓ 2 callersFunctionget_class_names
Read json file with entries {classname: index} and return an array of class names in order. If parent_path is provided, load and map all
timesformer/utils/misc.py:303
↓ 2 callersMethodget_dicts
return info dicts for specified keys (or all if None) at specified indices (or out_indices if None)
timesformer/models/features.py:41
↓ 2 callersFunctionget_func
(cfg)
run_net.py:11
↓ 2 callersFunctionget_layer
Return the targeted layer (nn.Module Object) given a hierarchical layer name, separated by /. Args: model (model): model to get l
timesformer/visualization/utils.py:324
↓ 2 callersFunctionget_lr_func
Given the configs, retrieve the specified lr policy function. Args: lr_policy (string): the learning rate policy to use for the job.
timesformer/utils/lr_policy.py:77
↓ 2 callersFunctionget_map
Compute mAP for multi-label case. Args: preds (numpy tensor): num_examples x num_classes. labels (numpy tensor): num_examples
timesformer/utils/meters.py:740
↓ 2 callersFunctionget_model_stats
Compute statistics for the current model given the config. Args: model (model): model to perform analysis. cfg (CfgNode): con
timesformer/utils/misc.py:126
↓ 2 callersFunctionget_resize_sizes
(im_h, im_w, size)
timesformer/datasets/functional.py:67
↓ 2 callersFunctionget_same_padding
(x: int, k: int, s: int, d: int)
timesformer/models/vit_utils.py:114
↓ 2 callersFunctionget_same_padding
(x: int, k: int, s: int, d: int)
timesformer/models/conv2d_same.py:22
↓ 2 callersFunctiongetidx
(num)
tools/train_net_emamix.py:209
↓ 2 callersFunctiongrayscale
Get the grayscale for the input images. The channels of images should be in order BGR. Args: images (tensor): the input images fo
timesformer/datasets/transform.py:292
↓ 2 callersFunctiongrayscale
Get the grayscale for the input images. The channels of images should be in order BGR. Args: images (tensor): the input image
timesformer/datasets/video_transform.py:292
↓ 2 callersFunctionintersection
Compute pairwise intersection areas between boxes. Args: boxes1: a numpy array with shape [N, 4] holding N boxes boxes2: a numpy array with
timesformer/utils/ava_evaluation/np_box_ops.py:43
↓ 2 callersFunctionintersection
Compute pairwise intersection areas between masks. Args: masks1: a numpy array with shape [N, height, width] holding N masks. Masks value
timesformer/utils/ava_evaluation/np_mask_ops.py:51
next →1–100 of 683, ranked by callers