MCPcopy Create free account

hub / github.com/OpenGVLab/UniFormerV2 / functions

Functions872 in github.com/OpenGVLab/UniFormerV2

↓ 89 callersMethodjoin
(self)
slowfast/visualization/demo_loader.py:143
↓ 27 callersMethodget
Return visualized frames/clips in the correct order based on task id if result(s) is available. Otherwise, raise queue.Empty exceptio
slowfast/visualization/async_predictor.py:193
↓ 24 callersMethodreset
Reset the Meter.
slowfast/utils/meters.py:156
↓ 21 callersMethodreset
Reset the Meter.
slowfast/utils/meters_co.py:156
↓ 19 callersMethodget
Convenience function for accesssing box coordinates. Returns: a numpy array of shape [N, 4] representing box corners
slowfast/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
slowfast/utils/ava_evaluation/np_box_list.py:100
↓ 11 callersMethodhas_field
(self, field)
slowfast/utils/ava_evaluation/np_box_list.py:72
↓ 11 callersMethodnum_boxes
Return number of boxes held in collections.
slowfast/utils/ava_evaluation/np_box_list.py:64
↓ 10 callersFunctionround_width
(width, multiplier, min_width=1, divisor=1, verbose=False)
slowfast/models/utils.py:8
↓ 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
slowfast/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
slowfast/utils/ava_evaluation/np_box_mask_list.py:67
↓ 9 callersMethodput
Add the new task to task queue. Args: task (TaskInfo object): task object that contain the necessary info
slowfast/visualization/async_predictor.py:183
↓ 8 callersMethod__init__
(self, in_features, hidden_features=None, out_features=None, act_layer=nn.GELU, drop=0.)
slowfast/models/uniformer.py:50
↓ 8 callersFunctionget_norm
Args: cfg (CfgNode): model building configs, details are in the comments of the config file. Returns: nn.Module:
slowfast/models/batchnorm_helper.py:15
↓ 7 callersFunction_check_args_tf
(kwargs)
slowfast/datasets/rand_augment.py:60
↓ 7 callersMethoddecode
(self, tokens)
extract_clip/simple_tokenizer.py:129
↓ 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
slowfast/utils/ava_evaluation/np_box_list_ops.py:101
↓ 7 callersFunctionlaunch_job
Run 'func' on one or more GPUs, specified in cfg Args: cfg (CfgNode): configs. Details can be found in slowfast/config/de
slowfast/utils/misc.py:283
↓ 7 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:
slowfast/utils/checkpoint_amp_co.py:239
↓ 7 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:
slowfast/utils/checkpoint.py:191
↓ 7 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:
slowfast/utils/checkpoint_amp.py:235
↓ 6 callersMethod__init__
(self, embed_dim: int, # vision image_resolution: int,
extract_clip/model.py:244
↓ 6 callersMethod__init__
Constructor. Args: categories: A list of dicts, each of which has the following keys - 'id': (required) an integer id u
slowfast/utils/ava_evaluation/object_detection_evaluation.py:64
↓ 6 callersMethodadd_image
(self, tag, img_tensor, global_step=None, dataformats='CHW')
slowfast/visualization/tensorboard_vis.py:183
↓ 6 callersMethodadd_value
Add a new scalar value to the deque.
slowfast/utils/meters.py:431
↓ 6 callersMethodadd_value
Add a new scalar value to the deque.
slowfast/utils/meters_co.py:431
↓ 6 callersFunctionblend
(image1, image2, alpha)
slowfast/datasets/cv2_transform.py:632
↓ 6 callersFunctionbuild_model
Builds the video model. Args: cfg (configs): configs that contains the hyper-parameters to build the backbone. Details can be
slowfast/models/build.py:23
↓ 6 callersMethodget_win_median
Calculate the current median value of the deque.
slowfast/utils/meters.py:439
↓ 6 callersMethodget_win_median
Calculate the current median value of the deque.
slowfast/utils/meters_co.py:439
↓ 6 callersMethoditer_tic
Start to record time.
slowfast/utils/meters.py:138
↓ 6 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:
slowfast/utils/checkpoint_amp_ema.py:238
↓ 6 callersMethodset
(self, model)
slowfast/utils/ema.py:111
↓ 6 callersMethodupdate_stats
Update the current stats. Args: preds (tensor): prediction embedding. ori_boxes (tensor): original boxes (x1,
slowfast/utils/meters.py:166
↓ 5 callersFunction_randomly_negate
With 50% prob, negate the value
slowfast/datasets/rand_augment.py:197
↓ 5 callersFunctioncreate_random_augment
Get video randaug transform. Args: input_size: The size of the input video in tuple. auto_augment: Parameters for randaug. A
slowfast/datasets/transform.py:657
↓ 5 callersFunctionget_checkpoint_dir
Get path for storing checkpoints. Args: path_to_job (string): the path to the folder of the current job.
slowfast/utils/checkpoint_amp_co.py:37
↓ 5 callersFunctionget_checkpoint_dir
Get path for storing checkpoints. Args: path_to_job (string): the path to the folder of the current job.
slowfast/utils/checkpoint_amp_ema.py:40
↓ 5 callersFunctionget_checkpoint_dir
Get path for storing checkpoints. Args: path_to_job (string): the path to the folder of the current job.
slowfast/utils/checkpoint_amp.py:37
↓ 5 callersMethodget_extra_fields
Return all non-box fields.
slowfast/utils/ava_evaluation/np_box_list.py:68
↓ 5 callersFunctionget_head_act
Return the actual head activation function given the activation fucntion name. Args: act_func (string): activation function to use.
slowfast/models/ptv_model_builder.py:34
↓ 5 callersMethoditer_toc
Stop to record time.
slowfast/utils/meters.py:145
↓ 5 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
slowfast/datasets/cv2_transform.py:77
↓ 4 callersMethod__init__
The `__init__` method of any subclass should also contain these arguments. Args: cfg (CfgNode): model buildi
slowfast/models/ptv_model_builder.py:429
↓ 4 callersMethod__init__
The `__init__` method of any subclass should also contain these arguments. Args: cfg (CfgNode): model buildi
slowfast/models/video_model_builder.py:628
↓ 4 callersMethod__init__
( self, d_model, n_head, attn_mask=None, mlp_factor=4.0, dropout=0.0, drop_path=0.0,
slowfast/models/uniformerv2_model.py:132
↓ 4 callersMethod__init__
ResBlock class constructs redisual blocks. More details can be found in: Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun.
slowfast/models/resnet_helper.py:395
↓ 4 callersFunction_get_param_spatial_crop
Given scale, ratio, height and width, return sampled coordinates of the videos.
slowfast/datasets/transform.py:535
↓ 4 callersMethod_make_layer
(self, planes, blocks, stride=1)
extract_clip/model.py:129
↓ 4 callersMethodadd_scalars
Add multiple scalars to Tensorboard logs. Args: data_dict (dict): key is a string specifying the tag of value.
slowfast/visualization/tensorboard_vis.py:90
↓ 4 callersFunctionattention_pool
(tensor, pool, thw_shape, has_cls_embed=True, norm=None)
slowfast/models/attention.py:12
↓ 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_
slowfast/utils/ava_evaluation/np_box_mask_list_ops.py:33
↓ 4 callersMethodclose
(self)
slowfast/visualization/tensorboard_vis.py:233
↓ 4 callersFunctionconv_1x1x1
(inp, oup, groups=1)
slowfast/models/uniformer.py:36
↓ 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
slowfast/utils/ava_evaluation/np_box_mask_list_ops.py:118
↓ 4 callersFunctionget_checkpoint_dir
Get path for storing checkpoints. Args: path_to_job (string): the path to the folder of the current job.
slowfast/utils/checkpoint.py:38
↓ 4 callersFunctionget_name_convert_func
Get the function to convert Caffe2 layer names to PyTorch layer names. Returns: (func): function to convert parameter name from Caffe
slowfast/utils/c2_model_loading.py:9
↓ 4 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
slowfast/datasets/decoder.py:31
↓ 4 callersFunctiongrayscale
Convert the image to gray scale. Args: image (tensor): image to convert to gray scale. Dimension is `channel` x `height`
slowfast/datasets/cv2_transform.py:636
↓ 4 callersFunctionload_config
Given the arguemnts, load and initialize the configs. Args: args (argument): arguments includes `shard_id`, `num_shards`,
slowfast/utils/parser.py:67
↓ 4 callersMethodlog_iter_stats
Log the stats. Args: cur_epoch (int): the current epoch. cur_iter (int): the current iteration.
slowfast/utils/meters.py:86
↓ 4 callersFunctionread_csv
Loads boxes and class labels from a CSV file in the AVA format. CSV file format described at https://research.google.com/ava/download.html. Ar
slowfast/utils/ava_eval_helper.py:54
↓ 4 callersMethodstart
(self)
slowfast/visualization/demo_loader.py:140
↓ 4 callersFunctionsub_to_normal_bn
Convert the Sub-BN paprameters to normal BN parameters in a state dict. There are two copies of BN layers in a Sub-BN implementation: `bn.bn`
slowfast/utils/checkpoint_amp_ema.py:411
↓ 3 callersMethod__init__
The `__init__` method of any subclass should also contain these arguments. Args: dim_in (int): the channel dimension of
slowfast/models/stem_helper.py:211
↓ 3 callersFunction_pil_interp
(method)
slowfast/datasets/transform.py:30
↓ 3 callersFunctionadd_confusion_matrix
Calculate and plot confusion matrix to a SummaryWriter. Args: writer (SummaryWriter): the SummaryWriter to write the matrix to.
slowfast/visualization/tensorboard_vis.py:238
↓ 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
slowfast/visualization/tensorboard_vis.py:411
↓ 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.
slowfast/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] repre
slowfast/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 a
slowfast/utils/ava_evaluation/np_mask_ops.py:33
↓ 3 callersFunctionassert_and_infer_cfg
(cfg)
slowfast/config/defaults.py:1182
↓ 3 callersFunctionblend
Blend two images with a given weight alpha. Args: images1 (tensor): the first images to be blended, the dimension is `num
slowfast/datasets/transform.py:312
↓ 3 callersFunctionbn_3d
(dim)
slowfast/models/uniformer.py:45
↓ 3 callersMethodclear
Clears the state to prepare for a fresh evaluation.
slowfast/utils/ava_evaluation/object_detection_evaluation.py:102
↓ 3 callersFunctionconv_3x3x3
(inp, oup, groups=1)
slowfast/models/uniformer.py:39
↓ 3 callersMethoddata_toc
(self)
slowfast/utils/meters.py:152
↓ 3 callersFunctionget_layer
Return the targeted layer (nn.Module Object) given a hierarchical layer name, separated by /. Args: model (model): model to get l
slowfast/visualization/utils.py:325
↓ 3 callersFunctionload_state_dict
(model, state_dict)
slowfast/models/uniformerv2_model.py:346
↓ 3 callersMethodno_weight_decay
(self)
slowfast/models/uniformer.py:375
↓ 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
slowfast/utils/parser.py:13
↓ 3 callersFunctionparse_bboxes_file
Parse AVA bounding boxes files. Args: ann_filenames (list of str(s)): a list of AVA bounding boxes annotation files. ann_is_g
slowfast/datasets/ava_helper.py:181
↓ 3 callersMethodplot_eval
Plot confusion matrices and histograms for eval/test set. Args: preds (tensor or list of tensors): list of predictions.
slowfast/visualization/tensorboard_vis.py:101
↓ 3 callersFunctionread_exclusions
Reads a CSV file of excluded timestamps. Args: exclusions_file: A file object containing a csv of video-id,timestamp. Returns: A s
slowfast/utils/ava_eval_helper.py:91
↓ 3 callersFunctionread_labelmap
Read label map and class ids.
slowfast/utils/ava_eval_helper.py:109
↓ 3 callersMethodupdate
(self, model)
slowfast/utils/ema.py:59
↓ 2 callersMethod__init__
Args: cfg (CfgNode): configs. Details can be found in slowfast/config/defaults.py n_workers (Optional
slowfast/visualization/async_predictor.py:154
↓ 2 callersMethod__init__
( self, in_features, hidden_features=None, out_features=None, act_laye
slowfast/models/common.py:8
↓ 2 callersMethod__init__
The `__init__` method of any subclass should also contain these arguments. X3DHead takes a 5-dim feature tensor (BxCxTxHx
slowfast/models/head_helper.py:232
↓ 2 callersMethod_aug_frame
( self, frames, spatial_sample_index, min_scale, max_scale, cr
slowfast/datasets/kinetics.py:324
↓ 2 callersMethod_aug_frame
( self, frames, spatial_sample_index, min_scale, max_scale, cr
slowfast/datasets/mit.py:332
↓ 2 callersMethod_aug_frame
( self, frames, spatial_sample_index, min_scale, max_scale, cr
slowfast/datasets/kinetics_sparse.py:333
↓ 2 callersMethod_aug_frame
( self, frames, spatial_sample_index, min_scale, max_scale, cr
slowfast/datasets/anet.py:354
↓ 2 callersMethod_aug_frame
( self, frames, spatial_sample_index, min_scale, max_scale, cr
slowfast/datasets/sth.py:292
↓ 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.
slowfast/utils/ava_evaluation/np_box_list_ops.py:572
↓ 2 callersMethod_erase
(self, img, chan, img_h, img_w, dtype)
slowfast/datasets/random_erasing.py:87
↓ 2 callersFunction_get_pixels
( per_pixel, rand_color, patch_size, dtype=torch.float32, device="cuda" )
slowfast/datasets/random_erasing.py:18
↓ 2 callersMethod_initialize_detections
(self)
slowfast/utils/ava_evaluation/object_detection_evaluation.py:569
↓ 2 callersMethod_prepare_im_tf
(self, im_path)
slowfast/datasets/imagenet.py:129
↓ 2 callersFunction_transform
(n_px)
extract_clip/clip.py:79
next →1–100 of 872, ranked by callers