MCPcopy Create free account

hub / github.com/chenhaoxing/DiffusionInst / functions

Functions203 in github.com/chenhaoxing/DiffusionInst

↓ 29 callersMethodto
(self, device)
diffusioninst/util/misc.py:292
↓ 15 callersMethodget
(self)
diffusioninst/predictor.py:196
↓ 14 callersMethodmax
(self)
diffusioninst/util/misc.py:76
↓ 10 callersFunctionprint
(*args, **kwargs)
diffusioninst/util/misc.py:373
↓ 7 callersMethod__init__
(self, in_features, hidden_features=None, out_features=None, act_layer=nn.GELU, drop=0.)
diffusioninst/swintransformer.py:51
↓ 6 callersFunction_remove_ddp
(model)
diffusioninst/util/model_ema.py:174
↓ 6 callersMethodapply_to
Apply state to `model` from this object
diffusioninst/util/model_ema.py:59
↓ 6 callersMethodupdate
(self, **kwargs)
diffusioninst/util/misc.py:167
↓ 5 callersMethod__init__
(self, input_dim, output_dim)
diffusioninst/head.py:91
↓ 5 callersFunctionbox_cxcywh_to_xyxy
(x)
diffusioninst/util/box_ops.py:9
↓ 4 callersFunctionbox_xyxy_to_cxcywh
(x)
diffusioninst/util/box_ops.py:16
↓ 4 callersFunctionextract
extract the appropriate t index for a batch of indices
diffusioninst/detector.py:205
↓ 4 callersFunctionis_dist_avail_and_initialized
()
diffusioninst/util/misc.py:381
↓ 4 callersMethodput
(self, image)
diffusioninst/predictor.py:192
↓ 3 callersMethodFromModel
(cls, model: torch.nn.Module, device: str = "")
diffusioninst/util/model_ema.py:48
↓ 3 callersFunction_run
(command)
diffusioninst/util/misc.py:255
↓ 3 callersMethodget_model_state_iterator
(self, model)
diffusioninst/util/model_ema.py:98
↓ 3 callersFunctionget_world_size
()
diffusioninst/util/misc.py:389
↓ 3 callersMethodresume_or_load
If `resume` is True, this method attempts to resume from the last checkpoint, if exists. Otherwise, load checkpoint from the given pa
diffusioninst/util/model_ema.py:20
↓ 3 callersMethodto
(self, device)
diffusioninst/util/model_ema.py:86
↓ 2 callersMethod_freeze_stages
(self)
diffusioninst/swintransformer.py:581
↓ 2 callersFunctionadd_diffusioninst_config
Add config for DiffusionInst
diffusioninst/config.py:19
↓ 2 callersFunctionadd_model_ema_configs
(_C)
diffusioninst/util/model_ema.py:162
↓ 2 callersMethodbuild_model
Returns: torch.nn.Module: It now calls :func:`detectron2.modeling.build_model`. Overwrite it if you'd like a dif
train_net.py:82
↓ 2 callersFunctionbuild_swintransformer_backbone
diffusioninst/swintransformer.py:716
↓ 2 callersMethodbuild_train_loader
(cls, cfg)
train_net.py:113
↓ 2 callersMethodclear
(self)
diffusioninst/util/model_ema.py:94
↓ 2 callersMethoddevice
(self)
diffusioninst/util/model_ema.py:81
↓ 2 callersMethodema_test
(cls, cfg, model, evaluators=None)
train_net.py:167
↓ 2 callersMethodforward
(self, x)
diffusioninst/head.py:95
↓ 2 callersMethodget_loss
(self, loss, outputs, targets, indices, num_boxes, **kwargs)
diffusioninst/loss.py:399
↓ 2 callersFunctionget_model_ema_state
Return the ema state stored in `model`
diffusioninst/util/model_ema.py:200
↓ 2 callersMethodhas_inited
(self)
diffusioninst/util/model_ema.py:91
↓ 2 callersMethodinference
Arguments: box_cls (Tensor): tensor of shape (batch_size, num_proposals, K). The tensor predicts the classificati
diffusioninst/detector.py:664
↓ 2 callersMethodmask_heads_forward
:param features :param weights: [w0, w1, ...] :param bias: [b0, b1, ...] :return:
diffusioninst/detector.py:644
↓ 2 callersFunctionmay_get_ema_checkpointer
(cfg, model)
diffusioninst/util/model_ema.py:193
↓ 2 callersFunctionnested_tensor_from_tensor_list
(tensor_list: List[Tensor])
diffusioninst/util/misc.py:310
↓ 2 callersFunctionparse_dynamic_params
(params, channels, weight_nums, bias_nums)
diffusioninst/detector.py:169
↓ 2 callersMethodq_sample
(self, x_start, t, noise=None)
diffusioninst/detector.py:474
↓ 2 callersMethodrun_on_video
Visualizes predictions on frames of the input video. Args: video (cv2.VideoCapture): a :class:`VideoCapture` object, who
diffusioninst/predictor.py:81
↓ 2 callersMethodsave_from
Save model state from `model` to this object
diffusioninst/util/model_ema.py:53
↓ 2 callersMethodupdate
(self, value, n=1)
diffusioninst/util/misc.py:43
↓ 2 callersFunctionwindow_partition
Args: x: (B, H, W, C) window_size (int): window size Returns: windows: (num_windows*B, window_size, window_size, C)
diffusioninst/swintransformer.py:69
↓ 1 callersMethod__init__
Create the criterion. Parameters: num_classes: number of object categories, omitting the special no-object category m
diffusioninst/loss.py:122
↓ 1 callersMethod__init__
Args: cfg (CfgNode): num_gpus (int): if 0, will run on CPU
diffusioninst/predictor.py:165
↓ 1 callersMethod_frame_from_video
(self, video)
diffusioninst/predictor.py:73
↓ 1 callersFunction_get_activation_fn
Return an activation function given a string
diffusioninst/head.py:504
↓ 1 callersFunction_get_clones
(module, N)
diffusioninst/head.py:500
↓ 1 callersMethod_init_box_pooler
(cfg, input_shape)
diffusioninst/head.py:196
↓ 1 callersFunction_max_by_axis
(the_list)
diffusioninst/util/misc.py:278
↓ 1 callersMethod_merge_detections
(self, all_boxes, all_scores, all_classes, shape_hw)
diffusioninst/test_time_augmentation.py:135
↓ 1 callersMethod_merge_detections_cvpods_tta
(self, all_boxes, all_scores, all_classes, shape_hw)
diffusioninst/test_time_augmentation.py:155
↓ 1 callersFunction_onnx_nested_tensor_from_tensor_list
(tensor_list: List[Tensor])
diffusioninst/util/misc.py:338
↓ 1 callersMethod_reset_parameters
(self)
diffusioninst/head.py:184
↓ 1 callersFunctionaligned_bilinear
(tensor, factor)
diffusioninst/head.py:39
↓ 1 callersFunctionaligned_bilinear
(tensor, factor)
diffusioninst/detector.py:148
↓ 1 callersMethodapply_deltas
Apply transformation `deltas` (dx, dy, dw, dh) to `boxes`. Args: deltas (Tensor): transformation deltas of shape (N, k*4
diffusioninst/head.py:411
↓ 1 callersFunctionapply_model_ema_and_restore
Apply ema stored in `model` to model and returns a function to restore the weights are applied
diffusioninst/util/model_ema.py:228
↓ 1 callersMethodbatched_vote_nms
(self, boxes, scores, labels, vote_type, vote_thresh=0.65)
diffusioninst/test_time_augmentation.py:190
↓ 1 callersMethodbbox_vote
(self, boxes, scores, labels, vote_thresh, vote_type="softvote")
diffusioninst/test_time_augmentation.py:202
↓ 1 callersFunctionbox_iou
(boxes1, boxes2)
diffusioninst/util/box_ops.py:24
↓ 1 callersMethodbuild_evaluator
Create evaluator(s) for a given dataset. This uses the special metadata "evaluator_type" associated with each builtin dataset.
train_net.py:98
↓ 1 callersMethodbuild_hooks
Build a list of default hooks, including timing, evaluation, checkpointing, lr scheduling, precise BN, writing events. Retur
train_net.py:196
↓ 1 callersMethodbuild_optimizer
(cls, cfg, model)
train_net.py:118
↓ 1 callersFunctionbuild_transform_gen
Create a list of :class:`TransformGen` from config. Returns: list[TransformGen]
diffusioninst/dataset_mapper.py:29
↓ 1 callersFunctioncheck_metadata_consistency
Check that the datasets have consistent metadata. Args: key (str): a metadata key dataset_names (list[str]): a list of datase
diffusioninst/loss.py:30
↓ 1 callersFunctionclip_mask
(Boxes,masks)
diffusioninst/detector.py:45
↓ 1 callersFunctioncosine_beta_schedule
cosine schedule as proposed in https://openreview.net/forum?id=-NEXDKk8gZ
diffusioninst/detector.py:212
↓ 1 callersMethodddim_sample
(self, batched_inputs, backbone_feats, images_whwh, images, clip_denoised=True, do_postprocess=True)
diffusioninst/detector.py:353
↓ 1 callersFunctiondefault
(val, d)
diffusioninst/detector.py:199
↓ 1 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
diffusioninst/detector.py:63
↓ 1 callersFunctiondice_coefficient
(x, target)
diffusioninst/loss.py:80
↓ 1 callersMethoddynamic_k_matching
(self, cost, pair_wise_ious, num_gt)
diffusioninst/loss.py:582
↓ 1 callersFunctionexists
(x)
diffusioninst/detector.py:195
↓ 1 callersMethodfilter_boxes
boxes: (N, 4) shape
diffusioninst/test_time_augmentation.py:105
↓ 1 callersFunctiongeneralized_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
diffusioninst/util/box_ops.py:40
↓ 1 callersMethodget_dets_sum
(vote_det)
diffusioninst/test_time_augmentation.py:246
↓ 1 callersMethodget_fed_loss_classes
Args: gt_classes: a long tensor of shape R that contains the gt class label of each proposal. num_fed_loss_classes: m
diffusioninst/loss.py:162
↓ 1 callersFunctionget_fed_loss_cls_weights
Get frequency weight for each class sorted by class id. We now calcualte freqency weight using image_count to the power freq_weight_power.
diffusioninst/loss.py:59
↓ 1 callersMethodget_in_boxes_info
(self, boxes, target_gts, expanded_strides)
diffusioninst/loss.py:551
↓ 1 callersFunctionget_parser
()
demo.py:43
↓ 1 callersFunctionget_rank
()
diffusioninst/util/misc.py:395
↓ 1 callersMethodget_soft_dets_sum
(vote_det, vote_det_iou)
diffusioninst/test_time_augmentation.py:256
↓ 1 callersMethodinit_state
(self, model)
diffusioninst/util/model_ema.py:147
↓ 1 callersMethodinit_weights
Initialize the weights in backbone. Args: pretrained (str, optional): Path to pre-trained weights. Defaults to Non
diffusioninst/swintransformer.py:598
↓ 1 callersFunctionis_main_process
()
diffusioninst/util/misc.py:401
↓ 1 callersMethodmask_heads_forward
:param features :param weights: [w0, w1, ...] :param bias: [b0, b1, ...] :return:
diffusioninst/loss.py:306
↓ 1 callersFunctionmay_build_model_ema
(cfg, model)
diffusioninst/util/model_ema.py:182
↓ 1 callersMethodmerge_result_from_multi_scales
( self, boxes, scores, labels, nms_type="soft-vote", vote_thresh=0.65, max_detection=100 )
diffusioninst/test_time_augmentation.py:174
↓ 1 callersMethodmodel_predictions
(self, backbone_feats, images_whwh, x, t, x_self_cond=None, clip_x_start=False)
diffusioninst/detector.py:334
↓ 1 callersFunctionparse_dynamic_params
(params, channels, weight_nums, bias_nums)
diffusioninst/loss.py:90
↓ 1 callersMethodpredict_noise_from_start
(self, x_t, t, x0)
diffusioninst/detector.py:328
↓ 1 callersMethodprepare_diffusion_concat
:param gt_boxes: (cx, cy, w, h), normalized :param num_proposals:
diffusioninst/detector.py:568
↓ 1 callersMethodprepare_targets
(self, targets)
diffusioninst/detector.py:605
↓ 1 callersMethodpreprocess_image
Normalize, pad and batch the input images.
diffusioninst/detector.py:762
↓ 1 callersMethodrun_on_image
Args: image (np.ndarray): an image of shape (H, W, C) (in BGR order). This is the format used by OpenCV.
diffusioninst/predictor.py:38
↓ 1 callersFunctionsetup
Create configs and perform basic setups.
train_net.py:246
↓ 1 callersFunctionsetup_cfg
(args)
demo.py:25
↓ 1 callersFunctionsetup_for_distributed
This function disables printing when not in master process
diffusioninst/util/misc.py:366
↓ 1 callersFunctiontest_opencv_video_format
(codec, file_ext)
demo.py:80
next →1–100 of 203, ranked by callers