Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/JeremyZhao1998/MRT-release
/ functions
Functions
182 in github.com/JeremyZhao1998/MRT-release
⨍
Functions
182
◇
Types & classes
40
↓ 10 callers
Method
next
(self)
datasets/coco_style_dataset.py:195
↓ 8 callers
Function
build_dataloader
(args, dataset_name, domain, split, trans)
build_modules.py:29
↓ 8 callers
Function
is_main_process
()
utils/distributed_utils.py:53
↓ 7 callers
Method
__init__
(self, size=800, max_size=1333)
datasets/transforms.py:17
↓ 7 callers
Function
box_cxcywh_to_xyxy
(x)
utils/box_utils.py:5
↓ 7 callers
Function
save_ckpt
(model, save_path, distributed=False)
utils/checkpoints_utils.py:16
↓ 6 callers
Function
build_criterion
(args, device, box_loss=True)
build_modules.py:89
↓ 5 callers
Method
__init__
(self, hidden_dim=256, num_heads=8, num_encoder_layers=6
models/deformable_transformer.py:21
↓ 5 callers
Function
evaluate
(model: torch.nn.Module, criterion: torch.nn.Module, data_loader_val: DataLoader,
engine.py:216
↓ 5 callers
Function
is_dist_avail_and_initialized
()
utils/distributed_utils.py:25
↓ 4 callers
Method
_get_src_permutation_idx
(indices)
models/criterion.py:189
↓ 4 callers
Method
forward
(self, image, annotation=None)
datasets/transforms.py:20
↓ 4 callers
Function
write_ap50
(epoch, prefix, m_ap, ap_per_class, idx_to_class)
main.py:97
↓ 4 callers
Function
write_loss
(epoch, prefix, total_loss, loss_dict)
main.py:91
↓ 3 callers
Method
__getitem__
(self, idx)
datasets/coco_style_dataset.py:87
↓ 3 callers
Method
__init__
(self, input_dim, hidden_dim, output_dim, num_layers)
models/deformable_detr.py:11
↓ 3 callers
Method
__init__
(self)
models/backbones.py:12
↓ 3 callers
Method
backward
(ctx, grad_output)
models/deformable_detr.py:64
↓ 3 callers
Function
build_optimizer
(args, model, enable_mae=False)
build_modules.py:108
↓ 3 callers
Method
pad_mask
(tensor_list)
datasets/coco_style_dataset.py:97
↓ 2 callers
Method
__init__
(self, loader, device)
datasets/coco_style_dataset.py:167
↓ 2 callers
Function
_get_activation_fn
Return an activation function given a string
models/deformable_transformer.py:453
↓ 2 callers
Function
_get_clones
(module, n)
models/deformable_transformer.py:449
↓ 2 callers
Function
all_gather
Run all_gather on arbitrary picklable data (not necessarily tensors) Args: data: any picklable object Returns: list[
utils/distributed_utils.py:90
↓ 2 callers
Method
build_mae_decoder
(self, image_size, mae_layers, device, channel0=512)
models/deformable_transformer.py:78
↓ 2 callers
Function
build_model
(args, device)
build_modules.py:59
↓ 2 callers
Function
build_sampler
(args, dataset, split)
build_modules.py:13
↓ 2 callers
Function
convert_split
(split_name, anno_file_names=None)
datasets/convert_voc2coco.py:7
↓ 2 callers
Function
convert_to_xywh
(boxes)
utils/box_utils.py:19
↓ 2 callers
Function
generalized_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
utils/box_utils.py:36
↓ 2 callers
Function
get_pseudo_labels
(pred_logits, pred_boxes, thresholds, nms_threshold=0.7)
models/criterion.py:277
↓ 2 callers
Function
get_rank
()
utils/distributed_utils.py:35
↓ 2 callers
Function
get_world_size
()
utils/distributed_utils.py:29
↓ 2 callers
Function
inverse_sigmoid
(x, eps=1e-5)
models/deformable_transformer.py:12
↓ 2 callers
Function
ms_deform_attn_core_pytorch
(value, value_spatial_shapes, sampling_locations, attention_weights)
models/ops/functions/ms_deform_attn_func.py:41
↓ 2 callers
Method
preload
(self)
datasets/coco_style_dataset.py:184
↓ 2 callers
Method
reset_parameters
(self)
models/ops/modules/ms_deform_attn.py:51
↓ 2 callers
Method
with_pos_embed
(tensor, pos)
models/deformable_transformer.py:310
↓ 1 callers
Method
__call__
(self, image, annotation=None)
datasets/transforms.py:201
↓ 1 callers
Method
__init__
(self, num_pos_feats=128, temperature=10000, normalize=True, scale=None)
models/positional_encoding.py:11
↓ 1 callers
Method
__init__
(self, num_classes=9, coef_class=2, coef_boxes=5,
models/criterion.py:53
↓ 1 callers
Method
_build_input_projections
(self)
models/deformable_detr.py:105
↓ 1 callers
Method
_init_params
(self)
models/deformable_detr.py:127
↓ 1 callers
Function
_is_power_of_2
(n)
models/ops/modules/ms_deform_attn.py:24
↓ 1 callers
Method
_reset_parameters
(self)
models/deformable_transformer.py:66
↓ 1 callers
Method
accumulate
(self)
datasets/coco_eval.py:101
↓ 1 callers
Function
box_iou
(boxes1, boxes2)
utils/box_utils.py:24
↓ 1 callers
Function
box_xyxy_to_cxcywh
(x)
utils/box_utils.py:12
↓ 1 callers
Function
build_dataloader_teaching
(args, dataset_name, domain, split)
build_modules.py:43
↓ 1 callers
Method
build_discriminators
(self, device)
models/deformable_detr.py:138
↓ 1 callers
Function
build_teacher
(args, student_model, device)
build_modules.py:127
↓ 1 callers
Function
check_forward_equal_with_pytorch_double
()
models/ops/test.py:32
↓ 1 callers
Function
check_forward_equal_with_pytorch_float
()
models/ops/test.py:48
↓ 1 callers
Function
check_gradient_numerical
(channels=4, grad_value=True, grad_sampling_loc=True, grad_attn_weight=True)
models/ops/test.py:63
↓ 1 callers
Method
clear_positive_logits
(self)
models/criterion.py:184
↓ 1 callers
Method
convert
(image_id, image, annotation)
datasets/coco_style_dataset.py:67
↓ 1 callers
Function
convert_official_ckpt
(checkpoints, state_dict)
utils/checkpoints_utils.py:40
↓ 1 callers
Function
cross_domain_mae
(model, device)
main.py:161
↓ 1 callers
Method
discriminator_forward
(self, features, inter_memory, inter_object_query, src_list)
models/deformable_detr.py:232
↓ 1 callers
Method
dynamic_threshold
(self, thresholds)
models/criterion.py:171
↓ 1 callers
Function
eval_only
(model, device)
main.py:324
↓ 1 callers
Method
evaluate
(self)
datasets/coco_eval.py:18
↓ 1 callers
Method
forward
(self, srcs, masks, pos_embeds, query_embed=None, enable_mae=False)
models/deformable_transformer.py:151
↓ 1 callers
Method
forward_ffn
(self, src)
models/deformable_transformer.py:235
↓ 1 callers
Method
forward_ffn
(self, tgt)
models/deformable_transformer.py:313
↓ 1 callers
Method
gen_encoder_output_proposals
(self, memory, memory_padding_mask, spatial_shapes)
models/deformable_transformer.py:111
↓ 1 callers
Function
get_args_parser
(parser)
main.py:15
↓ 1 callers
Method
get_backbone
(self)
models/backbones.py:23
↓ 1 callers
Function
get_extensions
()
models/ops/setup.py:23
↓ 1 callers
Method
get_mask_list
(mask_list, mask_ratio)
models/deformable_detr.py:158
↓ 1 callers
Method
get_proposal_pos_embed
(proposals)
models/deformable_transformer.py:100
↓ 1 callers
Method
get_reference_points
(spatial_shapes, valid_ratios, device)
models/deformable_transformer.py:261
↓ 1 callers
Method
get_region
(image, th, tw)
datasets/transforms.py:54
↓ 1 callers
Method
get_valid_ratio
(mask)
models/deformable_transformer.py:142
↓ 1 callers
Function
grad_reverse
(x, eta=1.0)
models/deformable_detr.py:68
↓ 1 callers
Function
init_distributed_mode
(args)
utils/distributed_utils.py:62
↓ 1 callers
Method
inverse_sigmoid
(x, eps=1e-5)
models/deformable_detr.py:151
↓ 1 callers
Method
loss_boxes
(self, pred_boxes, annotations, indices, num_boxes)
models/criterion.py:110
↓ 1 callers
Method
loss_class
(self, pred_logits, annotations, indices, num_boxes)
models/criterion.py:94
↓ 1 callers
Method
loss_domains
(self, out, domain_label)
models/criterion.py:126
↓ 1 callers
Method
loss_giou
(self, pred_boxes, annotations, indices, num_boxes)
models/criterion.py:117
↓ 1 callers
Method
loss_mae
(out)
models/criterion.py:154
↓ 1 callers
Function
main
()
main.py:346
↓ 1 callers
Function
main
()
datasets/convert_voc2coco.py:52
↓ 1 callers
Method
merge
(img_ids, eval_imgs)
datasets/coco_eval.py:124
↓ 1 callers
Function
post_process
(pred_logits, pred_boxes, image_sizes, topk=100)
models/criterion.py:259
↓ 1 callers
Method
prepare_for_coco_detection
(predictions)
datasets/coco_eval.py:108
↓ 1 callers
Method
record_positive_logits
(self, logits, indices)
models/criterion.py:163
↓ 1 callers
Method
reset_parameters
(self)
models/positional_encoding.py:50
↓ 1 callers
Function
resume_and_load
(model, ckpt_path, device)
utils/checkpoints_utils.py:5
↓ 1 callers
Function
selective_reinitialize
(model, reinit_ckpt, keep_modules)
utils/checkpoints_utils.py:25
↓ 1 callers
Function
set_random_seed
(seed)
main.py:82
↓ 1 callers
Function
setup_for_distributed
This function disables printing when not in master process
utils/distributed_utils.py:10
↓ 1 callers
Method
sigmoid_focal_loss
(inputs, targets, num_boxes, alpha: float = 0.25, gamma: float = 2)
models/criterion.py:84
↓ 1 callers
Function
single_domain_training
(model, device)
main.py:103
↓ 1 callers
Method
summarize
(self, if_print=True)
datasets/coco_eval.py:104
↓ 1 callers
Method
summarize_ap
(self, if_print=True)
datasets/coco_eval.py:42
↓ 1 callers
Method
synchronize_between_processes
(self)
datasets/coco_eval.py:93
↓ 1 callers
Function
teaching
(model_stu, device)
main.py:228
↓ 1 callers
Method
to_cuda
(self)
datasets/coco_style_dataset.py:176
next →
1–100 of 182, ranked by callers