SYMBOL INDEX (1314 symbols across 129 files) FILE: ape/checkpoint/detection_checkpoint.py class DetectionCheckpointer (line 16) | class DetectionCheckpointer(DetectionCheckpointer_d2): method _convert_ndarray_to_tensor (line 22) | def _convert_ndarray_to_tensor(self, state_dict: Dict[str, Any]) -> None: class FSDPDetectionCheckpointer (line 50) | class FSDPDetectionCheckpointer(DetectionCheckpointer): method save (line 56) | def save(self, name: str, **kwargs: Any) -> None: FILE: ape/data/build.py function _test_loader_from_config (line 44) | def _test_loader_from_config(cfg, dataset_name, mapper=None): function build_detection_test_loader (line 74) | def build_detection_test_loader( FILE: ape/data/build_copypaste.py function get_detection_dataset_dicts_copypaste (line 38) | def get_detection_dataset_dicts_copypaste( function _train_loader_from_config (line 103) | def _train_loader_from_config(cfg, mapper=None, *, dataset=None, sampler... function build_detection_train_loader_copypaste (line 179) | def build_detection_train_loader_copypaste( FILE: ape/data/build_multi_dataset.py function print_instances_class_histogram (line 49) | def print_instances_class_histogram(dataset_dicts, class_names): function DatasetCatalog_get (line 106) | def DatasetCatalog_get(dataset_name, reduce_memory, reduce_memory_size): function get_detection_dataset_dicts_multi_dataset (line 181) | def get_detection_dataset_dicts_multi_dataset( function build_batch_data_loader_multi_dataset (line 279) | def build_batch_data_loader_multi_dataset( function _train_loader_from_config (line 356) | def _train_loader_from_config(cfg, mapper=None, *, dataset=None, sampler... function build_detection_train_loader_multi_dataset (line 450) | def build_detection_train_loader_multi_dataset( class MultiDatasetSampler (line 525) | class MultiDatasetSampler(Sampler): method __init__ (line 526) | def __init__(self, cfg, dataset_dicts, sizes, seed: Optional[int] = No... method __iter__ (line 565) | def __iter__(self): method _infinite_indices (line 569) | def _infinite_indices(self): method _get_class_balance_factor_per_dataset (line 578) | def _get_class_balance_factor_per_dataset(self, dataset_dicts, l=1.0): class MultiDatasetAspectRatioGroupedDataset (line 703) | class MultiDatasetAspectRatioGroupedDataset(torch.utils.data.IterableDat... method __init__ (line 716) | def __init__(self, dataset, batch_size, num_datasets): method __iter__ (line 729) | def __iter__(self): FILE: ape/data/build_multi_dataset_copypaste.py function print_instances_class_histogram (line 50) | def print_instances_class_histogram(dataset_dicts, class_names): function DatasetCatalog_get (line 107) | def DatasetCatalog_get(dataset_name, reduce_memory, reduce_memory_size): function get_detection_dataset_dicts_multi_dataset_copypaste (line 182) | def get_detection_dataset_dicts_multi_dataset_copypaste( function build_batch_data_loader_multi_dataset (line 284) | def build_batch_data_loader_multi_dataset( function _train_loader_from_config (line 361) | def _train_loader_from_config(cfg, mapper=None, *, dataset=None, sampler... function build_detection_train_loader_multi_dataset_copypaste (line 498) | def build_detection_train_loader_multi_dataset_copypaste( class MultiDatasetSampler (line 589) | class MultiDatasetSampler(Sampler): method __init__ (line 590) | def __init__(self, cfg, dataset_dicts, sizes, seed: Optional[int] = No... method __iter__ (line 629) | def __iter__(self): method _infinite_indices (line 633) | def _infinite_indices(self): method _get_class_balance_factor_per_dataset (line 642) | def _get_class_balance_factor_per_dataset(self, dataset_dicts, l=1.0): class MultiDatasetAspectRatioGroupedDataset (line 767) | class MultiDatasetAspectRatioGroupedDataset(torch.utils.data.IterableDat... method __init__ (line 780) | def __init__(self, dataset, batch_size, num_datasets): method __iter__ (line 793) | def __iter__(self): FILE: ape/data/common_copypaste.py class MapDataset_coppaste (line 14) | class MapDataset_coppaste(data.Dataset): method __init__ (line 19) | def __init__(self, dataset, map_func, dataset_bg, sampler_bg): method __new__ (line 41) | def __new__(cls, dataset, map_func, dataset_bg, sampler_bg): method __getnewargs__ (line 49) | def __getnewargs__(self): method __len__ (line 52) | def __len__(self): method __getitem__ (line 55) | def __getitem__(self, idx): FILE: ape/data/dataset_mapper.py class DatasetMapper_ape (line 17) | class DatasetMapper_ape(DatasetMapper_d2): method __init__ (line 34) | def __init__(self, cfg, is_train: bool = True): FILE: ape/data/dataset_mapper_copypaste.py class DatasetMapper_copypaste (line 30) | class DatasetMapper_copypaste(DatasetMapper_d2): method __init__ (line 48) | def __init__( method from_config (line 126) | def from_config(cls, cfg, is_train: bool = True): method _transform_annotations (line 177) | def _transform_annotations(self, dataset_dict, transforms, image_shape): method __call__ (line 233) | def __call__(self, dataset_dict, dataset_dict_bg): method visualize_training (line 382) | def visualize_training(self, dataset_dict, prefix="", suffix=""): FILE: ape/data/dataset_mapper_detr_instance.py class DatasetMapper_detr_instance (line 23) | class DatasetMapper_detr_instance: method __init__ (line 41) | def __init__( method from_config (line 105) | def from_config(cls, cfg, is_train: bool = True): method _transform_annotations (line 108) | def _transform_annotations(self, dataset_dict, transforms, image_shape): method __call__ (line 156) | def __call__(self, dataset_dict): FILE: ape/data/dataset_mapper_detr_instance_exp.py class DatasetMapper_detr_instance_exp (line 22) | class DatasetMapper_detr_instance_exp: method __init__ (line 40) | def __init__( method from_config (line 99) | def from_config(cls, cfg, is_train: bool = True): method _transform_annotations (line 102) | def _transform_annotations(self, dataset_dict, transforms, image_shape): method __call__ (line 131) | def __call__(self, dataset_dict): FILE: ape/data/dataset_mapper_detr_panoptic.py class DatasetMapper_detr_panoptic (line 24) | class DatasetMapper_detr_panoptic: method __init__ (line 42) | def __init__( method from_config (line 107) | def from_config(cls, cfg, is_train: bool = True): method _transform_annotations (line 110) | def _transform_annotations(self, dataset_dict, transforms, image_shape): method __call__ (line 139) | def __call__(self, dataset_dict): FILE: ape/data/dataset_mapper_detr_panoptic_copypaste.py class DatasetMapper_detr_panoptic_copypaste (line 29) | class DatasetMapper_detr_panoptic_copypaste: method __init__ (line 47) | def __init__( method from_config (line 127) | def from_config(cls, cfg, is_train: bool = True): method _transform_annotations (line 130) | def _transform_annotations(self, dataset_dict, transforms, image_shape): method __call__ (line 186) | def __call__(self, dataset_dict, dataset_dict_bg): method visualize_training (line 555) | def visualize_training(self, dataset_dict, prefix="", suffix=""): FILE: ape/data/dataset_mapper_detr_semantic.py class DatasetMapper_detr_semantic (line 24) | class DatasetMapper_detr_semantic: method __init__ (line 42) | def __init__( method from_config (line 97) | def from_config(cls, cfg, is_train: bool = True): method _transform_annotations (line 100) | def _transform_annotations(self, dataset_dict, transforms, image_shape): method __call__ (line 129) | def __call__(self, dataset_dict): FILE: ape/data/datasets/coco.py function custom_load_coco_json (line 23) | def custom_load_coco_json(json_file, image_root, dataset_name=None, extr... function custom_load_sem_seg (line 238) | def custom_load_sem_seg(gt_root, image_root, gt_ext="png", image_ext="jp... function custom_load_sem_seg_list (line 314) | def custom_load_sem_seg_list(gt_root, image_root, gt_ext="png", image_ex... function custom_register_coco_instances (line 338) | def custom_register_coco_instances(name, metadata, json_file, image_root): function custom_register_coco_semseg (line 368) | def custom_register_coco_semseg(name, metadata, sem_seg_root, image_root): FILE: ape/data/datasets/d_cube.py function register_d3_instances (line 26) | def register_d3_instances(name, metadata, json_file, image_root, anno_ro... function load_d3_json (line 42) | def load_d3_json(json_file, image_root, anno_root, dataset_name=None, ex... function get_d3_instances_meta (line 223) | def get_d3_instances_meta(dataset_name): function register_all_D3 (line 259) | def register_all_D3(root): FILE: ape/data/datasets/flickr30k.py function _get_builtin_metadata (line 9) | def _get_builtin_metadata(dataset_name): function _get_flickr30k_metadata (line 15) | def _get_flickr30k_metadata(categories): function register_all_flickr30k (line 52) | def register_all_flickr30k(root): FILE: ape/data/datasets/gqa.py function _get_builtin_metadata (line 9) | def _get_builtin_metadata(dataset_name): function _get_gqa_metadata (line 15) | def _get_gqa_metadata(categories): function register_all_gqa (line 44) | def register_all_gqa(root): FILE: ape/data/datasets/grit.py function _get_builtin_metadata (line 10) | def _get_builtin_metadata(dataset_name): function register_all_GRIT (line 47) | def register_all_GRIT(root): FILE: ape/data/datasets/lvis_coco.py function custom_register_lvis_instances (line 26) | def custom_register_lvis_instances(name, metadata, json_file, image_root): function custom_load_lvis_json (line 42) | def custom_load_lvis_json(json_file, image_root, dataset_name=None, extr... function get_lvis_instances_meta (line 210) | def get_lvis_instances_meta(dataset_name): function _get_lvis_instances_meta_v0_5 (line 231) | def _get_lvis_instances_meta_v0_5(): function _get_lvis_instances_meta_v1 (line 244) | def _get_lvis_instances_meta_v1(): function register_all_lvis_coco (line 270) | def register_all_lvis_coco(root): FILE: ape/data/datasets/lvis_coco_panoptic.py function register_lvis_panoptic_separated (line 16) | def register_lvis_panoptic_separated( function merge_to_panoptic (line 83) | def merge_to_panoptic(detection_dicts, sem_seg_dicts): function _get_builtin_metadata (line 108) | def _get_builtin_metadata(dataset_name): function _get_lvis_panoptic_separated_meta (line 115) | def _get_lvis_panoptic_separated_meta(): function register_all_lvis_coco_panoptic (line 168) | def register_all_lvis_coco_panoptic(root): FILE: ape/data/datasets/objects365.py function _get_builtin_metadata (line 742) | def _get_builtin_metadata(key): function register_all_objects365 (line 786) | def register_all_objects365(root): FILE: ape/data/datasets/odinw_instance.py function load_coco_json (line 19) | def load_coco_json(json_file, image_root, dataset_name=None, extra_annot... function register_coco_instances (line 219) | def register_coco_instances(name, metadata, json_file, image_root): function _get_builtin_metadata (line 798) | def _get_builtin_metadata(name): function register_all_odinw (line 810) | def register_all_odinw(root): FILE: ape/data/datasets/oid.py function register_oid_instances (line 12) | def register_oid_instances(name, metadata, json_file, image_root): function _get_builtin_metadata (line 1454) | def _get_builtin_metadata(cats, class_image_count=None): function register_all_oid (line 1560) | def register_all_oid(root): FILE: ape/data/datasets/pascal_voc_external.py function _get_ctx59_meta (line 820) | def _get_ctx59_meta(): function register_all_ctx59 (line 838) | def register_all_ctx59(root): function _get_pascal21_meta (line 862) | def _get_pascal21_meta(): function register_all_pascal21 (line 880) | def register_all_pascal21(root): function _get_ctx459_meta (line 904) | def _get_ctx459_meta(): function register_all_ctx459 (line 922) | def register_all_ctx459(root): function _get_parts_meta (line 946) | def _get_parts_meta(): function _get_parts_only_meta (line 964) | def _get_parts_only_meta(): function register_all_pascal_parts_only (line 982) | def register_all_pascal_parts_only(root): function register_all_pascal_parts (line 1136) | def register_all_pascal_parts(root): function _get_builtin_metadata (line 1178) | def _get_builtin_metadata(dataset_name): function _get_pascalvocpart_metadata (line 1184) | def _get_pascalvocpart_metadata(categories): function register_all_pascalvocpart (line 1196) | def register_all_pascalvocpart(root): FILE: ape/data/datasets/phrasecut.py function _get_builtin_metadata (line 9) | def _get_builtin_metadata(dataset_name): function _get_phrasecut_metadata (line 15) | def _get_phrasecut_metadata(categories): function register_all_phrasecut (line 44) | def register_all_phrasecut(root): FILE: ape/data/datasets/refcoco.py function _get_refcoco_meta (line 30) | def _get_refcoco_meta(): function load_refcoco_json (line 45) | def load_refcoco_json(json_file, image_root, dataset_name=None, extra_an... function register_refcoco (line 254) | def register_refcoco(name, metadata, json_file, image_root): function register_all_refcoco (line 323) | def register_all_refcoco(root): FILE: ape/data/datasets/register_bdd100k_panoseg.py function load_bdd_panoptic_json (line 113) | def load_bdd_panoptic_json(json_file, image_dir, gt_dir, meta): function register_bdd_panoptic (line 167) | def register_bdd_panoptic( function get_metadata (line 214) | def get_metadata(): function register_all_bdd_panoptic (line 257) | def register_all_bdd_panoptic(root): FILE: ape/data/datasets/register_bdd100k_semseg.py function load_bdd_instances (line 42) | def load_bdd_instances( function register_bdd_context (line 72) | def register_bdd_context(name, dirname, split, class_names=BDD_SEM): function register_all_bdd_semseg (line 85) | def register_all_bdd_semseg(root): FILE: ape/data/datasets/register_pascal_context.py function _get_voc_meta (line 532) | def _get_voc_meta(cat_list): function register_pascal_context_59 (line 539) | def register_pascal_context_59(root): function register_pascal_context_459 (line 561) | def register_pascal_context_459(root): FILE: ape/data/datasets/register_voc_seg.py function _get_voc_meta (line 31) | def _get_voc_meta(cat_list): function register_pascalvoc (line 38) | def register_pascalvoc(root): FILE: ape/data/datasets/sa1b.py function _get_builtin_metadata (line 10) | def _get_builtin_metadata(key): function register_all_sa1b (line 31) | def register_all_sa1b(root): FILE: ape/data/datasets/seginw_instance.py function get_metadata (line 61) | def get_metadata(name): function load_seginw_json (line 69) | def load_seginw_json(name, image_root, annot_json, metadata): function register_seginw (line 111) | def register_seginw(name, metadata, image_root, annot_json): function register_all_seginw (line 126) | def register_all_seginw(root): FILE: ape/data/datasets/visualgenome.py function _get_builtin_metadata (line 16) | def _get_builtin_metadata(dataset_name): function _get_visualgenome_metadata (line 50) | def _get_visualgenome_metadata(categories): function register_all_visualgenome (line 206) | def register_all_visualgenome(root): FILE: ape/data/detection_utils.py function load_fed_loss_cls_weights (line 29) | def load_fed_loss_cls_weights(class_freq_path: str, freq_weight_power=1.0): function get_fed_loss_cls_weights (line 41) | def get_fed_loss_cls_weights(dataset_names: Union[str, List[str]], freq_... function get_fed_loss_cls_weights_v2 (line 75) | def get_fed_loss_cls_weights_v2(dataset_names: Union[str, List[str]], fr... function build_augmentation (line 128) | def build_augmentation(cfg, is_train): function build_augmentation_lsj (line 174) | def build_augmentation_lsj(cfg, is_train): function build_augmentation_aa (line 202) | def build_augmentation_aa(cfg, is_train): FILE: ape/data/mapper_utils.py function clean_string (line 32) | def clean_string(phrase): function transform_phrases (line 57) | def transform_phrases(phrases, transforms): function transform_expressions (line 70) | def transform_expressions(expressions, transforms): function has_ordinal_num (line 83) | def has_ordinal_num(phrases): function mask_to_polygons_2 (line 111) | def mask_to_polygons_2(mask): function mask_to_polygons (line 132) | def mask_to_polygons(mask): function close_contour (line 152) | def close_contour(contour): function binary_mask_to_polygon (line 159) | def binary_mask_to_polygon(binary_mask, tolerance=0): function instances_to_annotations (line 185) | def instances_to_annotations(instances, img_id, bbox_mode, instance_mask... function copypaste (line 232) | def copypaste(dataset_dict, dataset_dict_bg, image_format, instance_mask... function maybe_load_annotation_from_file (line 383) | def maybe_load_annotation_from_file(record, meta=None, extra_annotation_... FILE: ape/data/samplers/distributed_sampler_multi_dataset.py class MultiDatasetTrainingSampler (line 17) | class MultiDatasetTrainingSampler(Sampler): method __init__ (line 18) | def __init__(self, repeat_factors, *, shuffle=True, seed=None): method get_repeat_factors (line 32) | def get_repeat_factors( method get_class_balance_factor_per_dataset (line 85) | def get_class_balance_factor_per_dataset(dataset_dicts, l=1.0): method _get_epoch_indices (line 99) | def _get_epoch_indices(self, generator): method __iter__ (line 122) | def __iter__(self): method _infinite_indices (line 126) | def _infinite_indices(self): class InferenceSampler (line 140) | class InferenceSampler(Sampler): method __init__ (line 148) | def __init__(self, size: int): method _get_local_indices (line 160) | def _get_local_indices(total_size, world_size, rank): method __iter__ (line 172) | def __iter__(self): method __len__ (line 175) | def __len__(self): FILE: ape/data/transforms/augmentation_aa.py class AutoAugment (line 5) | class AutoAugment(T.Augmentation): method __init__ (line 6) | def __init__(self, cfg): method __call__ (line 29) | def __call__(self, aug_input) -> Transform: method __repr__ (line 37) | def __repr__(self): FILE: ape/data/transforms/augmentation_lsj.py class LargeScaleJitter (line 5) | class LargeScaleJitter(T.Augmentation): method __init__ (line 6) | def __init__(self, cfg): method __call__ (line 32) | def __call__(self, aug_input) -> Transform: method __repr__ (line 36) | def __repr__(self): FILE: ape/engine/defaults.py function create_fsdp_model (line 37) | def create_fsdp_model(model, *, fp16_compression=False, **kwargs): class DefaultPredictor (line 159) | class DefaultPredictor: method __init__ (line 187) | def __init__(self, cfg): method __call__ (line 203) | def __call__(self, original_image, text_prompt=None, mask_prompt=None): FILE: ape/engine/train_loop.py class SimpleTrainer (line 21) | class SimpleTrainer(TrainerBase): method __init__ (line 40) | def __init__( method run_step (line 83) | def run_step(self): method _data_loader_iter (line 160) | def _data_loader_iter(self): method reset_data_loader (line 166) | def reset_data_loader(self, data_loader_builder): method _write_metrics (line 176) | def _write_metrics( method write_metrics (line 194) | def write_metrics( method state_dict (line 244) | def state_dict(self): method load_state_dict (line 249) | def load_state_dict(self, state_dict): method after_train (line 253) | def after_train(self): method _write_metrics_common (line 257) | def _write_metrics_common( method write_metrics_common (line 274) | def write_metrics_common( class AMPTrainer (line 297) | class AMPTrainer(SimpleTrainer): method __init__ (line 303) | def __init__( method run_step (line 339) | def run_step(self): method state_dict (line 408) | def state_dict(self): method load_state_dict (line 413) | def load_state_dict(self, state_dict): FILE: ape/evaluation/d3_evaluation.py class D3Evaluator (line 34) | class D3Evaluator(DatasetEvaluator): method __init__ (line 47) | def __init__( method reset (line 158) | def reset(self): method process (line 161) | def process(self, inputs, outputs): method evaluate (line 195) | def evaluate(self, img_ids=None): method _tasks_from_predictions (line 229) | def _tasks_from_predictions(self, predictions): method _eval_predictions (line 241) | def _eval_predictions(self, predictions, img_ids=None): method _eval_box_proposals (line 303) | def _eval_box_proposals(self, predictions): method _derive_coco_results (line 342) | def _derive_coco_results(self, coco_eval, iou_type, class_names=None): function instances_to_coco_json (line 441) | def instances_to_coco_json(instances, img_id): function _evaluate_box_proposals (line 505) | def _evaluate_box_proposals(dataset_predictions, coco_api, thresholds=No... function _evaluate_predictions_on_coco (line 616) | def _evaluate_predictions_on_coco( class COCOevalMaxDets (line 683) | class COCOevalMaxDets(COCOeval): method summarize (line 689) | def summarize(self): method __str__ (line 770) | def __str__(self): FILE: ape/evaluation/evaluator.py function inference_on_dataset (line 17) | def inference_on_dataset( FILE: ape/evaluation/instance_evaluation.py class InstanceSegEvaluator (line 35) | class InstanceSegEvaluator(COCOEvaluator): method _eval_predictions (line 48) | def _eval_predictions(self, predictions, img_ids=None): FILE: ape/evaluation/lvis_evaluation.py class LVISEvaluator (line 24) | class LVISEvaluator(DatasetEvaluator): method __init__ (line 30) | def __init__( method reset (line 79) | def reset(self): method process (line 82) | def process(self, inputs, outputs): method evaluate (line 101) | def evaluate(self): method _tasks_from_predictions (line 130) | def _tasks_from_predictions(self, predictions): method _eval_predictions (line 136) | def _eval_predictions(self, predictions): method _eval_box_proposals (line 186) | def _eval_box_proposals(self, predictions): method _derive_lvis_results (line 225) | def _derive_lvis_results(self, lvis_eval, iou_type, class_names=None): function _evaluate_box_proposals (line 293) | def _evaluate_box_proposals(dataset_predictions, lvis_api, thresholds=No... function _evaluate_predictions_on_lvis (line 402) | def _evaluate_predictions_on_lvis( FILE: ape/evaluation/multi_dataset_evaluator.py function get_unified_evaluator (line 24) | def get_unified_evaluator(evaluator_type, dataset_name, cfg, distributed... function map_back_unified_id (line 43) | def map_back_unified_id(results, map_back, reverse_id_mapping=None): function map_back_unified_id_novel_classes (line 54) | def map_back_unified_id_novel_classes(results, map_back, reverse_id_mapp... class UnifiedCOCOEvaluator (line 68) | class UnifiedCOCOEvaluator(COCOEvaluator): method _eval_predictions (line 69) | def _eval_predictions(self, tasks, predictions): class UnifiedCityscapesEvaluator (line 132) | class UnifiedCityscapesEvaluator(COCOEvaluator): method __init__ (line 133) | def __init__(self, unified_label_file, dataset_name, cfg, distributed,... method process (line 160) | def process(self, inputs, outputs): method _eval_predictions (line 183) | def _eval_predictions(self, tasks, predictions): method write_as_cityscapes (line 264) | def write_as_cityscapes( class UnifiedOIDEvaluator (line 324) | class UnifiedOIDEvaluator(OIDEvaluator): method __init__ (line 325) | def __init__(self, unified_label_file, dataset_name, cfg, distributed,... method evaluate (line 335) | def evaluate(self): FILE: ape/evaluation/oideval.py function compute_average_precision (line 31) | def compute_average_precision(precision, recall): class OIDEval (line 79) | class OIDEval: method __init__ (line 80) | def __init__( method _to_mask (line 170) | def _to_mask(self, anns, lvis): method _prepare (line 175) | def _prepare(self): method _prepare_freq_group (line 217) | def _prepare_freq_group(self): method evaluate (line 228) | def evaluate(self): method _get_gt_dt (line 259) | def _get_gt_dt(self, img_id, cat_id): method compute_iou (line 272) | def compute_iou(self, img_id, cat_id): method evaluate_img_google (line 299) | def evaluate_img_google(self, img_id, cat_id, area_rng): method accumulate (line 396) | def accumulate(self): method _summarize (line 495) | def _summarize(self, summary_type, iou_thr=None, area_rng="all", freq_... method summarize (line 522) | def summarize(self): method run (line 546) | def run(self): method print_results (line 552) | def print_results(self): method get_results (line 584) | def get_results(self): class Params (line 590) | class Params: method __init__ (line 591) | def __init__(self, iou_type): class OIDEvaluator (line 623) | class OIDEvaluator(DatasetEvaluator): method __init__ (line 624) | def __init__( method reset (line 673) | def reset(self): method process (line 676) | def process(self, inputs, outputs): method evaluate (line 695) | def evaluate(self): method _tasks_from_predictions (line 724) | def _tasks_from_predictions(self, predictions): method _eval_predictions (line 731) | def _eval_predictions(self, predictions): method _derive_oid_results (line 780) | def _derive_oid_results(self, oid_eval, iou_type, class_names=None): function _evaluate_predictions_on_oid (line 847) | def _evaluate_predictions_on_oid( FILE: ape/evaluation/refcoco_evaluation.py class RefCOCOEvaluator (line 31) | class RefCOCOEvaluator(DatasetEvaluator): method __init__ (line 44) | def __init__( method reset (line 144) | def reset(self): method process (line 147) | def process(self, inputs, outputs): method evaluate (line 167) | def evaluate(self, img_ids=None): method _tasks_from_predictions (line 200) | def _tasks_from_predictions(self, predictions): method _eval_predictions (line 212) | def _eval_predictions(self, predictions, img_ids=None): method _eval_box_proposals (line 270) | def _eval_box_proposals(self, predictions): method _derive_coco_results (line 309) | def _derive_coco_results(self, coco_eval, iou_type, class_names=None): method _derive_refcoco_results (line 377) | def _derive_refcoco_results(self, coco_eval, iou_type): function instances_to_coco_json (line 425) | def instances_to_coco_json(instances, img_id): function _evaluate_box_proposals (line 489) | def _evaluate_box_proposals(dataset_predictions, coco_api, thresholds=No... function _evaluate_predictions_on_coco (line 600) | def _evaluate_predictions_on_coco( class COCOevalMaxDets (line 665) | class COCOevalMaxDets(COCOeval): method summarize (line 671) | def summarize(self): method __str__ (line 752) | def __str__(self): FILE: ape/evaluation/refcocoeval.py function compute_bbox_iou (line 17) | def compute_bbox_iou(boxes1: torch.Tensor, boxes2: torch.Tensor): function compute_mask_iou (line 34) | def compute_mask_iou(outputs: torch.Tensor, labels: torch.Tensor, EPS=1e... class RefCOCOeval (line 42) | class RefCOCOeval: method __init__ (line 92) | def __init__(self, cocoGt=None, cocoDt=None, iouType="segm"): method _prepare (line 121) | def _prepare(self): method evaluate (line 160) | def evaluate(self): method computeIoU (line 201) | def computeIoU(self, imgId, catId): method evaluateImg (line 252) | def evaluateImg(self, imgId, catId, aRng, maxDet): method accumulate (line 336) | def accumulate(self, p=None): method summarize (line 444) | def summarize(self): method __str__ (line 524) | def __str__(self): class Params (line 528) | class Params: method setDetParams (line 533) | def setDetParams(self): method setKpParams (line 549) | def setKpParams(self): method __init__ (line 584) | def __init__(self, iouType="segm"): FILE: ape/layers/csrc/MsDeformAttn/ms_deform_attn.h function namespace (line 19) | namespace ape { FILE: ape/layers/csrc/MsDeformAttn/ms_deform_attn_cpu.cpp type ape (line 15) | namespace ape { function ms_deform_attn_cpu_forward (line 17) | at::Tensor function ms_deform_attn_cpu_backward (line 29) | std::vector FILE: ape/layers/csrc/MsDeformAttn/ms_deform_attn_cpu.h function namespace (line 14) | namespace ape { FILE: ape/layers/csrc/MsDeformAttn/ms_deform_attn_cuda.h function namespace (line 14) | namespace ape { FILE: ape/layers/csrc/vision.cpp type ape (line 6) | namespace ape { function get_cuda_version (line 12) | std::string get_cuda_version() { function has_cuda (line 37) | bool has_cuda() { function get_compiler_version (line 47) | std::string get_compiler_version() { function PYBIND11_MODULE (line 73) | PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) { function TORCH_LIBRARY (line 76) | TORCH_LIBRARY(ape, m) { FILE: ape/layers/fuse_helper.py class BiMultiHeadAttention (line 8) | class BiMultiHeadAttention(nn.Module): method __init__ (line 9) | def __init__( method _shape (line 50) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method _reset_parameters (line 53) | def _reset_parameters(self): method forward (line 67) | def forward(self, v, l, attention_mask_v=None, attention_mask_l=None): method extra_repr (line 168) | def extra_repr(self): class BiAttentionBlock (line 178) | class BiAttentionBlock(nn.Module): method __init__ (line 179) | def __init__( method forward (line 221) | def forward(self, v, l, attention_mask_v=None, attention_mask_l=None): FILE: ape/layers/multi_scale_deform_attn.py function _is_power_of_2 (line 26) | def _is_power_of_2(n): class MultiScaleDeformableAttnFunction (line 32) | class MultiScaleDeformableAttnFunction(Function): method forward (line 34) | def forward( method backward (line 63) | def backward(ctx, grad_output): function multi_scale_deformable_attn_pytorch (line 84) | def multi_scale_deformable_attn_pytorch( class MultiScaleDeformableAttention (line 127) | class MultiScaleDeformableAttention(nn.Module): method __init__ (line 145) | def __init__( method init_weights (line 190) | def init_weights(self): method forward (line 215) | def forward( function create_dummy_class (line 361) | def create_dummy_class(klass, dependency, message=""): function create_dummy_func (line 390) | def create_dummy_func(func, dependency, message=""): FILE: ape/layers/vision_language_align.py class VisionLanguageAlign (line 8) | class VisionLanguageAlign(nn.Module): method __init__ (line 9) | def __init__( method forward (line 27) | def forward(self, x, embedding): class StillClassifier (line 55) | class StillClassifier(nn.Module): method __init__ (line 56) | def __init__(self, hidden_dim): method forward (line 60) | def forward(self, x, lang_feat=None): FILE: ape/layers/vision_language_fusion.py class VisionLanguageFusion (line 7) | class VisionLanguageFusion(torch.nn.Module): method __init__ (line 12) | def __init__( method forward (line 46) | def forward(self, v, l, attention_mask_v=None, attention_mask_l=None): method extra_repr (line 52) | def extra_repr(self): FILE: ape/layers/zero_shot_fc.py class ZeroShotFC (line 12) | class ZeroShotFC(nn.Module): method __init__ (line 13) | def __init__( method forward (line 96) | def forward(self, x, classifier=None): method set_predictor (line 134) | def set_predictor(self, param_or_path): method extra_repr (line 153) | def extra_repr(self): FILE: ape/model_zoo/model_zoo.py class _ModelZooUrls (line 13) | class _ModelZooUrls(object): method query (line 100) | def query(config_path: str) -> Optional[str]: function get_checkpoint_url (line 112) | def get_checkpoint_url(config_path): function get_config_file (line 129) | def get_config_file(config_path): function get_config (line 148) | def get_config(config_path, trained: bool = False): function get (line 181) | def get(config_path, trained: bool = False, device: Optional[str] = None): FILE: ape/modeling/ape_deta/ape_deta.py class SomeThing (line 20) | class SomeThing(nn.Module): method __init__ (line 21) | def __init__( method forward (line 35) | def forward(self, batched_inputs, do_postprocess=True): method set_eval_dataset (line 39) | def set_eval_dataset(self, dataset_name): FILE: ape/modeling/ape_deta/assigner.py function nonzero_tuple (line 10) | def nonzero_tuple(x): class Matcher (line 23) | class Matcher(object): method __init__ (line 39) | def __init__( method __call__ (line 76) | def __call__(self, match_quality_matrix): method set_low_quality_matches_ (line 115) | def set_low_quality_matches_(self, match_labels, match_quality_matrix): function subsample_labels (line 132) | def subsample_labels( function sample_topk_per_gt (line 177) | def sample_topk_per_gt(pr_inds, gt_inds, iou, k): class Stage2Assigner (line 189) | class Stage2Assigner(nn.Module): method __init__ (line 190) | def __init__(self, num_queries, num_classes, max_k=4): method _sample_proposals (line 200) | def _sample_proposals( method forward (line 235) | def forward(self, outputs, targets, return_cost_matrix=False): method postprocess_indices (line 273) | def postprocess_indices(self, pr_inds, gt_inds, iou): method __repr__ (line 276) | def __repr__(self, _repr_indent=8): class Stage1Assigner (line 287) | class Stage1Assigner(nn.Module): method __init__ (line 288) | def __init__(self, t_low=0.3, t_high=0.7, max_k=4): method _subsample_labels (line 299) | def _subsample_labels(self, label): method forward (line 316) | def forward(self, outputs, targets, return_cost_matrix=False): method postprocess_indices (line 353) | def postprocess_indices(self, pr_inds, gt_inds, iou): method __repr__ (line 356) | def __repr__(self, _repr_indent=8): FILE: ape/modeling/ape_deta/deformable_criterion.py function sigmoid_ce_loss (line 23) | def sigmoid_ce_loss( function calculate_uncertainty (line 43) | def calculate_uncertainty(logits): class DeformableCriterion (line 60) | class DeformableCriterion(SetCriterion): method __init__ (line 65) | def __init__( method get_fed_loss_classes (line 159) | def get_fed_loss_classes(self, gt_classes, num_fed_loss_classes, num_c... method loss_labels (line 187) | def loss_labels(self, outputs, targets, indices, num_boxes): method loss_anchor_ious (line 278) | def loss_anchor_ious(self, outputs, targets, indices, num_boxes): method loss_pred_ious (line 293) | def loss_pred_ious(self, outputs, targets, indices, num_boxes): method loss_boxes (line 315) | def loss_boxes(self, outputs, targets, indices, num_boxes): method loss_boxes_panoptic (line 340) | def loss_boxes_panoptic(self, outputs, targets, indices, num_boxes): method loss_masks (line 375) | def loss_masks(self, outputs, targets, indices, num_boxes): method loss_masks_maskdino (line 424) | def loss_masks_maskdino(self, outputs, targets, indices, num_boxes): method get_loss (line 492) | def get_loss(self, loss, outputs, targets, indices, num_boxes, **kwargs): method forward (line 505) | def forward(self, outputs, targets): method __repr__ (line 591) | def __repr__(self): FILE: ape/modeling/ape_deta/deformable_detr.py class DeformableDETR (line 22) | class DeformableDETR(nn.Module): method __init__ (line 52) | def __init__( method device (line 299) | def device(self): method _move_to_current_device (line 302) | def _move_to_current_device(self, x): method forward (line 305) | def forward(self, batched_inputs, do_postprocess=True): method _set_aux_loss (line 405) | def _set_aux_loss(self, outputs_class, outputs_coord): method inference (line 411) | def inference(self, box_cls, box_pred, image_sizes): method prepare_targets (line 487) | def prepare_targets(self, targets): method preprocess_image (line 498) | def preprocess_image(self, batched_inputs): method _postprocess (line 510) | def _postprocess(instances, batched_inputs: List[Dict[str, torch.Tenso... method set_eval_dataset (line 524) | def set_eval_dataset(self, dataset_name): class NMSPostProcess (line 552) | class NMSPostProcess(nn.Module): method forward (line 556) | def forward(self, outputs, target_sizes, select_box_nums_for_evaluation): FILE: ape/modeling/ape_deta/deformable_detr_segm.py class DeformableDETRSegm (line 32) | class DeformableDETRSegm(DeformableDETR): method __init__ (line 62) | def __init__( method forward (line 165) | def forward(self, batched_inputs, do_postprocess=True): method maskdino_mask_features (line 670) | def maskdino_mask_features(self, encode_feats, multi_level_feats, mult... method _set_aux_loss (line 695) | def _set_aux_loss(self, outputs_class, outputs_coord, outputs_mask): method inference (line 701) | def inference(self, box_cls, box_pred, image_sizes, use_sigmoid=True): method prepare_targets (line 780) | def prepare_targets(self, targets): method preprocess_image (line 814) | def preprocess_image(self, batched_inputs): method _postprocess_instance (line 826) | def _postprocess_instance( method _postprocess_semantic (line 843) | def _postprocess_semantic( method _postprocess_panoptic (line 874) | def _postprocess_panoptic( method visualize_training (line 954) | def visualize_training( method visualize_inference_panoptic (line 1105) | def visualize_inference_panoptic(self, batched_inputs, results, datase... method visualize_training_enc_output (line 1165) | def visualize_training_enc_output(self, batched_inputs, output, images... method visualize_training_enc_output_nonms (line 1222) | def visualize_training_enc_output_nonms( method visualize_training_init_reference (line 1298) | def visualize_training_init_reference( method visualize_training_enc_output_pos (line 1362) | def visualize_training_enc_output_pos( method visualize_training_init_reference_pos (line 1439) | def visualize_training_init_reference_pos( method set_model_language (line 1510) | def set_model_language(self, model_language): class NMSPostProcess (line 1514) | class NMSPostProcess(nn.Module): method forward (line 1518) | def forward(self, outputs, target_sizes, select_box_nums_for_evaluation): function is_thing_stuff_overlap (line 1573) | def is_thing_stuff_overlap(metadata): function get_text_list (line 1587) | def get_text_list(metadata, dataset_entity): function get_stuff_score (line 1609) | def get_stuff_score(box_cls, metadata, dataset_entity): FILE: ape/modeling/ape_deta/deformable_detr_segm_vl.py class DeformableDETRSegmVL (line 33) | class DeformableDETRSegmVL(DeformableDETR): method __init__ (line 63) | def __init__( method forward (line 166) | def forward(self, batched_inputs, do_postprocess=True): method maskdino_mask_features (line 728) | def maskdino_mask_features(self, encode_feats, multi_level_feats, mult... method _set_aux_loss (line 753) | def _set_aux_loss(self, outputs_class, outputs_coord, outputs_mask): method inference (line 759) | def inference(self, box_cls, box_pred, image_sizes, use_sigmoid=True): method prepare_targets (line 812) | def prepare_targets(self, targets): method preprocess_image (line 846) | def preprocess_image(self, batched_inputs): method _postprocess_instance (line 858) | def _postprocess_instance( method _postprocess_semantic (line 875) | def _postprocess_semantic( method _postprocess_panoptic (line 921) | def _postprocess_panoptic( method visualize_training (line 1001) | def visualize_training( method visualize_training_enc_output (line 1154) | def visualize_training_enc_output(self, batched_inputs, output, images... method set_model_language (line 1211) | def set_model_language(self, model_language): function is_thing_stuff_overlap (line 1215) | def is_thing_stuff_overlap(metadata): function get_text_list (line 1229) | def get_text_list(metadata, dataset_entity): function get_stuff_score (line 1251) | def get_stuff_score(box_cls, metadata, dataset_entity): FILE: ape/modeling/ape_deta/deformable_transformer.py class DeformableDetrTransformerEncoder (line 19) | class DeformableDetrTransformerEncoder(TransformerLayerSequence): method __init__ (line 20) | def __init__( method forward (line 65) | def forward( class DeformableDetrTransformerDecoder (line 109) | class DeformableDetrTransformerDecoder(TransformerLayerSequence): method __init__ (line 110) | def __init__( method forward (line 159) | def forward( class DeformableDetrTransformer (line 238) | class DeformableDetrTransformer(nn.Module): method __init__ (line 250) | def __init__( method init_weights (line 289) | def init_weights(self): method gen_encoder_output_proposals (line 301) | def gen_encoder_output_proposals(self, memory, memory_padding_mask, sp... method get_reference_points (line 344) | def get_reference_points(spatial_shapes, valid_ratios, device): method get_valid_ratio (line 374) | def get_valid_ratio(self, mask): method get_proposal_pos_embed (line 384) | def get_proposal_pos_embed(self, proposals, num_pos_feats=128, tempera... method forward (line 394) | def forward( FILE: ape/modeling/ape_deta/deformable_transformer_vl.py class DeformableDetrTransformerEncoderVL (line 20) | class DeformableDetrTransformerEncoderVL(TransformerLayerSequence): method __init__ (line 21) | def __init__( method forward (line 69) | def forward( class DeformableDetrTransformerDecoderVL (line 124) | class DeformableDetrTransformerDecoderVL(TransformerLayerSequence): method __init__ (line 125) | def __init__( method forward (line 177) | def forward( class DeformableDetrTransformerVL (line 258) | class DeformableDetrTransformerVL(nn.Module): method __init__ (line 270) | def __init__( method init_weights (line 309) | def init_weights(self): method gen_encoder_output_proposals (line 321) | def gen_encoder_output_proposals( method get_reference_points (line 372) | def get_reference_points(spatial_shapes, valid_ratios, device): method get_valid_ratio (line 402) | def get_valid_ratio(self, mask): method get_proposal_pos_embed (line 412) | def get_proposal_pos_embed(self, proposals, num_pos_feats=128, tempera... method forward (line 422) | def forward( FILE: ape/modeling/ape_deta/fast_rcnn.py function fast_rcnn_inference (line 40) | def fast_rcnn_inference( function fast_rcnn_inference_single_image (line 97) | def fast_rcnn_inference_single_image( FILE: ape/modeling/ape_deta/misc.py class SmoothedValue (line 26) | class SmoothedValue(object): method __init__ (line 31) | def __init__(self, window_size=20, fmt=None): method update (line 39) | def update(self, value, n=1): method synchronize_between_processes (line 44) | def synchronize_between_processes(self): method median (line 58) | def median(self): method avg (line 63) | def avg(self): method global_avg (line 68) | def global_avg(self): method max (line 72) | def max(self): method value (line 76) | def value(self): method __str__ (line 79) | def __str__(self): function all_gather (line 89) | def all_gather(data): function reduce_dict (line 127) | def reduce_dict(input_dict, average=True): class MetricLogger (line 153) | class MetricLogger(object): method __init__ (line 154) | def __init__(self, delimiter="\t"): method update (line 158) | def update(self, **kwargs): method __getattr__ (line 165) | def __getattr__(self, attr): method __str__ (line 172) | def __str__(self): method synchronize_between_processes (line 178) | def synchronize_between_processes(self): method add_meter (line 182) | def add_meter(self, name, meter): method log_every (line 185) | def log_every(self, iterable, print_freq, header=None): function get_sha (line 259) | def get_sha(): function collate_fn (line 280) | def collate_fn(batch): function _max_by_axis (line 286) | def _max_by_axis(the_list): class NestedTensor (line 294) | class NestedTensor(object): method __init__ (line 295) | def __init__(self, tensors, mask: Optional[Tensor]): method to (line 299) | def to(self, device): method decompose (line 309) | def decompose(self): method __repr__ (line 312) | def __repr__(self): function nested_tensor_from_tensor_list (line 316) | def nested_tensor_from_tensor_list(tensor_list: List[Tensor]): function _onnx_nested_tensor_from_tensor_list (line 337) | def _onnx_nested_tensor_from_tensor_list(tensor_list: List[Tensor]) -> N... function setup_for_distributed (line 363) | def setup_for_distributed(is_master): function is_dist_avail_and_initialized (line 379) | def is_dist_avail_and_initialized(): function get_world_size (line 387) | def get_world_size(): function get_rank (line 393) | def get_rank(): function is_main_process (line 399) | def is_main_process(): function save_on_master (line 403) | def save_on_master(*args, **kwargs): function init_distributed_mode (line 408) | def init_distributed_mode(args): function accuracy (line 437) | def accuracy(output, target, topk=(1,)): function interpolate (line 455) | def interpolate(input, size=None, scale_factor=None, mode="nearest", ali... FILE: ape/modeling/ape_deta/segmentation.py class DETRsegm (line 20) | class DETRsegm(nn.Module): method __init__ (line 21) | def __init__(self, detr, freeze_detr=False): method forward (line 33) | def forward(self, samples): class MaskHeadSmallConv (line 66) | class MaskHeadSmallConv(nn.Module): method __init__ (line 72) | def __init__(self, dim, fpn_dims, context_dim): method forward (line 106) | def forward(self, x, bbox_mask, fpns): class MHAttentionMap (line 147) | class MHAttentionMap(nn.Module): method __init__ (line 150) | def __init__(self, query_dim, hidden_dim, num_heads, dropout=0, bias=T... method forward (line 165) | def forward(self, q, k, mask=None): function dice_loss (line 181) | def dice_loss(inputs, targets, num_boxes): function sigmoid_focal_loss (line 199) | def sigmoid_focal_loss(inputs, targets, num_boxes, alpha: float = 0.25, ... class PostProcessSegm (line 227) | class PostProcessSegm(nn.Module): method __init__ (line 228) | def __init__(self, threshold=0.5): method forward (line 233) | def forward(self, results, outputs, orig_target_sizes, max_target_sizes): class PostProcessPanoptic (line 254) | class PostProcessPanoptic(nn.Module): method __init__ (line 258) | def __init__(self, is_thing_map, threshold=0.85): method forward (line 269) | def forward(self, outputs, processed_sizes, target_sizes=None): FILE: ape/modeling/backbone/utils_eva.py function window_partition (line 18) | def window_partition(x, window_size): function window_unpartition (line 42) | def window_unpartition(windows, window_size, pad_hw, hw): function get_rel_pos (line 65) | def get_rel_pos(q_size, k_size, rel_pos, interp_type): function add_decomposed_rel_pos (line 132) | def add_decomposed_rel_pos(attn, q, rel_pos_h, rel_pos_w, q_size, k_size... function get_abs_pos (line 164) | def get_abs_pos(abs_pos, has_cls_token, hw): class PatchEmbed (line 196) | class PatchEmbed(nn.Module): method __init__ (line 201) | def __init__( method forward (line 218) | def forward(self, x): FILE: ape/modeling/backbone/utils_eva02.py function window_partition (line 19) | def window_partition(x, window_size): function window_unpartition (line 43) | def window_unpartition(windows, window_size, pad_hw, hw): function get_rel_pos (line 66) | def get_rel_pos(q_size, k_size, rel_pos): function add_decomposed_rel_pos (line 126) | def add_decomposed_rel_pos(attn, q, rel_pos_h, rel_pos_w, q_size, k_size): function get_abs_pos (line 158) | def get_abs_pos(abs_pos, has_cls_token, hw): class PatchEmbed (line 190) | class PatchEmbed(nn.Module): method __init__ (line 195) | def __init__( method forward (line 212) | def forward(self, x): function broadcat (line 230) | def broadcat(tensors, dim = -1): function rotate_half (line 248) | def rotate_half(x): class VisionRotaryEmbedding (line 256) | class VisionRotaryEmbedding(nn.Module): method __init__ (line 257) | def __init__( method forward (line 296) | def forward(self, t, start_index = 0): class VisionRotaryEmbeddingFast (line 307) | class VisionRotaryEmbeddingFast(nn.Module): method __init__ (line 308) | def __init__( method forward (line 346) | def forward(self, t): return t * self.freqs_cos + rotate_half(t) * se... FILE: ape/modeling/backbone/vit.py function get_vit_lr_decay_rate (line 8) | def get_vit_lr_decay_rate(name, lr_decay_rate=1.0, num_layers=12): FILE: ape/modeling/backbone/vit_eva.py class LayerNormWithForceFP32 (line 37) | class LayerNormWithForceFP32(nn.Module): method __init__ (line 43) | def __init__(self, normalized_shape: _shape_t, eps: float = 1e-5, elem... method reset_parameters (line 58) | def reset_parameters(self) -> None: method forward (line 63) | def forward(self, input: Tensor) -> Tensor: method extra_repr (line 67) | def extra_repr(self) -> Tensor: class Attention (line 72) | class Attention(nn.Module): method __init__ (line 75) | def __init__( method forward (line 121) | def forward(self, x): class ResBottleneckBlock (line 149) | class ResBottleneckBlock(CNNBlockBase): method __init__ (line 155) | def __init__( method forward (line 201) | def forward(self, x): class Block (line 210) | class Block(nn.Module): method __init__ (line 213) | def __init__( method forward (line 285) | def forward(self, x): class ViT (line 311) | class ViT(Backbone): method __init__ (line 318) | def __init__( method _freeze_stages (line 434) | def _freeze_stages(self): method _init_weights (line 452) | def _init_weights(self, m): method forward (line 465) | def forward(self, x): class SimpleFeaturePyramid (line 479) | class SimpleFeaturePyramid(Backbone): method __init__ (line 485) | def __init__( method padding_constraints (line 587) | def padding_constraints(self): method forward (line 593) | def forward(self, x): function get_vit_lr_decay_rate (line 622) | def get_vit_lr_decay_rate(name, lr_decay_rate=1.0, num_layers=12): FILE: ape/modeling/backbone/vit_eva02.py class xops_SwiGLU (line 43) | class xops_SwiGLU(nn.Module): method __init__ (line 49) | def __init__( method forward (line 84) | def forward(self, x: torch.Tensor) -> torch.Tensor: method _ordered_params (line 109) | def _ordered_params( method _packed_ordered_params (line 151) | def _packed_ordered_params( class SwiGLU (line 179) | class SwiGLU(nn.Module): method __init__ (line 180) | def __init__(self, in_features, hidden_features=None, out_features=Non... method forward (line 196) | def forward(self, x): class Attention (line 206) | class Attention(nn.Module): method __init__ (line 207) | def __init__( method forward (line 245) | def forward(self, x): class ResBottleneckBlock (line 294) | class ResBottleneckBlock(CNNBlockBase): method __init__ (line 300) | def __init__( method forward (line 346) | def forward(self, x): class Block (line 355) | class Block(nn.Module): method __init__ (line 358) | def __init__( method forward (line 437) | def forward(self, x): class ViT (line 461) | class ViT(Backbone): method __init__ (line 468) | def __init__( method _freeze_stages (line 595) | def _freeze_stages(self): method _init_weights (line 614) | def _init_weights(self, m): method forward (line 623) | def forward(self, x): class SimpleFeaturePyramid (line 637) | class SimpleFeaturePyramid(Backbone): method __init__ (line 643) | def __init__( method padding_constraints (line 745) | def padding_constraints(self): method forward (line 751) | def forward(self, x): function get_vit_lr_decay_rate (line 780) | def get_vit_lr_decay_rate(name, lr_decay_rate=1.0, num_layers=12): FILE: ape/modeling/backbone/vit_eva_clip.py class LayerNorm (line 29) | class LayerNorm(nn.LayerNorm): method forward (line 32) | def forward(self, x: torch.Tensor): class DropPath (line 53) | class DropPath(nn.Module): method __init__ (line 56) | def __init__(self, drop_prob=None): method forward (line 60) | def forward(self, x): method extra_repr (line 63) | def extra_repr(self) -> str: class Mlp (line 67) | class Mlp(nn.Module): method __init__ (line 68) | def __init__( method forward (line 89) | def forward(self, x): class SwiGLU (line 101) | class SwiGLU(nn.Module): method __init__ (line 102) | def __init__( method forward (line 125) | def forward(self, x): class Attention (line 135) | class Attention(nn.Module): method __init__ (line 136) | def __init__( method forward (line 218) | def forward(self, x, rel_pos_bias=None, attn_mask=None): class ResBottleneckBlock (line 322) | class ResBottleneckBlock(CNNBlockBase): method __init__ (line 328) | def __init__( method forward (line 374) | def forward(self, x): class Block (line 383) | class Block(nn.Module): method __init__ (line 386) | def __init__( method forward (line 484) | def forward(self, x, rel_pos_bias=None, attn_mask=None): class ViT (line 570) | class ViT(Backbone): method __init__ (line 577) | def __init__( method _freeze_stages (line 715) | def _freeze_stages(self): method _init_weights (line 734) | def _init_weights(self, m): method forward (line 743) | def forward(self, x): class SimpleFeaturePyramid (line 757) | class SimpleFeaturePyramid(Backbone): method __init__ (line 763) | def __init__( method padding_constraints (line 865) | def padding_constraints(self): method forward (line 871) | def forward(self, x): function get_vit_lr_decay_rate (line 925) | def get_vit_lr_decay_rate(name, lr_decay_rate=1.0, num_layers=12): FILE: ape/modeling/deta/assigner.py function nonzero_tuple (line 9) | def nonzero_tuple(x): class Matcher (line 22) | class Matcher(object): method __init__ (line 38) | def __init__( method __call__ (line 75) | def __call__(self, match_quality_matrix): method set_low_quality_matches_ (line 114) | def set_low_quality_matches_(self, match_labels, match_quality_matrix): function subsample_labels (line 131) | def subsample_labels( function sample_topk_per_gt (line 176) | def sample_topk_per_gt(pr_inds, gt_inds, iou, k): class Stage2Assigner (line 188) | class Stage2Assigner(nn.Module): method __init__ (line 189) | def __init__(self, num_queries, num_classes, max_k=4): method _sample_proposals (line 199) | def _sample_proposals( method forward (line 234) | def forward(self, outputs, targets, return_cost_matrix=False): method postprocess_indices (line 271) | def postprocess_indices(self, pr_inds, gt_inds, iou): method __repr__ (line 274) | def __repr__(self, _repr_indent=8): class Stage1Assigner (line 285) | class Stage1Assigner(nn.Module): method __init__ (line 286) | def __init__(self, t_low=0.3, t_high=0.7, max_k=4): method _subsample_labels (line 297) | def _subsample_labels(self, label): method forward (line 314) | def forward(self, outputs, targets): method postprocess_indices (line 347) | def postprocess_indices(self, pr_inds, gt_inds, iou): method __repr__ (line 350) | def __repr__(self, _repr_indent=8): FILE: ape/modeling/deta/deformable_criterion.py function sigmoid_ce_loss (line 23) | def sigmoid_ce_loss( function calculate_uncertainty (line 43) | def calculate_uncertainty(logits): class DeformableCriterion (line 60) | class DeformableCriterion(SetCriterion): method __init__ (line 65) | def __init__( method get_fed_loss_classes (line 155) | def get_fed_loss_classes(self, gt_classes, num_fed_loss_classes, num_c... method loss_labels (line 183) | def loss_labels(self, outputs, targets, indices, num_boxes): method loss_boxes (line 267) | def loss_boxes(self, outputs, targets, indices, num_boxes): method loss_boxes_panoptic (line 292) | def loss_boxes_panoptic(self, outputs, targets, indices, num_boxes): method loss_masks (line 327) | def loss_masks(self, outputs, targets, indices, num_boxes): method loss_masks_maskdino (line 366) | def loss_masks_maskdino(self, outputs, targets, indices, num_boxes): method get_loss (line 432) | def get_loss(self, loss, outputs, targets, indices, num_boxes, **kwargs): method forward (line 443) | def forward(self, outputs, targets): method __repr__ (line 515) | def __repr__(self): FILE: ape/modeling/deta/deformable_detr.py class DeformableDETR (line 18) | class DeformableDETR(nn.Module): method __init__ (line 48) | def __init__( method device (line 176) | def device(self): method _move_to_current_device (line 179) | def _move_to_current_device(self, x): method forward (line 182) | def forward(self, batched_inputs, do_postprocess=True): method _set_aux_loss (line 279) | def _set_aux_loss(self, outputs_class, outputs_coord): method inference (line 285) | def inference(self, box_cls, box_pred, image_sizes): method prepare_targets (line 361) | def prepare_targets(self, targets): method preprocess_image (line 372) | def preprocess_image(self, batched_inputs): method _postprocess (line 384) | def _postprocess(instances, batched_inputs: List[Dict[str, torch.Tenso... class NMSPostProcess (line 399) | class NMSPostProcess(nn.Module): method forward (line 403) | def forward(self, outputs, target_sizes, select_box_nums_for_evaluation): FILE: ape/modeling/deta/deformable_detr_segm.py class DeformableDETRSegm (line 30) | class DeformableDETRSegm(DeformableDETR): method __init__ (line 60) | def __init__( method forward (line 139) | def forward(self, batched_inputs, do_postprocess=True): method maskdino_mask_features (line 411) | def maskdino_mask_features(self, encode_feats, multi_level_feats, mult... method _set_aux_loss (line 436) | def _set_aux_loss(self, outputs_class, outputs_coord, outputs_mask): method inference (line 442) | def inference(self, box_cls, box_pred, image_sizes): method prepare_targets (line 511) | def prepare_targets(self, targets): method preprocess_image (line 545) | def preprocess_image(self, batched_inputs): method _postprocess_instance (line 557) | def _postprocess_instance( method _postprocess_semantic (line 574) | def _postprocess_semantic( method _postprocess_panoptic (line 602) | def _postprocess_panoptic( method visualize_training (line 686) | def visualize_training(self, batched_inputs, output, images): method visualize_inference_panoptic (line 809) | def visualize_inference_panoptic(self, batched_inputs, results): class NMSPostProcess (line 869) | class NMSPostProcess(nn.Module): method forward (line 873) | def forward(self, outputs, target_sizes, select_box_nums_for_evaluation): function is_thing_stuff_overlap (line 929) | def is_thing_stuff_overlap(metadata): FILE: ape/modeling/deta/deformable_transformer.py class DeformableDetrTransformerEncoder (line 18) | class DeformableDetrTransformerEncoder(TransformerLayerSequence): method __init__ (line 19) | def __init__( method forward (line 59) | def forward( class DeformableDetrTransformerDecoder (line 89) | class DeformableDetrTransformerDecoder(TransformerLayerSequence): method __init__ (line 90) | def __init__( method forward (line 134) | def forward( class DeformableDetrTransformer (line 197) | class DeformableDetrTransformer(nn.Module): method __init__ (line 209) | def __init__( method init_weights (line 242) | def init_weights(self): method gen_encoder_output_proposals (line 254) | def gen_encoder_output_proposals(self, memory, memory_padding_mask, sp... method get_reference_points (line 297) | def get_reference_points(spatial_shapes, valid_ratios, device): method get_valid_ratio (line 327) | def get_valid_ratio(self, mask): method get_proposal_pos_embed (line 337) | def get_proposal_pos_embed(self, proposals, num_pos_feats=128, tempera... method forward (line 347) | def forward( FILE: ape/modeling/deta/misc.py class SmoothedValue (line 26) | class SmoothedValue(object): method __init__ (line 31) | def __init__(self, window_size=20, fmt=None): method update (line 39) | def update(self, value, n=1): method synchronize_between_processes (line 44) | def synchronize_between_processes(self): method median (line 58) | def median(self): method avg (line 63) | def avg(self): method global_avg (line 68) | def global_avg(self): method max (line 72) | def max(self): method value (line 76) | def value(self): method __str__ (line 79) | def __str__(self): function all_gather (line 89) | def all_gather(data): function reduce_dict (line 127) | def reduce_dict(input_dict, average=True): class MetricLogger (line 153) | class MetricLogger(object): method __init__ (line 154) | def __init__(self, delimiter="\t"): method update (line 158) | def update(self, **kwargs): method __getattr__ (line 165) | def __getattr__(self, attr): method __str__ (line 172) | def __str__(self): method synchronize_between_processes (line 178) | def synchronize_between_processes(self): method add_meter (line 182) | def add_meter(self, name, meter): method log_every (line 185) | def log_every(self, iterable, print_freq, header=None): function get_sha (line 259) | def get_sha(): function collate_fn (line 280) | def collate_fn(batch): function _max_by_axis (line 286) | def _max_by_axis(the_list): class NestedTensor (line 294) | class NestedTensor(object): method __init__ (line 295) | def __init__(self, tensors, mask: Optional[Tensor]): method to (line 299) | def to(self, device): method decompose (line 309) | def decompose(self): method __repr__ (line 312) | def __repr__(self): function nested_tensor_from_tensor_list (line 316) | def nested_tensor_from_tensor_list(tensor_list: List[Tensor]): function _onnx_nested_tensor_from_tensor_list (line 337) | def _onnx_nested_tensor_from_tensor_list(tensor_list: List[Tensor]) -> N... function setup_for_distributed (line 363) | def setup_for_distributed(is_master): function is_dist_avail_and_initialized (line 379) | def is_dist_avail_and_initialized(): function get_world_size (line 387) | def get_world_size(): function get_rank (line 393) | def get_rank(): function is_main_process (line 399) | def is_main_process(): function save_on_master (line 403) | def save_on_master(*args, **kwargs): function init_distributed_mode (line 408) | def init_distributed_mode(args): function accuracy (line 437) | def accuracy(output, target, topk=(1,)): function interpolate (line 455) | def interpolate(input, size=None, scale_factor=None, mode="nearest", ali... FILE: ape/modeling/deta/segmentation.py class DETRsegm (line 20) | class DETRsegm(nn.Module): method __init__ (line 21) | def __init__(self, detr, freeze_detr=False): method forward (line 33) | def forward(self, samples): class MaskHeadSmallConv (line 66) | class MaskHeadSmallConv(nn.Module): method __init__ (line 72) | def __init__(self, dim, fpn_dims, context_dim): method forward (line 106) | def forward(self, x, bbox_mask, fpns): class MHAttentionMap (line 147) | class MHAttentionMap(nn.Module): method __init__ (line 150) | def __init__(self, query_dim, hidden_dim, num_heads, dropout=0, bias=T... method forward (line 165) | def forward(self, q, k, mask=None): function dice_loss (line 181) | def dice_loss(inputs, targets, num_boxes): function sigmoid_focal_loss (line 199) | def sigmoid_focal_loss(inputs, targets, num_boxes, alpha: float = 0.25, ... class PostProcessSegm (line 227) | class PostProcessSegm(nn.Module): method __init__ (line 228) | def __init__(self, threshold=0.5): method forward (line 233) | def forward(self, results, outputs, orig_target_sizes, max_target_sizes): class PostProcessPanoptic (line 254) | class PostProcessPanoptic(nn.Module): method __init__ (line 258) | def __init__(self, is_thing_map, threshold=0.85): method forward (line 269) | def forward(self, outputs, processed_sizes, target_sizes=None): FILE: ape/modeling/text/bert_wrapper.py class Bert (line 16) | class Bert(nn.Module): method __init__ (line 17) | def __init__( method device (line 48) | def device(self): method forward_text (line 53) | def forward_text(self, text_list, cache=False): FILE: ape/modeling/text/clip_wrapper.py class LayerNorm (line 15) | class LayerNorm(nn.LayerNorm): method forward (line 18) | def forward(self, x: torch.Tensor): class QuickGELU (line 24) | class QuickGELU(nn.Module): method forward (line 25) | def forward(self, x: torch.Tensor): class ResidualAttentionBlock (line 29) | class ResidualAttentionBlock(nn.Module): method __init__ (line 30) | def __init__(self, d_model: int, n_head: int, attn_mask: torch.Tensor ... method attention (line 47) | def attention(self, x: torch.Tensor): method forward (line 55) | def forward(self, x: torch.Tensor): class Transformer (line 61) | class Transformer(nn.Module): method __init__ (line 62) | def __init__(self, width: int, layers: int, heads: int, attn_mask: tor... method forward (line 70) | def forward(self, x: torch.Tensor): class CLIPTEXT (line 74) | class CLIPTEXT(nn.Module): method __init__ (line 75) | def __init__( method initialize_parameters (line 107) | def initialize_parameters(self): method build_attention_mask (line 123) | def build_attention_mask(self): method device (line 130) | def device(self): method dtype (line 134) | def dtype(self): method tokenize (line 137) | def tokenize(self, texts: Union[str, List[str]], context_length: int =... method encode_text (line 155) | def encode_text(self, text): method forward (line 165) | def forward(self, captions): function build_clip_text_encoder (line 174) | def build_clip_text_encoder(model_path, pretrain=True): function get_clip_embeddings (line 215) | def get_clip_embeddings(text_model, vocabulary, prompt="a "): FILE: ape/modeling/text/clip_wrapper_eva01.py class EVA01CLIP (line 10) | class EVA01CLIP(nn.Module): method __init__ (line 11) | def __init__( method device (line 41) | def device(self): method infer_image (line 44) | def infer_image(self, features): method encode_text (line 51) | def encode_text(self, text_list, cache=False): method forward_text (line 85) | def forward_text(self, text_list, cache=False): method custom_encode_text (line 129) | def custom_encode_text(self, text, m): FILE: ape/modeling/text/clip_wrapper_eva02.py class EVA02CLIP (line 8) | class EVA02CLIP(nn.Module): method __init__ (line 9) | def __init__( method device (line 44) | def device(self): method infer_image (line 47) | def infer_image(self, features): method encode_text (line 54) | def encode_text(self, text_list, cache=False): method forward_text (line 88) | def forward_text(self, text_list, cache=False): method custom_encode_text (line 132) | def custom_encode_text(self, text, m, normalize: bool = False): FILE: ape/modeling/text/clip_wrapper_open.py function build_openclip_text_encoder (line 11) | def build_openclip_text_encoder(open_clip_name, open_clip_model): function get_openclip_embeddings (line 31) | def get_openclip_embeddings(model, tokenizer, vocabulary, prompt="a "): FILE: ape/modeling/text/eva01_clip/clip.py function _download (line 43) | def _download(url: str, root: str): function _convert_image_to_rgb (line 75) | def _convert_image_to_rgb(image): function _transform (line 79) | def _transform(n_px): function available_models (line 89) | def available_models() -> List[str]: function load (line 94) | def load(name: str, device: Union[str, torch.device] = "cuda" if torch.c... function tokenize (line 196) | def tokenize(texts: Union[str, List[str]], context_length: int = 77, tru... FILE: ape/modeling/text/eva01_clip/eva_clip.py function _natural_key (line 23) | def _natural_key(string_): function _rescan_model_configs (line 27) | def _rescan_model_configs(): function list_models (line 50) | def list_models(): function add_model_config (line 55) | def add_model_config(path): function get_model_config (line 62) | def get_model_config(model_name): function load_state_dict (line 68) | def load_state_dict(checkpoint_path: str, map_location: str='cpu', model... function load_checkpoint (line 81) | def load_checkpoint(model, checkpoint_path, model_key="model|module|stat... function create_model (line 87) | def create_model( function _convert_to_rgb (line 123) | def _convert_to_rgb(image): function image_transform (line 126) | def image_transform( function build_eva_model_and_transforms (line 156) | def build_eva_model_and_transforms( FILE: ape/modeling/text/eva01_clip/eva_model.py class LayerNorm (line 19) | class LayerNorm(nn.LayerNorm): method forward (line 22) | def forward(self, x: torch.Tensor): method forward (line 38) | def forward(self, x: torch.Tensor): class LayerNorm (line 35) | class LayerNorm(nn.LayerNorm): method forward (line 22) | def forward(self, x: torch.Tensor): method forward (line 38) | def forward(self, x: torch.Tensor): class QuickGELU (line 44) | class QuickGELU(nn.Module): method forward (line 46) | def forward(self, x: torch.Tensor): class Attention (line 50) | class Attention(nn.Module): method __init__ (line 51) | def __init__( method forward (line 90) | def forward(self, x, attn_mask: Optional[torch.Tensor] = None): class ResidualAttentionBlock (line 126) | class ResidualAttentionBlock(nn.Module): method __init__ (line 127) | def __init__( method attention (line 160) | def attention(self, x: torch.Tensor, attn_mask: Optional[torch.Tensor]... method cross_attention (line 168) | def cross_attention(self, x: torch.Tensor, context: torch.Tensor, attn... method forward (line 172) | def forward(self, x: torch.Tensor, attn_mask: Optional[torch.Tensor] =... class Transformer (line 177) | class Transformer(nn.Module): method __init__ (line 178) | def __init__(self, width: int, layers: int, heads: int, mlp_ratio: fl... method forward (line 188) | def forward(self, x: torch.Tensor, attn_mask: Optional[torch.Tensor] =... class TextTransformer (line 193) | class TextTransformer(nn.Module): method __init__ (line 194) | def __init__( method init_parameters (line 223) | def init_parameters(self): method build_attention_mask (line 240) | def build_attention_mask(self): method forward_features (line 248) | def forward_features(self, text: torch.Tensor): method forward (line 262) | def forward(self, x: torch.Tensor): class CLIPVisionCfg (line 269) | class CLIPVisionCfg: class CLIPTextCfg (line 283) | class CLIPTextCfg: class EVA_CLIP (line 292) | class EVA_CLIP(nn.Module): method __init__ (line 293) | def __init__( method encode_image (line 337) | def encode_image(self, image): method encode_text (line 340) | def encode_text(self, text): method forward (line 343) | def forward(self, image, text): function convert_weights_to_fp16 (line 357) | def convert_weights_to_fp16(model: nn.Module): FILE: ape/modeling/text/eva01_clip/model.py class Bottleneck (line 10) | class Bottleneck(nn.Module): method __init__ (line 13) | def __init__(self, inplanes, planes, stride=1): method forward (line 40) | def forward(self, x: torch.Tensor): class AttentionPool2d (line 56) | class AttentionPool2d(nn.Module): method __init__ (line 57) | def __init__(self, spacial_dim: int, embed_dim: int, num_heads: int, o... method forward (line 66) | def forward(self, x, return_all_tokens=False): class ModifiedResNet (line 95) | class ModifiedResNet(nn.Module): method __init__ (line 103) | def __init__(self, layers, output_dim, heads, input_resolution=224, wi... method _make_layer (line 128) | def _make_layer(self, planes, blocks, stride=1): method forward (line 137) | def forward(self, x, return_side_out=False, return_all_tokens=False): class LayerNorm (line 166) | class LayerNorm(nn.LayerNorm): method forward (line 169) | def forward(self, x: torch.Tensor): class QuickGELU (line 175) | class QuickGELU(nn.Module): method forward (line 176) | def forward(self, x: torch.Tensor): class ResidualAttentionBlock (line 180) | class ResidualAttentionBlock(nn.Module): method __init__ (line 181) | def __init__(self, d_model: int, n_head: int, attn_mask: torch.Tensor ... method attention (line 194) | def attention(self, x: torch.Tensor): method forward (line 199) | def forward(self, x: torch.Tensor): class Transformer (line 205) | class Transformer(nn.Module): method __init__ (line 206) | def __init__(self, width: int, layers: int, heads: int, attn_mask: tor... method forward (line 212) | def forward(self, x: torch.Tensor): class VisionTransformer (line 216) | class VisionTransformer(nn.Module): method __init__ (line 217) | def __init__(self, input_resolution: int, patch_size: int, width: int,... method interpolate_pos_encoding (line 236) | def interpolate_pos_encoding(self, x, w, h): method forward (line 253) | def forward(self, x: torch.Tensor): class CLIP (line 277) | class CLIP(nn.Module): method __init__ (line 278) | def __init__(self, method initialize_parameters (line 333) | def initialize_parameters(self): method build_attention_mask (line 362) | def build_attention_mask(self): method dtype (line 371) | def dtype(self): method encode_image (line 374) | def encode_image(self, image): method encode_text (line 377) | def encode_text(self, text): method forward (line 392) | def forward(self, image, text): function convert_weights (line 409) | def convert_weights(model: nn.Module): function build_model (line 434) | def build_model(state_dict: dict): FILE: ape/modeling/text/eva01_clip/simple_tokenizer.py function default_bpe (line 11) | def default_bpe(): function bytes_to_unicode (line 16) | def bytes_to_unicode(): function get_pairs (line 38) | def get_pairs(word): function basic_clean (line 50) | def basic_clean(text): function whitespace_clean (line 56) | def whitespace_clean(text): class SimpleTokenizer (line 62) | class SimpleTokenizer(object): method __init__ (line 63) | def __init__(self, bpe_path: str = default_bpe()): method bpe (line 80) | def bpe(self, token): method encode (line 121) | def encode(self, text): method decode (line 129) | def decode(self, tokens): FILE: ape/modeling/text/eva01_clip/vit_model.py function _cfg (line 26) | def _cfg(url='', **kwargs): class DropPath (line 36) | class DropPath(nn.Module): method __init__ (line 39) | def __init__(self, drop_prob=None): method forward (line 43) | def forward(self, x): method extra_repr (line 46) | def extra_repr(self) -> str: class Mlp (line 50) | class Mlp(nn.Module): method __init__ (line 51) | def __init__(self, in_features, hidden_features=None, out_features=Non... method forward (line 60) | def forward(self, x): class Attention (line 70) | class Attention(nn.Module): method __init__ (line 71) | def __init__( method forward (line 128) | def forward(self, x, rel_pos_bias=None): class Block (line 173) | class Block(nn.Module): method __init__ (line 175) | def __init__(self, dim, num_heads, mlp_ratio=4., qkv_bias=False, qk_sc... method forward (line 197) | def forward(self, x, rel_pos_bias=None): class PatchEmbed (line 207) | class PatchEmbed(nn.Module): method __init__ (line 210) | def __init__(self, img_size=224, patch_size=16, in_chans=3, embed_dim=... method forward (line 222) | def forward(self, x, **kwargs): class RelativePositionBias (line 231) | class RelativePositionBias(nn.Module): method __init__ (line 233) | def __init__(self, window_size, num_heads): method forward (line 262) | def forward(self): class VisionTransformer (line 270) | class VisionTransformer(nn.Module): method __init__ (line 273) | def __init__(self, img_size=224, patch_size=16, in_chans=3, num_classe... method fix_init_weight (line 326) | def fix_init_weight(self): method _init_weights (line 334) | def _init_weights(self, m): method get_classifier (line 343) | def get_classifier(self): method reset_classifier (line 346) | def reset_classifier(self, num_classes, global_pool=''): method forward_features (line 350) | def forward_features(self, x): method forward (line 368) | def forward(self, x): method get_intermediate_layers (line 373) | def get_intermediate_layers(self, x): FILE: ape/modeling/text/eva02_clip/eva_vit_model.py class DropPath (line 33) | class DropPath(nn.Module): method __init__ (line 36) | def __init__(self, drop_prob=None): method forward (line 40) | def forward(self, x): method extra_repr (line 43) | def extra_repr(self) -> str: class Mlp (line 47) | class Mlp(nn.Module): method __init__ (line 48) | def __init__( method forward (line 70) | def forward(self, x): class SwiGLU (line 81) | class SwiGLU(nn.Module): method __init__ (line 82) | def __init__(self, in_features, hidden_features=None, out_features=Non... method forward (line 97) | def forward(self, x): class Attention (line 106) | class Attention(nn.Module): method __init__ (line 107) | def __init__( method forward (line 173) | def forward(self, x, rel_pos_bias=None, attn_mask=None): class Block (line 246) | class Block(nn.Module): method __init__ (line 248) | def __init__(self, dim, num_heads, mlp_ratio=4., qkv_bias=False, qk_sc... method forward (line 287) | def forward(self, x, rel_pos_bias=None, attn_mask=None): class PatchEmbed (line 305) | class PatchEmbed(nn.Module): method __init__ (line 308) | def __init__(self, img_size=224, patch_size=16, in_chans=3, embed_dim=... method forward (line 320) | def forward(self, x, **kwargs): class RelativePositionBias (line 329) | class RelativePositionBias(nn.Module): method __init__ (line 331) | def __init__(self, window_size, num_heads): method forward (line 358) | def forward(self): class EVAVisionTransformer (line 366) | class EVAVisionTransformer(nn.Module): method __init__ (line 369) | def __init__(self, img_size=224, patch_size=16, in_chans=3, num_classe... method fix_init_weight (line 443) | def fix_init_weight(self): method get_cast_dtype (line 454) | def get_cast_dtype(self) -> torch.dtype: method _init_weights (line 457) | def _init_weights(self, m): method get_num_layers (line 466) | def get_num_layers(self): method lock (line 469) | def lock(self, unlocked_groups=0, freeze_bn_stats=False): method set_grad_checkpointing (line 475) | def set_grad_checkpointing(self, enable=True): method no_weight_decay (line 479) | def no_weight_decay(self): method get_classifier (line 482) | def get_classifier(self): method reset_classifier (line 485) | def reset_classifier(self, num_classes, global_pool=''): method forward_features (line 489) | def forward_features(self, x, return_all_features=False): method forward (line 526) | def forward(self, x, return_all_features=False): FILE: ape/modeling/text/eva02_clip/factory.py function _natural_key (line 25) | def _natural_key(string_): function _rescan_model_configs (line 29) | def _rescan_model_configs(): function list_models (line 53) | def list_models(): function add_model_config (line 58) | def add_model_config(path): function get_model_config (line 66) | def get_model_config(model_name): function get_tokenizer (line 73) | def get_tokenizer(model_name): function load_state_dict (line 80) | def load_state_dict(checkpoint_path: str, map_location: str='cpu', model... function load_checkpoint (line 110) | def load_checkpoint(model, checkpoint_path, model_key="model|module|stat... function load_clip_visual_state_dict (line 131) | def load_clip_visual_state_dict(checkpoint_path: str, map_location: str=... function load_clip_text_state_dict (line 144) | def load_clip_text_state_dict(checkpoint_path: str, map_location: str='c... function get_pretrained_tag (line 152) | def get_pretrained_tag(pretrained_model): function load_pretrained_checkpoint (line 163) | def load_pretrained_checkpoint( function create_model (line 211) | def create_model( function create_model_and_transforms (line 358) | def create_model_and_transforms( function create_model_from_pretrained (line 412) | def create_model_from_pretrained( FILE: ape/modeling/text/eva02_clip/hf_model.py class BaseModelOutput (line 21) | class BaseModelOutput: class PretrainedConfig (line 25) | class PretrainedConfig: function _camel2snake (line 31) | def _camel2snake(s): function register_pooler (line 37) | def register_pooler(cls): class MeanPooler (line 44) | class MeanPooler(nn.Module): method forward (line 46) | def forward(self, x:BaseModelOutput, attention_mask:TensorType): class MaxPooler (line 51) | class MaxPooler(nn.Module): method forward (line 53) | def forward(self, x:BaseModelOutput, attention_mask:TensorType): class ClsPooler (line 58) | class ClsPooler(nn.Module): method __init__ (line 60) | def __init__(self, use_pooler_output=True): method forward (line 65) | def forward(self, x:BaseModelOutput, attention_mask:TensorType): class HFTextEncoder (line 75) | class HFTextEncoder(nn.Module): method __init__ (line 77) | def __init__( method mask (line 152) | def mask(self, input_ids, vocab_size, device, targets=None, masked_ind... method forward_mlm (line 177) | def forward_mlm(self, input_ids, image_embeds, mlm_probability=0.25): method forward (line 213) | def forward(self, x:TensorType) -> TensorType: method lock (line 220) | def lock(self, unlocked_layers:int=0, freeze_layer_norm:bool=True): method set_grad_checkpointing (line 239) | def set_grad_checkpointing(self, enable=True): method get_num_layers (line 242) | def get_num_layers(self): method init_parameters (line 247) | def init_parameters(self): FILE: ape/modeling/text/eva02_clip/loss.py function gather_features (line 21) | def gather_features( class ClipLoss (line 70) | class ClipLoss(nn.Module): method __init__ (line 72) | def __init__( method forward (line 95) | def forward(self, image_features, text_features, logit_scale=1.): FILE: ape/modeling/text/eva02_clip/model.py class CLIPVisionCfg (line 38) | class CLIPVisionCfg: class CLIPTextCfg (line 67) | class CLIPTextCfg: function get_cast_dtype (line 84) | def get_cast_dtype(precision: str): function _build_vision_tower (line 93) | def _build_vision_tower( function _build_text_tower (line 174) | def _build_text_tower( class CLIP (line 211) | class CLIP(nn.Module): method __init__ (line 212) | def __init__( method lock_image_tower (line 234) | def lock_image_tower(self, unlocked_groups=0, freeze_bn_stats=False): method set_grad_checkpointing (line 239) | def set_grad_checkpointing(self, enable=True): method no_weight_decay (line 244) | def no_weight_decay(self): method encode_image (line 247) | def encode_image(self, image, normalize: bool = False): method encode_text (line 251) | def encode_text(self, text, normalize: bool = False): method forward (line 265) | def forward(self, image, text): class CustomCLIP (line 271) | class CustomCLIP(nn.Module): method __init__ (line 272) | def __init__( method lock_image_tower (line 286) | def lock_image_tower(self, unlocked_groups=0, freeze_bn_stats=False): method lock_text_tower (line 290) | def lock_text_tower(self, unlocked_layers:int=0, freeze_layer_norm:boo... method set_grad_checkpointing (line 294) | def set_grad_checkpointing(self, enable=True): method no_weight_decay (line 299) | def no_weight_decay(self): method encode_image (line 302) | def encode_image(self, image, normalize: bool = False): method encode_text (line 306) | def encode_text(self, text, normalize: bool = False): method forward (line 310) | def forward(self, image, text): function convert_weights_to_lp (line 316) | def convert_weights_to_lp(model: nn.Module, dtype=torch.float16): function convert_to_custom_text_state_dict (line 348) | def convert_to_custom_text_state_dict(state_dict: dict): function build_model_from_openai_state_dict (line 367) | def build_model_from_openai_state_dict( function trace_model (line 427) | def trace_model(model, batch_size=256, device=torch.device('cpu')): FILE: ape/modeling/text/eva02_clip/modified_resnet.py class Bottleneck (line 10) | class Bottleneck(nn.Module): method __init__ (line 13) | def __init__(self, inplanes, planes, stride=1): method forward (line 42) | def forward(self, x: torch.Tensor): class AttentionPool2d (line 58) | class AttentionPool2d(nn.Module): method __init__ (line 59) | def __init__(self, spacial_dim: int, embed_dim: int, num_heads: int, o... method forward (line 68) | def forward(self, x): class ModifiedResNet (line 95) | class ModifiedResNet(nn.Module): method __init__ (line 103) | def __init__(self, layers, output_dim, heads, image_size=224, width=64): method _make_layer (line 132) | def _make_layer(self, planes, blocks, stride=1): method init_parameters (line 141) | def init_parameters(self): method lock (line 154) | def lock(self, unlocked_groups=0, freeze_bn_stats=False): method set_grad_checkpointing (line 162) | def set_grad_checkpointing(self, enable=True): method stem (line 166) | def stem(self, x): method forward (line 173) | def forward(self, x): FILE: ape/modeling/text/eva02_clip/openai.py function list_openai_models (line 18) | def list_openai_models() -> List[str]: function load_openai_model (line 23) | def load_openai_model( FILE: ape/modeling/text/eva02_clip/pretrained.py function _pcfg (line 18) | def _pcfg(url='', hf_hub='', filename='', mean=None, std=None): function _clean_tag (line 191) | def _clean_tag(tag: str): function list_pretrained (line 196) | def list_pretrained(as_str: bool = False): function list_pretrained_models_by_tag (line 203) | def list_pretrained_models_by_tag(tag: str): function list_pretrained_tags_by_model (line 213) | def list_pretrained_tags_by_model(model: str): function is_pretrained_cfg (line 221) | def is_pretrained_cfg(model: str, tag: str): function get_pretrained_cfg (line 227) | def get_pretrained_cfg(model: str, tag: str): function get_pretrained_url (line 234) | def get_pretrained_url(model: str, tag: str): function download_pretrained_from_url (line 239) | def download_pretrained_from_url( function has_hf_hub (line 285) | def has_hf_hub(necessary=False): function download_pretrained_from_hf (line 293) | def download_pretrained_from_hf( function download_pretrained (line 304) | def download_pretrained( FILE: ape/modeling/text/eva02_clip/rope.py function broadcat (line 7) | def broadcat(tensors, dim = -1): function rotate_half (line 23) | def rotate_half(x): class VisionRotaryEmbedding (line 30) | class VisionRotaryEmbedding(nn.Module): method __init__ (line 31) | def __init__( method forward (line 70) | def forward(self, t, start_index = 0): class VisionRotaryEmbeddingFast (line 79) | class VisionRotaryEmbeddingFast(nn.Module): method __init__ (line 80) | def __init__( method forward (line 121) | def forward(self, t, patch_indices_keep=None): FILE: ape/modeling/text/eva02_clip/timm_model.py class TimmModel (line 28) | class TimmModel(nn.Module): method __init__ (line 33) | def __init__( method lock (line 80) | def lock(self, unlocked_groups=0, freeze_bn_stats=False): method set_grad_checkpointing (line 113) | def set_grad_checkpointing(self, enable=True): method forward (line 119) | def forward(self, x): FILE: ape/modeling/text/eva02_clip/tokenizer.py function default_bpe (line 21) | def default_bpe(): function bytes_to_unicode (line 26) | def bytes_to_unicode(): function get_pairs (line 48) | def get_pairs(word): function basic_clean (line 60) | def basic_clean(text): function whitespace_clean (line 66) | def whitespace_clean(text): class SimpleTokenizer (line 72) | class SimpleTokenizer(object): method __init__ (line 73) | def __init__(self, bpe_path: str = default_bpe(), special_tokens=None): method bpe (line 98) | def bpe(self, token): method encode (line 139) | def encode(self, text): method decode (line 147) | def decode(self, tokens): function tokenize (line 156) | def tokenize(texts: Union[str, List[str]], context_length: int = 77) -> ... class HFTokenizer (line 188) | class HFTokenizer: method __init__ (line 190) | def __init__(self, tokenizer_name:str): method __call__ (line 194) | def __call__(self, texts:Union[str, List[str]], context_length:int=77)... FILE: ape/modeling/text/eva02_clip/transform.py class ResizeMaxSize (line 13) | class ResizeMaxSize(nn.Module): method __init__ (line 15) | def __init__(self, max_size, interpolation=InterpolationMode.BICUBIC, ... method forward (line 24) | def forward(self, img): function _convert_to_rgb (line 39) | def _convert_to_rgb(image): function image_transform (line 60) | def image_transform( FILE: ape/modeling/text/eva02_clip/transformer.py class LayerNormFp32 (line 36) | class LayerNormFp32(nn.LayerNorm): method __init__ (line 38) | def __init__(self, *args, **kwargs): method forward (line 41) | def forward(self, x: torch.Tensor): class LayerNorm (line 52) | class LayerNorm(nn.LayerNorm): method forward (line 55) | def forward(self, x: torch.Tensor): class QuickGELU (line 60) | class QuickGELU(nn.Module): method forward (line 62) | def forward(self, x: torch.Tensor): class LayerScale (line 66) | class LayerScale(nn.Module): method __init__ (line 67) | def __init__(self, dim, init_values=1e-5, inplace=False): method forward (line 72) | def forward(self, x): class PatchDropout (line 75) | class PatchDropout(nn.Module): method __init__ (line 80) | def __init__(self, prob, exclude_first_token=True): method forward (line 87) | def forward(self, x): function _in_projection_packed (line 119) | def _in_projection_packed( class Attention (line 150) | class Attention(nn.Module): method __init__ (line 151) | def __init__( method forward (line 195) | def forward(self, x, attn_mask: Optional[torch.Tensor] = None): class CustomAttention (line 243) | class CustomAttention(nn.Module): method __init__ (line 244) | def __init__( method forward (line 286) | def forward(self, query: torch.Tensor, key: torch.Tensor, value: torch... class CustomResidualAttentionBlock (line 339) | class CustomResidualAttentionBlock(nn.Module): method __init__ (line 340) | def __init__( method forward (line 384) | def forward(self, q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, a... class CustomTransformer (line 389) | class CustomTransformer(nn.Module): method __init__ (line 390) | def __init__( method get_cast_dtype (line 429) | def get_cast_dtype(self) -> torch.dtype: method forward (line 432) | def forward(self, q: torch.Tensor, k: torch.Tensor = None, v: torch.Te... class ResidualAttentionBlock (line 443) | class ResidualAttentionBlock(nn.Module): method __init__ (line 444) | def __init__( method attention (line 474) | def attention(self, x: torch.Tensor, attn_mask: Optional[torch.Tensor]... method forward (line 480) | def forward(self, x: torch.Tensor, attn_mask: Optional[torch.Tensor] =... class Transformer (line 485) | class Transformer(nn.Module): method __init__ (line 486) | def __init__( method get_cast_dtype (line 508) | def get_cast_dtype(self) -> torch.dtype: method forward (line 511) | def forward(self, x: torch.Tensor, attn_mask: Optional[torch.Tensor] =... class VisionTransformer (line 520) | class VisionTransformer(nn.Module): method __init__ (line 521) | def __init__( method lock (line 567) | def lock(self, unlocked_groups=0, freeze_bn_stats=False): method get_num_layers (line 600) | def get_num_layers(self): method set_grad_checkpointing (line 604) | def set_grad_checkpointing(self, enable=True): method no_weight_decay (line 608) | def no_weight_decay(self): method forward (line 611) | def forward(self, x: torch.Tensor, return_all_features: bool=False): class TextTransformer (line 642) | class TextTransformer(nn.Module): method __init__ (line 643) | def __init__( method init_parameters (line 686) | def init_parameters(self): method set_grad_checkpointing (line 703) | def set_grad_checkpointing(self, enable=True): method no_weight_decay (line 707) | def no_weight_decay(self): method get_num_layers (line 711) | def get_num_layers(self): method build_attention_mask (line 714) | def build_attention_mask(self): method forward (line 722) | def forward(self, text, return_all_features: bool=False): FILE: ape/modeling/text/eva02_clip/utils.py function resize_clip_pos_embed (line 13) | def resize_clip_pos_embed(state_dict, model, interpolation: str = 'bicub... function resize_visual_pos_embed (line 46) | def resize_visual_pos_embed(state_dict, model, interpolation: str = 'bic... function resize_evaclip_pos_embed (line 78) | def resize_evaclip_pos_embed(state_dict, model, interpolation: str = 'bi... function resize_eva_pos_embed (line 109) | def resize_eva_pos_embed(state_dict, model, interpolation: str = 'bicubi... function resize_rel_pos_embed (line 140) | def resize_rel_pos_embed(state_dict, model, interpolation: str = 'bicubi... function freeze_batch_norm_2d (line 237) | def freeze_batch_norm_2d(module, module_match={}, name=''): function _ntuple (line 277) | def _ntuple(n): function is_logging (line 292) | def is_logging(args): class AllGather (line 304) | class AllGather(torch.autograd.Function): method forward (line 311) | def forward(ctx, tensor, rank, world_size): method backward (line 319) | def backward(ctx, grad_output): FILE: ape/modeling/text/llama2_wrapper.py class Llama2 (line 28) | class Llama2(nn.Module): method __init__ (line 29) | def __init__( method forward_text (line 107) | def forward_text(self, text_list, cache=False): method device (line 153) | def device(self): FILE: ape/modeling/text/t5_wrapper.py class T5_warpper (line 26) | class T5_warpper(nn.Module): method __init__ (line 27) | def __init__( method forward_text (line 70) | def forward_text(self, text_list, cache=False): method device (line 102) | def device(self): FILE: ape/modeling/text/text_encoder.py class TextModel (line 12) | class TextModel(nn.Module): method __init__ (line 13) | def __init__( method forward_text (line 33) | def forward_text(self, text, prompt="a "): FILE: ape/modeling/text/utils.py function clean_name (line 4) | def clean_name(name): function reduce_language_feature (line 11) | def reduce_language_feature(features, mask, reduce_type="average"): FILE: ape/utils/box_ops.py function box_cxcywh_to_xyxy (line 18) | def box_cxcywh_to_xyxy(x): function box_xyxy_to_cxcywh (line 24) | def box_xyxy_to_cxcywh(x): function box_iou (line 31) | def box_iou(boxes1, boxes2): function generalized_box_iou (line 47) | def generalized_box_iou(boxes1, boxes2): function masks_to_boxes (line 71) | def masks_to_boxes(masks): FILE: ape/utils/misc.py function _check_size_scale_factor (line 38) | 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 70) | class SmoothedValue(object): method __init__ (line 75) | def __init__(self, window_size=20, fmt=None): method update (line 83) | def update(self, value, n=1): method synchronize_between_processes (line 88) | def synchronize_between_processes(self): method median (line 102) | def median(self): method avg (line 107) | def avg(self): method global_avg (line 112) | def global_avg(self): method max (line 116) | def max(self): method value (line 120) | def value(self): method __str__ (line 123) | def __str__(self): function all_gather (line 133) | def all_gather(data): function reduce_dict (line 176) | def reduce_dict(input_dict, average=True): class MetricLogger (line 203) | class MetricLogger(object): method __init__ (line 204) | def __init__(self, delimiter="\t"): method update (line 208) | def update(self, **kwargs): method __getattr__ (line 215) | def __getattr__(self, attr): method __str__ (line 222) | def __str__(self): method synchronize_between_processes (line 228) | def synchronize_between_processes(self): method add_meter (line 232) | def add_meter(self, name, meter): method log_every (line 235) | def log_every(self, iterable, print_freq, header=None): function get_sha (line 309) | def get_sha(): function collate_fn (line 330) | def collate_fn(batch): function _max_by_axis (line 336) | def _max_by_axis(the_list): function nested_tensor_from_tensor_list (line 345) | def nested_tensor_from_tensor_list(tensor_list: List[Tensor]): class NestedTensor (line 365) | class NestedTensor(object): method __init__ (line 366) | def __init__(self, tensors, mask: Optional[Tensor]): method to (line 370) | def to(self, device, non_blocking=False): method record_stream (line 381) | def record_stream(self, *args, **kwargs): method decompose (line 386) | def decompose(self): method __repr__ (line 389) | def __repr__(self): function setup_for_distributed (line 393) | def setup_for_distributed(is_master): function is_dist_avail_and_initialized (line 409) | def is_dist_avail_and_initialized(): function get_world_size (line 417) | def get_world_size(): function get_rank (line 423) | def get_rank(): function get_local_size (line 429) | def get_local_size(): function get_local_rank (line 435) | def get_local_rank(): function is_main_process (line 441) | def is_main_process(): function save_on_master (line 445) | def save_on_master(*args, **kwargs): function init_distributed_mode (line 450) | def init_distributed_mode(args): function accuracy (line 494) | def accuracy(output, target, topk=(1,)): function interpolate (line 512) | def interpolate(input, size=None, scale_factor=None, mode="nearest", ali... function get_total_grad_norm (line 532) | def get_total_grad_norm(parameters, norm_type=2): function inverse_sigmoid (line 543) | def inverse_sigmoid(x, eps=1e-5): FILE: ape/utils/plot_utils.py function plot_logs (line 22) | def plot_logs( function plot_precision_recall (line 88) | def plot_precision_recall(files, naming_scheme="iter"): FILE: configs/common/data/roboflow100_instance_lsj1024.py function _get_builtin_metadata (line 31) | def _get_builtin_metadata(name): FILE: datasets/prepare_ade20k_full_sem_seg.py function loadAde20K (line 932) | def loadAde20K(file): FILE: datasets/prepare_coco_semantic_annos_from_panoptic_annos.py function _process_panoptic_to_semantic (line 18) | def _process_panoptic_to_semantic(input_panoptic, output_semantic, segme... function separate_coco_semantic_from_panoptic (line 29) | def separate_coco_semantic_from_panoptic(panoptic_json, panoptic_root, s... FILE: datasets/prepare_pascal_context.py function convert_pc59 (line 13) | def convert_pc59(mask_path, new_mask_path, pc59_dict): function convert_pc459 (line 25) | def convert_pc459(mask_path, new_mask_path): FILE: datasets/prepare_voc_sem_seg.py function convert_to_trainID (line 39) | def convert_to_trainID( FILE: demo/app.py function setup_model (line 338) | def setup_model(name): function run_on_image_A (line 357) | def run_on_image_A(input_image_path, input_text, score_threshold, output... function run_on_image_C (line 374) | def run_on_image_C(input_image_path, input_text, score_threshold, output... function run_on_image_D (line 391) | def run_on_image_D(input_image_path, input_text, score_threshold, output... function run_on_image_comparison (line 408) | def run_on_image_comparison(input_image_path, input_text, score_threshol... function run_on_image (line 431) | def run_on_image( function load_APE_A (line 528) | def load_APE_A(): function load_APE_B (line 575) | def load_APE_B(): function load_APE_C (line 623) | def load_APE_C(): function load_APE_D (line 671) | def load_APE_D(): function APE_A_tab (line 716) | def APE_A_tab(): function APE_C_tab (line 766) | def APE_C_tab(): function APE_D_tab (line 816) | def APE_D_tab(): function comparison_tab (line 865) | def comparison_tab(): function is_port_in_use (line 917) | def is_port_in_use(port: int) -> bool: function add_head_info (line 924) | def add_head_info(max_available_memory): function add_tail_info (line 946) | def add_tail_info(): FILE: demo/demo_lazy.py function setup_cfg (line 29) | def setup_cfg(args): function get_parser (line 60) | def get_parser(): function test_opencv_video_format (line 104) | def test_opencv_video_format(codec, file_ext): FILE: demo/predictor_lazy.py function filter_instances (line 20) | def filter_instances(instances, metadata): function cuda_grabcut (line 40) | def cuda_grabcut(img, masks, iter=5, gamma=50, iou_threshold=0.75): function opencv_grabcut (line 87) | def opencv_grabcut(img, masks, iter=5): class VisualizationDemo (line 128) | class VisualizationDemo(object): method __init__ (line 129) | def __init__(self, cfg, instance_mode=ColorMode.IMAGE, parallel=False,... method run_on_image (line 181) | def run_on_image( method _frame_from_video (line 266) | def _frame_from_video(self, video): method run_on_video (line 274) | def run_on_video(self, video): class AsyncPredictor (line 341) | class AsyncPredictor: class _StopToken (line 348) | class _StopToken: class _PredictWorker (line 351) | class _PredictWorker(mp.Process): method __init__ (line 352) | def __init__(self, cfg, task_queue, result_queue): method run (line 358) | def run(self): method __init__ (line 369) | def __init__(self, cfg, num_gpus: int = 1): method put (line 396) | def put(self, image): method get (line 400) | def get(self): method __len__ (line 416) | def __len__(self): method __call__ (line 419) | def __call__(self, image): method shutdown (line 423) | def shutdown(self): method default_buffer_size (line 428) | def default_buffer_size(self): FILE: setup.py function get_version (line 18) | def get_version(): function get_extensions (line 41) | def get_extensions(): function get_model_zoo_configs (line 111) | def get_model_zoo_configs() -> List[str]: FILE: tools/analyze_model.py function setup (line 25) | def setup(args): function do_flop (line 42) | def do_flop(cfg): function do_activation (line 73) | def do_activation(cfg): function do_parameter (line 102) | def do_parameter(cfg): function do_structure (line 110) | def do_structure(cfg): FILE: tools/eva_interpolate_patch_14to16.py function interpolate_pos_embed (line 19) | def interpolate_pos_embed(checkpoint_model, new_size=16, image_size=224): FILE: tools/train_net.py class Trainer (line 52) | class Trainer(SimpleTrainer): method __init__ (line 57) | def __init__( method run_step (line 112) | def run_step(self): method run_step_accumulate (line 199) | def run_step_accumulate(self): method run_step_accumulate_iter_loop (line 292) | def run_step_accumulate_iter_loop(self): method clip_grads (line 385) | def clip_grads(self, params): method state_dict (line 393) | def state_dict(self): method load_state_dict (line 399) | def load_state_dict(self, state_dict): method _data_loader_iter (line 405) | def _data_loader_iter(self): function do_test (line 423) | def do_test(cfg, model, eval_only=False): function do_train (line 514) | def do_train(args, cfg): function main (line 610) | def main(args): FILE: tools/train_net_fsdp.py class Trainer (line 56) | class Trainer(SimpleTrainer): method __init__ (line 61) | def __init__( method run_step (line 122) | def run_step(self): method run_step_accumulate (line 211) | def run_step_accumulate(self): method run_step_accumulate_iter_loop (line 304) | def run_step_accumulate_iter_loop(self): method clip_grads (line 397) | def clip_grads(self, params): method state_dict (line 406) | def state_dict(self): method load_state_dict (line 412) | def load_state_dict(self, state_dict): method _data_loader_iter (line 418) | def _data_loader_iter(self): function do_test (line 436) | def do_test(cfg, model, eval_only=False): function do_train (line 545) | def do_train(args, cfg): function main (line 648) | def main(args): FILE: tools/visualize_json_results.py function create_instances (line 18) | def create_instances(predictions, image_size): function dataset_id_map (line 63) | def dataset_id_map(ds_id): function dataset_id_map (line 68) | def dataset_id_map(ds_id):