MCPcopy Create free account

hub / github.com/Jingkang50/OpenPSG / functions

Functions484 in github.com/Jingkang50/OpenPSG

↓ 40 callersFunctionload_json
(path: Path)
openpsg/utils/vis_tools/preprocess.py:148
↓ 23 callersFunctionsave_json
(obj, path: Path)
openpsg/utils/vis_tools/preprocess.py:155
↓ 22 callersFunctiondraw_text
( viz_img: VisImage = None, text: str = None, x: float = None, y: float = None, color: Tup
openpsg/utils/vis_tools/viz.py:30
↓ 16 callersMethodoverlay_instances
Args: boxes (Boxes, RotatedBoxes or ndarray): either a :class:`Boxes`, or an Nx4 numpy array of XYXY_ABS format f
openpsg/utils/vis_tools/detectron_viz.py:316
↓ 13 callersMethodget_output
Returns: output (VisImage): the image output containing the visualizations added to the image.
openpsg/utils/vis_tools/detectron_viz.py:973
↓ 11 callersFunctionget_colormap
(num_colors: int)
openpsg/utils/vis_tools/viz.py:17
↓ 9 callersFunctionblock_orthogonal
An initializer which allows initializing model parameters in "blocks". This is helpful in the case of recurrent models which use multiple
openpsg/models/relation_heads/approaches/motif_util.py:267
↓ 9 callersFunctiondraw_text
( viz_img: VisImage = None, text: str = None, x: float = None, y: float = None, color: Tup
openpsg/utils/utils.py:40
↓ 7 callersFunctionget_colormap
(num_colors: int)
openpsg/utils/utils.py:28
↓ 6 callersMethod__init__
(self, *args, **kwargs)
openpsg/evaluation/sgg_metrics.py:65
↓ 6 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.
openpsg/utils/vis_tools/detectron_viz.py:908
↓ 6 callersMethodassign
gt_ids are mapped from previous Hungarian matchinmg results. ~[0,99]
openpsg/models/relation_heads/approaches/matcher.py:138
↓ 6 callersMethodget_child_num
(self)
openpsg/models/relation_heads/approaches/vctree_util.py:334
↓ 5 callersMethod__init__
(self, hidden_tensor, order_tensor, order_count, dists_tensor, commitments_tensor, dropout_ma
openpsg/models/relation_heads/approaches/treelstm_util.py:349
↓ 5 callersFunctionbuild_dataset
(cfg, default_args=None)
openpsg/datasets/builder.py:22
↓ 5 callersMethodindex_with_labels
:param labels: [batch_size, 2] :return:
openpsg/models/relation_heads/approaches/motif.py:42
↓ 5 callersFunctionobj_edge_vectors
(names, wv_dir, wv_type='glove.6B', wv_dim=300)
openpsg/models/relation_heads/approaches/motif_util.py:162
↓ 5 callersFunctionparse_requirements
Parse the package dependencies listed in a requirements file but strips specific versioning information. Args: fname (str): path to re
setup.py:56
↓ 5 callersFunctionto_onehot
Creates a [size, num_classes] torch FloatTensor where one_hot[i, vec[i]] = fill :param vec: 1d torch tensor :param num_classes: int
openpsg/models/relation_heads/approaches/motif_util.py:105
↓ 4 callersMethod__init__
(self, init_c=32)
openpsg/models/relation_heads/approaches/pointnet.py:18
↓ 4 callersMethod__init__
(self, gamma=2, alpha=0.25, reduction='sum', loss_weight=1.0)
openpsg/models/losses/seg_losses.py:106
↓ 4 callersMethod_calculate_single
(self, target_dict, prediction_to_gt,
openpsg/evaluation/sgg_metrics.py:89
↓ 4 callersMethod_calculate_single
(self, target_dict, prediction_to_gt,
openpsg/evaluation/sgg_metrics.py:381
↓ 4 callersMethod_calculate_single
(self, target_dict, mode, nogc_num=None)
openpsg/evaluation/sgg_metrics.py:718
↓ 4 callersMethod_collect_single
(self, target_dict, prediction_to_gt,
openpsg/evaluation/sgg_metrics.py:687
↓ 4 callersFunction_expand
(tensor, length: int)
openpsg/models/relation_heads/detr4seg_head.py:788
↓ 4 callersFunction_expand
(tensor, length: int)
openpsg/models/relation_heads/psgtr_head.py:1209
↓ 4 callersFunction_expand
(tensor, length: int)
openpsg/models/relation_heads/psgformer_head.py:1148
↓ 4 callersMethod_print_single
(self, target_dict, mode, nogc_num=None)
openpsg/evaluation/sgg_metrics.py:104
↓ 4 callersMethod_print_single
(self, target_dict, mode, nogc_num=None)
openpsg/evaluation/sgg_metrics.py:403
↓ 4 callersMethod_print_single
(self, target_dict, mode, nogc_num=None)
openpsg/evaluation/sgg_metrics.py:523
↓ 4 callersMethod_print_single
(self, target_dict, mode, nogc_num=None,
openpsg/evaluation/sgg_metrics.py:737
↓ 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
openpsg/utils/vis_tools/detectron_viz.py:738
↓ 4 callersMethodfrontend_features
(self, img, img_meta, det_result, gt_result)
openpsg/models/relation_heads/relation_head.py:168
↓ 4 callersMethodroi_forward
(self, roi_layers, feats, rois,
openpsg/models/roi_extractors/visual_spatial.py:243
↓ 4 callersFunctionx1y1wh_to_xyxy
Convert [x1 y1 w h] box format to [x1 y1 x2 y2] format.
openpsg/utils/vis_tools/preprocess.py:12
↓ 3 callersMethod__init__
(self, input_dim, hidden_dim, output_dim, num_layers)
openpsg/models/relation_heads/detr4seg_head.py:775
↓ 3 callersMethod__init__
(self, input_dim, hidden_dim, output_dim, num_layers)
openpsg/models/relation_heads/psgtr_head.py:1196
↓ 3 callersMethod__init__
(self, input_dim, hidden_dim, output_dim, num_layers)
openpsg/models/relation_heads/psgformer_head.py:1135
↓ 3 callersMethod_jitter
Randomly modifies given color to produce a slightly different color than the color given. Args: color (tuple[double]): a
openpsg/utils/vis_tools/detectron_viz.py:879
↓ 3 callersFunctionadjust_text_color
(color: Tuple[float, float, float], viz: Visualizer)
openpsg/utils/vis_tools/viz.py:21
↓ 3 callersMethodclean_relations_via_objects
(self, keep_obj_ids, det_result)
openpsg/models/relation_heads/approaches/relation_util.py:349
↓ 3 callersMethoddraw_text
Args: text (str): class label position (tuple): a tuple of the x and y coordinates to place text on image.
openpsg/utils/vis_tools/detectron_viz.py:574
↓ 3 callersFunctionencode_box_info
encode proposed box information (x1, y1, x2, y2) to (cx/wid, cy/hei, w/wid, h/hei, x1/wid, y1/hei, x2/wid, y2/hei, wh/wid*hei)
openpsg/models/relation_heads/approaches/motif_util.py:138
↓ 3 callersMethodevaluate
**kwargs: contain the paramteters specifically for OD, e.g., proposal_nums. Overwritten evaluate API: For each metric in
openpsg/datasets/sg.py:228
↓ 3 callersMethodgenerate_bi_tree
(self)
openpsg/models/relation_heads/approaches/vctree_util.py:275
↓ 3 callersMethodget_bboxes
(self, cls_scores, bbox_preds, img_metas, rescale=False)
openpsg/models/relation_heads/psgtr_head.py:875
↓ 3 callersFunctionget_dropout_mask
once get, it is fixed all the time.
openpsg/models/relation_heads/approaches/motif_util.py:123
↓ 3 callersFunctioninit_coco_panoptic_dataset
()
openpsg/utils/vis_tools/datasets.py:31
↓ 3 callersFunctionintersect_2d
Given two arrays [m1, n], [m2,n], returns a [m1, m2] array where each entry is True if those rows match. :param x1: [m1, n] numpy array :
openpsg/evaluation/sgg_eval_util.py:12
↓ 3 callersMethodloss
(self, all_cls_scores_list, all_bbox_preds_list, gt_rels_list,
openpsg/models/relation_heads/psgtr_head.py:343
↓ 3 callersFunctionmask_iou
(mask1, mask2)
openpsg/evaluation/sgg_metrics.py:1059
↓ 3 callersMethodmoving_average
(self, holder, input)
openpsg/models/relation_heads/approaches/vctree.py:348
↓ 3 callersMethodmoving_average
(self, holder, input)
openpsg/models/relation_heads/approaches/motif.py:415
↓ 3 callersMethodrelation_ranking_forward
(self, input, det_result, gt_result, num_rels, is_testing)
openpsg/models/relation_heads/relation_head.py:235
↓ 3 callersFunctionsegment_to_bbox
Parameters ---------- seg_mask : np.ndarray Boolean mask containing segmented object, (H, W) Returns ------- Tuple[i
openpsg/utils/vis_tools/preprocess.py:75
↓ 3 callersMethodsimple_test_bboxes
(self, feats, img_metas, rescale=False)
openpsg/models/relation_heads/psgtr_head.py:1179
↓ 3 callersMethodsimple_test_sg_bboxes
Test without Augmentation; convert panoptic segments to bounding boxes.
openpsg/models/frameworks/sg_panoptic_fpn.py:59
↓ 2 callersMethod__call__
(self, results)
openpsg/datasets/pipelines/loading.py:21
↓ 2 callersMethod__init__
( self, bboxes=None, # gt bboxes / OD: det bboxes dists=None, # OD: predicted dists
openpsg/models/relation_heads/approaches/relation_util.py:23
↓ 2 callersMethod__init__
(self, config, obj_classes, embed_dim, inputs_dim, hidden_dim, rnn_drop)
openpsg/models/relation_heads/approaches/motif.py:72
↓ 2 callersMethod_calculate_single
(self, target_dict, prediction_to_gt,
openpsg/evaluation/sgg_metrics.py:496
↓ 2 callersMethod_create_grayscale_image
Create a grayscale version of the original image. The colors in masked area, if given, will be kept.
openpsg/utils/vis_tools/detectron_viz.py:897
↓ 2 callersFunctionadjust_text_color
(color: Tuple[float, float, float], viz: Visualizer)
openpsg/utils/utils.py:32
↓ 2 callersFunctionargsort_desc
Returns the indices that sort scores descending in a smart way. :param scores: Numpy array of arbitrary size :return: an array of size [numel
openpsg/evaluation/sgg_eval_util.py:29
↓ 2 callersFunctionbbox_intersection
(box_a, box_b)
openpsg/models/relation_heads/approaches/vctree_util.py:405
↓ 2 callersMethodbuild_roi_layers
(self, layer_cfg, featmap_strides)
openpsg/models/roi_extractors/visual_spatial.py:199
↓ 2 callersMethodcalculate_recall
(self, global_container, local_container, mode)
openpsg/evaluation/sgg_metrics.py:131
↓ 2 callersFunctioncenter_x
(infostruct)
openpsg/models/relation_heads/approaches/motif_util.py:132
↓ 2 callersMethoddepth
(self)
openpsg/models/relation_heads/approaches/vctree_util.py:184
↓ 2 callersMethoddetector_simple_test
Test without augmentation. Used in SGG. Return: det_bboxes: (list[Tensor]): The boxes may have 5 columns (sgdet) or 4 columns (pr
openpsg/models/frameworks/sg_rcnn.py:196
↓ 2 callersMethoddetector_simple_test
Test without augmentation. Used in SGG. Return: det_bboxes: (list[Tensor]): The boxes may have 5 columns (sgdet)
openpsg/models/frameworks/sg_panoptic_fpn.py:334
↓ 2 callersMethoddraw_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
openpsg/utils/vis_tools/detectron_viz.py:767
↓ 2 callersMethoddraw_polygon
Args: segment: numpy array of shape Nx2, containing all the points in the polygon. color: color of the polygon. Refer
openpsg/utils/vis_tools/detectron_viz.py:842
↓ 2 callersMethodeval_recall
( self, data_loader: DataLoader, )
ce7454/evaluator.py:17
↓ 2 callersFunctionget_box_info
input: [batch_size, (x1,y1,x2,y2)] size: [h, w] output: [batch_size, (x1,y1,x2,y2,cx,cy,w,h)]
openpsg/models/relation_heads/approaches/relation_util.py:438
↓ 2 callersMethodget_result
for test forward. :param det_result: :return:
openpsg/models/relation_heads/relation_head.py:363
↓ 2 callersFunctioninterpolate
Equivalent to nn.functional.interpolate, but with support for empty batch sizes. This will eventually be supported natively by PyTorch, and t
openpsg/models/relation_heads/psgtr_head.py:1331
↓ 2 callersMethodis_descendant
(self, idx)
openpsg/models/relation_heads/approaches/vctree_util.py:211
↓ 2 callersFunctionload_xml
(path: Path)
openpsg/utils/vis_tools/preprocess.py:160
↓ 2 callersFunctionparse_require_file
(fpath)
setup.py:105
↓ 2 callersFunctionpass_embed_postprocess
Calculate districution and predict/sample labels Add to lstm_IO.
openpsg/models/relation_heads/approaches/treelstm_util.py:323
↓ 2 callersFunctionresize_bbox
(old_height: int, old_width: int, bbox: Tuple[int, int, int, int], resize: int)
openpsg/utils/vis_tools/preprocess.py:133
↓ 2 callersFunctionseg2Result
(segs)
openpsg/models/frameworks/detr4seg.py:23
↓ 2 callersFunctionsgg_evaluation
( mode, groundtruths, predictions, iou_thrs, logger, ind_to_predicates, multiple_p
openpsg/evaluation/sgg_eval.py:23
↓ 2 callersFunctionshow_result
(img, result, is_one_stage, num_rel=20, show=F
openpsg/utils/utils.py:254
↓ 2 callersMethodsimple_test
(self, img, img_metas, rescale=False)
openpsg/models/frameworks/psgtr.py:139
↓ 2 callersFunctionsort_by_score
We'll sort everything scorewise from Hi->low, BUT we need to keep images together and sort LSTM from l. :param im_inds: Which im we're on
openpsg/models/relation_heads/approaches/motif_util.py:72
↓ 2 callersFunctionxyxy_to_xcycwh
Convert [x1 y1 x2 y2] box format to [xc yc w h] format.
openpsg/utils/vis_tools/preprocess.py:59
↓ 1 callersMethod__call__
(self, results)
openpsg/datasets/pipelines/formatting.py:8
↓ 1 callersMethod__init__
(self, mode='RGB')
ce7454/dataset.py:16
↓ 1 callersMethod__init__
( self, with_bbox=True, with_label=True, with_mask=False,
openpsg/datasets/pipelines/loading.py:31
↓ 1 callersMethod__init__
(self, input_dim=1024, hidden_dim=512, dropout_rate=0.2,
openpsg/models/relation_heads/approaches/relation_ranker.py:46
↓ 1 callersMethod__init__
(self, cfg, classes, embed_dim, inputs_dim
openpsg/models/relation_heads/approaches/vctree.py:24
↓ 1 callersMethod__repr__
(self)
openpsg/datasets/pipelines/loading.py:70
↓ 1 callersMethod_convert_boxes
Convert different format of boxes to an NxB array, where B = 4 or 5 is the box dimension.
openpsg/utils/vis_tools/detectron_viz.py:934
↓ 1 callersMethod_convert_keypoints
(self, keypoints)
openpsg/utils/vis_tools/detectron_viz.py:967
↓ 1 callersMethod_convert_masks
Convert different format of masks or polygons to a tuple of masks and polygons. Returns: list[GenericMask]:
openpsg/utils/vis_tools/detectron_viz.py:943
↓ 1 callersMethod_get_bboxes_single
Transform outputs from the last decoder layer into bbox predictions for each image. Args: h_cls_score/o_cls_score/i_cls_s
openpsg/models/relation_heads/detr4seg_head.py:621
↓ 1 callersMethod_get_bboxes_single
(self, s_cls_score, o_cls_score,
openpsg/models/relation_heads/psgtr_head.py:904
next →1–100 of 484, ranked by callers