MCPcopy Create free account

hub / github.com/GRAP-UdL-AT/Amodal_Fruit_Sizing / functions

Functions1,212 in github.com/GRAP-UdL-AT/Amodal_Fruit_Sizing

↓ 127 callersMethodget
Access an attribute and return its value if exists. Otherwise return default.
detectron2/data/catalog.py:157
↓ 110 callersMethodto
(self, device: str)
detectron2/structures/boxes.py:163
↓ 50 callersMethoddevice
(self)
detectron2/structures/boxes.py:287
↓ 39 callersFunctioncat
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 callersMethodput_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 callersMethodhas
(self, name)
detectron2/export/c10.py:69
↓ 29 callersMethodcat
Concatenates a list of Boxes into a single Boxes Arguments: boxes_list (list[Boxes]) Returns: Boxes
detectron2/structures/boxes.py:269
↓ 25 callersMethodwrite
(self)
detectron2/utils/events.py:95
↓ 24 callersFunctionget_cfg
Get a copy of the default config. Returns: a detectron2 CfgNode instance.
detectron2/config/config.py:75
↓ 24 callersFunctionpairwise_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 callersMethodconvert
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 callersMethodextend
(self, buffers)
detectron2/modeling/anchor_generator.py:30
↓ 21 callersFunctionto_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 callersFunctioncheck_set_pb_arg
(pb, arg_name, arg_attr, arg_value, allow_override=False)
detectron2/export/shared.py:204
↓ 20 callersMethodclone
Clone the Boxes. Returns: Boxes
detectron2/structures/boxes.py:154
↓ 19 callersMethodflatten
(self)
detectron2/export/c10.py:94
↓ 19 callersFunctionsetup_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 callersFunctionget_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 callersFunctionalias
(x, name, is_backward=False)
detectron2/export/shared.py:589
↓ 16 callersMethodoutput_shape
(self)
detectron2/modeling/backbone/fpn.py:146
↓ 15 callersFunctionget_norm
Args: norm (str or callable): Returns: nn.Module or None: the normalization layer
detectron2/layers/batch_norm.py:127
↓ 14 callersMethodclip
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 callersMethodoverlay_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 callersMethodsave
Args: filepath (str): a string that contains the absolute path, including the file name, where the visualized ima
detectron2/utils/visualizer.py:249
↓ 12 callersMethodget_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 callersMethodmerge_from_file
(self, cfg_filename: str, allow_unsafe: bool = True)
detectron2/config/config.py:21
↓ 12 callersMethodset
Set multiple metadata with kwargs.
detectron2/data/catalog.py:149
↓ 10 callersFunctionbuild_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 callersFunctionget_pb_arg
(pb, arg_name)
detectron2/export/shared.py:167
↓ 10 callersFunctionpairwise_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 callersMethodset
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 callersMethod_init
(self, params=None)
detectron2/data/transforms/transform_gen.py:66
↓ 9 callersMethodarea
Computes the area of all the boxes. Returns: torch.Tensor: a vector with areas of each box.
detectron2/structures/boxes.py:166
↓ 9 callersFunctionbuild_backbone
Build a backbone from `cfg.MODEL.BACKBONE.NAME`. Returns: an instance of :class:`Backbone`
detectron2/modeling/backbone/build.py:20
↓ 9 callersFunctionget_pb_arg_vali
(pb, arg_name, default_val)
detectron2/export/shared.py:189
↓ 9 callersMethodregister
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 callersMethodtrain
Args: start_iter, max_iter (int): See docs above
detectron2/engine/train_loop.py:116
↓ 8 callersMethod__init__
Args: shape: (h, w) tuple or a int interp: PIL interpolation method
detectron2/data/transforms/transform_gen.py:150
↓ 8 callersFunction_rename
(cfg: CN, old: str, new: str)
detectron2/config/compat.py:116
↓ 8 callersMethodfrom_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 callersMethodremove
Remove the field called `name`.
detectron2/structures/instances.py:85
↓ 8 callersMethodstep
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 callersMethodstride
(self)
detectron2/modeling/backbone/resnet.py:324
↓ 7 callersFunctionbuild_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 callersFunctionbuild_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 callersMethodcrop_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 callersFunctiondetector_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 callersMethodfreeze
(self)
detectron2/modeling/backbone/resnet.py:46
↓ 7 callersFunctionlog_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 callersMethodnonempty
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 callersFunctionpairwise_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 callersMethodresume_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 callersMethod_create_tensors
(self, N)
tests/test_nms_rotated.py:35
↓ 6 callersMethodbackward
(ctx, grad_output)
detectron2/layers/roi_align.py:26
↓ 6 callersFunctionbuild_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 callersFunctioncreate_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 callersMethoddraw_dataset_dict
Draw annotations/segmentaions in Detectron2 Dataset format. Args: dic (dict): annotation/segmentation data of one image,
detectron2/utils/visualizer.py:477
↓ 6 callersFunctionget_pb_arg_vals
(pb, arg_name, default_val)
detectron2/export/shared.py:194
↓ 6 callersMethodlosses
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 callersFunctionnms_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 callersMethodto
(self, device: str)
detectron2/structures/masks.py:103
↓ 5 callersFunction_cast_to_f32
(f64)
detectron2/export/caffe2_modeling.py:94
↓ 5 callersMethod_convert_xy_to_wh
(self, x)
tests/test_boxes.py:12
↓ 5 callersMethod_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 callersMethod_random_data
(self)
tests/test_visualizer.py:15
↓ 5 callersMethod_simple_roialign
RoiAlign with scale 1.0 and 0 sample ratio.
tests/test_roi_align.py:62
↓ 5 callersMethodapply_image
(self, img, interp=None)
detectron2/data/transforms/transform.py:33
↓ 5 callersFunctionbatched_nms
Same as torchvision.ops.boxes.batched_nms, but safer.
detectron2/layers/nms.py:9
↓ 5 callersMethoddump
Returns: str: a yaml string representation of the config
detectron2/config/config.py:63
↓ 5 callersMethodget
(name)
detectron2/checkpoint/catalog.py:55
↓ 5 callersMethodget_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 callersFunctionget_empty_instance
(h, w)
tests/test_model_e2e.py:33
↓ 5 callersFunctionget_world_size
()
detectron2/utils/comm.py:21
↓ 5 callersMethodhas
Returns: bool: whether the field called `name` exists.
detectron2/structures/instances.py:78
↓ 5 callersMethodinference
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 callersFunctionpolygons_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 callersMethodpolygons_to_mask
(self, polygons)
detectron2/utils/visualizer.py:124
↓ 5 callersMethodput_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 callersMethodput_scalars
Put multiple scalars from keyword arguments. Examples: storage.put_scalars(loss=my_loss, accuracy=my_accuracy, smoothin
detectron2/utils/events.py:275
↓ 5 callersFunctionrandom_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 callersFunctionselect_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 callersMethod__init__
Args: stem (nn.Module): a stem module stages (list[list[ResNetBlock]]): several (typically 4) stages,
detectron2/modeling/backbone/resnet.py:329
↓ 4 callersMethod_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 callersMethod_convert_xywh_to_xywha
(self, x)
tests/test_boxes.py:18
↓ 4 callersMethod_convert_xywha_to_xyxy
(self, x)
tests/test_boxes.py:15
↓ 4 callersMethod_simple_roi_align_rotated
RoiAlignRotated with scale 1.0 and 0 sample ratio.
tests/test_roi_align_rotated.py:87
↓ 4 callersFunctionadd
detectron2/layers/csrc/ROIAlign/ROIAlign_cpu.cpp:282
↓ 4 callersFunctionadd
detectron2/layers/csrc/ROIAlignRotated/ROIAlignRotated_cpu.cpp:195
↓ 4 callersMethodapply_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 callersMethodarea
Computes the area of all the boxes. Returns: torch.Tensor: a vector with areas of each box.
detectron2/structures/rotated_boxes.py:234
↓ 4 callersFunctionbatched_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 callersFunctionbuild_anchor_generator
Built an anchor generator from `cfg.MODEL.ANCHOR_GENERATOR.NAME`.
detectron2/modeling/anchor_generator.py:360
↓ 4 callersFunctionbuild_box_head
Build a box head defined by `cfg.MODEL.ROI_BOX_HEAD.NAME`.
detectron2/modeling/roi_heads/box_head.py:88
↓ 4 callersFunctionbuild_optimizer
Build an optimizer from config.
detectron2/solver/build.py:10
↓ 4 callersFunctionbuild_roi_heads
Build ROIHeads defined by `cfg.MODEL.ROI_HEADS.NAME`.
detectron2/modeling/roi_heads/roi_heads.py:42
↓ 4 callersMethodclip
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 callersMethodclose
(self)
detectron2/utils/events.py:106
↓ 4 callersMethoddraw_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 callersMethoddraw_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 callersMethodforward
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