MCPcopy Create free account

hub / github.com/chenhaoxing/DiffusionInst / functions

Functions203 in github.com/chenhaoxing/DiffusionInst

↓ 1 callersMethodtest_with_TTA
(cls, cfg, model)
train_net.py:179
↓ 1 callersMethodtrain
Convert the model into training mode while keep layers freezed.
diffusioninst/swintransformer.py:651
↓ 1 callersMethodupdate
(self, model)
diffusioninst/util/model_ema.py:151
↓ 1 callersFunctionwindow_reverse
Args: windows: (num_windows*B, window_size, window_size, C) window_size (int): Window size H (int): Height of image
diffusioninst/swintransformer.py:83
Method__call__
(self, image)
diffusioninst/predictor.py:215
Method__call__
Args: dataset_dict (dict): Metadata of one image, in Detectron2 Dataset format. Returns: dict: a format that
diffusioninst/dataset_mapper.py:88
Method__getattr__
(self, attr)
diffusioninst/util/misc.py:174
Method__init__
Args: cfg (CfgNode):
train_net.py:40
Method__init__
Creates the matcher Params: cost_class: This is the relative weight of the classification error in the matching cost c
diffusioninst/loss.py:457
Method__init__
Args: cfg (CfgNode): model (DiffusionInst): a DiffusionInst to apply TTA on. tta_mapper (
diffusioninst/test_time_augmentation.py:33
Method__init__
(self, dim)
diffusioninst/head.py:60
Method__init__
(self, embed_dim, scale=30.)
diffusioninst/head.py:77
Method__init__
(self, cfg, roi_input_shape)
diffusioninst/head.py:101
Method__init__
(self, cfg, d_model, num_classes, dim_feedforward=2048, nhead=8, dropout=0.1, activation="relu",
diffusioninst/head.py:273
Method__init__
(self, cfg)
diffusioninst/head.py:454
Method__init__
Args: cfg (CfgNode): instance_mode (ColorMode): parallel (bool): whether to run the model in different pr
diffusioninst/predictor.py:15
Method__init__
(self, cfg, task_queue, result_queue)
diffusioninst/predictor.py:148
Method__init__
(self, cfg, is_train=True)
diffusioninst/dataset_mapper.py:71
Method__init__
(self, in_channels, out_channels)
diffusioninst/swintransformer.py:33
Method__init__
(self, dim, window_size, num_heads, qkv_bias=True, qk_scale=None, attn_drop=0., proj_drop=0.)
diffusioninst/swintransformer.py:112
Method__init__
(self, dim, num_heads, window_size=7, shift_size=0, mlp_ratio=4., qkv_bias=True, qk_scale=Non
diffusioninst/swintransformer.py:197
Method__init__
(self, dim, norm_layer=nn.LayerNorm)
diffusioninst/swintransformer.py:286
Method__init__
(self, dim, depth, num_heads, window_size=
diffusioninst/swintransformer.py:339
Method__init__
(self, patch_size=4, in_chans=3, embed_dim=96, norm_layer=None)
diffusioninst/swintransformer.py:432
Method__init__
(self, pretrain_img_size=224, patch_size=4, in_chans=3,
diffusioninst/swintransformer.py:493
Method__init__
(self, cfg)
diffusioninst/detector.py:231
Method__init__
(self, window_size=20, fmt=None)
diffusioninst/util/misc.py:35
Method__init__
(self, delimiter="\t")
diffusioninst/util/misc.py:163
Method__init__
(self, tensors, mask: Optional[Tensor])
diffusioninst/util/misc.py:288
Method__init__
(self)
diffusioninst/util/model_ema.py:44
Method__init__
(self, state: EMAState, decay: float = 0.999, device: str = "", yolox: bool = False)
diffusioninst/util/model_ema.py:136
Method__init__
(self, cfg, model)
diffusioninst/util/model_ema.py:244
Method__len__
(self)
diffusioninst/predictor.py:212
Method__repr__
(self)
diffusioninst/util/misc.py:306
Method__repr__
(self)
diffusioninst/util/model_ema.py:114
Method__str__
(self)
diffusioninst/util/misc.py:83
Method__str__
(self)
diffusioninst/util/misc.py:182
Method_batch_inference
Execute inference on a list of inputs, using batch size = self.batch_size, instead of the length of the list. Inputs & outpu
diffusioninst/test_time_augmentation.py:62
Method_get_src_permutation_idx
(self, indices)
diffusioninst/loss.py:387
Method_get_tgt_permutation_idx
(self, indices)
diffusioninst/loss.py:393
Method_inference_one_image
Args: input (dict): one dataset dict with "image" field being a CHW tensor Returns: dict: one output dict
diffusioninst/test_time_augmentation.py:115
Method_init_weights
(m)
diffusioninst/swintransformer.py:605
Functionaccuracy
Computes the precision@k for the specified values of k
diffusioninst/util/misc.py:436
Methodadd_meter
(self, name, meter)
diffusioninst/util/misc.py:194
Methodafter_step
(self)
diffusioninst/util/model_ema.py:269
Methodafter_train
(self)
diffusioninst/util/model_ema.py:263
Functionall_gather
Run all_gather on arbitrary picklable data (not necessarily tensors) Args: data: any picklable object Returns: list[data]
diffusioninst/util/misc.py:92
Methodapply_and_restore
(self, model)
diffusioninst/util/model_ema.py:69
Functionapply_model_ema
Apply ema stored in `model` to model and returns a function to restore the weights are applied
diffusioninst/util/model_ema.py:208
Methodavg
(self)
diffusioninst/util/misc.py:67
Methodbefore_step
(self)
diffusioninst/util/model_ema.py:266
Methodbefore_train
(self)
diffusioninst/util/model_ema.py:257
Functionbuild_swintransformer_bifpn_backbone
diffusioninst/swintransformer.py:756
Functionbuild_swintransformer_fpn_backbone
diffusioninst/swintransformer.py:737
Functioncategory
()
diffusioninst/util/colormap.py:94
Functioncollate_fn
(batch)
diffusioninst/util/misc.py:272
Functioncolormap
(rgb=False)
diffusioninst/util/colormap.py:4
Methoddecompose
(self)
diffusioninst/util/misc.py:303
Methoddefault_buffer_size
(self)
diffusioninst/predictor.py:224
Methodforward
This performs the loss computation. Parameters: outputs: dict of tensors, see the output specification of the model for the form
diffusioninst/loss.py:408
Methodforward
simOTA for detr
diffusioninst/loss.py:476
Methodforward
(self, time)
diffusioninst/head.py:64
Methodforward
(self, x)
diffusioninst/head.py:83
Methodforward
(self, features, init_bboxes, t, init_features)
diffusioninst/head.py:218
Methodforward
:features: (torch.Size([2, 256, 208, 208]),xxx,) :param bboxes: (N, nr_boxes, 4) :param pro_features: (N, nr_boxes, d_model)
diffusioninst/head.py:332
Methodforward
pro_features: (1, N * nr_boxes, self.d_model) roi_features: (49, N * nr_boxes, self.d_model)
diffusioninst/head.py:473
Methodforward
(self, c5)
diffusioninst/swintransformer.py:42
Methodforward
(self, x)
diffusioninst/swintransformer.py:60
Methodforward
Forward function. Args: x: input features with shape of (num_windows*B, N, C) mask: (0/-inf) mask with shape of (num_
diffusioninst/swintransformer.py:146
Methodforward
Forward function. Args: x: Input feature, tensor size (B, H*W, C). H, W: Spatial resolution of the input feature.
diffusioninst/swintransformer.py:221
Methodforward
Forward function. Args: x: Input feature, tensor size (B, H*W, C). H, W: Spatial resolution of the input feature.
diffusioninst/swintransformer.py:292
Methodforward
Forward function. Args: x: Input feature, tensor size (B, H*W, C). H, W: Spatial resolution of the input feature.
diffusioninst/swintransformer.py:381
Methodforward
Forward function.
diffusioninst/swintransformer.py:446
Methodforward
Forward function.
diffusioninst/swintransformer.py:622
Methodforward
Args: batched_inputs: a list, batched outputs of :class:`DatasetMapper` . Each item in the list contains the inpu
diffusioninst/detector.py:483
Methodget_ema_model
(self, model)
diffusioninst/util/model_ema.py:75
Functionget_sha
()
diffusioninst/util/misc.py:252
Methodglobal_avg
(self)
diffusioninst/util/misc.py:72
Functioninit_distributed_mode
(args)
diffusioninst/util/misc.py:410
Functioninterpolate
Equivalent to nn.functional.interpolate, but with support for empty batch sizes. This will eventually be supported natively by PyTorch, and t
diffusioninst/util/misc.py:454
Methodload_state_dict
(self, state_dict, strict: bool = True)
diffusioninst/util/model_ema.py:106
Methodlog_every
(self, iterable, print_freq, header=None)
diffusioninst/util/misc.py:197
Methodloss_boxes
Compute the losses related to the bounding boxes, the L1 regression loss and the GIoU loss targets dicts must contain the key "boxes" conta
diffusioninst/loss.py:257
Methodloss_labels
Classification loss (NLL) targets dicts must contain the key "labels" containing a tensor of dim [nb_target_boxes]
diffusioninst/loss.py:189
Methodloss_masks
(self, outputs, targets, indices, num_boxes)
diffusioninst/loss.py:327
Functionmain
(args)
train_net.py:260
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
diffusioninst/util/box_ops.py:64
Methodmaybe_add_full_model_gradient_clipping
(optim)
train_net.py:134
Methodmedian
(self)
diffusioninst/util/misc.py:62
Functionplot_logs
Function to plot specific fields from training log(s). Plots both training and test results. :: Inputs - logs = list containing Path objects
diffusioninst/util/plot_utils.py:13
Functionplot_precision_recall
(files, naming_scheme='iter')
diffusioninst/util/plot_utils.py:76
Methodprepare_diffusion_repeat
:param gt_boxes: (cx, cy, w, h), normalized :param num_proposals:
diffusioninst/detector.py:535
Methodprocess_predictions
(frame, predictions)
diffusioninst/predictor.py:94
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
diffusioninst/util/misc.py:135
Methodrun
(self)
diffusioninst/predictor.py:154
Functionsave_on_master
(*args, **kwargs)
diffusioninst/util/misc.py:405
Methodshutdown
(self)
diffusioninst/predictor.py:219
Methodstate_dict
(self)
diffusioninst/util/model_ema.py:103
Methodstep
(self, closure=None)
train_net.py:144
Methodsynchronize_between_processes
Warning: does not synchronize the deque!
diffusioninst/util/misc.py:48
← previousnext →101–200 of 203, ranked by callers