MCPcopy Create free account

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

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

↓ 2 callersFunctionget_checkpoint_url
Returns the URL to the model trained using the given config Args: config_path (str): config file name relative to detectron2's "conf
data_generation/grit/third_party/CenterNet2/detectron2/model_zoo/model_zoo.py:111
↓ 2 callersFunctionget_code
(mod)
data_generation/grit/third_party/CenterNet2/detectron2/export/torchscript.py:83
↓ 2 callersFunctionget_config
Returns a config object for a model in model zoo. Args: config_path (str): config file name relative to detectron2's "configs/"
data_generation/grit/third_party/CenterNet2/detectron2/model_zoo/model_zoo.py:147
↓ 2 callersMethodget_crop_size
Args: image_size (tuple): height, width Returns: crop_size (tuple): height, width in absolute pixels
data_generation/grit/third_party/CenterNet2/detectron2/data/transforms/augmentation_impl.py:389
↓ 2 callersMethodget_gt_and_features
(self)
data_generation/grit/third_party/CenterNet2/tests/modeling/test_rpn.py:22
↓ 2 callersMethodget_image_path
(self, image_path)
project/mini_monkey/internvl/train/minimonkey_chat_finetune.py:320
↓ 2 callersMethodget_image_path
(self, image_path)
project/mini_monkey/internvl/train/internvl_chat_finetune.py:320
↓ 2 callersMethodget_image_path
(self, image_path)
project/mini_monkey/internvl/train/internvl_chat_pretrain.py:358
↓ 2 callersFunctionget_lvis_instances_meta
Load LVIS metadata. Args: dataset_name (str): LVIS dataset name without the split name (e.g., "lvis_v0.5"). Returns: di
data_generation/grit/third_party/CenterNet2/detectron2/data/datasets/lvis.py:167
↓ 2 callersMethodget_output_shape
Compute the output size given input size and target short edge length.
data_generation/grit/third_party/CenterNet2/detectron2/data/transforms/augmentation_impl.py:176
↓ 2 callersFunctionget_pb_arg_valf
(pb, arg_name, default_val)
data_generation/grit/third_party/CenterNet2/detectron2/export/shared.py:174
↓ 2 callersFunctionget_rel_pos
Get relative positional embeddings according to the relative positions of query and key sizes. Args: q_size (int): size of qu
data_generation/grit/grit/modeling/backbone/utils.py:63
↓ 2 callersFunctionget_sub_graph_external_input_output
Return the list of external input/output of sub-graph, each element is tuple of the name and corresponding version in predict_net. exter
data_generation/grit/third_party/CenterNet2/detectron2/export/shared.py:750
↓ 2 callersFunctiongiou_loss
Generalized Intersection over Union Loss (Hamid Rezatofighi et. al) https://arxiv.org/abs/1902.09630 Gradient-friendly IoU loss with an a
data_generation/grit/third_party/CenterNet2/projects/CenterNet2/centernet/modeling/layers/iou_loss.py:66
↓ 2 callersFunctiongrid_sample_roi_align
(input, boxes, output_size, scale, sampling_ratio)
data_generation/grit/third_party/CenterNet2/tests/layers/test_roi_align.py:131
↓ 2 callersMethodinference
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:361
↓ 2 callersMethodinstance_masks
(self)
data_generation/grit/third_party/CenterNet2/detectron2/utils/visualizer.py:220
↓ 2 callersFunctioninstances_to_coco_json
Add object_descriptions and logit (if applicable) to detectron2's instances_to_coco_json
data_generation/grit/grit/evaluation/eval.py:125
↓ 2 callersFunctioninstances_to_coco_json
Dump an "Instances" object to a COCO-format json that's used for evaluation. Args: instances (Instances): img_id (int): the
data_generation/grit/third_party/CenterNet2/detectron2/evaluation/coco_evaluation.py:380
↓ 2 callersMethodinverse
The inverse is to rotate it back with expand, and crop to get the original shape.
data_generation/grit/third_party/CenterNet2/detectron2/data/transforms/transform.py:235
↓ 2 callersFunctionis_main_process
()
data_generation/grit/third_party/CenterNet2/detectron2/utils/comm.py:63
↓ 2 callersMethodis_rotated
(box_list)
data_generation/grit/third_party/CenterNet2/detectron2/evaluation/rotated_coco_evaluation.py:17
↓ 2 callersMethodlatest
Returns: dict[str -> (float, int)]: mapping from the name of each scalar to the most recent value and the iterati
data_generation/grit/third_party/CenterNet2/detectron2/utils/events.py:394
↓ 2 callersMethodlatest_with_smoothing_hint
Similar to :meth:`latest`, but the returned values are either the un-smoothed original latest value, or a median of the given
data_generation/grit/third_party/CenterNet2/detectron2/utils/events.py:402
↓ 2 callersFunctionlink_val100
(dir_full, dir_100)
data_generation/grit/third_party/CenterNet2/datasets/prepare_panoptic_fpn.py:98
↓ 2 callersFunctionload_cityscapes_instances
Args: image_dir (str): path to the raw dataset. e.g., "~/cityscapes/leftImg8bit/train". gt_dir (str): path to the raw annotations
data_generation/grit/third_party/CenterNet2/detectron2/data/datasets/cityscapes.py:53
↓ 2 callersFunctionload_cityscapes_semantic
Args: image_dir (str): path to the raw dataset. e.g., "~/cityscapes/leftImg8bit/train". gt_dir (str): path to the raw annotations
data_generation/grit/third_party/CenterNet2/detectron2/data/datasets/cityscapes.py:95
↓ 2 callersFunctionload_coco_panoptic_json
Args: image_dir (str): path to the raw dataset. e.g., "~/coco/train2017". gt_dir (str): path to the raw annotations. e.g., "~/coc
data_generation/grit/third_party/CenterNet2/detectron2/data/datasets/coco_panoptic.py:14
↓ 2 callersMethodload_image
(self, image_path)
project/mini_monkey/internvl/train/minimonkey_chat_finetune.py:314
↓ 2 callersMethodload_image
(self, image_path)
project/mini_monkey/internvl/train/internvl_chat_finetune.py:314
↓ 2 callersMethodload_image
(self, image_path)
project/mini_monkey/internvl/train/internvl_chat_pretrain.py:352
↓ 2 callersFunctionload_lvis_json
Load a json file in LVIS's annotation format. Args: json_file (str): full path to the LVIS json annotation file. image_root
data_generation/grit/third_party/CenterNet2/detectron2/data/datasets/lvis.py:40
↓ 2 callersMethodmake_default_stages
Created list of ResNet stages from pre-defined depth (one of 18, 34, 50, 101, 152). If it doesn't create the ResNet variant you need,
data_generation/grit/third_party/CenterNet2/detectron2/modeling/backbone/resnet.py:548
↓ 2 callersFunctionmake_mask
Makes a donut shaped binary mask.
data_generation/grit/third_party/CenterNet2/tests/data/test_coco.py:14
↓ 2 callersFunctionmask_rcnn_inference
Convert pred_mask_logits to estimated foreground probability masks while also extracting only the masks for the predicted classes in pred_ins
data_generation/grit/third_party/CenterNet2/detectron2/modeling/roi_heads/mask_head.py:114
↓ 2 callersMethodmask_to_polygons
(self, mask)
data_generation/grit/third_party/CenterNet2/detectron2/utils/visualizer.py:119
↓ 2 callersFunctionmaybe_add_full_model_gradient_clipping
(optim)
data_generation/grit/grit/custom_solver.py:33
↓ 2 callersFunctionmaybe_add_gradient_clipping
If gradient clipping is enabled through config options, wraps the existing optimizer type to become a new dynamically created class Optimizer
data_generation/grit/third_party/CenterNet2/detectron2/solver/build.py:78
↓ 2 callersFunctionmaybe_to_cpu
(x)
data_generation/grit/third_party/CenterNet2/detectron2/utils/memory.py:57
↓ 2 callersMethodnon_empty_mask
Returns: (H, W) array, a mask for all pixels that have a prediction
data_generation/grit/third_party/CenterNet2/detectron2/utils/visualizer.py:196
↓ 2 callersMethodnormalize_angles
Restrict angles to the range of [-180, 180) degrees
data_generation/grit/third_party/CenterNet2/detectron2/structures/rotated_boxes.py:247
↓ 2 callersFunctionoutput
(vis, fname)
data_generation/grit/third_party/CenterNet2/tools/visualize_data.py:57
↓ 2 callersFunctionpairwise_intersection
Given two lists of boxes of size N and M, compute the intersection area between __all__ N x M pairs of boxes. The box order must be (xmin
data_generation/grit/third_party/CenterNet2/detectron2/structures/boxes.py:310
↓ 2 callersFunctionpatch
recursively (post-order) update all modules with the target type and its subclasses, make a initialization/composition/inheritance/... via th
data_generation/grit/third_party/CenterNet2/detectron2/export/caffe2_patch.py:57
↓ 2 callersMethodpredict_probs
support sigmoid
data_generation/grit/third_party/CenterNet2/projects/CenterNet2/centernet/modeling/roi_heads/custom_fast_rcnn.py:117
↓ 2 callersMethodprepare_data
(self, dataset_dict_in)
data_generation/grit/grit/data/custom_dataset_mapper.py:67
↓ 2 callersFunctionpreprocess
( source, tokenizer, max_len, system_message: str
finetune_multitask.py:134
↓ 2 callersFunctionpreprocess
[{"from": "user", "value": f"<img>{file_abs_path}</img>" + prefix,}, {"from": "assistant", "value": label}] <|im_start|>system You are a
finetune_multitask_dialouge_doc.py:146
↓ 2 callersMethodpreprocess_image
Normalize, pad and batch the input images.
data_generation/grit/third_party/CenterNet2/projects/CenterNet2/centernet/modeling/meta_arch/centernet_detector.py:62
↓ 2 callersMethodprocess
Process the pair of inputs and outputs. If they contain batches, the pairs can be consumed one-by-one using `zip`: .. code-b
data_generation/grit/third_party/CenterNet2/detectron2/evaluation/evaluator.py:33
↓ 2 callersMethodprocessPunctuation
(self, inText)
eval/vqa_eval.py:254
↓ 2 callersMethodput
(self, value)
project/mini_monkey/internvl/model/internlm2/modeling_internlm2.py:1260
↓ 2 callersFunctionrandom_boxes
(mean_box, stdev, N, maxsize)
data_generation/grit/third_party/CenterNet2/tests/layers/test_roi_align.py:157
↓ 2 callersFunctionrandom_rotated_boxes
(mean_box, std_length, std_angle, N)
data_generation/grit/third_party/CenterNet2/tests/modeling/test_box2box_transform.py:46
↓ 2 callersFunctionreduce_param_groups
(params: List[Dict[str, Any]])
data_generation/grit/third_party/CenterNet2/detectron2/solver/build.py:233
↓ 2 callersFunctionreduce_sum
(tensor)
data_generation/grit/third_party/CenterNet2/projects/CenterNet2/centernet/modeling/dense_heads/utils.py:32
↓ 2 callersFunctionreload_script_model
Save a jit module and load it back. Similar to the `getExportImportCopy` function in torch/testing/
data_generation/grit/third_party/CenterNet2/detectron2/utils/testing.py:129
↓ 2 callersFunctionrepeat_kv
This is the equivalent of torch.repeat_interleave(x, dim=1, repeats=n_rep). The hidden states go from (batch, num_key_value_heads, seqlen, he
project/mini_monkey/internvl/model/internlm2/modeling_internlm2.py:282
↓ 2 callersFunctionrotate_half
Rotates half the hidden dims of the input.
project/mini_monkey/internvl/model/internlm2/modeling_internlm2.py:247
↓ 2 callersMethodrun_on_video
Visualizes predictions on frames of the input video. Args: video (cv2.VideoCapture): a :class:`VideoCapture` object, who
data_generation/grit/third_party/CenterNet2/projects/CenterNet2/predictor.py:93
↓ 2 callersMethodrun_on_video
Visualizes predictions on frames of the input video. Args: video (cv2.VideoCapture): a :class:`VideoCapture` object, who
data_generation/grit/third_party/CenterNet2/demo/predictor.py:76
↓ 2 callersMethodsave_graph
Save the graph as SVG format. Args: output_file (str): a SVG file inputs: optional inputs given to the model
data_generation/grit/third_party/CenterNet2/detectron2/export/api.py:180
↓ 2 callersMethodsave_protobuf
Save the model as caffe2's protobuf format. It saves the following files: * "model.pb": definition of the graph. Can be
data_generation/grit/third_party/CenterNet2/detectron2/export/api.py:154
↓ 2 callersFunctionsem_seg_postprocess
Return semantic segmentation predictions in the original resolution. The input images are often resized when entering semantic segmentor. Mo
data_generation/grit/third_party/CenterNet2/detectron2/modeling/postprocessing.py:78
↓ 2 callersMethodsemantic_masks
(self)
data_generation/grit/third_party/CenterNet2/detectron2/utils/visualizer.py:212
↓ 2 callersFunctionshapes_to_tensor
Turn a list of integer scalars or integer Tensor scalars into a vector, in a way that's both traceable and scriptable. In tracing, `x` s
data_generation/grit/third_party/CenterNet2/detectron2/layers/wrappers.py:16
↓ 2 callersFunctionsliding_window
(matrix, window_size, stride)
monkey_model/text_monkey/visual_text.py:36
↓ 2 callersFunctionsplit_s3_path
Split a full s3 path into the bucket name and path.
data_generation/grit/grit/modeling/text/file_utils.py:118
↓ 2 callersFunctionsubsample_labels
Return `num_samples` (or fewer, if not enough found) random samples from `labels` which is a mixture of positives & negatives. It will tr
data_generation/grit/third_party/CenterNet2/detectron2/modeling/sampling.py:9
↓ 2 callersMethodtest
(self)
data_generation/grit/third_party/CenterNet2/tests/data/test_coco.py:78
↓ 2 callersMethodtest_with_TTA
(cls, cfg, model)
data_generation/grit/third_party/CenterNet2/tools/train_net.py:102
↓ 2 callersMethodto
(self, device: torch.device)
data_generation/grit/third_party/CenterNet2/detectron2/structures/rotated_boxes.py:232
↓ 2 callersMethodto_d2_instances_list
Convert InstancesList to List[Instances]. The input `instances_list` can also be a List[Instances], in this case this method is a non
data_generation/grit/third_party/CenterNet2/detectron2/export/c10.py:107
↓ 2 callersMethodto_json_string
Serializes this instance to a JSON string.
data_generation/grit/grit/modeling/text/modeling_bert.py:430
↓ 2 callersMethodto_list_format
(self, text: str)
monkey_model/tokenization_qwen.py:355
↓ 2 callersMethodtokenize
Converts a string in a sequence of tokens. Args: text (`str`): The sequence to be encoded. a
monkey_model/tokenization_qwen.py:236
↓ 2 callersFunctionuncompressed_rle
(mask)
data_generation/grit/third_party/CenterNet2/tests/data/test_coco.py:29
↓ 2 callersFunctionupgrade_config
Upgrade a config from its current version to a newer version. Args: cfg (CfgNode): to_version (int): defaults to the latest
data_generation/grit/third_party/CenterNet2/detectron2/config/compat.py:33
↓ 2 callersFunctionverify_results
Args: results (OrderedDict[dict]): task_name -> {metric -> score} Returns: bool: whether the verification succeeds or not
data_generation/grit/third_party/CenterNet2/detectron2/evaluation/testing.py:31
↓ 2 callersMethodverify_rpn
(self, conv_dims, expected_conv_dims)
data_generation/grit/third_party/CenterNet2/tests/modeling/test_rpn.py:69
↓ 2 callersFunctionversion_cmp
(v1, v2, op='eq')
project/mini_monkey/internvl/model/internvl_chat/modeling_internvl_chat.py:30
↓ 2 callersFunctionwindow_partition
Partition into non-overlapping windows with padding if needed. Args: x (tensor): input tokens with [B, H, W, C]. window_size
monkey_model/text_monkey/window.py:187
↓ 2 callersMethodwrap_backbone_lora
(self, r=128, lora_alpha=256, lora_dropout=0.05)
project/mini_monkey/internvl/model/internvl_chat/modeling_minimonkey_chat.py:103
↓ 2 callersMethodwrap_llm_lora
(self, r=128, lora_alpha=256, lora_dropout=0.05)
project/mini_monkey/internvl/model/internvl_chat/modeling_minimonkey_chat.py:113
↓ 2 callersMethodwrite
(self)
data_generation/grit/third_party/CenterNet2/detectron2/utils/events.py:223
↓ 2 callersMethodwrite_metrics
Args: loss_dict (dict): dict of scalar losses data_time (float): time taken by the dataloader iteration p
data_generation/grit/third_party/CenterNet2/detectron2/engine/train_loop.py:305
↓ 1 callersFunctionBilinearInterpolation
(tensor_in, up_scale)
data_generation/grit/third_party/CenterNet2/detectron2/export/shared.py:48
↓ 1 callersMethod__init__
(self, raw_data, tokenizer: transformers.PreTrainedTokenizer, max_len: int)
finetune_multitask.py:182
↓ 1 callersMethod__init__
(self, raw_data, tokenizer: transformers.PreTrainedTokenizer, max_len: int)
finetune_multitask_dialouge_doc.py:206
↓ 1 callersMethod__init__
(self, conf_path, sc_config_key='sensecore')
project/mini_monkey/internvl/train/dataset.py:183
↓ 1 callersMethod__init__
(self, cfg)
data_generation/grit/grit/predictor.py:63
↓ 1 callersMethod__init__
(self, object_descriptions)
data_generation/grit/grit/data/custom_dataset_mapper.py:130
↓ 1 callersMethod__init__
(self, cfg)
data_generation/grit/third_party/CenterNet2/tools/lightning_train_net.py:171
↓ 1 callersMethod__init__
Args: min_sizes: list of short-edge size to resize the image to max_size: maximum height or width of resized images
data_generation/grit/third_party/CenterNet2/detectron2/modeling/test_time_augmentation.py:39
↓ 1 callersMethod__init__
Args: backbone: either a backbone module or a mmdet config dict that defines a backbone. The backbone takes a 4D
data_generation/grit/third_party/CenterNet2/detectron2/modeling/mmdet_wrapper.py:43
↓ 1 callersMethod__init__
NOTE: this interface is experimental. Args: num_keypoints (int): number of keypoints to predict loss_weight
data_generation/grit/third_party/CenterNet2/detectron2/modeling/roi_heads/keypoint_head.py:142
↓ 1 callersMethod__init__
NOTE: this interface is experimental. Args: loss_weight (float): multiplier of the loss vis_period (int): vi
data_generation/grit/third_party/CenterNet2/detectron2/modeling/roi_heads/mask_head.py:161
↓ 1 callersMethod__init__
Args: backbone: a backbone module, must follow detectron2's backbone interface proposal_generator: a module that gene
data_generation/grit/third_party/CenterNet2/detectron2/modeling/meta_arch/rcnn.py:33
↓ 1 callersMethod__init__
Args: center_sampling_radius: radius of the "center" of a groundtruth box, within which all anchor points are lab
data_generation/grit/third_party/CenterNet2/detectron2/modeling/meta_arch/fcos.py:31
↓ 1 callersMethod__init__
NOTE: this interface is experimental. Args: input_shape: shapes (channels and stride) of the input features
data_generation/grit/third_party/CenterNet2/detectron2/modeling/meta_arch/semantic_seg.py:146
← previousnext →501–600 of 3,034, ranked by callers