MCPcopy Create free account

hub / github.com/IDEA-Research/GroundingDINO / functions

Functions376 in github.com/IDEA-Research/GroundingDINO

Methodforward
Forward function.
groundingdino/models/GroundingDINO/backbone/swin_transformer.py:482
Methodforward
(self, tensor_list: NestedTensor)
groundingdino/models/GroundingDINO/backbone/swin_transformer.py:712
Methodforward
(self, x)
groundingdino/models/GroundingDINO/backbone/backbone.py:60
Methodforward
(self, tensor_list: NestedTensor)
groundingdino/models/GroundingDINO/backbone/backbone.py:107
Methodforward
(self, tensor_list: NestedTensor)
groundingdino/models/GroundingDINO/backbone/backbone.py:150
Methodforward
(self, tensor_list: NestedTensor)
groundingdino/models/GroundingDINO/backbone/position_encoding.py:47
Methodforward
(self, tensor_list: NestedTensor)
groundingdino/models/GroundingDINO/backbone/position_encoding.py:98
Methodforward
(self, tensor_list: NestedTensor)
groundingdino/models/GroundingDINO/backbone/position_encoding.py:149
Methodforward
Perform the computation Parameters: outputs: raw outputs of the model target_sizes: tensor of dimension [batch_size x
demo/test_ap_on_coco.py:91
Methodfreeze_attention_weights
(self)
groundingdino/models/GroundingDINO/ms_deform_attn.py:227
Methodfreeze_sampling_offsets
(self)
groundingdino/models/GroundingDINO/ms_deform_attn.py:222
Functionfunc_attention
query: (n_context, queryL, d) context: (n_context, sourceL, d)
groundingdino/models/GroundingDINO/fuse_modules.py:50
Functiongeneralized_box_iou
Generalized IoU from https://giou.stanford.edu/ The boxes should be in [x0, y0, x1, y1] format Returns a [N, M] pairwise matrix, where
groundingdino/util/box_ops.py:39
Functiongeneralized_box_iou_pairwise
Generalized IoU from https://giou.stanford.edu/ Input: - boxes1, boxes2: N,4 Output: - giou: N, 4
groundingdino/util/box_ops.py:82
Functiongenerate_masks_with_special_tokens
Generate attention mask between each pair of special tokens Args: input_ids (torch.Tensor): input ids. Shape: [bs, num_token] spec
groundingdino/models/GroundingDINO/bertwarper.py:180
Functionget_embedder
(multires, i=0)
groundingdino/util/utils.py:255
Functionget_expected_points_from_map
get_gaussian_map_from_points B,C,H,W -> B,N,2 float(0, 1) float(0, 1) softargmax function Args: hm (float): Input images(
groundingdino/util/utils.py:200
Functionget_pretrained_language_model
(text_encoder_type)
groundingdino/util/get_tokenlizer.py:23
Functionget_raw_dict
return the dicf contained in args. e.g: >>> with open(path, 'w') as f: json.dump(get_raw_dict(args), f, indent=2)
groundingdino/util/utils.py:307
Functionget_sha
()
groundingdino/util/misc.py:362
Functionget_tokenlizer
(text_encoder_type)
groundingdino/util/get_tokenlizer.py:4
Methodglobal_avg
(self)
groundingdino/util/misc.py:77
Methodimgsize
(self)
groundingdino/util/misc.py:416
Functioninit_distributed_mode
(args)
groundingdino/util/misc.py:577
Methodinit_ref_points
(self, use_num_queries)
groundingdino/models/GroundingDINO/groundingdino.py:224
Functioninverse_sigmoid
(x, eps=1e-5)
groundingdino/util/utils.py:300
Functionl1norm
L1-normalize columns of X
groundingdino/models/GroundingDINO/fuse_modules.py:36
Methodload_from_fileobj
(self, file, **kwargs)
groundingdino/util/slio.py:57
Methodload_from_fileobj
(self, file, **kwargs)
groundingdino/util/slio.py:76
Methodload_from_path
(self, filepath, mode="r", **kwargs)
groundingdino/util/slio.py:36
Functionload_image
(image_path: str)
groundingdino/util/inference.py:39
Methodlog_every
(self, iterable, print_freq, header=None, logger=None)
groundingdino/util/misc.py:282
Functionmain
( image_directory: str = 'test_grounding_dino', text_prompt: str = 'bus, car', box_thr
demo/create_coco_dataset.py:9
Functionmasks_to_boxes
Compute the bounding boxes around the provided masks The masks should be in format [N, H, W] where N is the number of masks, (H, W) are the spati
groundingdino/util/box_ops.py:107
Methodmedian
(self)
groundingdino/util/misc.py:65
Methodmerge_from_dict
Merge list into cfg_dict Merge the dict parsed by MultipleKVAction into this cfg. Examples: >>> options = {'model.backbo
groundingdino/util/slconfig.py:353
Methodmodule_dict
(self)
groundingdino/models/registry.py:37
Methodname
(self)
groundingdino/models/registry.py:33
Methodorigin2compact
(self, idx)
groundingdino/util/utils.py:153
Methodpredict_with_caption
import cv2 image = cv2.imread(IMAGE_PATH) model = Model(model_config_path=CONFIG_PATH, model_checkpoint_path=WEIGHTS_PATH)
groundingdino/util/inference.py:152
Methodpredict_with_classes
import cv2 image = cv2.imread(IMAGE_PATH) model = Model(model_config_path=CONFIG_PATH, model_checkpoint_path=WEIGHTS_PATH)
groundingdino/util/inference.py:193
Methodpretty_text
(self)
groundingdino/util/slconfig.py:217
Functionrainbow_text
Take a list of strings ``ls`` and colors ``lc`` and place them next to each other, with text ls[i] being shown in color lc[i]. This exam
groundingdino/util/visualizer.py:66
Functionrandom_boxes
Simple version of ``kwimage.Boxes.random`` Returns: Tensor: shape (n, 4) in x1, y1, x2, y2 format. References: https://gitla
groundingdino/util/utils.py:436
Functionreduce_dict
Args: input_dict (dict): all the values will be reduced average (bool): whether to do average or sum Reduce the values in the
groundingdino/util/misc.py:220
Methodregiste_with_name
(self, module_name=None, force=False)
groundingdino/models/registry.py:43
Methodregister
Register a module build function. Args: module (:obj:`nn.Module`): Module to be registered.
groundingdino/models/registry.py:46
Functionrenorm
( img: torch.FloatTensor, mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225] )
groundingdino/util/utils.py:38
Methodrm_self_attn_modules
(self)
groundingdino/models/GroundingDINO/transformer.py:852
Functionrun_grounding
(input_image, grounding_caption, box_threshold, text_threshold)
demo/gradio_app.py:72
Functionsave_on_master
(*args, **kwargs)
groundingdino/util/misc.py:572
Methodset
(self, model)
groundingdino/util/utils.py:499
Methodset_image_features
(self, features , poss)
groundingdino/models/GroundingDINO/groundingdino.py:220
Functionsetup_logger
Initialize the detectron2 logger and set its verbosity level to "INFO". Args: output (str): a file name or a directory to save log.
groundingdino/util/logger.py:32
Methodshape
(self)
groundingdino/util/misc.py:470
MethodshowAnns
Display the specified annotations. :param anns (array of object): annotations to display :return: None
groundingdino/util/visualizer.py:225
Functionsigmoid_focal_loss
Loss used in RetinaNet for dense detection: https://arxiv.org/abs/1708.02002. Args: inputs: A float tensor of arbitrary shape.
groundingdino/models/GroundingDINO/utils.py:138
Functionsldump
Dump data to json/yaml/pickle strings or files. This method provides a unified api for dumping data as strings or to files, and also supports
groundingdino/util/slio.py:143
Functionslprint
(x, name="x")
groundingdino/util/utils.py:15
Functionstat_tensors
(tensor)
groundingdino/util/utils.py:325
Methodsynchronize_between_processes
Warning: does not synchronize the deque!
groundingdino/util/misc.py:51
Methodsynchronize_between_processes
(self)
groundingdino/util/misc.py:275
Functiontargets_to
Moves the target dicts to the given device.
groundingdino/util/utils.py:577
Methodtimeit
(self, name)
groundingdino/util/time_counter.py:13
Functionto_device
(item, device)
groundingdino/util/utils.py:160
Methodto_img_list
remove the padding and convert to img list Returns: [type]: [description]
groundingdino/util/misc.py:443
Methodtrain
Convert the model into training mode while keep layers freezed.
groundingdino/models/GroundingDINO/backbone/swin_transformer.py:756
Methodupdate
(self, **kwargs)
groundingdino/util/misc.py:252
Methodupdate
Input: pred, gt: Tensor()
groundingdino/util/utils.py:282
Methodupdate
(self, new_res, ep)
groundingdino/util/utils.py:518
Methodupdate
return if the results is the best.
groundingdino/util/utils.py:546
Methodupdate
(self, _timedict: dict)
groundingdino/util/time_counter.py:23
Methodupdate
(self, val, n=1)
groundingdino/util/time_counter.py:51
Methodupdate_cm
(self, tp, fp, tn, fn)
groundingdino/util/utils.py:293
Methodvalue
(self)
groundingdino/util/misc.py:89
Methodvisualize
img: tensor(3, H, W) tgt: make sure they are all on cpu. must have items: 'image_id', 'boxes', 'size'
groundingdino/util/visualizer.py:99
← previous301–376 of 376, ranked by callers