MCPcopy Create free account

hub / github.com/Yuliang-Liu/Monkey / functions

Functions3,034 in github.com/Yuliang-Liu/Monkey

↓ 292 callersMethodto
(self, device: torch.device)
data_generation/grit/third_party/CenterNet2/detectron2/structures/boxes.py:166
↓ 289 callersMethodinfo
Print information about the VQA annotation file. :return:
eval/vqa.py:73
↓ 153 callersMethodcat
Concatenates a list of Boxes into a single Boxes Arguments: boxes_list (list[Boxes]) Returns: Boxes
data_generation/grit/third_party/CenterNet2/detectron2/structures/boxes.py:277
↓ 123 callersMethodget
Access an attribute and return its value if exists. Otherwise return default.
data_generation/grit/third_party/CenterNet2/detectron2/data/catalog.py:170
↓ 111 callersMethodget
(self)
data_generation/grit/third_party/CenterNet2/demo/predictor.py:191
↓ 80 callersFunctionget_norm
Args: norm (str or callable): either one of BN, SyncBN, FrozenBN, GN; or a callable that takes a channel number and returns
data_generation/grit/third_party/CenterNet2/detectron2/layers/batch_norm.py:121
↓ 70 callersMethodload
Load a config file. Args: filename: absolute path or relative path w.r.t. the current working directory keys
data_generation/grit/third_party/CenterNet2/detectron2/config/lazy.py:183
↓ 70 callersMethodwrite
(self)
data_generation/grit/third_party/CenterNet2/detectron2/utils/events.py:105
↓ 68 callersMethodfrom_pretrained
(cls, pretrained_model_name_or_path: Union[str, os.PathLike], **kwargs)
project/mini_monkey/internvl/model/internvl_chat/configuration_intern_vit.py:107
↓ 57 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
data_generation/grit/third_party/CenterNet2/detectron2/structures/boxes.py:44
↓ 52 callersMethodclone
Clone the Boxes. Returns: Boxes
data_generation/grit/third_party/CenterNet2/detectron2/structures/boxes.py:157
↓ 44 callersMethodflatten
(cls, obj)
data_generation/grit/third_party/CenterNet2/detectron2/export/flatten.py:37
↓ 42 callersMethodhas
(self, name)
data_generation/grit/third_party/CenterNet2/detectron2/export/c10.py:72
↓ 40 callersFunctioncat
Efficient version of torch.cat that avoids a copy if there is only a single element in a list
data_generation/grit/third_party/CenterNet2/detectron2/layers/wrappers.py:38
↓ 38 callersMethoddump
Returns: str: a yaml string representation of the config
data_generation/grit/third_party/CenterNet2/detectron2/config/config.py:87
↓ 35 callersMethoddevice
(self)
data_generation/grit/third_party/CenterNet2/detectron2/structures/boxes.py:297
↓ 35 callersFunctionget_cfg
Get a copy of the default config. Returns: a detectron2 CfgNode instance.
data_generation/grit/third_party/CenterNet2/detectron2/config/config.py:99
↓ 34 callersMethodput_scalar
Add a scalar `value` to the `HistoryBuffer` associated with `name`. Args: smoothing_hint (bool): a 'hint' on whether thi
data_generation/grit/third_party/CenterNet2/detectron2/utils/events.py:309
↓ 32 callersFunctioninstantiate
Recursively instantiate objects defined in dictionaries by "_target_" and arguments. Args: cfg: a dict-like object with "_target
data_generation/grit/third_party/CenterNet2/detectron2/config/instantiate.py:36
↓ 29 callersMethodencode
(self, image_paths: List[str])
monkey_model/visual.py:512
↓ 29 callersMethodsave
Save a config object to a yaml file. Note that when the config dictionary contains complex objects (e.g. lambda), it can't be
data_generation/grit/third_party/CenterNet2/detectron2/config/lazy.py:238
↓ 26 callersMethodget_image
Returns: ndarray: the visualized image of shape (H, W, 3) (RGB) in uint8 type. The shape is scale
data_generation/grit/third_party/CenterNet2/detectron2/utils/visualizer.py:310
↓ 25 callersFunctiondynamic_preprocess
(image, min_num=1, max_num=6, image_size=448, use_thumbnail=False)
project/mini_monkey/internvl/train/dataset.py:690
↓ 23 callersMethodclose
(self)
data_generation/grit/third_party/CenterNet2/detectron2/utils/events.py:127
↓ 23 callersMethodget
(self)
data_generation/grit/third_party/CenterNet2/projects/CenterNet2/predictor.py:214
↓ 22 callersFunctionget_event_storage
Returns: The :class:`EventStorage` object that's currently being used. Throws an error if no :class:`EventStorage` is currently e
data_generation/grit/third_party/CenterNet2/detectron2/utils/events.py:26
↓ 22 callersMethodtrain
Args: start_iter, max_iter (int): See docs above
data_generation/grit/third_party/CenterNet2/detectron2/engine/train_loop.py:133
↓ 21 callersMethodclip
Clip (in place) the boxes by limiting x coordinates to the range [0, width] and y coordinates to the range [0, height]. Args
data_generation/grit/third_party/CenterNet2/detectron2/structures/boxes.py:181
↓ 21 callersFunctionsetup_logger
Initialize the detectron2 logger and set its verbosity level to "DEBUG". Args: output (str): a file name or a directory to save log.
data_generation/grit/third_party/CenterNet2/detectron2/utils/logger.py:39
↓ 21 callersMethodstep
User should either: (1) Call this function to increment storage.iter when needed. Or (2) Set `storage.iter` to the correct iteration
data_generation/grit/third_party/CenterNet2/detectron2/utils/events.py:427
↓ 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
data_generation/grit/third_party/CenterNet2/detectron2/export/shared.py:25
↓ 20 callersMethodchat
( self, tokenizer, query: str, history: List[Tuple[str, str]] = [], st
project/mini_monkey/internvl/model/internlm2/modeling_internlm2.py:1187
↓ 20 callersMethodset
Set multiple metadata with kwargs.
data_generation/grit/third_party/CenterNet2/detectron2/data/catalog.py:162
↓ 19 callersMethodfrom_pretrained
r""" Instantiate a PretrainedConfig from a pre-trained model configuration. Params: **pretrained_model_name_or_path**: either:
data_generation/grit/grit/modeling/text/modeling_bert.py:309
↓ 19 callersMethodregister
Args: name (str): the name that identifies a dataset, e.g. "coco_2014_train". func (callable): a callable which takes
data_generation/grit/third_party/CenterNet2/detectron2/data/catalog.py:29
↓ 19 callersMethodtransform
In-place transform all attributes of this class. By "in-place", it means after calling this method, accessing an attribute such
data_generation/grit/third_party/CenterNet2/detectron2/data/transforms/augmentation.py:328
↓ 18 callersFunctionbuild_transform
(is_train, input_size, pad2square=False, normalize_type='imagenet')
project/mini_monkey/internvl/train/dataset.py:238
↓ 17 callersMethodcopy
(self)
project/mini_monkey/internvl/conversation.py:289
↓ 16 callersMethodappend_message
Append a new message.
project/mini_monkey/internvl/conversation.py:255
↓ 16 callersFunctionfunc
(device, n=3)
data_generation/grit/third_party/CenterNet2/tests/layers/test_mask_ops.py:181
↓ 16 callersMethodoverlay_instances
Args: boxes (Boxes, RotatedBoxes or ndarray): either a :class:`Boxes`, or an Nx4 numpy array of XYXY_ABS format f
data_generation/grit/third_party/CenterNet2/detectron2/utils/visualizer.py:607
↓ 16 callersFunctionpatch_instances
A contextmanager, under which the Instances class in detectron2 is replaced by a statically-typed scriptable class, defined by `fields`.
data_generation/grit/third_party/CenterNet2/detectron2/export/torchscript_patch.py:51
↓ 15 callersFunction_parse_text
(text)
demo.py:88
↓ 15 callersFunctionalias
(x, name, is_backward=False)
data_generation/grit/third_party/CenterNet2/detectron2/export/shared.py:592
↓ 15 callersFunctionbuild_model
Build the whole model architecture, defined by ``cfg.MODEL.META_ARCHITECTURE``. Note that it does not load any weights from ``cfg``.
data_generation/grit/third_party/CenterNet2/detectron2/modeling/meta_arch/build.py:16
↓ 15 callersMethoddraw_instance_predictions
Draw instance-level prediction results on an image. Args: predictions (Instances): the output of an instance detection/s
data_generation/grit/third_party/CenterNet2/detectron2/utils/visualizer.py:383
↓ 15 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
data_generation/grit/third_party/CenterNet2/detectron2/layers/rotated_boxes.py:6
↓ 14 callersMethodarea
Computes the area of all the boxes. Returns: torch.Tensor: a vector with areas of each box.
data_generation/grit/third_party/CenterNet2/detectron2/structures/boxes.py:170
↓ 14 callersMethodinference
Run inference on the given inputs. Args: batched_inputs (list[dict]): same as in :meth:`forward` detected_in
data_generation/grit/third_party/CenterNet2/detectron2/modeling/meta_arch/rcnn.py:174
↓ 13 callersMethod_init
(self, params=None)
data_generation/grit/third_party/CenterNet2/detectron2/data/transforms/augmentation.py:106
↓ 13 callersFunctioncheck_set_pb_arg
(pb, arg_name, arg_attr, arg_value, allow_override=False)
data_generation/grit/third_party/CenterNet2/detectron2/export/shared.py:204
↓ 13 callersFunctionconv2d
Helper for building a conv2d layer.
data_generation/grit/third_party/CenterNet2/detectron2/modeling/backbone/regnet.py:28
↓ 13 callersMethodconvert_tokens_to_ids
( self, tokens: Union[bytes, str, List[Union[bytes, str]]] )
monkey_model/tokenization_qwen.py:197
↓ 13 callersMethodmerge_from_file
Load content from the given config file and merge it into self. Args: cfg_filename: config filename allow_un
data_generation/grit/third_party/CenterNet2/detectron2/config/config.py:37
↓ 13 callersMethodoutput_shape
(self)
data_generation/grit/third_party/CenterNet2/detectron2/modeling/backbone/fpn.py:156
↓ 13 callersFunctionrandom_boxes
Create a random Nx4 boxes tensor, with coordinates < max_coord.
data_generation/grit/third_party/CenterNet2/detectron2/utils/testing.py:29
↓ 12 callersMethod__init__
Args: shape: (h, w) tuple or a int interp: PIL interpolation method
data_generation/grit/third_party/CenterNet2/detectron2/data/transforms/augmentation_impl.py:112
↓ 12 callersFunctionbuild_detection_test_loader
Similar to `build_detection_train_loader`, with default batch size = 1, and sampler = :class:`InferenceSampler`. This sampler coordinates all
data_generation/grit/third_party/CenterNet2/detectron2/data/build.py:469
↓ 11 callersMethod__init__
(self, config)
project/mini_monkey/internvl/model/phi3/modeling_phi3.py:256
↓ 11 callersMethodassertEqualsArrays
(self, a1, a2)
data_generation/grit/third_party/CenterNet2/tests/data/test_rotation_transform.py:9
↓ 11 callersMethodbackward
(ctx, grad_output)
data_generation/grit/third_party/CenterNet2/detectron2/layers/deform_conv.py:84
↓ 11 callersMethodfrom_tensors
Args: tensors: a tuple or list of `torch.Tensor`, each of shape (Hi, Wi) or (C_1, ..., C_K, Hi, Wi) where K >= 1.
data_generation/grit/third_party/CenterNet2/detectron2/structures/image_list.py:59
↓ 11 callersMethodgenerate
( self, inputs: Optional[torch.Tensor] = None, generation_config: Optional[GenerationC
monkey_model/modeling_qwen.py:1240
↓ 11 callersMethodnorm
(c)
data_generation/grit/third_party/CenterNet2/detectron2/modeling/meta_arch/retinanet.py:350
↓ 11 callersMethodremove
Alias of ``pop``.
data_generation/grit/third_party/CenterNet2/detectron2/data/catalog.py:69
↓ 11 callersMethodset
Set the field named `name` to `value`. The length of `value` must be the number of instances, and must agree with other exist
data_generation/grit/third_party/CenterNet2/detectron2/structures/instances.py:68
↓ 10 callersMethod__init__
(self, config)
project/mini_monkey/internvl/model/internlm2/modeling_internlm2.py:265
↓ 10 callersMethod__init__
(self, w_in, w_se, activation_class)
data_generation/grit/third_party/CenterNet2/detectron2/modeling/backbone/regnet.py:94
↓ 10 callersFunctionbuild_backbone
Build a backbone from `cfg.MODEL.BACKBONE.NAME`. Returns: an instance of :class:`Backbone`
data_generation/grit/third_party/CenterNet2/detectron2/modeling/backbone/build.py:20
↓ 10 callersMethodfreeze
Make this block not trainable. This method sets all parameters to `requires_grad=False`, and convert all BatchNorm layers to
data_generation/grit/third_party/CenterNet2/detectron2/layers/blocks.py:43
↓ 10 callersFunctionget_conv_template
Get a conversation template.
project/mini_monkey/internvl/conversation.py:328
↓ 10 callersMethodget_fields
like `get_fields` in the Instances object, but return each field in tensor representations
data_generation/grit/third_party/CenterNet2/detectron2/export/c10.py:58
↓ 10 callersFunctionget_pb_arg
(pb, arg_name)
data_generation/grit/third_party/CenterNet2/detectron2/export/shared.py:167
↓ 10 callersMethodpredict_boxes
Args: predictions: return values of :meth:`forward()`. proposals (list[Instances]): proposals that match the features
data_generation/grit/third_party/CenterNet2/detectron2/modeling/roi_heads/fast_rcnn.py:419
↓ 9 callersMethod__init__
(self, cfg, levels, channels, block=BasicBlock, residual_root=False)
data_generation/grit/third_party/CenterNet2/projects/CenterNet2/centernet/modeling/backbone/dlafpn.py:188
↓ 9 callersMethod__init__
Args:
data_generation/grit/third_party/CenterNet2/projects/CenterNet2/centernet/modeling/backbone/dla.py:190
↓ 9 callersMethodapply_deltas
Apply transformation `deltas` (dx, dy, dw, dh) to `boxes`. Args: deltas (Tensor): transformation deltas of shape (N, k*4
data_generation/grit/third_party/CenterNet2/detectron2/modeling/box_regression.py:78
↓ 9 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
data_generation/grit/third_party/CenterNet2/detectron2/modeling/postprocessing.py:9
↓ 9 callersMethoddraw_dataset_dict
Draw annotations/segmentaions in Detectron2 Dataset format. Args: dic (dict): annotation/segmentation data of one image,
data_generation/grit/third_party/CenterNet2/detectron2/utils/visualizer.py:538
↓ 9 callersFunctionget_world_size
()
data_generation/grit/third_party/CenterNet2/detectron2/utils/comm.py:19
↓ 9 callersMethodhas
Returns: bool: whether the field called `name` exists.
data_generation/grit/third_party/CenterNet2/detectron2/structures/instances.py:81
↓ 9 callersMethodregister_hooks
Register hooks to the trainer. The hooks are executed in the order they are registered. Args: hooks (list[Option
data_generation/grit/third_party/CenterNet2/detectron2/engine/train_loop.py:115
↓ 9 callersMethodresume_or_load
If `resume==True` and `cfg.OUTPUT_DIR` contains the last checkpoint (defined by a `last_checkpoint` file), resume from the file. Resu
data_generation/grit/third_party/CenterNet2/detectron2/engine/defaults.py:398
↓ 9 callersMethodsave_pretrained
Save a configuration object to a directory, so that it can be re-loaded using the `from_pretrained(save_directory)` class method.
data_generation/grit/grit/modeling/text/modeling_bert.py:297
↓ 8 callersMethod__init__
(self, config)
data_generation/grit/grit/modeling/text/modeling_bert.py:192
↓ 8 callersMethod__init__
(self, inplace: bool = False)
data_generation/grit/third_party/CenterNet2/projects/CenterNet2/centernet/modeling/backbone/bifpn.py:47
↓ 8 callersMethod__init__
(self, config)
monkey_model/modeling_qwen.py:465
↓ 8 callersMethod__init__
(self, config)
monkey_model/modeling_qwen_nvdia3090.py:326
↓ 8 callersFunction_ntuple
(n)
monkey_model/text_monkey/window.py:28
↓ 8 callersFunction_rename
(cfg: CN, old: str, new: str)
data_generation/grit/third_party/CenterNet2/detectron2/config/compat.py:116
↓ 8 callersMethodapply_image
(self, img)
data_generation/grit/third_party/CenterNet2/detectron2/data/transforms/transform.py:269
↓ 8 callersFunctionassert_instances_allclose
Args: input, other (Instances): size_as_tensor: compare image_size of the Instances as tensors (instead of tuples).
data_generation/grit/third_party/CenterNet2/detectron2/utils/testing.py:82
↓ 8 callersFunctionbatched_nms
Same as torchvision.ops.boxes.batched_nms, but with float().
data_generation/grit/third_party/CenterNet2/detectron2/layers/nms.py:9
↓ 8 callersFunctionbuild_detection_train_loader
Build a dataloader for object detection with some default features. Args: dataset (list or torch.utils.data.Dataset): a list of data
data_generation/grit/third_party/CenterNet2/detectron2/data/build.py:378
↓ 8 callersFunctionbuild_resnet_backbone
Create a ResNet instance from config. Returns: ResNet: a :class:`ResNet` instance.
data_generation/grit/third_party/CenterNet2/detectron2/modeling/backbone/resnet.py:614
↓ 8 callersMethodget_prompt
Get the prompt for generation.
project/mini_monkey/internvl/conversation.py:61
↓ 8 callersMethodnonempty
Find boxes that are non-empty. A box is considered empty, if either of its side is no larger than threshold. Returns:
data_generation/grit/third_party/CenterNet2/detectron2/structures/boxes.py:197
↓ 8 callersMethodput_scalars
Put multiple scalars from keyword arguments. Examples: storage.put_scalars(loss=my_loss, accuracy=my_accuracy, smoothin
data_generation/grit/third_party/CenterNet2/detectron2/utils/events.py:336
↓ 8 callersFunctionrank0_print
(*args)
finetune_multitask_dialouge_doc.py:117
↓ 7 callersFunction_convert_target_to_string
Inverse of ``locate()``. Args: t: any object with ``__module__`` and ``__qualname__``
data_generation/grit/third_party/CenterNet2/detectron2/utils/registry.py:15
next →1–100 of 3,034, ranked by callers