Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Yuliang-Liu/Monkey
/ functions
Functions
3,034 in github.com/Yuliang-Liu/Monkey
⨍
Functions
3,034
◇
Types & classes
589
↳
Endpoints
3
↓ 7 callers
Method
_random_data
(self)
data_generation/grit/third_party/CenterNet2/tests/test_visualizer.py:17
↓ 7 callers
Function
default_argument_parser
Create a parser with some common arguments used by detectron2 users. Args: epilog (str): epilog passed to ArgumentParser describing
data_generation/grit/third_party/CenterNet2/detectron2/engine/defaults.py:82
↓ 7 callers
Function
default_setup
Perform some basic common setups at the beginning of a job, including: 1. Set up the detectron2 logger 2. Log basic information about en
data_generation/grit/third_party/CenterNet2/detectron2/engine/defaults.py:174
↓ 7 callers
Method
device
(self)
data_generation/grit/third_party/CenterNet2/projects/CenterNet2/centernet/modeling/meta_arch/centernet_detector.py:38
↓ 7 callers
Function
flatten_to_tuple
Flatten an object so it can be used for PyTorch tracing. Also returns how to rebuild the original object from the flattened outputs. Ret
data_generation/grit/third_party/CenterNet2/detectron2/export/flatten.py:158
↓ 7 callers
Function
get_pb_arg_vali
(pb, arg_name, default_val)
data_generation/grit/third_party/CenterNet2/detectron2/export/shared.py:189
↓ 7 callers
Method
loadRes
Load result file and return a result object. :param resFile (str) : file name of result file :return: res (obj) : resul
eval/vqa.py:168
↓ 7 callers
Function
nonzero_tuple
A 'as_tuple=True' version of torch.nonzero to support torchscript. because of https://github.com/pytorch/pytorch/issues/38718
data_generation/grit/third_party/CenterNet2/detectron2/layers/wrappers.py:122
↓ 7 callers
Method
output_shape
(self)
data_generation/grit/third_party/CenterNet2/projects/CenterNet2/centernet/modeling/backbone/res2net.py:641
↓ 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 order m
data_generation/grit/third_party/CenterNet2/detectron2/structures/boxes.py:334
↓ 7 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
data_generation/grit/third_party/CenterNet2/detectron2/structures/rotated_boxes.py:488
↓ 7 callers
Method
reset
Preparation for a new round of evaluation. Should be called before starting a round of evaluation.
data_generation/grit/third_party/CenterNet2/detectron2/evaluation/evaluator.py:26
↓ 7 callers
Function
split_name
(name)
data_generation/grit/third_party/CenterNet2/projects/CenterNet2/centernet/modeling/backbone/bifpn_fcos.py:20
↓ 7 callers
Method
to
(self, *args: Any, **kwargs: Any)
data_generation/grit/third_party/CenterNet2/detectron2/structures/masks.py:109
↓ 6 callers
Method
__init__
(self, config: InternVisionConfig)
project/mini_monkey/internvl/model/internvl_chat/modeling_intern_vit.py:185
↓ 6 callers
Method
_forward_mask
Forward logic of the mask prediction branch. Args: features (dict[str, Tensor]): mapping from feature map names to tenso
data_generation/grit/third_party/CenterNet2/detectron2/modeling/roi_heads/roi_heads.py:818
↓ 6 callers
Function
_get_builtin_metadata
(dataset_name)
data_generation/grit/third_party/CenterNet2/detectron2/data/datasets/builtin_meta.py:283
↓ 6 callers
Method
_simple_roialign
RoiAlign with scale 1.0.
data_generation/grit/third_party/CenterNet2/tests/layers/test_roi_align.py:79
↓ 6 callers
Method
_test_model
(self, config_path, inference_func, batch=1)
data_generation/grit/third_party/CenterNet2/tests/test_export_torchscript.py:137
↓ 6 callers
Method
apply_augmentations
Equivalent of ``AugmentationList(augmentations)(self)``
data_generation/grit/third_party/CenterNet2/detectron2/data/transforms/augmentation.py:341
↓ 6 callers
Function
build_batch_data_loader
Build a batched dataloader. The main differences from `torch.utils.data.DataLoader` are: 1. support aspect ratio grouping options 2. use
data_generation/grit/third_party/CenterNet2/detectron2/data/build.py:276
↓ 6 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.
data_generation/grit/third_party/CenterNet2/detectron2/modeling/proposal_generator/build.py:15
↓ 6 callers
Function
ciou_loss
Complete Intersection over Union Loss (Zhaohui Zheng et. al) https://arxiv.org/abs/1911.08287 Args: boxes1, boxes2 (Tensor): box
data_generation/grit/third_party/CenterNet2/detectron2/layers/losses.py:66
↓ 6 callers
Function
diou_loss
Distance Intersection over Union Loss (Zhaohui Zheng et. al) https://arxiv.org/abs/1911.08287 Args: boxes1, boxes2 (Tensor): box
data_generation/grit/third_party/CenterNet2/detectron2/layers/losses.py:5
↓ 6 callers
Method
draw_binary_mask
Args: binary_mask (ndarray): numpy array of shape (H, W), where H is the image height and W is the image width. E
data_generation/grit/third_party/CenterNet2/detectron2/utils/visualizer.py:1035
↓ 6 callers
Method
draw_sem_seg
Draw semantic segmentation predictions/labels. Args: sem_seg (Tensor or ndarray): the segmentation of shape (H, W).
data_generation/grit/third_party/CenterNet2/detectron2/utils/visualizer.py:436
↓ 6 callers
Function
fixup_module_metadata
Fix the __qualname__ of module members to be their exported api name, so when they are referenced in docs, sphinx can find them. Reference:
data_generation/grit/third_party/CenterNet2/detectron2/utils/env.py:135
↓ 6 callers
Method
forward_with_given_boxes
Use the given boxes in `instances` to produce other (non-box) per-ROI outputs. Args: features: same as in `forward()`
data_generation/grit/third_party/CenterNet2/detectron2/modeling/roi_heads/roi_heads.py:502
↓ 6 callers
Method
get
(name)
data_generation/grit/third_party/CenterNet2/detectron2/checkpoint/catalog.py:58
↓ 6 callers
Method
get_input_embeddings
(self)
project/mini_monkey/internvl/model/internvl_chat/modeling_intern_vit.py:321
↓ 6 callers
Function
get_pb_arg_vals
(pb, arg_name, default_val)
data_generation/grit/third_party/CenterNet2/detectron2/export/shared.py:194
↓ 6 callers
Function
get_stop_words_ids
(chat_format, tokenizer)
monkey_model/qwen_generation_utils.py:109
↓ 6 callers
Method
label_and_sample_proposals
Prepare some proposals to be used to train the ROI heads. It performs box matching between `proposals` and `targets`, and assigns
data_generation/grit/third_party/CenterNet2/detectron2/modeling/roi_heads/roi_heads.py:220
↓ 6 callers
Method
load_state_dict
(self, state_dict)
data_generation/grit/third_party/CenterNet2/detectron2/engine/hooks.py:369
↓ 6 callers
Function
locate
Locate and return an object ``x`` using an input string ``{x.__module__}.{x.__qualname__}``, such as "module.submodule.class_name". Rais
data_generation/grit/third_party/CenterNet2/detectron2/utils/registry.py:40
↓ 6 callers
Function
make_context
( tokenizer: PreTrainedTokenizer, query: str, history: List[Tuple[str, str]] = None, system: s
monkey_model/qwen_generation_utils.py:119
↓ 6 callers
Method
preprocess_image
Normalize, pad and batch the input images.
data_generation/grit/third_party/CenterNet2/detectron2/modeling/meta_arch/rcnn.py:220
↓ 6 callers
Function
print_csv_format
Print main metrics in a format similar to Detectron, so that they are easy to copypaste into a spreadsheet. Args: results (Order
data_generation/grit/third_party/CenterNet2/detectron2/evaluation/testing.py:9
↓ 6 callers
Method
randomData
(self, h=5, w=5)
data_generation/grit/third_party/CenterNet2/tests/data/test_rotation_transform.py:12
↓ 6 callers
Function
rank0_print
(*args)
finetune_multitask.py:105
↓ 6 callers
Function
repeat_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/phi3/modeling_phi3.py:275
↓ 6 callers
Method
reset_image
Args: img: same as in __init__
data_generation/grit/third_party/CenterNet2/detectron2/utils/visualizer.py:294
↓ 6 callers
Method
search
(self, begin_tokens, step)
data_generation/grit/grit/modeling/text/text_decoder.py:368
↓ 6 callers
Method
to_dict
Serializes this instance to a Python dictionary. Override the default [`~PretrainedConfig.to_dict`]. Returns: `Dict[str,
project/mini_monkey/internvl/model/internvl_chat/configuration_internvl_chat.py:80
↓ 5 callers
Method
__init__
(self, visual_feature_size: int, vocab_size: int, hidden_size: int)
data_generation/grit/grit/modeling/text/text_decoder.py:9
↓ 5 callers
Method
__init__
(self, arg1, arg2, arg3=3)
data_generation/grit/third_party/CenterNet2/tests/config/test_yacs_config.py:68
↓ 5 callers
Method
__init__
( self, grid_size, embed_dim, num_heads, kv_dim=No
monkey_model/visual.py:118
↓ 5 callers
Method
__init__
( self, grid_size, embed_dim, num_heads, kv_dim=No
monkey_model/text_monkey/visual_text.py:125
↓ 5 callers
Method
__init__
( self, in_features, hidden_features=None, out_features=None,
monkey_model/text_monkey/window.py:82
↓ 5 callers
Method
_benchmark
(self, iterator, num_iter, warmup, msg=None)
data_generation/grit/third_party/CenterNet2/detectron2/data/benchmark.py:100
↓ 5 callers
Function
_broadcast_params
If one size (or aspect ratio) is specified and there are multiple feature maps, we "broadcast" anchors of that single size (or aspect ratio)
data_generation/grit/third_party/CenterNet2/detectron2/modeling/anchor_generator.py:54
↓ 5 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
data_generation/grit/third_party/CenterNet2/detectron2/utils/visualizer.py:1180
↓ 5 callers
Method
_convert_xy_to_wh
(self, x)
data_generation/grit/third_party/CenterNet2/tests/structures/test_boxes.py:13
↓ 5 callers
Method
_create_grayscale_image
Create a grayscale version of the original image. The colors in masked area, if given, will be kept.
data_generation/grit/third_party/CenterNet2/detectron2/utils/visualizer.py:1169
↓ 5 callers
Method
_data_loader
(self, device)
data_generation/grit/third_party/CenterNet2/tests/test_engine.py:40
↓ 5 callers
Method
_forward_keypoint
Forward logic of the keypoint prediction branch. Args: features (dict[str, Tensor]): mapping from feature map names to t
data_generation/grit/third_party/CenterNet2/detectron2/modeling/roi_heads/roi_heads.py:848
↓ 5 callers
Function
_test_func
(arg1, arg2=2, arg3=3, arg4=4)
data_generation/grit/third_party/CenterNet2/tests/config/test_yacs_config.py:147
↓ 5 callers
Method
_test_obj
(self, obj)
data_generation/grit/third_party/CenterNet2/tests/test_registry.py:15
↓ 5 callers
Method
apply_coords
coords should be a N * 2 array-like, containing N couples of (x, y) points
data_generation/grit/third_party/CenterNet2/detectron2/data/transforms/transform.py:210
↓ 5 callers
Method
apply_image
img should be a numpy array, formatted as Height * Width * Nchannels
data_generation/grit/third_party/CenterNet2/detectron2/data/transforms/transform.py:200
↓ 5 callers
Method
apply_overrides
In-place override contents of cfg. Args: cfg: an omegaconf config object overrides: list of strings in the f
data_generation/grit/third_party/CenterNet2/detectron2/config/lazy.py:296
↓ 5 callers
Method
area
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/rotated_boxes.py:236
↓ 5 callers
Function
build_optimizer
Build an optimizer from config.
data_generation/grit/third_party/CenterNet2/detectron2/solver/build.py:114
↓ 5 callers
Function
check_metadata_consistency
Check that the datasets have consistent metadata. Args: key (str): a metadata key dataset_names (list[str]): a list of datas
data_generation/grit/third_party/CenterNet2/detectron2/data/detection_utils.py:564
↓ 5 callers
Function
default_X_scheduler
Returns the config for a default multi-step LR scheduler such as "1x", "3x", commonly referred to in papers, where every 1x has the total len
data_generation/grit/third_party/CenterNet2/configs/common/coco_schedule.py:7
↓ 5 callers
Function
dump_torchscript_IR
Dump IR of a TracedModule/ScriptModule/Function in various format (code, graph, inlined graph). Useful for debugging. Args: mode
data_generation/grit/third_party/CenterNet2/detectron2/export/torchscript.py:63
↓ 5 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.
data_generation/grit/third_party/CenterNet2/detectron2/structures/masks.py:222
↓ 5 callers
Function
get_model_no_weights
Like model_zoo.get, but do not load any weights (even pretrained)
data_generation/grit/third_party/CenterNet2/detectron2/utils/testing.py:19
↓ 5 callers
Function
inference_on_dataset
Run model on the data_loader and evaluate the metrics with evaluator. Also benchmark the inference speed of `model.__call__` accurately.
data_generation/grit/third_party/CenterNet2/detectron2/evaluation/evaluator.py:103
↓ 5 callers
Function
launch
Launch multi-gpu or distributed training. This function must be called on all machines involved in the training. It will spawn child proc
data_generation/grit/third_party/CenterNet2/detectron2/engine/launch.py:27
↓ 5 callers
Function
load_coco_json
Load a json file with COCO's instances annotation format. Currently supports instance detection, instance segmentation, and person keypoi
data_generation/grit/third_party/CenterNet2/detectron2/data/datasets/coco.py:30
↓ 5 callers
Function
load_image
(image_file, input_size=448, min_num=1, max_num=6, upscale=False)
project/mini_monkey/eval/internvl_chat.py:84
↓ 5 callers
Function
nms_rotated
Performs non-maximum suppression (NMS) on the rotated boxes according to their intersection-over-union (IoU). Rotated NMS iteratively re
data_generation/grit/third_party/CenterNet2/detectron2/layers/nms.py:25
↓ 5 callers
Function
open_json
(path)
data_generation/add_all_json.py:3
↓ 5 callers
Function
patch_builtin_len
Patch the builtin len() function of a few detectron2 modules to use __len__ instead, because __len__ does not convert values to integers
data_generation/grit/third_party/CenterNet2/detectron2/export/torchscript_patch.py:316
↓ 5 callers
Function
polygons_to_bitmask
Args: polygons (list[ndarray]): each array has shape (Nx2,) height, width (int) Returns: ndarray: a bool mask of sha
data_generation/grit/third_party/CenterNet2/detectron2/structures/masks.py:22
↓ 5 callers
Function
process
(filename)
project/mini_monkey/tools/convert_parquet.py:52
↓ 5 callers
Method
processDigitArticle
(self, inText)
project/mini_monkey/eval/tiny_lvlm/tools.py:243
↓ 5 callers
Method
processPunctuation
(self, inText)
project/mini_monkey/eval/tiny_lvlm/tools.py:231
↓ 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
data_generation/grit/third_party/CenterNet2/detectron2/utils/colormap.py:111
↓ 5 callers
Function
read_image
Read an image into the given format. Will apply rotation and flipping if the image has such exif information. Args: file_name (s
data_generation/grit/third_party/CenterNet2/detectron2/data/detection_utils.py:166
↓ 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()`.
data_generation/grit/third_party/CenterNet2/detectron2/utils/memory.py:26
↓ 5 callers
Method
save
(self, filepath)
monkey_model/tokenization_qwen.py:502
↓ 5 callers
Function
seed_all_rng
Set the random seed for the RNG in torch, numpy and python. Args: seed (int): if None, will use a strong random seed.
data_generation/grit/third_party/CenterNet2/detectron2/utils/env.py:27
↓ 5 callers
Method
state_dict
(self)
data_generation/grit/third_party/CenterNet2/detectron2/engine/hooks.py:364
↓ 5 callers
Method
state_dict
Hooks are stateless by default, but can be made checkpointable by implementing `state_dict` and `load_state_dict`.
data_generation/grit/third_party/CenterNet2/detectron2/engine/train_loop.py:80
↓ 5 callers
Method
summarize
Compute and display summary metrics for evaluation results given a custom value for max_dets_per_image
data_generation/grit/third_party/CenterNet2/detectron2/evaluation/coco_evaluation.py:628
↓ 4 callers
Method
__getattr__
(self, key)
data_generation/grit/third_party/CenterNet2/detectron2/data/catalog.py:115
↓ 4 callers
Method
__init__
Args: img_size (int): Input image size. patch_size (int): Patch size. in_chans (int): Number of input ima
data_generation/grit/grit/modeling/backbone/vit.py:246
↓ 4 callers
Method
__init__
Args: stem (nn.Module): a stem module stages (list[list[CNNBlockBase]]): several (typically 4) stages,
data_generation/grit/third_party/CenterNet2/detectron2/modeling/backbone/resnet.py:367
↓ 4 callers
Method
__init__
Args: op (Callable): operation to be applied to the image, which takes in an ndarray and returns an ndarray.
data_generation/grit/third_party/CenterNet2/detectron2/data/transforms/transform.py:258
↓ 4 callers
Method
__init__
Args: stem (nn.Module): a stem module stages (list[list[CNNBlockBase]]): several (typically 4) stages,
data_generation/grit/third_party/CenterNet2/projects/CenterNet2/centernet/modeling/backbone/res2net.py:569
↓ 4 callers
Function
_cast_to_config
(obj)
data_generation/grit/third_party/CenterNet2/detectron2/config/lazy.py:83
↓ 4 callers
Method
_check_is_range
(self, data_loader, N)
data_generation/grit/third_party/CenterNet2/tests/data/test_dataset.py:97
↓ 4 callers
Method
_convert_xywh_to_xywha
(self, x)
data_generation/grit/third_party/CenterNet2/tests/structures/test_boxes.py:19
↓ 4 callers
Method
_convert_xywha_to_xyxy
(self, x)
data_generation/grit/third_party/CenterNet2/tests/structures/test_boxes.py:16
↓ 4 callers
Method
_create_tensors
(self, N, device="cpu")
data_generation/grit/third_party/CenterNet2/tests/layers/test_nms_rotated.py:68
↓ 4 callers
Function
_create_text_labels
Args: classes (list[int] or None): scores (list[float] or None): class_names (list[str] or None): is_crowd (list[
data_generation/grit/third_party/CenterNet2/detectron2/utils/visualizer.py:230
↓ 4 callers
Function
_dense_box_regression_loss
Compute loss for dense multi-level box regression. Loss is accumulated over ``fg_mask``. Args: anchors: #lvl anchor boxes, each
data_generation/grit/third_party/CenterNet2/detectron2/modeling/box_regression.py:310
↓ 4 callers
Method
_forward_box
Add mult proposal scores at testing
data_generation/grit/third_party/CenterNet2/projects/CenterNet2/centernet/modeling/roi_heads/custom_roi_heads.py:98
← previous
next →
101–200 of 3,034, ranked by callers