SYMBOL INDEX (643 symbols across 53 files) FILE: benchmark.py function get_benckmark_arg_parser (line 27) | def get_benckmark_arg_parser(): function measure_average_inference_time (line 37) | def measure_average_inference_time(model, inputs, num_iters=100, warm_it... function benchmark (line 51) | def benchmark(): FILE: datasets/__init__.py function get_coco_api_from_dataset (line 21) | def get_coco_api_from_dataset(dataset): function build_dataset (line 31) | def build_dataset(image_set, args): FILE: datasets/coco.py class CocoDetection (line 28) | class CocoDetection(TvCocoDetection): method __init__ (line 29) | def __init__(self, img_folder, ann_file, transforms, return_masks, cac... method __getitem__ (line 35) | def __getitem__(self, idx): function convert_coco_poly_to_mask (line 45) | def convert_coco_poly_to_mask(segmentations, height, width): class ConvertCocoPolysToMask (line 62) | class ConvertCocoPolysToMask(object): method __init__ (line 63) | def __init__(self, return_masks=False): method __call__ (line 66) | def __call__(self, image, target): function make_coco_transforms (line 127) | def make_coco_transforms(image_set): function build (line 159) | def build(image_set, args): FILE: datasets/coco_eval.py class CocoEvaluator (line 32) | class CocoEvaluator(object): method __init__ (line 33) | def __init__(self, coco_gt, iou_types): method update (line 46) | def update(self, predictions): method synchronize_between_processes (line 66) | def synchronize_between_processes(self): method accumulate (line 71) | def accumulate(self): method summarize (line 75) | def summarize(self): method prepare (line 80) | def prepare(self, predictions, iou_type): method prepare_for_coco_detection (line 90) | def prepare_for_coco_detection(self, predictions): method prepare_for_coco_segmentation (line 114) | def prepare_for_coco_segmentation(self, predictions): method prepare_for_coco_keypoint (line 149) | def prepare_for_coco_keypoint(self, predictions): function convert_to_xywh (line 176) | def convert_to_xywh(boxes): function merge (line 181) | def merge(img_ids, eval_imgs): function create_common_coco_eval (line 203) | def create_common_coco_eval(coco_eval, img_ids, eval_imgs): function evaluate (line 219) | def evaluate(self): FILE: datasets/coco_panoptic.py class CocoPanoptic (line 25) | class CocoPanoptic: method __init__ (line 26) | def __init__(self, img_folder, ann_folder, ann_file, transforms=None, ... method __getitem__ (line 44) | def __getitem__(self, idx): method __len__ (line 80) | def __len__(self): method get_height_and_width (line 83) | def get_height_and_width(self, idx): function build (line 90) | def build(image_set, args): FILE: datasets/dance.py class DetMOTDetection (line 31) | class DetMOTDetection: method __init__ (line 32) | def __init__(self, args, data_txt_path: str, seqs_folder, dataset2tran... method set_epoch (line 75) | def set_epoch(self, epoch): method step_epoch (line 87) | def step_epoch(self): method _targets_to_instances (line 93) | def _targets_to_instances(targets: dict, img_shape) -> Instances: method load_crowd (line 101) | def load_crowd(self): method _pre_single_frame (line 122) | def _pre_single_frame(self, vid, idx: int): method _get_sample_range (line 154) | def _get_sample_range(self, start_idx): method pre_continuous_frames (line 165) | def pre_continuous_frames(self, vid, indices): method sample_indices (line 168) | def sample_indices(self, vid, f_index): method __getitem__ (line 175) | def __getitem__(self, idx): method __len__ (line 192) | def __len__(self): class DetMOTDetectionValidation (line 196) | class DetMOTDetectionValidation(DetMOTDetection): method __init__ (line 197) | def __init__(self, args, seqs_folder, dataset2transform): function make_transforms_for_mot17 (line 202) | def make_transforms_for_mot17(image_set, args=None): function build_dataset2transform (line 233) | def build_dataset2transform(args, image_set): function build (line 247) | def build(image_set, args): FILE: datasets/data_path/gen_bdd100k_mot.py function convert (line 9) | def convert(img_dir, split, label_dir, save_label_dir, filter_crowd=Fals... function generate_txt (line 73) | def generate_txt(img_dir,label_dir,txt_path='bdd100k.train',split='train'): FILE: datasets/data_path/gen_labels_15.py function mkdirs (line 7) | def mkdirs(d): FILE: datasets/data_path/gen_labels_16.py function mkdirs (line 4) | def mkdirs(d): FILE: datasets/data_path/prepare.py function solve_MOT_train (line 6) | def solve_MOT_train(root, year): function solve_CUHK (line 27) | def solve_CUHK(root): function solve_ETHZ (line 40) | def solve_ETHZ(root): function solve_PRW (line 59) | def solve_PRW(root): function solve (line 82) | def solve(dataset_list: List[str], root, save_path): FILE: datasets/data_prefetcher.py function to_cuda (line 16) | def to_cuda(samples, targets, device): function tensor_to_cuda (line 22) | def tensor_to_cuda(tensor: torch.Tensor, device): function is_tensor_or_instances (line 26) | def is_tensor_or_instances(data): function data_apply (line 30) | def data_apply(data, check_func, apply_func): function data_dict_to_cuda (line 52) | def data_dict_to_cuda(data_dict, device): class data_prefetcher (line 56) | class data_prefetcher(): method __init__ (line 57) | def __init__(self, loader, device, prefetch=True): method preload (line 65) | def preload(self): method next (line 93) | def next(self): FILE: datasets/detmot.py class DetMOTDetection (line 26) | class DetMOTDetection: method __init__ (line 27) | def __init__(self, args, data_txt_path: str, seqs_folder, transforms): method _register_videos (line 63) | def _register_videos(self): method set_epoch (line 71) | def set_epoch(self, epoch): method step_epoch (line 83) | def step_epoch(self): method _targets_to_instances (line 89) | def _targets_to_instances(targets: dict, img_shape) -> Instances: method _pre_single_frame (line 97) | def _pre_single_frame(self, idx: int): method _get_sample_range (line 142) | def _get_sample_range(self, start_idx): method pre_continuous_frames (line 153) | def pre_continuous_frames(self, start, end, interval=1): method __getitem__ (line 162) | def __getitem__(self, idx): method __len__ (line 180) | def __len__(self): class DetMOTDetectionValidation (line 184) | class DetMOTDetectionValidation(DetMOTDetection): method __init__ (line 185) | def __init__(self, args, seqs_folder, transforms): function make_detmot_transforms (line 190) | def make_detmot_transforms(image_set, args=None): function build (line 217) | def build(image_set, args): FILE: datasets/joint.py class DetMOTDetection (line 26) | class DetMOTDetection: method __init__ (line 27) | def __init__(self, args, data_txt_path: str, seqs_folder, dataset2tran... method _register_videos (line 64) | def _register_videos(self): method set_epoch (line 72) | def set_epoch(self, epoch): method step_epoch (line 84) | def step_epoch(self): method _targets_to_instances (line 90) | def _targets_to_instances(targets: dict, img_shape) -> Instances: method _pre_single_frame (line 98) | def _pre_single_frame(self, idx: int): method _get_sample_range (line 149) | def _get_sample_range(self, start_idx): method pre_continuous_frames (line 160) | def pre_continuous_frames(self, start, end, interval=1): method __getitem__ (line 169) | def __getitem__(self, idx): method __len__ (line 189) | def __len__(self): class DetMOTDetectionValidation (line 193) | class DetMOTDetectionValidation(DetMOTDetection): method __init__ (line 194) | def __init__(self, args, seqs_folder, dataset2transform): function make_transforms_for_mot17 (line 200) | def make_transforms_for_mot17(image_set, args=None): function make_transforms_for_crowdhuman (line 231) | def make_transforms_for_crowdhuman(image_set, args=None): function build_dataset2transform (line 264) | def build_dataset2transform(args, image_set): function build (line 279) | def build(image_set, args): FILE: datasets/panoptic_eval.py class PanopticEvaluator (line 23) | class PanopticEvaluator(object): method __init__ (line 24) | def __init__(self, ann_file, ann_folder, output_dir="panoptic_eval"): method update (line 33) | def update(self, predictions): method synchronize_between_processes (line 40) | def synchronize_between_processes(self): method summarize (line 47) | def summarize(self): FILE: datasets/samplers.py class DistributedSampler (line 19) | class DistributedSampler(Sampler): method __init__ (line 34) | def __init__(self, dataset, num_replicas=None, rank=None, local_rank=N... method __iter__ (line 51) | def __iter__(self): method __len__ (line 71) | def __len__(self): method set_epoch (line 74) | def set_epoch(self, epoch): class NodeDistributedSampler (line 78) | class NodeDistributedSampler(Sampler): method __init__ (line 93) | def __init__(self, dataset, num_replicas=None, rank=None, local_rank=N... method __iter__ (line 118) | def __iter__(self): method __len__ (line 138) | def __len__(self): method set_epoch (line 141) | def set_epoch(self, epoch): FILE: datasets/static_detmot.py class DetMOTDetection (line 26) | class DetMOTDetection: method __init__ (line 27) | def __init__(self, args, data_txt_path: str, seqs_folder, transforms): method _register_videos (line 63) | def _register_videos(self): method set_epoch (line 71) | def set_epoch(self, epoch): method step_epoch (line 83) | def step_epoch(self): method _targets_to_instances (line 89) | def _targets_to_instances(targets: dict, img_shape) -> Instances: method _pre_single_frame (line 97) | def _pre_single_frame(self, idx: int): method _get_sample_range (line 142) | def _get_sample_range(self, start_idx): method pre_continuous_frames (line 153) | def pre_continuous_frames(self, idx): method __getitem__ (line 163) | def __getitem__(self, idx): method __len__ (line 180) | def __len__(self): class DetMOTDetectionValidation (line 184) | class DetMOTDetectionValidation(DetMOTDetection): method __init__ (line 185) | def __init__(self, args, seqs_folder, transforms): function make_detmot_transforms (line 191) | def make_detmot_transforms(image_set, args=None): function build (line 238) | def build(image_set, args): FILE: datasets/torchvision_datasets/coco.py class CocoDetection (line 23) | class CocoDetection(VisionDataset): method __init__ (line 36) | def __init__(self, root, annFile, transform=None, target_transform=Non... method cache_images (line 49) | def cache_images(self): method get_image (line 58) | def get_image(self, path): method __getitem__ (line 66) | def __getitem__(self, index): method __len__ (line 86) | def __len__(self): FILE: datasets/transforms.py function crop_mot (line 28) | def crop_mot(image, target, region): function random_shift (line 69) | def random_shift(image, target, region, sizes): function crop (line 114) | def crop(image, target, region): function hflip (line 160) | def hflip(image, target): function resize (line 177) | def resize(image, target, size, max_size=None): function pad (line 236) | def pad(image, target, padding): class RandomCrop (line 249) | class RandomCrop(object): method __init__ (line 250) | def __init__(self, size): method __call__ (line 253) | def __call__(self, img, target): class MotRandomCrop (line 258) | class MotRandomCrop(RandomCrop): method __call__ (line 259) | def __call__(self, imgs: list, targets: list): class FixedMotRandomCrop (line 269) | class FixedMotRandomCrop(object): method __init__ (line 270) | def __init__(self, min_size: int, max_size: int): method __call__ (line 274) | def __call__(self, imgs: list, targets: list): class MotRandomShift (line 286) | class MotRandomShift(object): method __init__ (line 287) | def __init__(self, bs=1): method __call__ (line 290) | def __call__(self, imgs: list, targets: list): class FixedMotRandomShift (line 313) | class FixedMotRandomShift(object): method __init__ (line 314) | def __init__(self, bs=1, padding=50): method __call__ (line 318) | def __call__(self, imgs: list, targets: list): class RandomSizeCrop (line 345) | class RandomSizeCrop(object): method __init__ (line 346) | def __init__(self, min_size: int, max_size: int): method __call__ (line 350) | def __call__(self, img: PIL.Image.Image, target: dict): class MotRandomSizeCrop (line 357) | class MotRandomSizeCrop(RandomSizeCrop): method __call__ (line 358) | def __call__(self, imgs, targets): class CenterCrop (line 371) | class CenterCrop(object): method __init__ (line 372) | def __init__(self, size): method __call__ (line 375) | def __call__(self, img, target): class MotCenterCrop (line 383) | class MotCenterCrop(CenterCrop): method __call__ (line 384) | def __call__(self, imgs, targets): class RandomHorizontalFlip (line 398) | class RandomHorizontalFlip(object): method __init__ (line 399) | def __init__(self, p=0.5): method __call__ (line 402) | def __call__(self, img, target): class MotRandomHorizontalFlip (line 408) | class MotRandomHorizontalFlip(RandomHorizontalFlip): method __call__ (line 409) | def __call__(self, imgs, targets): class RandomResize (line 421) | class RandomResize(object): method __init__ (line 422) | def __init__(self, sizes, max_size=None): method __call__ (line 427) | def __call__(self, img, target=None): class MotRandomResize (line 432) | class MotRandomResize(RandomResize): method __call__ (line 433) | def __call__(self, imgs, targets): class RandomPad (line 444) | class RandomPad(object): method __init__ (line 445) | def __init__(self, max_pad): method __call__ (line 448) | def __call__(self, img, target): class MotRandomPad (line 454) | class MotRandomPad(RandomPad): method __call__ (line 455) | def __call__(self, imgs, targets): class RandomSelect (line 467) | class RandomSelect(object): method __init__ (line 472) | def __init__(self, transforms1, transforms2, p=0.5): method __call__ (line 477) | def __call__(self, img, target): class MotRandomSelect (line 483) | class MotRandomSelect(RandomSelect): method __call__ (line 488) | def __call__(self, imgs, targets): class ToTensor (line 494) | class ToTensor(object): method __call__ (line 495) | def __call__(self, img, target): class MotToTensor (line 499) | class MotToTensor(ToTensor): method __call__ (line 500) | def __call__(self, imgs, targets): class RandomErasing (line 507) | class RandomErasing(object): method __init__ (line 509) | def __init__(self, *args, **kwargs): method __call__ (line 512) | def __call__(self, img, target): class MotRandomErasing (line 516) | class MotRandomErasing(RandomErasing): method __call__ (line 517) | def __call__(self, imgs, targets): class MoTColorJitter (line 525) | class MoTColorJitter(T.ColorJitter): method __call__ (line 526) | def __call__(self, imgs, targets): class Normalize (line 535) | class Normalize(object): method __init__ (line 536) | def __init__(self, mean, std): method __call__ (line 540) | def __call__(self, image, target=None): class MotNormalize (line 556) | class MotNormalize(Normalize): method __call__ (line 557) | def __call__(self, imgs, targets=None): class Compose (line 569) | class Compose(object): method __init__ (line 570) | def __init__(self, transforms): method __call__ (line 573) | def __call__(self, image, target): method __repr__ (line 578) | def __repr__(self): class MotCompose (line 587) | class MotCompose(Compose): method __call__ (line 588) | def __call__(self, imgs, targets): FILE: demo.py function plot_one_box (line 59) | def plot_one_box(x, img, color=None, label=None, score=None, line_thickn... function draw_bboxes (line 84) | def draw_bboxes(ori_img, bbox, identities=None, offset=(0, 0), cvt_color... function draw_points (line 107) | def draw_points(img: np.ndarray, points: np.ndarray, color=(255, 255, 25... class LoadVideo (line 115) | class LoadVideo: # for inference method __init__ (line 116) | def __init__(self, path, img_size=(1536, 800)): method __iter__ (line 135) | def __iter__(self): method __next__ (line 139) | def __next__(self): method init_img (line 151) | def init_img(self, img): method __len__ (line 164) | def __len__(self): class MOTR (line 167) | class MOTR(object): method update (line 168) | def update(self, dt_instances: Instances): class Detector (line 180) | class Detector(object): method __init__ (line 181) | def __init__(self, args): method filter_dt_by_score (line 206) | def filter_dt_by_score(dt_instances: Instances, prob_threshold: float)... method filter_dt_by_area (line 211) | def filter_dt_by_area(dt_instances: Instances, area_threshold: float) ... method write_results (line 218) | def write_results(txt_path, frame_id, bbox_xyxy, identities): method visualize_img_with_bbox (line 230) | def visualize_img_with_bbox(img_path, img, dt_instances: Instances, re... method run (line 243) | def run(self, prob_threshold=0.7, area_threshold=100, vis=True, dump=T... FILE: engine.py function train_one_epoch (line 33) | def train_one_epoch(model: torch.nn.Module, criterion: torch.nn.Module, function train_one_epoch_mot (line 91) | def train_one_epoch_mot(model: torch.nn.Module, criterion: torch.nn.Module, function evaluate (line 150) | def evaluate(model, criterion, postprocessors, data_loader, base_ds, dev... FILE: eval.py function plot_one_box (line 71) | def plot_one_box(x, img, color=None, label=None, score=None, line_thickn... function draw_bboxes (line 96) | def draw_bboxes(ori_img, bbox, identities=None, offset=(0, 0), cvt_color... function draw_points (line 119) | def draw_points(img: np.ndarray, points: np.ndarray, color=(255, 255, 25... function tensor_to_numpy (line 128) | def tensor_to_numpy(tensor: torch.Tensor) -> np.ndarray: class Track (line 132) | class Track(object): method __init__ (line 135) | def __init__(self, box): method miss_one_frame (line 142) | def miss_one_frame(self): method clear_miss (line 145) | def clear_miss(self): method update (line 148) | def update(self, box): class MOTR (line 153) | class MOTR(object): method __init__ (line 154) | def __init__(self, max_age=1, min_hits=3, iou_threshold=0.3): method update (line 157) | def update(self, dt_instances: Instances): function load_label (line 171) | def load_label(label_path: str, img_size: tuple) -> dict: function filter_pub_det (line 198) | def filter_pub_det(res_file, pub_det_file, filter_iou=False): class Detector (line 264) | class Detector(object): method __init__ (line 265) | def __init__(self, args, model=None, seq_num=2): method load_img_from_file (line 295) | def load_img_from_file(self, f_path): method init_img (line 302) | def init_img(self, img): method filter_dt_by_score (line 316) | def filter_dt_by_score(dt_instances: Instances, prob_threshold: float)... method filter_dt_by_area (line 321) | def filter_dt_by_area(dt_instances: Instances, area_threshold: float) ... method write_results (line 328) | def write_results(txt_path, frame_id, bbox_xyxy, identities): method eval_seq (line 339) | def eval_seq(self): method visualize_img_with_bbox (line 347) | def visualize_img_with_bbox(img_path, img, dt_instances: Instances, re... method detect (line 359) | def detect(self, prob_threshold=0.7, area_threshold=100, vis=False): FILE: main.py function get_args_parser (line 34) | def get_args_parser(): function main (line 183) | def main(args): FILE: models/__init__.py function build_model (line 14) | def build_model(args): FILE: models/backbone.py class FrozenBatchNorm2d (line 27) | class FrozenBatchNorm2d(torch.nn.Module): method __init__ (line 36) | def __init__(self, n, eps=1e-5): method _load_from_state_dict (line 44) | def _load_from_state_dict(self, state_dict, prefix, local_metadata, st... method forward (line 54) | def forward(self, x): class BackboneBase (line 67) | class BackboneBase(nn.Module): method __init__ (line 69) | def __init__(self, backbone: nn.Module, train_backbone: bool, return_i... method forward (line 85) | def forward(self, tensor_list: NestedTensor): class Backbone (line 96) | class Backbone(BackboneBase): method __init__ (line 98) | def __init__(self, name: str, class Joiner (line 112) | class Joiner(nn.Sequential): method __init__ (line 113) | def __init__(self, backbone, position_embedding): method forward (line 118) | def forward(self, tensor_list: NestedTensor): function build_backbone (line 132) | def build_backbone(args): FILE: models/deformable_detr.py function _get_clones (line 33) | def _get_clones(module, N): class DeformableDETR (line 37) | class DeformableDETR(nn.Module): method __init__ (line 39) | def __init__(self, backbone, transformer, num_classes, num_queries, nu... method _get_valid_ratio (line 118) | def _get_valid_ratio(mask): method forward (line 127) | def forward(self, samples: NestedTensor): method _set_aux_loss (line 212) | def _set_aux_loss(self, outputs_class, outputs_coord): class SetCriterion (line 220) | class SetCriterion(nn.Module): method __init__ (line 226) | def __init__(self, num_classes, matcher, weight_dict, losses, focal_al... method loss_labels (line 242) | def loss_labels(self, outputs, targets, indices, num_boxes, log=True): method loss_cardinality (line 269) | def loss_cardinality(self, outputs, targets, indices, num_boxes): method loss_boxes (line 282) | def loss_boxes(self, outputs, targets, indices, num_boxes): method loss_masks (line 303) | def loss_masks(self, outputs, targets, indices, num_boxes): method _get_src_permutation_idx (line 332) | def _get_src_permutation_idx(self, indices): method _get_tgt_permutation_idx (line 338) | def _get_tgt_permutation_idx(self, indices): method get_loss (line 344) | def get_loss(self, loss, outputs, targets, indices, num_boxes, **kwargs): method forward (line 354) | def forward(self, outputs, targets): class PostProcess (line 416) | class PostProcess(nn.Module): method forward (line 420) | def forward(self, outputs, target_sizes): class MLP (line 451) | class MLP(nn.Module): method __init__ (line 454) | def __init__(self, input_dim, hidden_dim, output_dim, num_layers): method forward (line 460) | def forward(self, x): function build (line 466) | def build(args): FILE: models/deformable_transformer.py class DeformableTransformer (line 28) | class DeformableTransformer(nn.Module): method __init__ (line 29) | def __init__(self, d_model=256, nhead=8, method _reset_parameters (line 67) | def _reset_parameters(self): method get_proposal_pos_embed (line 79) | def get_proposal_pos_embed(self, proposals): method gen_encoder_output_proposals (line 94) | def gen_encoder_output_proposals(self, memory, memory_padding_mask, sp... method get_valid_ratio (line 126) | def get_valid_ratio(self, mask): method forward (line 135) | def forward(self, srcs, masks, pos_embeds, query_embed=None, ref_pts=N... class DeformableTransformerEncoderLayer (line 202) | class DeformableTransformerEncoderLayer(nn.Module): method __init__ (line 203) | def __init__(self, method with_pos_embed (line 223) | def with_pos_embed(tensor, pos): method forward_ffn (line 226) | def forward_ffn(self, src): method forward (line 232) | def forward(self, src, pos, reference_points, spatial_shapes, level_st... class DeformableTransformerEncoder (line 244) | class DeformableTransformerEncoder(nn.Module): method __init__ (line 245) | def __init__(self, encoder_layer, num_layers): method get_reference_points (line 251) | def get_reference_points(spatial_shapes, valid_ratios, device): method forward (line 265) | def forward(self, src, spatial_shapes, level_start_index, valid_ratios... class DeformableTransformerDecoderLayer (line 274) | class DeformableTransformerDecoderLayer(nn.Module): method __init__ (line 275) | def __init__(self, d_model=256, d_ffn=1024, method with_pos_embed (line 302) | def with_pos_embed(tensor, pos): method forward_ffn (line 305) | def forward_ffn(self, tgt): method _forward_self_attn (line 311) | def _forward_self_attn(self, tgt, query_pos, attn_mask=None): method _forward_self_cross (line 321) | def _forward_self_cross(self, tgt, query_pos, reference_points, src, s... method _forward_cross_self (line 338) | def _forward_cross_self(self, tgt, query_pos, reference_points, src, s... method forward (line 353) | def forward(self, tgt, query_pos, reference_points, src, src_spatial_s... class DeformableTransformerDecoder (line 362) | class DeformableTransformerDecoder(nn.Module): method __init__ (line 363) | def __init__(self, decoder_layer, num_layers, return_intermediate=False): method forward (line 372) | def forward(self, tgt, reference_points, src, src_spatial_shapes, src_... function _get_clones (line 410) | def _get_clones(module, N): function _get_activation_fn (line 414) | def _get_activation_fn(activation): function build_deforamble_transformer (line 425) | def build_deforamble_transformer(args): FILE: models/deformable_transformer_plus.py class DeformableTransformer (line 28) | class DeformableTransformer(nn.Module): method __init__ (line 29) | def __init__(self, d_model=256, nhead=8, method _reset_parameters (line 67) | def _reset_parameters(self): method get_proposal_pos_embed (line 79) | def get_proposal_pos_embed(self, proposals): method gen_encoder_output_proposals (line 94) | def gen_encoder_output_proposals(self, memory, memory_padding_mask, sp... method get_valid_ratio (line 126) | def get_valid_ratio(self, mask): method forward (line 135) | def forward(self, srcs, masks, pos_embeds, query_embed=None, ref_pts=N... class DeformableTransformerEncoderLayer (line 200) | class DeformableTransformerEncoderLayer(nn.Module): method __init__ (line 201) | def __init__(self, method with_pos_embed (line 221) | def with_pos_embed(tensor, pos): method forward_ffn (line 224) | def forward_ffn(self, src): method forward (line 230) | def forward(self, src, pos, reference_points, spatial_shapes, level_st... class DeformableTransformerEncoder (line 241) | class DeformableTransformerEncoder(nn.Module): method __init__ (line 242) | def __init__(self, encoder_layer, num_layers): method get_reference_points (line 248) | def get_reference_points(spatial_shapes, valid_ratios, device): method forward (line 262) | def forward(self, src, spatial_shapes, level_start_index, valid_ratios... class DeformableTransformerDecoderLayer (line 271) | class DeformableTransformerDecoderLayer(nn.Module): method __init__ (line 272) | def __init__(self, d_model=256, d_ffn=1024, method with_pos_embed (line 311) | def with_pos_embed(tensor, pos): method forward_ffn (line 314) | def forward_ffn(self, tgt): method _forward_self_attn (line 320) | def _forward_self_attn(self, tgt, query_pos, attn_mask=None): method _forward_track_attn (line 333) | def _forward_track_attn(self, tgt, query_pos): method _forward_self_cross (line 342) | def _forward_self_cross(self, tgt, query_pos, reference_points, src, s... method _forward_cross_self (line 359) | def _forward_cross_self(self, tgt, query_pos, reference_points, src, s... method forward (line 374) | def forward(self, tgt, query_pos, reference_points, src, src_spatial_s... class DeformableTransformerDecoder (line 383) | class DeformableTransformerDecoder(nn.Module): method __init__ (line 384) | def __init__(self, decoder_layer, num_layers, return_intermediate=False): method forward (line 393) | def forward(self, tgt, reference_points, src, src_spatial_shapes, src_... function _get_clones (line 431) | def _get_clones(module, N): function _get_activation_fn (line 435) | def _get_activation_fn(activation): function build_deforamble_transformer (line 447) | def build_deforamble_transformer(args): FILE: models/matcher.py class HungarianMatcher (line 23) | class HungarianMatcher(nn.Module): method __init__ (line 31) | def __init__(self, method forward (line 48) | def forward(self, outputs, targets, use_focal=True): function build_matcher (line 119) | def build_matcher(args): FILE: models/memory_bank.py class MemoryBank (line 14) | class MemoryBank(nn.Module): method __init__ (line 15) | def __init__(self, args, dim_in, hidden_dim, dim_out): method _build_layers (line 22) | def _build_layers(self, args, dim_in, hidden_dim, dim_out): method update (line 47) | def update(self, track_instances): method _forward_spatial_attn (line 70) | def _forward_spatial_attn(self, track_instances): method _forward_track_cls (line 90) | def _forward_track_cls(self, track_instances): method _forward_temporal_attn (line 94) | def _forward_temporal_attn(self, track_instances): method forward_temporal_attn (line 122) | def forward_temporal_attn(self, track_instances): method forward (line 125) | def forward(self, track_instances: Instances, update_bank=True) -> Ins... function build_memory_bank (line 136) | def build_memory_bank(args, dim_in, hidden_dim, dim_out): FILE: models/motr.py class ClipMatcher (line 38) | class ClipMatcher(SetCriterion): method __init__ (line 39) | def __init__(self, num_classes, method initialize_for_single_clip (line 60) | def initialize_for_single_clip(self, gt_instances: List[Instances]): method _step (line 67) | def _step(self): method calc_loss_for_track_scores (line 70) | def calc_loss_for_track_scores(self, track_instances: Instances): method get_num_boxes (line 91) | def get_num_boxes(self, num_samples): method get_loss (line 98) | def get_loss(self, loss, outputs, gt_instances, indices, num_boxes, **... method loss_boxes (line 107) | def loss_boxes(self, outputs, gt_instances: List[Instances], indices: ... method loss_labels (line 138) | def loss_labels(self, outputs, gt_instances: List[Instances], indices,... method match_for_single_frame (line 175) | def match_for_single_frame(self, outputs: dict): method forward (line 294) | def forward(self, outputs, input_data: dict): class RuntimeTrackerBase (line 303) | class RuntimeTrackerBase(object): method __init__ (line 304) | def __init__(self, score_thresh=0.7, filter_score_thresh=0.6, miss_tol... method clear (line 310) | def clear(self): method update (line 313) | def update(self, track_instances: Instances): class TrackerPostProcess (line 328) | class TrackerPostProcess(nn.Module): method __init__ (line 330) | def __init__(self): method forward (line 334) | def forward(self, track_instances: Instances, target_size) -> Instances: function _get_clones (line 364) | def _get_clones(module, N): class MOTR (line 368) | class MOTR(nn.Module): method __init__ (line 369) | def __init__(self, backbone, transformer, num_classes, num_queries, nu... method _generate_empty_tracks (line 454) | def _generate_empty_tracks(self): method clear (line 477) | def clear(self): method _set_aux_loss (line 481) | def _set_aux_loss(self, outputs_class, outputs_coord): method _forward_single_image (line 488) | def _forward_single_image(self, samples, track_instances: Instances): method _post_process_single_image (line 545) | def _post_process_single_image(self, frame_res, track_instances, is_la... method inference_single_image (line 580) | def inference_single_image(self, img, ori_img_size, track_instances=No... method forward (line 600) | def forward(self, data: dict): function build (line 657) | def build(args): FILE: models/ops/functions/ms_deform_attn_func.py class MSDeformAttnFunction (line 24) | class MSDeformAttnFunction(Function): method forward (line 26) | def forward(ctx, value, value_spatial_shapes, value_level_start_index,... method backward (line 35) | def backward(ctx, grad_output): function ms_deform_attn_core_pytorch (line 44) | 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, sig... method _reset_parameters (line 66) | def _reset_parameters(self): method forward (line 82) | def forward(self, query, reference_points, input_flatten, input_spatia... 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 22) | class PositionEmbeddingSine(nn.Module): method __init__ (line 27) | def __init__(self, num_pos_feats=64, temperature=10000, normalize=Fals... method forward (line 38) | def forward(self, tensor_list: NestedTensor): class PositionEmbeddingLearned (line 61) | class PositionEmbeddingLearned(nn.Module): method __init__ (line 65) | def __init__(self, num_pos_feats=256): method reset_parameters (line 71) | def reset_parameters(self): method forward (line 75) | def forward(self, tensor_list: NestedTensor): function build_position_encoding (line 89) | def build_position_encoding(args): FILE: models/qim.py function random_drop_tracks (line 16) | def random_drop_tracks(track_instances: Instances, drop_probability: flo... class QueryInteractionBase (line 23) | class QueryInteractionBase(nn.Module): method __init__ (line 24) | def __init__(self, args, dim_in, hidden_dim, dim_out): method _build_layers (line 30) | def _build_layers(self, args, dim_in, hidden_dim, dim_out): method _reset_parameters (line 33) | def _reset_parameters(self): method _select_active_tracks (line 38) | def _select_active_tracks(self, data: dict) -> Instances: method _update_track_embedding (line 41) | def _update_track_embedding(self, track_instances): class FFN (line 45) | class FFN(nn.Module): method __init__ (line 46) | def __init__(self, d_model, d_ffn, dropout=0): method forward (line 55) | def forward(self, tgt): class QueryInteractionModule (line 62) | class QueryInteractionModule(QueryInteractionBase): method __init__ (line 63) | def __init__(self, args, dim_in, hidden_dim, dim_out): method _build_layers (line 69) | def _build_layers(self, args, dim_in, hidden_dim, dim_out): method _random_drop_tracks (line 103) | def _random_drop_tracks(self, track_instances: Instances) -> Instances: method _add_fp_tracks (line 106) | def _add_fp_tracks(self, track_instances: Instances, active_track_inst... method _select_active_tracks (line 133) | def _select_active_tracks(self, data: dict) -> Instances: method _update_track_embedding (line 147) | def _update_track_embedding(self, track_instances: Instances) -> Insta... method forward (line 179) | def forward(self, data) -> Instances: function build (line 187) | def build(args, layer_name, dim_in, hidden_dim, dim_out): FILE: models/relu_dropout.py class ReLUDropout (line 4) | class ReLUDropout(torch.nn.Dropout): method forward (line 5) | def forward(self, input): function relu_dropout (line 8) | def relu_dropout(x, p=0, inplace=False, training=False): FILE: models/segmentation.py class DETRsegm (line 32) | class DETRsegm(nn.Module): method __init__ (line 33) | def __init__(self, detr, freeze_detr=False): method forward (line 45) | def forward(self, samples: NestedTensor): class MaskHeadSmallConv (line 74) | class MaskHeadSmallConv(nn.Module): method __init__ (line 80) | def __init__(self, dim, fpn_dims, context_dim): method forward (line 107) | def forward(self, x, bbox_mask, fpns): class MHAttentionMap (line 148) | class MHAttentionMap(nn.Module): method __init__ (line 151) | def __init__(self, query_dim, hidden_dim, num_heads, dropout=0, bias=T... method forward (line 166) | def forward(self, q, k, mask=None): function dice_loss (line 180) | def dice_loss(inputs, targets, num_boxes): function sigmoid_focal_loss (line 198) | def sigmoid_focal_loss(inputs, targets, num_boxes, alpha: float = 0.25, ... class PostProcessSegm (line 228) | class PostProcessSegm(nn.Module): method __init__ (line 229) | def __init__(self, threshold=0.5): method forward (line 234) | def forward(self, results, outputs, orig_target_sizes, max_target_sizes): class PostProcessPanoptic (line 251) | class PostProcessPanoptic(nn.Module): method __init__ (line 255) | def __init__(self, is_thing_map, threshold=0.85): method forward (line 266) | def forward(self, outputs, processed_sizes, target_sizes=None): FILE: models/structures/boxes.py function _maybe_jit_unused (line 14) | def _maybe_jit_unused(x): class BoxMode (line 19) | class BoxMode(IntEnum): method convert (line 50) | def convert(box: _RawBoxType, from_mode: "BoxMode", to_mode: "BoxMode"... class Boxes (line 136) | class Boxes: method __init__ (line 148) | def __init__(self, tensor: torch.Tensor): method clone (line 163) | def clone(self) -> "Boxes": method to (line 173) | def to(self, device: torch.device): method area (line 177) | def area(self) -> torch.Tensor: method clip (line 188) | def clip(self, box_size: Tuple[int, int]) -> None: method nonempty (line 204) | def nonempty(self, threshold: float = 0.0) -> torch.Tensor: method __getitem__ (line 220) | def __getitem__(self, item) -> "Boxes": method __len__ (line 244) | def __len__(self) -> int: method __repr__ (line 247) | def __repr__(self) -> str: method inside_box (line 250) | def inside_box(self, box_size: Tuple[int, int], boundary_threshold: in... method get_centers (line 269) | def get_centers(self) -> torch.Tensor: method scale (line 276) | def scale(self, scale_x: float, scale_y: float) -> None: method cat (line 285) | def cat(cls, boxes_list: List["Boxes"]) -> "Boxes": method device (line 305) | def device(self) -> device: method __iter__ (line 311) | def __iter__(self): function pairwise_intersection (line 318) | def pairwise_intersection(boxes1: Boxes, boxes2: Boxes) -> torch.Tensor: function pairwise_iou (line 342) | def pairwise_iou(boxes1: Boxes, boxes2: Boxes) -> torch.Tensor: function pairwise_ioa (line 367) | def pairwise_ioa(boxes1: Boxes, boxes2: Boxes) -> torch.Tensor: function matched_boxlist_iou (line 387) | def matched_boxlist_iou(boxes1: Boxes, boxes2: Boxes) -> torch.Tensor: FILE: models/structures/instances.py class Instances (line 12) | class Instances: method __init__ (line 43) | def __init__(self, image_size: Tuple[int, int], **kwargs: Any): method image_size (line 55) | def image_size(self) -> Tuple[int, int]: method __setattr__ (line 62) | def __setattr__(self, name: str, val: Any) -> None: method __getattr__ (line 68) | def __getattr__(self, name: str) -> Any: method set (line 73) | def set(self, name: str, value: Any) -> None: method has (line 86) | def has(self, name: str) -> bool: method remove (line 93) | def remove(self, name: str) -> None: method get (line 99) | def get(self, name: str) -> Any: method get_fields (line 105) | def get_fields(self) -> Dict[str, Any]: method to (line 115) | def to(self, *args: Any, **kwargs: Any) -> "Instances": method numpy (line 127) | def numpy(self): method __getitem__ (line 135) | def __getitem__(self, item: Union[int, slice, torch.BoolTensor]) -> "I... method __len__ (line 155) | def __len__(self) -> int: method __iter__ (line 161) | def __iter__(self): method cat (line 165) | def cat(instance_lists: List["Instances"]) -> "Instances": method __str__ (line 196) | def __str__(self) -> str: FILE: submit.py function plot_one_box (line 72) | def plot_one_box(x, img, color=None, label=None, score=None, line_thickn... function draw_bboxes (line 100) | def draw_bboxes(ori_img, bbox, identities=None, offset=(0, 0), cvt_color... function draw_points (line 123) | def draw_points(img: np.ndarray, points: np.ndarray, color=(255, 255, 25... function tensor_to_numpy (line 132) | def tensor_to_numpy(tensor: torch.Tensor) -> np.ndarray: class Track (line 136) | class Track(object): method __init__ (line 139) | def __init__(self, box): method miss_one_frame (line 146) | def miss_one_frame(self): method clear_miss (line 149) | def clear_miss(self): method update (line 152) | def update(self, box): class MOTR (line 157) | class MOTR(object): method __init__ (line 158) | def __init__(self, max_age=1, min_hits=3, iou_threshold=0.3): method _remove_track (line 171) | def _remove_track(self, slot_id): method clear_disappeared_track (line 175) | def clear_disappeared_track(self): method update (line 178) | def update(self, dt_instances: Instances): function load_label (line 240) | def load_label(label_path: str, img_size: tuple) -> dict: function filter_pub_det (line 267) | def filter_pub_det(res_file, pub_det_file, filter_iou=False): class ListImgDataset (line 332) | class ListImgDataset(Dataset): method __init__ (line 333) | def __init__(self, img_list) -> None: method load_img_from_file (line 345) | def load_img_from_file(self, f_path): method init_img (line 353) | def init_img(self, img): method __len__ (line 366) | def __len__(self): method __getitem__ (line 369) | def __getitem__(self, index): class Detector (line 374) | class Detector(object): method __init__ (line 375) | def __init__(self, args, model=None, seq_num=2): method filter_dt_by_score (line 398) | def filter_dt_by_score(dt_instances: Instances, prob_threshold: float)... method filter_dt_by_area (line 403) | def filter_dt_by_area(dt_instances: Instances, area_threshold: float) ... method write_results (line 410) | def write_results(txt_path, frame_id, bbox_xyxy, identities): method eval_seq (line 421) | def eval_seq(self): method visualize_img_with_bbox (line 429) | def visualize_img_with_bbox(img_path, img, dt_instances: Instances, re... method detect (line 440) | def detect(self, prob_threshold=0.7, area_threshold=100): FILE: submit_dance.py function plot_one_box (line 72) | def plot_one_box(x, img, color=None, label=None, score=None, line_thickn... function draw_bboxes (line 100) | def draw_bboxes(ori_img, bbox, identities=None, offset=(0, 0), cvt_color... function draw_points (line 123) | def draw_points(img: np.ndarray, points: np.ndarray, color=(255, 255, 25... function tensor_to_numpy (line 132) | def tensor_to_numpy(tensor: torch.Tensor) -> np.ndarray: class Track (line 136) | class Track(object): method __init__ (line 139) | def __init__(self, box): method miss_one_frame (line 146) | def miss_one_frame(self): method clear_miss (line 149) | def clear_miss(self): method update (line 152) | def update(self, box): class MOTR (line 157) | class MOTR(object): method __init__ (line 158) | def __init__(self, max_age=1, min_hits=3, iou_threshold=0.3): method _remove_track (line 171) | def _remove_track(self, slot_id): method clear_disappeared_track (line 175) | def clear_disappeared_track(self): method update (line 178) | def update(self, dt_instances: Instances): function load_label (line 240) | def load_label(label_path: str, img_size: tuple) -> dict: function filter_pub_det (line 267) | def filter_pub_det(res_file, pub_det_file, filter_iou=False): class ListImgDataset (line 332) | class ListImgDataset(Dataset): method __init__ (line 333) | def __init__(self, img_list) -> None: method load_img_from_file (line 345) | def load_img_from_file(self, f_path): method init_img (line 353) | def init_img(self, img): method __len__ (line 366) | def __len__(self): method __getitem__ (line 369) | def __getitem__(self, index): class Detector (line 374) | class Detector(object): method __init__ (line 375) | def __init__(self, args, model=None, seq_num=2): method filter_dt_by_score (line 398) | def filter_dt_by_score(dt_instances: Instances, prob_threshold: float)... method filter_dt_by_area (line 403) | def filter_dt_by_area(dt_instances: Instances, area_threshold: float) ... method write_results (line 410) | def write_results(txt_path, frame_id, bbox_xyxy, identities): method eval_seq (line 421) | def eval_seq(self): method visualize_img_with_bbox (line 429) | def visualize_img_with_bbox(img_path, img, dt_instances: Instances, re... method detect (line 440) | def detect(self, prob_threshold=0.7, area_threshold=100, vis=False): FILE: tools/launch.py function parse_args (line 119) | def parse_args(): function main (line 162) | def main(): FILE: util/box_ops.py function box_cxcywh_to_xyxy (line 19) | def box_cxcywh_to_xyxy(x): function box_xyxy_to_cxcywh (line 26) | def box_xyxy_to_cxcywh(x): function box_iou (line 34) | def box_iou(boxes1, boxes2): function generalized_box_iou (line 50) | def generalized_box_iou(boxes1, boxes2): function masks_to_boxes (line 74) | def masks_to_boxes(masks): FILE: util/checkpoint.py function detach_variable (line 7) | def detach_variable(inputs): function check_backward_validity (line 20) | def check_backward_validity(inputs): class CheckpointFunction (line 25) | class CheckpointFunction(torch.autograd.Function): method forward (line 27) | def forward(ctx, run_function, length, *args): method backward (line 36) | def backward(ctx, *output_grads): FILE: util/evaluation.py function read_results (line 22) | def read_results(filename, data_type: str, is_gt=False, is_ignore=False): function read_mot_results (line 59) | def read_mot_results(filename, is_gt, is_ignore): function unzip_objs (line 104) | def unzip_objs(objs): class Evaluator (line 113) | class Evaluator(object): method __init__ (line 114) | def __init__(self, data_root, seq_name, data_type='mot'): method load_annotations (line 123) | def load_annotations(self): method reset_accumulator (line 130) | def reset_accumulator(self): method eval_frame (line 133) | def eval_frame(self, frame_id, trk_tlwhs, trk_ids, rtn_events=False): method eval_file (line 171) | def eval_file(self, filename): method get_summary (line 184) | def get_summary(accs, names, metrics=('mota', 'num_switches', 'idp', '... method save_summary (line 201) | def save_summary(summary, filename): FILE: util/misc.py function _check_size_scale_factor (line 35) | def _check_size_scale_factor(dim, size, scale_factor): function _output_size (line 46) | def _output_size(dim, input, size, scale_factor): class SmoothedValue (line 64) | class SmoothedValue(object): method __init__ (line 69) | def __init__(self, window_size=20, fmt=None): method update (line 77) | def update(self, value, n=1): method synchronize_between_processes (line 82) | def synchronize_between_processes(self): method median (line 96) | def median(self): method avg (line 101) | def avg(self): method global_avg (line 106) | def global_avg(self): method max (line 110) | def max(self): method value (line 114) | def value(self): method __str__ (line 117) | def __str__(self): function all_gather (line 126) | def all_gather(data): function reduce_dict (line 169) | def reduce_dict(input_dict, average=True): class MetricLogger (line 196) | class MetricLogger(object): method __init__ (line 197) | def __init__(self, delimiter="\t"): method update (line 201) | def update(self, **kwargs): method __getattr__ (line 208) | def __getattr__(self, attr): method __str__ (line 216) | def __str__(self): method synchronize_between_processes (line 224) | def synchronize_between_processes(self): method add_meter (line 228) | def add_meter(self, name, meter): method log_every (line 231) | def log_every(self, iterable, print_freq, header=None): function get_sha (line 286) | def get_sha(): function collate_fn (line 306) | def collate_fn(batch): function mot_collate_fn (line 312) | def mot_collate_fn(batch: List[dict]) -> dict: function _max_by_axis (line 322) | def _max_by_axis(the_list): function nested_tensor_from_tensor_list (line 331) | def nested_tensor_from_tensor_list(tensor_list: List[Tensor], size_divis... class NestedTensor (line 358) | class NestedTensor(object): method __init__ (line 359) | def __init__(self, tensors, mask: Optional[Tensor]): method to (line 363) | def to(self, device, non_blocking=False): method record_stream (line 374) | def record_stream(self, *args, **kwargs): method decompose (line 379) | def decompose(self): method __repr__ (line 382) | def __repr__(self): function setup_for_distributed (line 386) | def setup_for_distributed(is_master): function is_dist_avail_and_initialized (line 401) | def is_dist_avail_and_initialized(): function get_world_size (line 409) | def get_world_size(): function get_rank (line 415) | def get_rank(): function get_local_size (line 421) | def get_local_size(): function get_local_rank (line 427) | def get_local_rank(): function is_main_process (line 433) | def is_main_process(): function save_on_master (line 437) | def save_on_master(*args, **kwargs): function init_distributed_mode (line 442) | def init_distributed_mode(args): function accuracy (line 484) | def accuracy(output, target, topk=(1,)): function interpolate (line 502) | def interpolate(input, size=None, scale_factor=None, mode="nearest", ali... function get_total_grad_norm (line 524) | def get_total_grad_norm(parameters, norm_type=2): function inverse_sigmoid (line 532) | def inverse_sigmoid(x, eps=1e-5): FILE: util/motdet_eval.py function ap_per_class (line 16) | def ap_per_class(tp, conf, pred_cls, target_cls): function compute_ap (line 69) | def compute_ap(recall, precision): function bbox_iou (line 97) | def bbox_iou(box1, box2, x1y1x2y2=False): function xyxy2xywh (line 126) | def xyxy2xywh(x): function xywh2xyxy (line 136) | def xywh2xyxy(x): function motdet_evaluate (line 147) | def motdet_evaluate(model, data_loader, iou_thres=0.5, print_interval=10): function init_metrics (line 259) | def init_metrics(): function detmotdet_evaluate (line 282) | def detmotdet_evaluate(model, data_loader, device, iou_thres=0.5, print_... FILE: util/plot_utils.py function plot_logs (line 27) | def plot_logs(logs, fields=('class_error', 'loss_bbox_unscaled', 'mAP'),... function plot_precision_recall (line 83) | def plot_precision_recall(files, naming_scheme='iter'): function draw_boxes (line 117) | def draw_boxes(image: Tensor, boxes: Tensor, color=(0, 255, 0), texts=No... function draw_ref_pts (line 141) | def draw_ref_pts(image: Tensor, ref_pts: Tensor) -> np.ndarray: function image_hwc2chw (line 157) | def image_hwc2chw(image: np.ndarray): FILE: util/tool.py function load_model (line 15) | def load_model(model, model_path, optimizer=None, resume=False,