MCPcopy Create free account

hub / github.com/MTLab/MorphMLP / functions

Functions764 in github.com/MTLab/MorphMLP

↓ 46 callersMethodjoin
(self)
slowfast/visualization/demo_loader.py:143
↓ 24 callersMethodreset
Reset the Meter.
slowfast/utils/meters.py:156
↓ 21 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
↓ 20 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
↓ 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
↓ 11 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 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:16
↓ 7 callersMethod__init__
(self, in_features, hidden_features=None, out_features=None, act_layer=nn.GELU, drop=0.)
slowfast/models/morphmlp_32.py:18
↓ 7 callersMethod__init__
(self, in_features, hidden_features=None, out_features=None, act_layer=nn.GELU, drop=0.)
slowfast/models/morphmlp.py:20
↓ 7 callersFunction_check_args_tf
(kwargs)
slowfast/datasets/rand_augment.py:60
↓ 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 callersMethodget
(self, ind, time, interp=False)
slowfast/models/contrastive.py:968
↓ 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_value
Add a new scalar value to the deque.
slowfast/utils/meters.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:18
↓ 6 callersMethodeval_knn
(self, q_knn, knn_k=200)
slowfast/models/contrastive.py:235
↓ 6 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:37
↓ 6 callersMethodget_win_median
Calculate the current median value of the deque.
slowfast/utils/meters.py:439
↓ 6 callersMethoditer_tic
Start to record time.
slowfast/utils/meters.py:138
↓ 6 callersMethodsim_loss
(self, q, k)
slowfast/models/contrastive.py:245
↓ 6 callersMethodupdate_stats
Update the current stats. Args: preds (tensor): prediction embedding. ori_boxes (tensor): original boxes (x1,
slowfast/utils/meters.py:166
↓ 5 callersMethod__init__
The `__init__` method of any subclass should also contain these arguments. Args: cfg (CfgNode): model buildi
slowfast/models/ptv_model_builder.py:426
↓ 5 callersFunction_randomly_negate
With 50% prob, negate the value
slowfast/datasets/rand_augment.py:197
↓ 5 callersMethodclose
(self)
slowfast/visualization/tensorboard_vis.py:230
↓ 5 callersMethoddisplay
Either display a single frame (BGR image) to a window or write to an output file if output path is provided.
slowfast/visualization/ava_demo_precomputed_boxes.py:317
↓ 5 callersMethodget_extra_fields
Return all non-box fields.
slowfast/utils/ava_evaluation/np_box_list.py:68
↓ 5 callersMethoditer_toc
Stop to record time.
slowfast/utils/meters.py:145
↓ 5 callersMethodknn_mem_update
(self, q_knn, index)
slowfast/models/contrastive.py:134
↓ 5 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:180
↓ 5 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:180
↓ 5 callersMethodresize
(self, length, duration, dim)
slowfast/models/contrastive.py:955
↓ 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
↓ 5 callersMethodstart
(self)
slowfast/visualization/demo_loader.py:140
↓ 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:666
↓ 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:402
↓ 4 callersMethod__init__
( self, dim_in, dim_out, mlp_dim, num_layers, bn_on=False,
slowfast/models/head_helper.py:147
↓ 4 callersMethod_get_frame_range
Return a clip of `num_frames` frames starting from `start_idx`. If not enough frames from `start_idx`, return the remaining frames fr
slowfast/visualization/ava_demo_precomputed_boxes.py:339
↓ 4 callersFunction_get_param_spatial_crop
Given scale, ratio, height and width, return sampled coordinates of the videos.
slowfast/datasets/transform.py:502
↓ 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:14
↓ 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 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:37
↓ 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_amp.py:37
↓ 4 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
slowfast/utils/misc.py:314
↓ 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 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 callersMethodupdate
(self, mem, momentum, ind, time, interp=False)
slowfast/models/contrastive.py:993
↓ 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:213
↓ 3 callersMethod__init__
(self, length, duration, dim, cfg)
slowfast/models/contrastive.py:940
↓ 3 callersFunction_pil_interp
(method)
slowfast/datasets/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.
slowfast/visualization/tensorboard_vis.py:235
↓ 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:408
↓ 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 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:279
↓ 3 callersMethoddata_toc
(self)
slowfast/utils/meters.py:152
↓ 3 callersMethoddraw_clip
Draw predicted labels or ground truth classes to clip. Draw bouding boxes to clip if bboxes is provided. Boxes will gradually fade in
slowfast/visualization/video_visualizer.py:568
↓ 3 callersMethoddraw_clip_range
Draw predicted labels or ground truth classes to clip. Draw bouding boxes to clip if bboxes is provided. Boxes will gradually fade in
slowfast/visualization/video_visualizer.py:514
↓ 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 callersFunctionget_rel_pos
(rel_pos, d)
slowfast/models/attention.py:51
↓ 3 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
↓ 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:182
↓ 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_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
↓ 3 callersMethodrun_swav_encoder_q
(self, im)
slowfast/models/contrastive.py:850
↓ 2 callersMethodKLDivLoss
(self, out, code)
slowfast/models/contrastive.py:914
↓ 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_align_x_coordinate
Choose an x-coordinate from the box to make sure the text label does not go out of frames. By default, the left x-coordinate is
slowfast/visualization/video_visualizer.py:290
↓ 2 callersMethod_aug_frame
( self, frames, spatial_sample_index, min_scale, max_scale, cr
slowfast/datasets/kinetics.py:320
↓ 2 callersMethod_aug_frame
( self, frames, spatial_sample_index, min_scale, m
slowfast/datasets/sth.py:307
↓ 2 callersMethod_batch_unshuffle
(self, x, idx_restore)
slowfast/models/contrastive.py:219
↓ 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 callersMethod_get_color
Get color for a class id. Args: class_id (int): class id.
slowfast/visualization/video_visualizer.py:396
↓ 2 callersFunction_get_pixels
( per_pixel, rand_color, patch_size, dtype=torch.float32, device="cuda" )
slowfast/datasets/random_erasing.py:18
↓ 2 callersMethod_get_pos_embed
(self, pos_embed, bcthw)
slowfast/models/video_model_builder.py:1060
↓ 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:123
↓ 2 callersMethodadd_bboxes
Add correspondding bounding boxes.
slowfast/visualization/utils.py:365
↓ 2 callersMethodadd_frames
Add the clip and corresponding id. Args: idx (int): the current index of the clip. frames (list[ndarray]): li
slowfast/visualization/utils.py:355
↓ 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.
slowfast/utils/ava_evaluation/object_detection_evaluation.py:86
↓ 2 callersMethodavg_epoch_time
Calculate the average epoch time among the recorded epochs.
slowfast/utils/meters.py:809
↓ 2 callersMethodbatch_clips
(self, clips)
slowfast/models/contrastive.py:297
↓ 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
slowfast/datasets/cv2_transform.py:458
↓ 2 callersMethodclear
Clears the state to prepare for a fresh evaluation.
slowfast/utils/ava_evaluation/object_detection_evaluation.py:102
↓ 2 callersMethodcompute_key_feat
( self, clips_k, compute_predictor_keys=False, batched_inference=True )
slowfast/models/contrastive.py:311
↓ 2 callersFunctionconv_1xnxn
(inp, oup, kernel_size=3, stride=3)
slowfast/models/morphmlp_32.py:14
↓ 2 callersFunctionconv_1xnxn
(inp, oup, kernel_size=3, stride=3)
slowfast/models/morphmlp.py:16
↓ 2 callersFunctionconvert_to_one_hot
This function converts target class indices to one-hot vectors, given the number of classes. Args: targets (loader): Class labels
slowfast/datasets/mixup.py:22
↓ 2 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:624
next →1–100 of 764, ranked by callers