Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/GRAP-UdL-AT/Amodal_Fruit_Sizing
/ functions
Functions
1,212 in github.com/GRAP-UdL-AT/Amodal_Fruit_Sizing
⨍
Functions
1,212
◇
Types & classes
203
↓ 127 callers
Method
get
Access an attribute and return its value if exists. Otherwise return default.
detectron2/data/catalog.py:157
↓ 110 callers
Method
to
(self, device: str)
detectron2/structures/boxes.py:163
↓ 50 callers
Method
device
(self)
detectron2/structures/boxes.py:287
↓ 39 callers
Function
cat
Efficient version of torch.cat that avoids a copy if there is only a single element in a list
detectron2/layers/wrappers.py:18
↓ 32 callers
Method
put_scalar
Add a scalar `value` to the `HistoryBuffer` associated with `name`. Args: smoothing_hint (bool): a 'hint' on whether thi
detectron2/utils/events.py:248
↓ 30 callers
Method
has
(self, name)
detectron2/export/c10.py:69
↓ 29 callers
Method
cat
Concatenates a list of Boxes into a single Boxes Arguments: boxes_list (list[Boxes]) Returns: Boxes
detectron2/structures/boxes.py:269
↓ 25 callers
Method
write
(self)
detectron2/utils/events.py:95
↓ 24 callers
Function
get_cfg
Get a copy of the default config. Returns: a detectron2 CfgNode instance.
detectron2/config/config.py:75
↓ 24 callers
Function
pairwise_iou_rotated
Return intersection-over-union (Jaccard index) of boxes. Both sets of boxes are expected to be in (x_center, y_center, width, height, an
detectron2/layers/rotated_boxes.py:8
↓ 21 callers
Method
convert
Args: box: can be a k-tuple, k-list or an Nxk array/tensor, where k = 4 or 5 from_mode, to_mode (BoxMode) Re
detectron2/structures/boxes.py:36
↓ 21 callers
Method
extend
(self, buffers)
detectron2/modeling/anchor_generator.py:30
↓ 21 callers
Function
to_device
This function is a replacement of .to(another_device) such that it allows the casting to be traced properly by explicitly calling the underly
detectron2/export/shared.py:25
↓ 20 callers
Function
check_set_pb_arg
(pb, arg_name, arg_attr, arg_value, allow_override=False)
detectron2/export/shared.py:204
↓ 20 callers
Method
clone
Clone the Boxes. Returns: Boxes
detectron2/structures/boxes.py:154
↓ 19 callers
Method
flatten
(self)
detectron2/export/c10.py:94
↓ 19 callers
Function
setup_logger
Initialize the detectron2 logger and set its verbosity level to "INFO". Args: output (str): a file name or a directory to save log.
detectron2/utils/logger.py:34
↓ 17 callers
Function
get_event_storage
Returns: The :class:`EventStorage` object that's currently being used. Throws an error if no :class`EventStorage` is currently en
detectron2/utils/events.py:15
↓ 16 callers
Function
alias
(x, name, is_backward=False)
detectron2/export/shared.py:589
↓ 16 callers
Method
output_shape
(self)
detectron2/modeling/backbone/fpn.py:146
↓ 15 callers
Function
get_norm
Args: norm (str or callable): Returns: nn.Module or None: the normalization layer
detectron2/layers/batch_norm.py:127
↓ 14 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]. Args
detectron2/structures/boxes.py:177
↓ 13 callers
Method
overlay_instances
Args: boxes (Boxes, RotatedBoxes or ndarray): either a :class:`Boxes`, or an Nx4 numpy array of XYXY_ABS format f
detectron2/utils/visualizer.py:519
↓ 13 callers
Method
save
Args: filepath (str): a string that contains the absolute path, including the file name, where the visualized ima
detectron2/utils/visualizer.py:249
↓ 12 callers
Method
get_image
Returns: ndarray: the visualized image of shape (H, W, 3) (RGB) in uint8 type. The shape is scaled w.r.t the input
detectron2/utils/visualizer.py:263
↓ 12 callers
Method
merge_from_file
(self, cfg_filename: str, allow_unsafe: bool = True)
detectron2/config/config.py:21
↓ 12 callers
Method
set
Set multiple metadata with kwargs.
detectron2/data/catalog.py:149
↓ 10 callers
Function
build_model
Build the whole model architecture, defined by ``cfg.MODEL.META_ARCHITECTURE``. Note that it does not load any weights from ``cfg``.
detectron2/modeling/meta_arch/build.py:13
↓ 10 callers
Function
get_pb_arg
(pb, arg_name)
detectron2/export/shared.py:167
↓ 10 callers
Function
pairwise_iou
Given two lists of rotated boxes of size N and M, compute the IoU (intersection over union) between __all__ N x M pairs of boxes. The
detectron2/structures/rotated_boxes.py:483
↓ 10 callers
Method
set
Set the field named `name` to `value`. The length of `value` must be the number of instances, and must agree with other exist
detectron2/structures/instances.py:65
↓ 9 callers
Method
_init
(self, params=None)
detectron2/data/transforms/transform_gen.py:66
↓ 9 callers
Method
area
Computes the area of all the boxes. Returns: torch.Tensor: a vector with areas of each box.
detectron2/structures/boxes.py:166
↓ 9 callers
Function
build_backbone
Build a backbone from `cfg.MODEL.BACKBONE.NAME`. Returns: an instance of :class:`Backbone`
detectron2/modeling/backbone/build.py:20
↓ 9 callers
Function
get_pb_arg_vali
(pb, arg_name, default_val)
detectron2/export/shared.py:189
↓ 9 callers
Method
register
Args: name (str): the name that identifies a dataset, e.g. "coco_2014_train". func (callable): a callable which takes
detectron2/data/catalog.py:31
↓ 9 callers
Method
train
Args: start_iter, max_iter (int): See docs above
detectron2/engine/train_loop.py:116
↓ 8 callers
Method
__init__
Args: shape: (h, w) tuple or a int interp: PIL interpolation method
detectron2/data/transforms/transform_gen.py:150
↓ 8 callers
Function
_rename
(cfg: CN, old: str, new: str)
detectron2/config/compat.py:116
↓ 8 callers
Method
from_tensors
Args: tensors: a tuple or list of `torch.Tensors`, each of shape (Hi, Wi) or (C_1, ..., C_K, Hi, Wi) where K >= 1
detectron2/structures/image_list.py:50
↓ 8 callers
Method
remove
Remove the field called `name`.
detectron2/structures/instances.py:85
↓ 8 callers
Method
step
User should call this function at the beginning of each iteration, to notify the storage of the start of a new iteration. The
detectron2/utils/events.py:332
↓ 8 callers
Method
stride
(self)
detectron2/modeling/backbone/resnet.py:324
↓ 7 callers
Function
build_detection_test_loader
Similar to `build_detection_train_loader`. But this function uses the given `dataset_name` argument (instead of the names in cfg), and us
detectron2/data/build.py:343
↓ 7 callers
Function
build_proposal_generator
Build a proposal generator from `cfg.MODEL.PROPOSAL_GENERATOR.NAME`. The name can be "PrecomputedProposals" to use no proposal generator.
detectron2/modeling/proposal_generator/build.py:15
↓ 7 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
detectron2/structures/masks.py:168
↓ 7 callers
Function
detector_postprocess
Resize the output instances. The input images are often resized when entering an object detector. As a result, we often need the outputs
detectron2/modeling/postprocessing.py:8
↓ 7 callers
Method
freeze
(self)
detectron2/modeling/backbone/resnet.py:46
↓ 7 callers
Function
log_first_n
Log only for the first n times. Args: lvl (int): the logging level msg (str): n (int): name (str): name of t
detectron2/utils/logger.py:132
↓ 7 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:
detectron2/structures/boxes.py:192
↓ 7 callers
Function
pairwise_iou
Given two lists of boxes of size N and M, compute the IoU (intersection over union) between __all__ N x M pairs of boxes. The box ord
detectron2/structures/boxes.py:299
↓ 7 callers
Method
resume_or_load
If `resume==True`, and last checkpoint exists, resume from it. Otherwise, load a model specified by the config. Args:
detectron2/engine/defaults.py:281
↓ 6 callers
Method
_create_tensors
(self, N)
tests/test_nms_rotated.py:35
↓ 6 callers
Method
backward
(ctx, grad_output)
detectron2/layers/roi_align.py:26
↓ 6 callers
Function
build_detection_train_loader
A data loader is created by the following steps: 1. Use the dataset names in config to query :class:`DatasetCatalog`, and obtain a list of d
detectron2/data/build.py:256
↓ 6 callers
Function
create_small_table
Create a small table using the keys of small_dict as headers. This is only suitable for small dictionaries. Args: small_dict (di
detectron2/utils/logger.py:201
↓ 6 callers
Method
draw_dataset_dict
Draw annotations/segmentaions in Detectron2 Dataset format. Args: dic (dict): annotation/segmentation data of one image,
detectron2/utils/visualizer.py:477
↓ 6 callers
Function
get_pb_arg_vals
(pb, arg_name, default_val)
detectron2/export/shared.py:194
↓ 6 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:
detectron2/modeling/roi_heads/fast_rcnn.py:262
↓ 6 callers
Function
nms_rotated
Performs non-maximum suppression (NMS) on the rotated boxes according to their intersection-over-union (IoU). Rotated NMS iteratively re
detectron2/layers/nms.py:31
↓ 6 callers
Method
to
(self, device: str)
detectron2/structures/masks.py:103
↓ 5 callers
Function
_cast_to_f32
(f64)
detectron2/export/caffe2_modeling.py:94
↓ 5 callers
Method
_convert_xy_to_wh
(self, x)
tests/test_boxes.py:12
↓ 5 callers
Method
_create_grayscale_image
Create a grayscale version of the original image. The colors in masked area, if given, will be kept.
detectron2/utils/visualizer.py:1056
↓ 5 callers
Method
_random_data
(self)
tests/test_visualizer.py:15
↓ 5 callers
Method
_simple_roialign
RoiAlign with scale 1.0 and 0 sample ratio.
tests/test_roi_align.py:62
↓ 5 callers
Method
apply_image
(self, img, interp=None)
detectron2/data/transforms/transform.py:33
↓ 5 callers
Function
batched_nms
Same as torchvision.ops.boxes.batched_nms, but safer.
detectron2/layers/nms.py:9
↓ 5 callers
Method
dump
Returns: str: a yaml string representation of the config
detectron2/config/config.py:63
↓ 5 callers
Method
get
(name)
detectron2/checkpoint/catalog.py:55
↓ 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
detectron2/modeling/box_regression.py:38
↓ 5 callers
Function
get_empty_instance
(h, w)
tests/test_model_e2e.py:33
↓ 5 callers
Function
get_world_size
()
detectron2/utils/comm.py:21
↓ 5 callers
Method
has
Returns: bool: whether the field called `name` exists.
detectron2/structures/instances.py:78
↓ 5 callers
Method
inference
Arguments: box_cls, box_delta: Same as the output of :meth:`RetinaNetHead.forward` anchors (list[list[Boxes]]): a lis
detectron2/modeling/meta_arch/retinanet.py:258
↓ 5 callers
Function
polygons_to_bitmask
Args: polygons (list[ndarray]): each array has shape (Nx2,) height, width (int) Returns: ndarray: a bool mask of shap
detectron2/structures/masks.py:21
↓ 5 callers
Method
polygons_to_mask
(self, polygons)
detectron2/utils/visualizer.py:124
↓ 5 callers
Method
put_image
Add an `img_tensor` to the `_vis_data` associated with `img_name`. Args: img_name (str): The name of the image to put in
detectron2/utils/events.py:227
↓ 5 callers
Method
put_scalars
Put multiple scalars from keyword arguments. Examples: storage.put_scalars(loss=my_loss, accuracy=my_accuracy, smoothin
detectron2/utils/events.py:275
↓ 5 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
detectron2/utils/colormap.py:111
↓ 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
detectron2/modeling/roi_heads/roi_heads.py:50
↓ 4 callers
Method
__init__
Args: stem (nn.Module): a stem module stages (list[list[ResNetBlock]]): several (typically 4) stages,
detectron2/modeling/backbone/resnet.py:329
↓ 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
detectron2/utils/visualizer.py:1067
↓ 4 callers
Method
_convert_xywh_to_xywha
(self, x)
tests/test_boxes.py:18
↓ 4 callers
Method
_convert_xywha_to_xyxy
(self, x)
tests/test_boxes.py:15
↓ 4 callers
Method
_simple_roi_align_rotated
RoiAlignRotated with scale 1.0 and 0 sample ratio.
tests/test_roi_align_rotated.py:87
↓ 4 callers
Function
add
detectron2/layers/csrc/ROIAlign/ROIAlign_cpu.cpp:282
↓ 4 callers
Function
add
detectron2/layers/csrc/ROIAlignRotated/ROIAlignRotated_cpu.cpp:195
↓ 4 callers
Method
apply_deltas
Apply transformation `deltas` (dx, dy, dw, dh) to `boxes`. Args: deltas (Tensor): transformation deltas of shape (N, k*4
detectron2/modeling/box_regression.py:73
↓ 4 callers
Method
area
Computes the area of all the boxes. Returns: torch.Tensor: a vector with areas of each box.
detectron2/structures/rotated_boxes.py:234
↓ 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
detectron2/layers/nms.py:99
↓ 4 callers
Function
build_anchor_generator
Built an anchor generator from `cfg.MODEL.ANCHOR_GENERATOR.NAME`.
detectron2/modeling/anchor_generator.py:360
↓ 4 callers
Function
build_box_head
Build a box head defined by `cfg.MODEL.ROI_BOX_HEAD.NAME`.
detectron2/modeling/roi_heads/box_head.py:88
↓ 4 callers
Function
build_optimizer
Build an optimizer from config.
detectron2/solver/build.py:10
↓ 4 callers
Function
build_roi_heads
Build ROIHeads defined by `cfg.MODEL.ROI_HEADS.NAME`.
detectron2/modeling/roi_heads/roi_heads.py:42
↓ 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
detectron2/structures/rotated_boxes.py:251
↓ 4 callers
Method
close
(self)
detectron2/utils/events.py:106
↓ 4 callers
Method
draw_instance_predictions
Draw instance-level prediction results on an image. Args: predictions (Instances): the output of an instance detection/s
detectron2/utils/visualizer.py:322
↓ 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
detectron2/utils/visualizer.py:910
↓ 4 callers
Method
forward
Args: input: NCHW images rois: Bx5 boxes. First column is the index into N. The other 4 columns are xyxy.
detectron2/layers/roi_align.py:87
next →
1–100 of 1,212, ranked by callers