Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cjrd/self-supervised-pretraining
/ functions
Functions
2,192 in github.com/cjrd/self-supervised-pretraining
⨍
Functions
2,192
◇
Types & classes
424
↓ 5 callers
Function
build_dataset
(cfg, default_args=None)
OpenSelfSup/openselfsup/datasets/builder.py:30
↓ 5 callers
Function
build_model
Build model.
OpenSelfSup/openselfsup/models/builder.py:71
↓ 5 callers
Method
crop_and_resize
Crop each bitmask by the given box, and resize results to (mask_size, mask_size). This can be used to prepare training targets for Ma
OpenSelfSup/benchmarks/detection/detection/detectron2/structures/masks.py:169
↓ 5 callers
Function
dist_forward_collect
Forward and collect network outputs in a distributed manner. This function performs forward propagation and collects outputs. It can be used
OpenSelfSup/openselfsup/utils/collect.py:39
↓ 5 callers
Method
find_spec
(self, name, path, target=None)
OpenSelfSup/benchmarks/detection/detection/detectron2/projects/__init__.py:17
↓ 5 callers
Method
forward_backbone
Forward backbone. Args: img (Tensor): Input images of shape (N, C, H, W). Typically these should be mean centered
OpenSelfSup/openselfsup/models/relative_loc.py:47
↓ 5 callers
Function
func
(device, n=3)
OpenSelfSup/benchmarks/detection/detection/tests/layers/test_mask_ops.py:169
↓ 5 callers
Method
get
(name)
OpenSelfSup/benchmarks/detection/detection/detectron2/checkpoint/catalog.py:57
↓ 5 callers
Method
get_deltas
Get box regression transformation deltas (dx, dy, dw, dh) that can be used to transform the `src_boxes` into the `target_boxes`. That
OpenSelfSup/benchmarks/detection/detection/detectron2/modeling/box_regression.py:38
↓ 5 callers
Method
inference
Arguments: anchors (list[Boxes]): A list of #feature level Boxes. The Boxes contain anchors of this image on the
OpenSelfSup/benchmarks/detection/detection/detectron2/modeling/meta_arch/retinanet.py:299
↓ 5 callers
Function
nondist_forward_collect
Forward and collect network outputs. This function performs forward propagation and collects outputs. It can be used to collect results, feat
OpenSelfSup/openselfsup/utils/collect.py:9
↓ 5 callers
Method
register
Registers a converter for the specified type. Can be used as a decorator (if converter is None), or called as a method. Args
OpenSelfSup/benchmarks/detection/detection/projects/DensePose/densepose/converters/base.py:15
↓ 5 callers
Method
register_hooks
Register hooks to the trainer. The hooks are executed in the order they are registered. Args: hooks (list[Option
OpenSelfSup/benchmarks/detection/detection/detectron2/engine/train_loop.py:108
↓ 5 callers
Method
reset
Preparation for a new round of evaluation. Should be called before starting a round of evaluation.
OpenSelfSup/benchmarks/detection/detection/detectron2/evaluation/evaluator.py:24
↓ 5 callers
Function
retry_if_cuda_oom
Makes a function retry itself after encountering pytorch's CUDA OOM error. It will first retry after calling `torch.cuda.empty_cache()`.
OpenSelfSup/benchmarks/detection/detection/detectron2/utils/memory.py:26
↓ 5 callers
Function
select_foreground_proposals
Given a list of N Instances (for N images), each containing a `gt_classes` field, return a list of Instances that contain only instances with
OpenSelfSup/benchmarks/detection/detection/detectron2/modeling/roi_heads/roi_heads.py:46
↓ 5 callers
Function
to_numpy
(pil_img)
OpenSelfSup/openselfsup/datasets/utils.py:4
↓ 5 callers
Function
validate_files
The valid files will have name: <class_name>_<split>.txt. We want to remove all the other files from the input.
OpenSelfSup/tools/prepare_data/create_voc_data_files.py:32
↓ 5 callers
Function
verify_results
Args: results (OrderedDict[dict]): task_name -> {metric -> score} Returns: bool: whether the verification succeeds or not
OpenSelfSup/benchmarks/detection/detection/detectron2/evaluation/testing.py:28
↓ 4 callers
Method
__init__
Args: stem (nn.Module): a stem module stages (list[list[CNNBlockBase]]): several (typically 4) stages,
OpenSelfSup/benchmarks/detection/detection/detectron2/modeling/backbone/resnet.py:367
↓ 4 callers
Method
_batch_inference
Execute inference on a list of inputs, using batch size = self.batch_size, instead of the length of the list. Inputs & outpu
OpenSelfSup/benchmarks/detection/detection/detectron2/modeling/test_time_augmentation.py:146
↓ 4 callers
Method
_change_color_brightness
Depending on the brightness_factor, gives a lighter or darker color i.e. a color with less or more saturation than the original color
OpenSelfSup/benchmarks/detection/detection/detectron2/utils/visualizer.py:1127
↓ 4 callers
Function
_collect_config_files
Collect all configuration files (i.e. densepose_*.yaml) directly in the specified directory
OpenSelfSup/benchmarks/detection/detection/projects/DensePose/tests/common.py:48
↓ 4 callers
Method
_convert_xywh_to_xywha
(self, x)
OpenSelfSup/benchmarks/detection/detection/tests/structures/test_boxes.py:19
↓ 4 callers
Method
_convert_xywha_to_xyxy
(self, x)
OpenSelfSup/benchmarks/detection/detection/tests/structures/test_boxes.py:16
↓ 4 callers
Method
_create_grayscale_image
Create a grayscale version of the original image. The colors in masked area, if given, will be kept.
OpenSelfSup/benchmarks/detection/detection/detectron2/utils/visualizer.py:1116
↓ 4 callers
Method
_generate_rlemask_on_image
(self, mask, imgId, data)
OpenSelfSup/benchmarks/detection/detection/projects/DensePose/densepose/densepose_coco_evaluation.py:348
↓ 4 callers
Method
_make_layer
(self, block, planes, blocks, stride=1, dilate=False)
utils/simclr-converter/resnet_wider.py:154
↓ 4 callers
Method
_parse_error
(self, msg)
OpenSelfSup/benchmarks/detection/detection/projects/DensePose/densepose/utils/dbhelper.py:144
↓ 4 callers
Method
_simple_roi_align_rotated
RoiAlignRotated with scale 1.0 and 0 sample ratio.
OpenSelfSup/benchmarks/detection/detection/tests/layers/test_roi_align_rotated.py:87
↓ 4 callers
Method
_test_model
(self, config_path, device="cpu")
OpenSelfSup/benchmarks/detection/detection/tests/test_export_caffe2.py:26
↓ 4 callers
Method
_test_setup
(self, config_file)
OpenSelfSup/benchmarks/detection/detection/projects/DensePose/tests/test_setup.py:15
↓ 4 callers
Function
add
OpenSelfSup/benchmarks/detection/detection/detectron2/layers/csrc/ROIAlign/ROIAlign_cpu.cpp:282
↓ 4 callers
Function
add
OpenSelfSup/benchmarks/detection/detection/detectron2/layers/csrc/ROIAlignRotated/ROIAlignRotated_cpu.cpp:195
↓ 4 callers
Function
all_gather
Run all_gather on arbitrary picklable data (not necessarily tensors). Args: data: any picklable object group: a torch proces
OpenSelfSup/benchmarks/detection/detection/detectron2/utils/comm.py:139
↓ 4 callers
Method
area
Computes the area of all the boxes. Returns: torch.Tensor: a vector with areas of each box.
OpenSelfSup/benchmarks/detection/detection/detectron2/structures/rotated_boxes.py:235
↓ 4 callers
Function
batched_nms_rotated
Performs non-maximum suppression in a batched fashion. Each index value correspond to a category, and NMS will not be applied between el
OpenSelfSup/benchmarks/detection/detection/detectron2/layers/nms.py:102
↓ 4 callers
Function
build_anchor_generator
Built an anchor generator from `cfg.MODEL.ANCHOR_GENERATOR.NAME`.
OpenSelfSup/benchmarks/detection/detection/detectron2/modeling/anchor_generator.py:375
↓ 4 callers
Method
clip
Clip (in place) the boxes by limiting x coordinates to the range [0, width] and y coordinates to the range [0, height]. For
OpenSelfSup/benchmarks/detection/detection/detectron2/structures/rotated_boxes.py:252
↓ 4 callers
Function
collect_env_info
()
OpenSelfSup/benchmarks/detection/detection/detectron2/utils/collect_env.py:55
↓ 4 callers
Method
draw_line
Args: x_data (list[int]): a list containing x values of all the points being drawn. Length of list should match t
OpenSelfSup/benchmarks/detection/detection/detectron2/utils/visualizer.py:969
↓ 4 callers
Method
draw_sem_seg
Draw semantic segmentation predictions/labels. Args: sem_seg (Tensor or ndarray): the segmentation of shape (H, W).
OpenSelfSup/benchmarks/detection/detection/detectron2/utils/visualizer.py:410
↓ 4 callers
Function
extract_boxes_xywh_from_instances
(instances: Instances, select=None)
OpenSelfSup/benchmarks/detection/detection/projects/DensePose/densepose/vis/extractor.py:24
↓ 4 callers
Method
forward
Args: input: NCHW images rois: Bx5 boxes. First column is the index into N. The other 4 columns are xyxy.
OpenSelfSup/benchmarks/detection/detection/detectron2/layers/roi_align.py:99
↓ 4 callers
Method
forward_backbone
Forward backbone. Args: img (Tensor): Input images of shape (N, C, H, W). Typically these should be mean centered
OpenSelfSup/openselfsup/models/classification.py:49
↓ 4 callers
Method
get_bounding_boxes
Returns: Boxes: tight bounding boxes around bitmasks. If a mask is empty, it's bounding box will be all zero.
OpenSelfSup/benchmarks/detection/detection/detectron2/structures/masks.py:202
↓ 4 callers
Function
get_pb_arg_valf
(pb, arg_name, default_val)
OpenSelfSup/benchmarks/detection/detection/detectron2/export/shared.py:174
↓ 4 callers
Function
get_world_size
()
OpenSelfSup/benchmarks/detection/detection/detectron2/utils/comm.py:21
↓ 4 callers
Method
has
Returns: bool: whether the field called `name` exists.
OpenSelfSup/benchmarks/detection/detection/detectron2/structures/instances.py:81
↓ 4 callers
Method
history
Returns: HistoryBuffer: the scalar history for name
OpenSelfSup/benchmarks/detection/detection/detectron2/utils/events.py:365
↓ 4 callers
Function
interpolate
A wrapper around :func:`torch.nn.functional.interpolate` to support zero-size tensor.
OpenSelfSup/benchmarks/detection/detection/detectron2/layers/wrappers.py:196
↓ 4 callers
Method
losses
Compute the default losses for box head in Fast(er) R-CNN, with softmax cross entropy loss and smooth L1 loss. Returns:
OpenSelfSup/benchmarks/detection/detection/detectron2/modeling/roi_heads/fast_rcnn.py:314
↓ 4 callers
Method
make_stage
Create a list of blocks of the same type that forms one ResNet stage. Args: block_class (type): a subclass of CNNBlockBa
OpenSelfSup/benchmarks/detection/detection/detectron2/modeling/backbone/resnet.py:480
↓ 4 callers
Method
nonempty
Find boxes that are non-empty. A box is considered empty, if either of its side is no larger than threshold. Returns:
OpenSelfSup/benchmarks/detection/detection/detectron2/structures/boxes.py:199
↓ 4 callers
Function
polygons_to_bitmask
Args: polygons (list[ndarray]): each array has shape (Nx2,) height, width (int) Returns: ndarray: a bool mask of sha
OpenSelfSup/benchmarks/detection/detection/detectron2/structures/masks.py:20
↓ 4 callers
Method
predict_boxes
Deprecated
OpenSelfSup/benchmarks/detection/detection/detectron2/modeling/roi_heads/fast_rcnn.py:324
↓ 4 callers
Method
put
(self, image)
OpenSelfSup/benchmarks/detection/detection/demo/predictor.py:187
↓ 4 callers
Method
put_scalars
Put multiple scalars from keyword arguments. Examples: storage.put_scalars(loss=my_loss, accuracy=my_accuracy, smoothin
OpenSelfSup/benchmarks/detection/detection/detectron2/utils/events.py:324
↓ 4 callers
Function
random_color
Args: rgb (bool): whether to return RGB colors or BGR colors. maximum (int): either 255 or 1 Returns: ndarray: a vec
OpenSelfSup/benchmarks/detection/detection/detectron2/utils/colormap.py:111
↓ 4 callers
Function
save_stats
(output_dir, stat, output)
OpenSelfSup/benchmarks/svm_tools/aggregate_low_shot_svm_stats.py:33
↓ 4 callers
Method
update
(self, val, n=1)
utils/simclr-converter/eval.py:134
↓ 3 callers
Method
__init__
Args: cfg (CfgNode): torch_model (nn.Module): the detectron2 model (meta_arch) to be converted.
OpenSelfSup/benchmarks/detection/detection/detectron2/export/caffe2_modeling.py:145
↓ 3 callers
Method
__init__
(self, inplanes, planes, stride=1, downsample=None)
OpenSelfSup/benchmarks/detection/detection/projects/DensePose/densepose/modeling/hrnet.py:31
↓ 3 callers
Method
__init__
(self, inplace=True, cmap=cv2.COLORMAP_PARULA, alpha=0.7, to_visualize=None)
OpenSelfSup/benchmarks/detection/detection/projects/DensePose/densepose/vis/densepose_outputs.py:11
↓ 3 callers
Method
__init__
(self, densepose_data_to_value_fn=None, cmap=cv2.COLORMAP_PARULA)
OpenSelfSup/benchmarks/detection/detection/projects/DensePose/densepose/vis/densepose_data_points.py:39
↓ 3 callers
Method
_box_to_rotated_box
(self, box, angle)
OpenSelfSup/benchmarks/detection/detection/tests/layers/test_roi_align_rotated.py:15
↓ 3 callers
Method
_caffe2_preprocess_image
Caffe2 implementation of preprocess_image, which is called inside each MetaArch's forward. It normalizes the input images, and the fi
OpenSelfSup/benchmarks/detection/detection/detectron2/export/caffe2_modeling.py:202
↓ 3 callers
Function
_create_text_labels
Args: classes (list[int] or None): scores (list[float] or None): class_names (list[str] or None): Returns: l
OpenSelfSup/benchmarks/detection/detection/detectron2/utils/visualizer.py:223
↓ 3 callers
Method
_decode_proposals
Transform anchors into proposals by applying the predicted anchor deltas. Returns: proposals (list[Tensor]): A list of L
OpenSelfSup/benchmarks/detection/detection/detectron2/modeling/proposal_generator/rpn.py:485
↓ 3 callers
Method
_do_register
(cls, from_type: Type, converter: Any)
OpenSelfSup/benchmarks/detection/detection/projects/DensePose/densepose/converters/base.py:37
↓ 3 callers
Function
_find_caller
Returns: str: module name of the caller tuple: a hashable key to be used to identify different callers
OpenSelfSup/benchmarks/detection/detection/detectron2/utils/logger.py:114
↓ 3 callers
Method
_forward_keypoint
Forward logic of the keypoint prediction branch. Args: features (dict[str, Tensor]): mapping from feature map names to t
OpenSelfSup/benchmarks/detection/detection/detectron2/modeling/roi_heads/roi_heads.py:798
↓ 3 callers
Method
_forward_mask
Forward logic of the mask prediction branch. Args: features (dict[str, Tensor]): mapping from feature map names to tenso
OpenSelfSup/benchmarks/detection/detection/detectron2/modeling/roi_heads/roi_heads.py:766
↓ 3 callers
Method
_freeze_stages
(self)
OpenSelfSup/openselfsup/models/backbones/resnet.py:375
↓ 3 callers
Method
_get_traceable
(self)
OpenSelfSup/benchmarks/detection/detection/detectron2/export/api.py:93
↓ 3 callers
Function
_get_warmup_factor_at_iter
Return the learning rate warmup factor at a specific iteration. See :paper:`ImageNet in 1h` for more details. Args: method (str)
OpenSelfSup/benchmarks/detection/detection/detectron2/solver/lr_scheduler.py:90
↓ 3 callers
Method
_jitter
Randomly modifies given color to produce a slightly different color than the color given. Args: color (tuple[double]): a
OpenSelfSup/benchmarks/detection/detection/detectron2/utils/visualizer.py:1097
↓ 3 callers
Method
_make_stage
(self, layer_config, num_inchannels, multi_scale_output=True)
OpenSelfSup/benchmarks/detection/detection/projects/DensePose/densepose/modeling/hrnet.py:404
↓ 3 callers
Method
_make_transition_layer
(self, num_channels_pre_layer, num_channels_cur_layer)
OpenSelfSup/benchmarks/detection/detection/projects/DensePose/densepose/modeling/hrnet.py:340
↓ 3 callers
Method
_parse_losses
Parse the raw outputs (losses) of the network. Args: losses (dict): Raw output of the network, which usually contain
OpenSelfSup/openselfsup/models/byol.py:43
↓ 3 callers
Method
_parse_losses
Parse the raw outputs (losses) of the network. Args: losses (dict): Raw output of the network, which usually contain
OpenSelfSup/openselfsup/models/moco.py:43
↓ 3 callers
Method
_postprocess
Rescale the output instances to the target size.
OpenSelfSup/benchmarks/detection/detection/detectron2/modeling/meta_arch/rcnn.py:226
↓ 3 callers
Function
_rename_versioned_blob_in_proto
In given proto, rename all blobs with matched version
OpenSelfSup/benchmarks/detection/detection/detectron2/export/shared.py:631
↓ 3 callers
Method
_run_validate
(self, runner)
OpenSelfSup/openselfsup/hooks/validate_hook.py:74
↓ 3 callers
Function
_updater_raise
(op, input_types, output_types)
OpenSelfSup/benchmarks/detection/detection/detectron2/export/shared.py:369
↓ 3 callers
Method
accumulate
Accumulate per image evaluation results and store the result in self.eval :param p: input params for evaluation :return: None
OpenSelfSup/benchmarks/detection/detection/projects/DensePose/densepose/densepose_coco_evaluation.py:786
↓ 3 callers
Function
accuracy
(pred, target, topk=1)
OpenSelfSup/openselfsup/models/utils/accuracy.py:5
↓ 3 callers
Function
add_densepose_config
(cfg: CN)
OpenSelfSup/benchmarks/detection/detection/projects/DensePose/densepose/config.py:180
↓ 3 callers
Function
add_export_config
Args: cfg (CfgNode): a detectron2 config Returns: CfgNode: an updated config with new options that will be used
OpenSelfSup/benchmarks/detection/detection/detectron2/export/api.py:25
↓ 3 callers
Method
backward
(ctx, *grads)
OpenSelfSup/openselfsup/models/utils/gather_layer.py:18
↓ 3 callers
Function
build_box_head
Build a box head defined by `cfg.MODEL.ROI_BOX_HEAD.NAME`.
OpenSelfSup/benchmarks/detection/detection/detectron2/modeling/roi_heads/box_head.py:113
↓ 3 callers
Function
build_mask_head
Build a mask head defined by `cfg.MODEL.ROI_MASK_HEAD.NAME`.
OpenSelfSup/benchmarks/detection/detection/detectron2/modeling/roi_heads/mask_head.py:284
↓ 3 callers
Function
build_optimizer
Build an optimizer from config.
OpenSelfSup/benchmarks/detection/detection/detectron2/solver/build.py:93
↓ 3 callers
Function
build_roi_heads
Build ROIHeads defined by `cfg.MODEL.ROI_HEADS.NAME`.
OpenSelfSup/benchmarks/detection/detection/detectron2/modeling/roi_heads/roi_heads.py:38
↓ 3 callers
Function
build_sem_seg_head
Build a semantic segmentation head from `cfg.MODEL.SEM_SEG_HEAD.NAME`.
OpenSelfSup/benchmarks/detection/detection/detectron2/modeling/meta_arch/semantic_seg.py:95
↓ 3 callers
Function
concat_all_gather
Performs all_gather operation on the provided tensors. *** Warning ***: torch.distributed.all_gather has no gradient.
OpenSelfSup/openselfsup/models/moco.py:276
↓ 3 callers
Function
conv1x1
1x1 convolution
utils/simclr-converter/resnet_wider.py:11
↓ 3 callers
Function
conv3x3
3x3 convolution with padding
utils/simclr-converter/resnet_wider.py:5
↓ 3 callers
Method
convert
(self, img, alpha=1, beta=0)
OpenSelfSup/benchmarks/detection/detection/projects/PointRend/point_rend/color_augmentation.py:65
↓ 3 callers
Function
convert_batched_inputs_to_c2_format
See get_caffe2_inputs() below.
OpenSelfSup/benchmarks/detection/detection/detectron2/export/caffe2_modeling.py:110
← previous
next →
101–200 of 2,192, ranked by callers