SYMBOL INDEX (341 symbols across 34 files) FILE: datasets/__init__.py function get_coco_api_from_dataset (line 16) | def get_coco_api_from_dataset(dataset): function build_dataset (line 26) | def build_dataset(image_set, args): FILE: datasets/coco.py class CocoDetection (line 26) | class CocoDetection(TvCocoDetection): method __init__ (line 27) | def __init__(self, img_folder, ann_file, transforms, return_masks, cac... method __getitem__ (line 33) | def __getitem__(self, idx): function convert_coco_poly_to_mask (line 43) | def convert_coco_poly_to_mask(segmentations, height, width): class ConvertCocoPolysToMask (line 60) | class ConvertCocoPolysToMask(object): method __init__ (line 61) | def __init__(self, return_masks=False): method __call__ (line 64) | def __call__(self, image, target): function make_coco_transforms (line 125) | def make_coco_transforms(image_set): function build (line 157) | def build(image_set, args): FILE: datasets/coco_eval.py class CocoEvaluator (line 30) | class CocoEvaluator(object): method __init__ (line 31) | def __init__(self, coco_gt, iou_types): method update (line 44) | def update(self, predictions): method synchronize_between_processes (line 63) | def synchronize_between_processes(self): method accumulate (line 68) | def accumulate(self): method summarize (line 72) | def summarize(self): method prepare (line 77) | def prepare(self, predictions, iou_type): method prepare_for_coco_detection (line 87) | def prepare_for_coco_detection(self, predictions): method prepare_for_coco_segmentation (line 111) | def prepare_for_coco_segmentation(self, predictions): method prepare_for_coco_keypoint (line 146) | def prepare_for_coco_keypoint(self, predictions): function convert_to_xywh (line 173) | def convert_to_xywh(boxes): function merge (line 178) | def merge(img_ids, eval_imgs): function create_common_coco_eval (line 200) | def create_common_coco_eval(coco_eval, img_ids, eval_imgs): function evaluate (line 216) | def evaluate(self): FILE: datasets/coco_panoptic.py class CocoPanoptic (line 23) | class CocoPanoptic: method __init__ (line 24) | def __init__(self, img_folder, ann_folder, ann_file, transforms=None, ... method __getitem__ (line 42) | def __getitem__(self, idx): method __len__ (line 78) | def __len__(self): method get_height_and_width (line 81) | def get_height_and_width(self, idx): function build (line 88) | def build(image_set, args): FILE: datasets/data_prefetcher.py function to_cuda (line 9) | def to_cuda(samples, targets, device): class data_prefetcher (line 14) | class data_prefetcher(): method __init__ (line 15) | def __init__(self, loader, device, prefetch=True): method preload (line 23) | def preload(self): method next (line 51) | def next(self): FILE: datasets/panoptic_eval.py class PanopticEvaluator (line 21) | class PanopticEvaluator(object): method __init__ (line 22) | def __init__(self, ann_file, ann_folder, output_dir="panoptic_eval"): method update (line 31) | def update(self, predictions): method synchronize_between_processes (line 38) | def synchronize_between_processes(self): method summarize (line 45) | def summarize(self): FILE: datasets/samplers.py class DistributedSampler (line 16) | class DistributedSampler(Sampler): method __init__ (line 31) | def __init__(self, dataset, num_replicas=None, rank=None, local_rank=N... method __iter__ (line 48) | def __iter__(self): method __len__ (line 68) | def __len__(self): method set_epoch (line 71) | def set_epoch(self, epoch): class NodeDistributedSampler (line 75) | class NodeDistributedSampler(Sampler): method __init__ (line 90) | def __init__(self, dataset, num_replicas=None, rank=None, local_rank=N... method __iter__ (line 115) | def __iter__(self): method __len__ (line 135) | def __len__(self): method set_epoch (line 138) | def set_epoch(self, epoch): FILE: datasets/torchvision_datasets/coco.py class CocoDetection (line 20) | class CocoDetection(VisionDataset): method __init__ (line 33) | def __init__(self, root, annFile, transform=None, target_transform=Non... method cache_images (line 46) | def cache_images(self): method get_image (line 55) | def get_image(self, path): method __getitem__ (line 63) | def __getitem__(self, index): method __len__ (line 83) | def __len__(self): FILE: datasets/transforms.py function crop (line 24) | def crop(image, target, region): function hflip (line 67) | def hflip(image, target): function resize (line 84) | def resize(image, target, size, max_size=None): function pad (line 143) | def pad(image, target, padding): class RandomCrop (line 156) | class RandomCrop(object): method __init__ (line 157) | def __init__(self, size): method __call__ (line 160) | def __call__(self, img, target): class RandomSizeCrop (line 165) | class RandomSizeCrop(object): method __init__ (line 166) | def __init__(self, min_size: int, max_size: int): method __call__ (line 170) | def __call__(self, img: PIL.Image.Image, target: dict): class CenterCrop (line 177) | class CenterCrop(object): method __init__ (line 178) | def __init__(self, size): method __call__ (line 181) | def __call__(self, img, target): class RandomHorizontalFlip (line 189) | class RandomHorizontalFlip(object): method __init__ (line 190) | def __init__(self, p=0.5): method __call__ (line 193) | def __call__(self, img, target): class RandomResize (line 199) | class RandomResize(object): method __init__ (line 200) | def __init__(self, sizes, max_size=None): method __call__ (line 205) | def __call__(self, img, target=None): class RandomPad (line 210) | class RandomPad(object): method __init__ (line 211) | def __init__(self, max_pad): method __call__ (line 214) | def __call__(self, img, target): class RandomSelect (line 220) | class RandomSelect(object): method __init__ (line 225) | def __init__(self, transforms1, transforms2, p=0.5): method __call__ (line 230) | def __call__(self, img, target): class ToTensor (line 236) | class ToTensor(object): method __call__ (line 237) | def __call__(self, img, target): class RandomErasing (line 241) | class RandomErasing(object): method __init__ (line 243) | def __init__(self, *args, **kwargs): method __call__ (line 246) | def __call__(self, img, target): class Normalize (line 250) | class Normalize(object): method __init__ (line 251) | def __init__(self, mean, std): method __call__ (line 255) | def __call__(self, image, target=None): class Compose (line 269) | class Compose(object): method __init__ (line 270) | def __init__(self, transforms): method __call__ (line 273) | def __call__(self, image, target): method __repr__ (line 278) | def __repr__(self): FILE: engine.py function train_one_epoch (line 31) | def train_one_epoch(model: torch.nn.Module, criterion: torch.nn.Module, function evaluate (line 107) | def evaluate(model, criterion, postprocessors, data_loader, base_ds, dev... FILE: main.py function get_args_parser (line 37) | def get_args_parser(): function main (line 156) | def main(args): function print_final_result_on_master (line 403) | def print_final_result_on_master(model, dataset_val, args, test_stats, s... FILE: models/__init__.py function build_model (line 17) | def build_model(args): FILE: models/backbone.py class FrozenBatchNorm2d (line 32) | class FrozenBatchNorm2d(torch.nn.Module): method __init__ (line 41) | def __init__(self, n, eps=1e-5): method _load_from_state_dict (line 49) | def _load_from_state_dict(self, state_dict, prefix, local_metadata, st... method forward (line 59) | def forward(self, x): class BackboneBase (line 72) | class BackboneBase(nn.Module): method __init__ (line 74) | def __init__(self, backbone: nn.Module, train_backbone: bool, return_i... method get_return_layers (line 120) | def get_return_layers(name: str, layer_ids): method forward (line 123) | def forward(self, tensor_list: NestedTensor): class DummyBackbone (line 134) | class DummyBackbone(torch.nn.Module): method __init__ (line 135) | def __init__(self): class Backbone (line 140) | class Backbone(BackboneBase): method __init__ (line 142) | def __init__(self, name: str, class Joiner (line 202) | class Joiner(nn.Sequential): method __init__ (line 203) | def __init__(self, backbone, position_embedding): method forward (line 208) | def forward(self, tensor_list: NestedTensor): function test_backbone (line 222) | def test_backbone(backbone): function build_backbone (line 231) | def build_backbone(args): FILE: models/deformable_detr.py function _get_clones (line 36) | def _get_clones(module, N): class DeformableDETR (line 40) | class DeformableDETR(nn.Module): method __init__ (line 42) | def __init__(self, backbone, transformer, num_classes, num_queries, nu... method forward (line 144) | def forward(self, samples: NestedTensor): method _set_aux_loss (line 270) | def _set_aux_loss(self, outputs_class, outputs_coord): class SetCriterion (line 278) | class SetCriterion(nn.Module): method __init__ (line 284) | def __init__(self, num_classes, matcher, weight_dict, losses, args): method loss_labels (line 302) | def loss_labels(self, outputs, targets, indices, num_boxes, log=True): method loss_cardinality (line 330) | def loss_cardinality(self, outputs, targets, indices, num_boxes): method loss_boxes (line 343) | def loss_boxes(self, outputs, targets, indices, num_boxes): method loss_masks (line 364) | def loss_masks(self, outputs, targets, indices, num_boxes): method loss_mask_prediction (line 393) | def loss_mask_prediction(self, outputs, targets, indices, num_boxes, l... method corr (line 430) | def corr(self, outputs, targets, indices, num_boxes): method _get_src_permutation_idx (line 457) | def _get_src_permutation_idx(self, indices): method _get_tgt_permutation_idx (line 463) | def _get_tgt_permutation_idx(self, indices): method get_loss (line 469) | def get_loss(self, loss, outputs, targets, indices, num_boxes, **kwargs): method forward (line 481) | def forward(self, outputs, targets): class PostProcess (line 579) | class PostProcess(nn.Module): method forward (line 583) | def forward(self, outputs, target_sizes): class MLP (line 614) | class MLP(nn.Module): method __init__ (line 617) | def __init__(self, input_dim, hidden_dim, output_dim, num_layers): method forward (line 623) | def forward(self, x): function build (line 629) | def build(args): FILE: models/deformable_transformer.py class DeformableTransformer (line 27) | class DeformableTransformer(nn.Module): method __init__ (line 28) | def __init__(self, d_model=256, nhead=8, method _log_args (line 78) | def _log_args(self, *names): method _reset_parameters (line 83) | def _reset_parameters(self): method get_proposal_pos_embed (line 95) | def get_proposal_pos_embed(self, proposals): method gen_encoder_output_proposals (line 110) | def gen_encoder_output_proposals(self, memory, memory_padding_mask, sp... method get_valid_ratio (line 160) | def get_valid_ratio(self, mask): method forward (line 169) | def forward(self, srcs, masks, pos_embeds, query_embed=None): class DeformableTransformerEncoderLayer (line 313) | class DeformableTransformerEncoderLayer(nn.Module): method __init__ (line 314) | def __init__(self, method with_pos_embed (line 334) | def with_pos_embed(tensor, pos): method forward_ffn (line 337) | def forward_ffn(self, src): method forward (line 343) | def forward(self, src, pos, reference_points, spatial_shapes, level_st... class DeformableTransformerEncoder (line 372) | class DeformableTransformerEncoder(nn.Module): method __init__ (line 373) | def __init__(self, encoder_layer, num_layers, mask_predictor_dim=256): method get_reference_points (line 383) | def get_reference_points(spatial_shapes, valid_ratios, device): method forward (line 405) | def forward(self, src, spatial_shapes, level_start_index, valid_ratios, class DeformableTransformerDecoderLayer (line 473) | class DeformableTransformerDecoderLayer(nn.Module): method __init__ (line 474) | def __init__(self, d_model=256, d_ffn=1024, dropout=0.1, activation="r... method with_pos_embed (line 497) | def with_pos_embed(tensor, pos): method forward_ffn (line 500) | def forward_ffn(self, tgt): method forward (line 506) | def forward(self, tgt, query_pos, reference_points, src, src_spatial_s... class DeformableTransformerDecoder (line 530) | class DeformableTransformerDecoder(nn.Module): method __init__ (line 531) | def __init__(self, decoder_layer, num_layers, return_intermediate=False): method forward (line 542) | def forward(self, tgt, reference_points, src, src_spatial_shapes, src_... class MaskPredictor (line 618) | class MaskPredictor(nn.Module): method __init__ (line 619) | def __init__(self, in_dim, h_dim): method forward (line 635) | def forward(self, x): function _get_clones (line 644) | def _get_clones(module, N): function _get_activation_fn (line 648) | def _get_activation_fn(activation): function build_deforamble_transformer (line 659) | def build_deforamble_transformer(args): FILE: models/matcher.py class HungarianMatcher (line 24) | class HungarianMatcher(nn.Module): method __init__ (line 32) | def __init__(self, method forward (line 49) | def forward(self, outputs, targets): function build_matcher (line 104) | def build_matcher(args): FILE: models/ops/functions/ms_deform_attn_func.py class MSDeformAttnFunction (line 21) | class MSDeformAttnFunction(Function): method forward (line 23) | def forward(ctx, value, value_spatial_shapes, value_level_start_index,... method backward (line 32) | def backward(ctx, grad_output): function ms_deform_attn_core_pytorch (line 41) | def ms_deform_attn_core_pytorch(value, value_spatial_shapes, sampling_lo... FILE: models/ops/modules/ms_deform_attn.py function _is_power_of_2 (line 27) | def _is_power_of_2(n): class MSDeformAttn (line 33) | class MSDeformAttn(nn.Module): method __init__ (line 34) | def __init__(self, d_model=256, n_levels=4, n_heads=8, n_points=4): method _reset_parameters (line 66) | def _reset_parameters(self): method forward (line 82) | def forward(self, query, reference_points, input_flatten, input_spatia... function ms_deform_attn_core_pytorch (line 125) | def ms_deform_attn_core_pytorch(value, value_spatial_shapes, sampling_lo... FILE: models/ops/setup.py function get_extensions (line 23) | def get_extensions(): FILE: models/ops/src/cpu/ms_deform_attn_cpu.cpp function ms_deform_attn_cpu_forward (line 17) | at::Tensor function ms_deform_attn_cpu_backward (line 29) | std::vector FILE: models/ops/src/ms_deform_attn.h function im2col_step (line 27) | int im2col_step) FILE: models/ops/src/vision.cpp function PYBIND11_MODULE (line 13) | PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) { FILE: models/ops/test.py function check_forward_equal_with_pytorch_double (line 32) | def check_forward_equal_with_pytorch_double(): function check_forward_equal_with_pytorch_float (line 48) | def check_forward_equal_with_pytorch_float(): function check_gradient_numerical (line 63) | def check_gradient_numerical(channels=4, grad_value=True, grad_sampling_... FILE: models/position_encoding.py class PositionEmbeddingSine (line 24) | class PositionEmbeddingSine(nn.Module): method __init__ (line 29) | def __init__(self, num_pos_feats=64, temperature=10000, normalize=Fals... method forward (line 40) | def forward(self, tensor_list: NestedTensor): class PositionEmbeddingLearned (line 63) | class PositionEmbeddingLearned(nn.Module): method __init__ (line 67) | def __init__(self, num_pos_feats=256): method reset_parameters (line 73) | def reset_parameters(self): method forward (line 77) | def forward(self, tensor_list: NestedTensor): function build_position_encoding (line 91) | def build_position_encoding(args): FILE: models/segmentation.py class DETRsegm (line 34) | class DETRsegm(nn.Module): method __init__ (line 35) | def __init__(self, detr, freeze_detr=False): method forward (line 47) | def forward(self, samples: NestedTensor): class MaskHeadSmallConv (line 76) | class MaskHeadSmallConv(nn.Module): method __init__ (line 82) | def __init__(self, dim, fpn_dims, context_dim): method forward (line 109) | def forward(self, x, bbox_mask, fpns): class MHAttentionMap (line 150) | class MHAttentionMap(nn.Module): method __init__ (line 153) | def __init__(self, query_dim, hidden_dim, num_heads, dropout=0, bias=T... method forward (line 168) | def forward(self, q, k, mask=None): function dice_loss (line 182) | def dice_loss(inputs, targets, num_boxes): function sigmoid_focal_loss (line 200) | def sigmoid_focal_loss(inputs, targets, num_boxes, alpha: float = 0.25, ... class PostProcessSegm (line 229) | class PostProcessSegm(nn.Module): method __init__ (line 230) | def __init__(self, threshold=0.5): method forward (line 235) | def forward(self, results, outputs, orig_target_sizes, max_target_sizes): class PostProcessPanoptic (line 252) | class PostProcessPanoptic(nn.Module): method __init__ (line 256) | def __init__(self, is_thing_map, threshold=0.85): method forward (line 267) | def forward(self, outputs, processed_sizes, target_sizes=None): FILE: models/swin_transformer/build.py function build_model (line 31) | def build_model(name, out_indices, frozen_stages, pretrained): function _update_dict (line 67) | def _update_dict(tar, src): function load_config_yaml (line 77) | def load_config_yaml(cfg_file, config=None): FILE: models/swin_transformer/config.py class Config (line 18) | class Config(SimpleNamespace): method __init__ (line 48) | def __init__(self, _dict=None, **kwargs): method _set_with_nested_dict (line 55) | def _set_with_nested_dict(self, _dict): method freezed (line 64) | def freezed(self): method from_yaml (line 68) | def from_yaml(cls, yaml_file): method __repr__ (line 73) | def __repr__(self): method __getitem__ (line 76) | def __getitem__(self, item): method __getattr__ (line 79) | def __getattr__(self, item): method __setattr__ (line 91) | def __setattr__(self, item, value): method __bool__ (line 96) | def __bool__(self): method __len__ (line 100) | def __len__(self): method __getstate__ (line 103) | def __getstate__(self): method __setstate__ (line 106) | def __setstate__(self, state): method __contains__ (line 109) | def __contains__(self, item): method __deepcopy__ (line 112) | def __deepcopy__(self, memodict={}): method __iter__ (line 115) | def __iter__(self): method pformat (line 119) | def pformat(self): method pprint (line 123) | def pprint(self): method freeze (line 126) | def freeze(self): method defrost (line 134) | def defrost(self): method get (line 141) | def get(self, *args, **kwargs): method keys (line 144) | def keys(self): method values (line 147) | def values(self): method items (line 150) | def items(self): method clone (line 153) | def clone(self): method update (line 156) | def update(self, dict_, delimiter='/'): method _update (line 160) | def _update(self, key, value, delimiter='/'): method to_dict (line 167) | def to_dict(self): FILE: models/swin_transformer/swin_transformer.py class Mlp (line 21) | class Mlp(nn.Module): method __init__ (line 22) | def __init__(self, in_features, hidden_features=None, out_features=Non... method forward (line 31) | def forward(self, x): function window_partition (line 40) | def window_partition(x, window_size): function window_reverse (line 55) | def window_reverse(windows, window_size, H, W): class WindowAttention (line 72) | class WindowAttention(nn.Module): method __init__ (line 85) | def __init__(self, dim, window_size, num_heads, qkv_bias=True, qk_scal... method forward (line 119) | def forward(self, x, mask=None): class SwinTransformerBlock (line 153) | class SwinTransformerBlock(nn.Module): method __init__ (line 170) | def __init__(self, dim, num_heads, window_size=7, shift_size=0, method forward (line 194) | def forward(self, x, mask_matrix): class PatchMerging (line 253) | class PatchMerging(nn.Module): method __init__ (line 259) | def __init__(self, dim, norm_layer=nn.LayerNorm): method forward (line 265) | def forward(self, x, H, W): class BasicLayer (line 294) | class BasicLayer(nn.Module): method __init__ (line 312) | def __init__(self, method forward (line 354) | def forward(self, x, H, W): class PatchEmbed (line 396) | class PatchEmbed(nn.Module): method __init__ (line 405) | def __init__(self, patch_size=4, in_chans=3, embed_dim=96, norm_layer=... method forward (line 419) | def forward(self, x): class SwinTransformer (line 438) | class SwinTransformer(nn.Module): method __init__ (line 466) | def __init__(self, method _freeze_stages (line 546) | def _freeze_stages(self): method _init_weights (line 563) | def _init_weights(self, m): method forward (line 572) | def forward(self, x): FILE: tools/launch.py function parse_args (line 116) | def parse_args(): function main (line 159) | def main(): FILE: util/benchmark.py function measure_average_inference_time (line 17) | def measure_average_inference_time(model, inputs, num_iters=100, warm_it... function python_ops_mode_for_deform_attn (line 31) | def python_ops_mode_for_deform_attn(model, ops_mode): function compute_fps (line 39) | def compute_fps(model, dataset, num_iters=300, warm_iters=5, batch_size=4): function compute_gflops (line 54) | def compute_gflops(model, dataset, approximated=True): function flop_count_without_warnings (line 93) | def flop_count_without_warnings( FILE: util/box_ops.py function box_cxcywh_to_xyxy (line 17) | def box_cxcywh_to_xyxy(x): function box_xyxy_to_cxcywh (line 24) | def box_xyxy_to_cxcywh(x): function box_iou (line 32) | def box_iou(boxes1, boxes2): function generalized_box_iou (line 48) | def generalized_box_iou(boxes1, boxes2): function masks_to_boxes (line 72) | def masks_to_boxes(masks): FILE: util/dam.py function idx_to_flat_grid (line 21) | def idx_to_flat_grid(spatial_shapes, idx): function attn_map_to_flat_grid (line 29) | def attn_map_to_flat_grid(spatial_shapes, level_start_index, sampling_lo... function compute_corr (line 70) | def compute_corr(flat_grid_topk, flat_grid_attn_map, spatial_shapes): FILE: util/misc.py function _check_size_scale_factor (line 39) | def _check_size_scale_factor(dim, size, scale_factor): function _output_size (line 50) | def _output_size(dim, input, size, scale_factor): class SmoothedValue (line 68) | class SmoothedValue(object): method __init__ (line 73) | def __init__(self, window_size=20, fmt=None): method update (line 81) | def update(self, value, n=1): method synchronize_between_processes (line 86) | def synchronize_between_processes(self): method median (line 100) | def median(self): method avg (line 105) | def avg(self): method global_avg (line 110) | def global_avg(self): method max (line 114) | def max(self): method value (line 118) | def value(self): method __str__ (line 121) | def __str__(self): function unwrap (line 130) | def unwrap(wrapped_module): function check_unused_parameters (line 138) | def check_unused_parameters(model, loss_dict, weight_dict): function all_gather (line 152) | def all_gather(data): function reduce_dict (line 195) | def reduce_dict(input_dict, average=True): class MetricLogger (line 222) | class MetricLogger(object): method __init__ (line 223) | def __init__(self, delimiter="\t"): method update (line 227) | def update(self, **kwargs): method __getattr__ (line 234) | def __getattr__(self, attr): method __str__ (line 242) | def __str__(self): method synchronize_between_processes (line 250) | def synchronize_between_processes(self): method add_meter (line 254) | def add_meter(self, name, meter): method log_every (line 257) | def log_every(self, iterable, print_freq, header=None): function get_sha (line 312) | def get_sha(): function collate_fn (line 332) | def collate_fn(batch): function _max_by_axis (line 338) | def _max_by_axis(the_list): function nested_tensor_from_tensor_list (line 347) | def nested_tensor_from_tensor_list(tensor_list: List[Tensor]): class NestedTensor (line 367) | class NestedTensor(object): method __init__ (line 368) | def __init__(self, tensors, mask: Optional[Tensor]): method to (line 372) | def to(self, device, non_blocking=False): method record_stream (line 383) | def record_stream(self, *args, **kwargs): method decompose (line 388) | def decompose(self): method __repr__ (line 391) | def __repr__(self): function setup_for_distributed (line 395) | def setup_for_distributed(is_master): function is_dist_avail_and_initialized (line 410) | def is_dist_avail_and_initialized(): function get_world_size (line 418) | def get_world_size(): function get_rank (line 424) | def get_rank(): function get_local_size (line 430) | def get_local_size(): function get_local_rank (line 436) | def get_local_rank(): function is_main_process (line 442) | def is_main_process(): function save_on_master (line 446) | def save_on_master(*args, **kwargs): function _check_if_valid_ip (line 450) | def _check_if_valid_ip(ip): function _maybe_gethostbyname (line 460) | def _maybe_gethostbyname(addr): function init_distributed_mode (line 483) | def init_distributed_mode(args): function accuracy (line 527) | def accuracy(output, target, topk=(1,)): function interpolate (line 545) | def interpolate(input, size=None, scale_factor=None, mode="nearest", ali... function get_total_grad_norm (line 567) | def get_total_grad_norm(parameters, norm_type=2): function inverse_sigmoid (line 576) | def inverse_sigmoid(x, eps=1e-5): function scale_learning_rate (line 583) | def scale_learning_rate(args): FILE: util/plot_utils.py function plot_logs (line 21) | def plot_logs(logs, fields=('class_error', 'loss_bbox_unscaled', 'mAP'),... function plot_precision_recall (line 77) | def plot_precision_recall(files, naming_scheme='iter'):