SYMBOL INDEX (3464 symbols across 398 files) FILE: demo.py class ScreenGrab (line 26) | class ScreenGrab: method __init__ (line 27) | def __init__(self): method read (line 32) | def read(self): method isOpened (line 37) | def isOpened(self): method release (line 39) | def release(self): function setup_cfg (line 46) | def setup_cfg(args): function get_parser (line 65) | def get_parser(): function test_opencv_video_format (line 114) | def test_opencv_video_format(codec, file_ext): FILE: detectron2/configs/Misc/torchvision_imagenet_R_50.py function build_data_loader (line 40) | def build_data_loader(dataset, batch_size, num_workers, training=True): class ClassificationNet (line 50) | class ClassificationNet(nn.Module): method __init__ (line 51) | def __init__(self, model: nn.Module): method device (line 56) | def device(self): method forward (line 59) | def forward(self, inputs): class ClassificationAcc (line 69) | class ClassificationAcc(DatasetEvaluator): method reset (line 70) | def reset(self): method process (line 73) | def process(self, inputs, outputs): method evaluate (line 78) | def evaluate(self): FILE: detectron2/configs/common/coco_schedule.py function default_X_scheduler (line 7) | def default_X_scheduler(num_X): FILE: detectron2/datasets/prepare_ade20k_sem_seg.py function convert (line 11) | def convert(input, output): FILE: detectron2/datasets/prepare_cocofied_lvis.py function cocofy_lvis (line 96) | def cocofy_lvis(input_filename, output_filename): FILE: detectron2/datasets/prepare_panoptic_fpn.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... function link_val100 (line 98) | def link_val100(dir_full, dir_100): FILE: detectron2/demo/demo.py function setup_cfg (line 23) | def setup_cfg(args): function get_parser (line 39) | def get_parser(): function test_opencv_video_format (line 76) | def test_opencv_video_format(codec, file_ext): FILE: detectron2/demo/predictor.py class VisualizationDemo (line 15) | class VisualizationDemo(object): method __init__ (line 16) | def __init__(self, cfg, instance_mode=ColorMode.IMAGE, parallel=False): method run_on_image (line 37) | def run_on_image(self, image): method _frame_from_video (line 68) | def _frame_from_video(self, video): method run_on_video (line 76) | def run_on_video(self, video): class AsyncPredictor (line 132) | class AsyncPredictor: class _StopToken (line 139) | class _StopToken: class _PredictWorker (line 142) | class _PredictWorker(mp.Process): method __init__ (line 143) | def __init__(self, cfg, task_queue, result_queue): method run (line 149) | def run(self): method __init__ (line 160) | def __init__(self, cfg, num_gpus: int = 1): method put (line 187) | def put(self, image): method get (line 191) | def get(self): method __len__ (line 207) | def __len__(self): method __call__ (line 210) | def __call__(self, image): method shutdown (line 214) | def shutdown(self): method default_buffer_size (line 219) | def default_buffer_size(self): FILE: detectron2/detectron2/checkpoint/c2_model_loading.py function convert_basic_c2_names (line 10) | def convert_basic_c2_names(original_keys): function convert_c2_detectron_names (line 66) | def convert_c2_detectron_names(weights): function align_and_update_state_dicts (line 209) | def align_and_update_state_dicts(model_state_dict, ckpt_state_dict, c2_c... function _group_keys_by_module (line 337) | def _group_keys_by_module(keys: List[str], original_names: Dict[str, str]): function _longest_common_prefix (line 377) | def _longest_common_prefix(names: List[str]) -> str: function _longest_common_prefix_str (line 388) | def _longest_common_prefix_str(names: List[str]) -> str: function _group_str (line 395) | def _group_str(names: List[str]) -> str: FILE: detectron2/detectron2/checkpoint/catalog.py class ModelCatalog (line 7) | class ModelCatalog(object): method get (line 58) | def get(name): method _get_c2_imagenet_pretrained (line 66) | def _get_c2_imagenet_pretrained(name): method _get_c2_detectron_baseline (line 74) | def _get_c2_detectron_baseline(name): class ModelCatalogHandler (line 95) | class ModelCatalogHandler(PathHandler): method _get_supported_prefixes (line 102) | def _get_supported_prefixes(self): method _get_local_path (line 105) | def _get_local_path(self, path, **kwargs): method _open (line 111) | def _open(self, path, mode="r", **kwargs): FILE: detectron2/detectron2/checkpoint/detection_checkpoint.py class DetectionCheckpointer (line 15) | class DetectionCheckpointer(Checkpointer): method __init__ (line 22) | def __init__(self, model, save_dir="", *, save_to_disk=None, **checkpo... method load (line 32) | def load(self, path, *args, **kwargs): method _load_file (line 59) | def _load_file(self, filename): method _load_model (line 94) | def _load_model(self, checkpoint): FILE: detectron2/detectron2/config/compat.py function upgrade_config (line 33) | def upgrade_config(cfg: CN, to_version: Optional[int] = None) -> CN: function downgrade_config (line 55) | def downgrade_config(cfg: CN, to_version: int) -> CN: function guess_version (line 82) | def guess_version(cfg: CN, filename: str) -> int: function _rename (line 116) | def _rename(cfg: CN, old: str, new: str) -> None: class _RenameConverter (line 146) | class _RenameConverter: method upgrade (line 154) | def upgrade(cls, cfg: CN) -> None: method downgrade (line 159) | def downgrade(cls, cfg: CN) -> None: class ConverterV1 (line 164) | class ConverterV1(_RenameConverter): class ConverterV2 (line 168) | class ConverterV2(_RenameConverter): method upgrade (line 204) | def upgrade(cls, cfg: CN) -> None: method downgrade (line 222) | def downgrade(cls, cfg: CN) -> None: FILE: detectron2/detectron2/config/config.py class CfgNode (line 12) | class CfgNode(_CfgNode): method _open_cfg (line 33) | def _open_cfg(cls, filename): method merge_from_file (line 37) | def merge_from_file(self, cfg_filename: str, allow_unsafe: bool = True... method dump (line 87) | def dump(self, *args, **kwargs): function get_cfg (line 99) | def get_cfg() -> CfgNode: function set_global_cfg (line 111) | def set_global_cfg(cfg: CfgNode) -> None: function configurable (line 130) | def configurable(init_func=None, *, from_config=None): function _get_args_from_config (line 218) | def _get_args_from_config(from_config_func, *args, **kwargs): function _called_with_cfg (line 251) | def _called_with_cfg(*args, **kwargs): FILE: detectron2/detectron2/config/instantiate.py function dump_dataclass (line 13) | def dump_dataclass(obj: Any): function instantiate (line 37) | def instantiate(cfg): FILE: detectron2/detectron2/config/lazy.py class LazyCall (line 25) | class LazyCall: method __init__ (line 42) | def __init__(self, target): method __call__ (line 49) | def __call__(self, **kwargs): function _visit_dict_config (line 61) | def _visit_dict_config(cfg, func): function _validate_py_syntax (line 74) | def _validate_py_syntax(filename): function _cast_to_config (line 84) | def _cast_to_config(obj): function _random_package_name (line 97) | def _random_package_name(filename): function _patch_import (line 103) | def _patch_import(): class LazyConfig (line 161) | class LazyConfig: method load_rel (line 168) | def load_rel(filename: str, keys: Union[None, str, Tuple[str, ...]] = ... method load (line 184) | def load(filename: str, keys: Union[None, str, Tuple[str, ...]] = None): method save (line 239) | def save(cfg, filename: str): method apply_overrides (line 305) | def apply_overrides(cfg, overrides: List[str]): method to_py (line 347) | def to_py(cfg, prefix: str = "cfg."): FILE: detectron2/detectron2/data/benchmark.py class _EmptyMapDataset (line 19) | class _EmptyMapDataset(torch.utils.data.Dataset): method __init__ (line 24) | def __init__(self, dataset): method __len__ (line 27) | def __len__(self): method __getitem__ (line 30) | def __getitem__(self, idx): function iter_benchmark (line 35) | def iter_benchmark( class DataLoaderBenchmark (line 65) | class DataLoaderBenchmark: method __init__ (line 71) | def __init__( method _benchmark (line 100) | def _benchmark(self, iterator, num_iter, warmup, msg=None): method _log_time (line 106) | def _log_time(self, msg, avg, all_times, distributed=False): method benchmark_dataset (line 126) | def benchmark_dataset(self, num_iter, warmup=5): method benchmark_mapper (line 138) | def benchmark_mapper(self, num_iter, warmup=5): method benchmark_workers (line 151) | def benchmark_workers(self, num_iter, warmup=10): method benchmark_IPC (line 175) | def benchmark_IPC(self, num_iter, warmup=10): method benchmark_distributed (line 195) | def benchmark_distributed(self, num_iter, warmup=10): FILE: detectron2/detectron2/data/build.py function filter_images_with_only_crowd_annotations (line 45) | def filter_images_with_only_crowd_annotations(dataset_dicts): function filter_images_with_few_keypoints (line 76) | def filter_images_with_few_keypoints(dataset_dicts, min_keypoints_per_im... function load_proposals_into_dataset (line 110) | def load_proposals_into_dataset(dataset_dicts, proposal_file): function print_instances_class_histogram (line 164) | def print_instances_class_histogram(dataset_dicts, class_names): function get_detection_dataset_dicts (line 216) | def get_detection_dataset_dicts( function build_batch_data_loader (line 282) | def build_batch_data_loader( function _train_loader_from_config (line 342) | def _train_loader_from_config(cfg, mapper=None, *, dataset=None, sampler... function build_detection_train_loader (line 390) | def build_detection_train_loader( function _test_loader_from_config (line 453) | def _test_loader_from_config(cfg, dataset_name, mapper=None): function build_detection_test_loader (line 483) | def build_detection_test_loader( function trivial_batch_collator (line 547) | def trivial_batch_collator(batch): function worker_init_reset_seed (line 554) | def worker_init_reset_seed(worker_id): FILE: detectron2/detectron2/data/catalog.py class _DatasetCatalog (line 13) | class _DatasetCatalog(UserDict): method register (line 29) | def register(self, name, func): method get (line 40) | def get(self, name): method list (line 60) | def list(self) -> List[str]: method remove (line 69) | def remove(self, name): method __str__ (line 75) | def __str__(self): class Metadata (line 91) | class Metadata(types.SimpleNamespace): method __getattr__ (line 115) | def __getattr__(self, key): method __setattr__ (line 136) | def __setattr__(self, key, val): method as_dict (line 155) | def as_dict(self): method set (line 162) | def set(self, **kwargs): method get (line 170) | def get(self, key, default=None): class _MetadataCatalog (line 181) | class _MetadataCatalog(UserDict): method get (line 194) | def get(self, name): method list (line 209) | def list(self): method remove (line 218) | def remove(self, name): method __str__ (line 224) | def __str__(self): FILE: detectron2/detectron2/data/common.py function _shard_iterator_dataloader_worker (line 16) | def _shard_iterator_dataloader_worker(iterable): class _MapIterableDataset (line 26) | class _MapIterableDataset(data.IterableDataset): method __init__ (line 36) | def __init__(self, dataset, map_func): method __len__ (line 40) | def __len__(self): method __iter__ (line 43) | def __iter__(self): class MapDataset (line 49) | class MapDataset(data.Dataset): method __init__ (line 54) | def __init__(self, dataset, map_func): method __new__ (line 72) | def __new__(cls, dataset, map_func): method __getnewargs__ (line 79) | def __getnewargs__(self): method __len__ (line 82) | def __len__(self): method __getitem__ (line 85) | def __getitem__(self, idx): class DatasetFromList (line 109) | class DatasetFromList(data.Dataset): method __init__ (line 114) | def __init__(self, lst: list, copy: bool = True, serialize: bool = True): method __len__ (line 146) | def __len__(self): method __getitem__ (line 152) | def __getitem__(self, idx): class ToIterableDataset (line 164) | class ToIterableDataset(data.IterableDataset): method __init__ (line 170) | def __init__(self, dataset: data.Dataset, sampler: Sampler, shard_samp... method __iter__ (line 190) | def __iter__(self): method __len__ (line 203) | def __len__(self): class AspectRatioGroupedDataset (line 207) | class AspectRatioGroupedDataset(data.IterableDataset): method __init__ (line 220) | def __init__(self, dataset, batch_size): method __iter__ (line 233) | def __iter__(self): FILE: detectron2/detectron2/data/dataset_mapper.py class DatasetMapper (line 20) | class DatasetMapper: method __init__ (line 38) | def __init__( method from_config (line 86) | def from_config(cls, cfg, is_train: bool = True): method _transform_annotations (line 115) | def _transform_annotations(self, dataset_dict, transforms, image_shape): method __call__ (line 144) | def __call__(self, dataset_dict): FILE: detectron2/detectron2/data/datasets/builtin.py function register_all_coco (line 101) | def register_all_coco(root): function register_all_lvis (line 165) | def register_all_lvis(root): function register_all_cityscapes (line 184) | def register_all_cityscapes(root): function register_all_pascal_voc (line 215) | def register_all_pascal_voc(root): function register_all_ade20k (line 231) | def register_all_ade20k(root): FILE: detectron2/detectron2/data/datasets/builtin_meta.py function _get_coco_instances_meta (line 235) | def _get_coco_instances_meta(): function _get_coco_panoptic_separated_meta (line 250) | def _get_coco_panoptic_separated_meta(): function _get_builtin_metadata (line 283) | def _get_builtin_metadata(dataset_name): FILE: detectron2/detectron2/data/datasets/cityscapes.py function _get_cityscapes_files (line 27) | def _get_cityscapes_files(image_dir, gt_dir): function load_cityscapes_instances (line 53) | def load_cityscapes_instances(image_dir, gt_dir, from_json=True, to_poly... function load_cityscapes_semantic (line 95) | def load_cityscapes_semantic(image_dir, gt_dir): function _cityscapes_files_to_dict (line 128) | def _cityscapes_files_to_dict(files, from_json, to_polygons): FILE: detectron2/detectron2/data/datasets/cityscapes_panoptic.py function get_cityscapes_panoptic_files (line 18) | def get_cityscapes_panoptic_files(image_dir, gt_dir, json_info): function load_cityscapes_panoptic (line 51) | def load_cityscapes_panoptic(image_dir, gt_dir, gt_json, meta): function register_all_cityscapes_panoptic (line 127) | def register_all_cityscapes_panoptic(root): FILE: detectron2/detectron2/data/datasets/coco.py function load_coco_json (line 30) | def load_coco_json(json_file, image_root, dataset_name=None, extra_annot... function load_sem_seg (line 230) | def load_sem_seg(gt_root, image_root, gt_ext="png", image_ext="jpg"): function convert_to_coco_dict (line 306) | def convert_to_coco_dict(dataset_name): function convert_to_coco_json (line 445) | def convert_to_coco_json(dataset_name, output_file, allow_cached=True): function register_coco_instances (line 479) | def register_coco_instances(name, metadata, json_file, image_root): FILE: detectron2/detectron2/data/datasets/coco_panoptic.py function load_coco_panoptic_json (line 14) | def load_coco_panoptic_json(json_file, image_dir, gt_dir, meta): function register_coco_panoptic (line 66) | def register_coco_panoptic( function register_coco_panoptic_separated (line 102) | def register_coco_panoptic_separated( function merge_to_panoptic (line 168) | def merge_to_panoptic(detection_dicts, sem_seg_dicts): FILE: detectron2/detectron2/data/datasets/lvis.py function register_lvis_instances (line 25) | def register_lvis_instances(name, metadata, json_file, image_root): function load_lvis_json (line 41) | def load_lvis_json(json_file, image_root, dataset_name=None, extra_annot... function get_lvis_instances_meta (line 168) | def get_lvis_instances_meta(dataset_name): function _get_lvis_instances_meta_v0_5 (line 187) | def _get_lvis_instances_meta_v0_5(): function _get_lvis_instances_meta_v1 (line 200) | def _get_lvis_instances_meta_v1(): FILE: detectron2/detectron2/data/datasets/pascal_voc.py function load_voc_instances (line 25) | def load_voc_instances(dirname: str, split: str, class_names: Union[List... function register_pascal_voc (line 78) | def register_pascal_voc(name, dirname, split, year, class_names=CLASS_NA... FILE: detectron2/detectron2/data/detection_utils.py class SizeMismatchError (line 46) | class SizeMismatchError(ValueError): function convert_PIL_to_numpy (line 60) | def convert_PIL_to_numpy(image, format): function convert_image_to_rgb (line 93) | def convert_image_to_rgb(image, format): function _apply_exif_orientation (line 119) | def _apply_exif_orientation(image): function read_image (line 166) | def read_image(file_name, format=None): function check_image_size (line 188) | def check_image_size(dataset_dict, image): function transform_proposals (line 214) | def transform_proposals(dataset_dict, image_shape, transforms, *, propos... function transform_instance_annotations (line 257) | def transform_instance_annotations( function transform_keypoint_annotations (line 321) | def transform_keypoint_annotations(keypoints, transforms, image_size, ke... function annotations_to_instances (line 369) | def annotations_to_instances(annos, image_size, mask_format="polygon"): function annotations_to_instances_rotated (line 444) | def annotations_to_instances_rotated(annos, image_size): function filter_empty_instances (line 473) | def filter_empty_instances( function create_keypoint_hflip_indices (line 509) | def create_keypoint_hflip_indices(dataset_names: Union[str, List[str]]) ... function get_fed_loss_cls_weights (line 534) | def get_fed_loss_cls_weights(dataset_names: Union[str, List[str]], freq_... function gen_crop_transform_with_instance (line 557) | def gen_crop_transform_with_instance(crop_size, image_size, instance): function check_metadata_consistency (line 587) | def check_metadata_consistency(key, dataset_names): function build_augmentation (line 616) | def build_augmentation(cfg, is_train): FILE: detectron2/detectron2/data/samplers/distributed_sampler.py class TrainingSampler (line 15) | class TrainingSampler(Sampler): method __init__ (line 36) | def __init__(self, size: int, shuffle: bool = True, seed: Optional[int... method __iter__ (line 58) | def __iter__(self): method _infinite_indices (line 62) | def _infinite_indices(self): class RandomSubsetTrainingSampler (line 72) | class RandomSubsetTrainingSampler(TrainingSampler): method __init__ (line 79) | def __init__( method _infinite_indices (line 117) | def _infinite_indices(self): class RepeatFactorTrainingSampler (line 129) | class RepeatFactorTrainingSampler(Sampler): method __init__ (line 135) | def __init__(self, repeat_factors, *, shuffle=True, seed=None): method repeat_factors_from_category_frequency (line 158) | def repeat_factors_from_category_frequency(dataset_dicts, repeat_thresh): method _get_epoch_indices (line 204) | def _get_epoch_indices(self, generator): method __iter__ (line 227) | def __iter__(self): method _infinite_indices (line 231) | def _infinite_indices(self): class InferenceSampler (line 245) | class InferenceSampler(Sampler): method __init__ (line 253) | def __init__(self, size: int): method _get_local_indices (line 265) | def _get_local_indices(total_size, world_size, rank): method __iter__ (line 274) | def __iter__(self): method __len__ (line 277) | def __len__(self): FILE: detectron2/detectron2/data/samplers/grouped_batch_sampler.py class GroupedBatchSampler (line 6) | class GroupedBatchSampler(BatchSampler): method __init__ (line 14) | def __init__(self, sampler, group_ids, batch_size): method __iter__ (line 37) | def __iter__(self): method __len__ (line 46) | def __len__(self): FILE: detectron2/detectron2/data/transforms/augmentation.py function _check_img_dtype (line 27) | def _check_img_dtype(img): function _get_aug_input_args (line 39) | def _get_aug_input_args(aug, aug_input) -> List[Any]: class Augmentation (line 80) | class Augmentation: method _init (line 109) | def _init(self, params=None): method get_transform (line 115) | def get_transform(self, *args) -> Transform: method __call__ (line 151) | def __call__(self, aug_input) -> Transform: method _rand_range (line 176) | def _rand_range(self, low=1.0, high=None, size=None): method __repr__ (line 186) | def __repr__(self): class _TransformToAug (line 219) | class _TransformToAug(Augmentation): method __init__ (line 220) | def __init__(self, tfm: Transform): method get_transform (line 223) | def get_transform(self, *args): method __repr__ (line 226) | def __repr__(self): function _transform_to_aug (line 232) | def _transform_to_aug(tfm_or_aug): class AugmentationList (line 244) | class AugmentationList(Augmentation): method __init__ (line 256) | def __init__(self, augs): method __call__ (line 264) | def __call__(self, aug_input) -> Transform: method __repr__ (line 271) | def __repr__(self): class AugInput (line 278) | class AugInput: method __init__ (line 310) | def __init__( method transform (line 331) | def transform(self, tfm: Transform) -> None: method apply_augmentations (line 344) | def apply_augmentations( function apply_augmentations (line 353) | def apply_augmentations(augmentations: List[Union[Transform, Augmentatio... FILE: detectron2/detectron2/data/transforms/augmentation_impl.py class RandomApply (line 43) | class RandomApply(Augmentation): method __init__ (line 48) | def __init__(self, tfm_or_aug, prob=0.5): method get_transform (line 62) | def get_transform(self, *args): method __call__ (line 69) | def __call__(self, aug_input): class RandomFlip (line 77) | class RandomFlip(Augmentation): method __init__ (line 82) | def __init__(self, prob=0.5, *, horizontal=True, vertical=False): method get_transform (line 97) | def get_transform(self, image): class Resize (line 109) | class Resize(Augmentation): method __init__ (line 112) | def __init__(self, shape, interp=Image.BILINEAR): method get_transform (line 123) | def get_transform(self, image): class ResizeShortestEdge (line 129) | class ResizeShortestEdge(Augmentation): method __init__ (line 138) | def __init__( method get_transform (line 163) | def get_transform(self, image): method get_output_shape (line 176) | def get_output_shape( class ResizeScale (line 198) | class ResizeScale(Augmentation): method __init__ (line 207) | def __init__( method _get_resize (line 226) | def _get_resize(self, image: np.ndarray, scale: float) -> Transform: method get_transform (line 243) | def get_transform(self, image: np.ndarray) -> Transform: class RandomRotation (line 248) | class RandomRotation(Augmentation): method __init__ (line 254) | def __init__(self, angle, expand=True, center=None, sample_style="rang... method get_transform (line 278) | def get_transform(self, image): class FixedSizeCrop (line 302) | class FixedSizeCrop(Augmentation): method __init__ (line 310) | def __init__(self, crop_size: Tuple[int], pad: bool = True, pad_value:... method _get_crop (line 320) | def _get_crop(self, image: np.ndarray) -> Transform: method _get_pad (line 334) | def _get_pad(self, image: np.ndarray) -> Transform: method get_transform (line 347) | def get_transform(self, image: np.ndarray) -> TransformList: class RandomCrop (line 354) | class RandomCrop(Augmentation): method __init__ (line 359) | def __init__(self, crop_type: str, crop_size): method get_transform (line 381) | def get_transform(self, image): method get_crop_size (line 389) | def get_crop_size(self, image_size): class RandomCrop_CategoryAreaConstraint (line 416) | class RandomCrop_CategoryAreaConstraint(Augmentation): method __init__ (line 424) | def __init__( method get_transform (line 443) | def get_transform(self, image, sem_seg): class RandomExtent (line 462) | class RandomExtent(Augmentation): method __init__ (line 471) | def __init__(self, scale_range, shift_range): method get_transform (line 484) | def get_transform(self, image): class RandomContrast (line 507) | class RandomContrast(Augmentation): method __init__ (line 519) | def __init__(self, intensity_min, intensity_max): method get_transform (line 528) | def get_transform(self, image): class RandomBrightness (line 533) | class RandomBrightness(Augmentation): method __init__ (line 545) | def __init__(self, intensity_min, intensity_max): method get_transform (line 554) | def get_transform(self, image): class RandomSaturation (line 559) | class RandomSaturation(Augmentation): method __init__ (line 572) | def __init__(self, intensity_min, intensity_max): method get_transform (line 581) | def get_transform(self, image): class RandomLighting (line 588) | class RandomLighting(Augmentation): method __init__ (line 597) | def __init__(self, scale): method get_transform (line 609) | def get_transform(self, image): FILE: detectron2/detectron2/data/transforms/transform.py class ExtentTransform (line 36) | class ExtentTransform(Transform): method __init__ (line 46) | def __init__(self, src_rect, output_size, interp=Image.LINEAR, fill=0): method apply_image (line 57) | def apply_image(self, img, interp=None): method apply_coords (line 75) | def apply_coords(self, coords): method apply_segmentation (line 89) | def apply_segmentation(self, segmentation): class ResizeTransform (line 94) | class ResizeTransform(Transform): method __init__ (line 99) | def __init__(self, h, w, new_h, new_w, interp=None): method apply_image (line 112) | def apply_image(self, img, interp=None): method apply_coords (line 149) | def apply_coords(self, coords): method apply_segmentation (line 154) | def apply_segmentation(self, segmentation): method inverse (line 158) | def inverse(self): class RotationTransform (line 162) | class RotationTransform(Transform): method __init__ (line 168) | def __init__(self, h, w, angle, expand=True, center=None, interp=None): method apply_image (line 200) | def apply_image(self, img, interp=None): method apply_coords (line 210) | def apply_coords(self, coords): method apply_segmentation (line 219) | def apply_segmentation(self, segmentation): method create_rotation_matrix (line 223) | def create_rotation_matrix(self, offset=0): method inverse (line 235) | def inverse(self): class ColorTransform (line 250) | class ColorTransform(Transform): method __init__ (line 258) | def __init__(self, op): method apply_image (line 269) | def apply_image(self, img): method apply_coords (line 272) | def apply_coords(self, coords): method inverse (line 275) | def inverse(self): method apply_segmentation (line 278) | def apply_segmentation(self, segmentation): class PILColorTransform (line 282) | class PILColorTransform(ColorTransform): method __init__ (line 289) | def __init__(self, op): method apply_image (line 302) | def apply_image(self, img): function HFlip_rotated_box (line 307) | def HFlip_rotated_box(transform, rotated_boxes): function Resize_rotated_box (line 323) | def Resize_rotated_box(transform, rotated_boxes): FILE: detectron2/detectron2/engine/defaults.py function create_ddp_model (line 60) | def create_ddp_model(model, *, fp16_compression=False, **kwargs): function default_argument_parser (line 82) | def default_argument_parser(epilog=None): function _try_get_key (line 146) | def _try_get_key(cfg, *keys, default=None): function _highlight (line 160) | def _highlight(code, filename): function default_setup (line 174) | def default_setup(cfg, args): function default_writers (line 230) | def default_writers(output_dir: str, max_iter: Optional[int] = None): class DefaultPredictor (line 252) | class DefaultPredictor: method __init__ (line 280) | def __init__(self, cfg): method __call__ (line 297) | def __call__(self, original_image): class DefaultTrainer (line 321) | class DefaultTrainer(TrainerBase): method __init__ (line 364) | def __init__(self, cfg): method resume_or_load (line 398) | def resume_or_load(self, resume=True): method build_hooks (line 418) | def build_hooks(self): method build_writers (line 466) | def build_writers(self): method train (line 477) | def train(self): method run_step (line 492) | def run_step(self): method state_dict (line 496) | def state_dict(self): method load_state_dict (line 501) | def load_state_dict(self, state_dict): method build_model (line 506) | def build_model(cls, cfg): method build_optimizer (line 520) | def build_optimizer(cls, cfg, model): method build_lr_scheduler (line 531) | def build_lr_scheduler(cls, cfg, optimizer): method build_train_loader (line 539) | def build_train_loader(cls, cfg): method build_test_loader (line 550) | def build_test_loader(cls, cfg, dataset_name): method build_evaluator (line 561) | def build_evaluator(cls, cfg, dataset_name): method test (line 577) | def test(cls, cfg, model, evaluators=None): method auto_scale_workers (line 633) | def auto_scale_workers(cfg, num_workers: int): FILE: detectron2/detectron2/engine/hooks.py class CallbackHook (line 49) | class CallbackHook(HookBase): method __init__ (line 54) | def __init__(self, *, before_train=None, after_train=None, before_step... method before_train (line 63) | def before_train(self): method after_train (line 67) | def after_train(self): method before_step (line 75) | def before_step(self): method after_step (line 79) | def after_step(self): class IterationTimer (line 84) | class IterationTimer(HookBase): method __init__ (line 96) | def __init__(self, warmup_iter=3): method before_train (line 107) | def before_train(self): method after_train (line 112) | def after_train(self): method before_step (line 138) | def before_step(self): method after_step (line 142) | def after_step(self): class PeriodicWriter (line 156) | class PeriodicWriter(HookBase): method __init__ (line 164) | def __init__(self, writers, period=20): method after_step (line 175) | def after_step(self): method after_train (line 182) | def after_train(self): class PeriodicCheckpointer (line 190) | class PeriodicCheckpointer(_PeriodicCheckpointer, HookBase): method before_train (line 201) | def before_train(self): method after_step (line 204) | def after_step(self): class BestCheckpointer (line 209) | class BestCheckpointer(HookBase): method __init__ (line 217) | def __init__( method _update_best (line 250) | def _update_best(self, val, iteration): method _best_checking (line 257) | def _best_checking(self): method after_step (line 290) | def after_step(self): method after_train (line 300) | def after_train(self): class LRScheduler (line 306) | class LRScheduler(HookBase): method __init__ (line 312) | def __init__(self, optimizer=None, scheduler=None): method before_train (line 325) | def before_train(self): method get_best_param_group_id (line 337) | def get_best_param_group_id(optimizer): method after_step (line 355) | def after_step(self): method scheduler (line 361) | def scheduler(self): method state_dict (line 364) | def state_dict(self): method load_state_dict (line 369) | def load_state_dict(self, state_dict): class TorchProfiler (line 376) | class TorchProfiler(HookBase): method __init__ (line 394) | def __init__(self, enable_predicate, output_dir, *, activities=None, s... method before_step (line 409) | def before_step(self): method after_step (line 434) | def after_step(self): class AutogradProfiler (line 456) | class AutogradProfiler(TorchProfiler): method __init__ (line 479) | def __init__(self, enable_predicate, output_dir, *, use_cuda=True): method before_step (line 493) | def before_step(self): class EvalHook (line 501) | class EvalHook(HookBase): method __init__ (line 508) | def __init__(self, eval_period, eval_function, eval_after_train=True): method _do_eval (line 527) | def _do_eval(self): method after_step (line 550) | def after_step(self): method after_train (line 557) | def after_train(self): class PreciseBN (line 566) | class PreciseBN(HookBase): method __init__ (line 576) | def __init__(self, period, model, data_loader, num_iter): method after_step (line 605) | def after_step(self): method update_stats (line 611) | def update_stats(self): class TorchMemoryStats (line 638) | class TorchMemoryStats(HookBase): method __init__ (line 643) | def __init__(self, period=20, max_runs=10): method after_step (line 655) | def after_step(self): FILE: detectron2/detectron2/engine/launch.py function _find_free_port (line 15) | def _find_free_port(): function launch (line 27) | def launch( function _distributed_worker (line 85) | def _distributed_worker( FILE: detectron2/detectron2/engine/train_loop.py class HookBase (line 19) | class HookBase: method before_train (line 56) | def before_train(self): method after_train (line 62) | def after_train(self): method before_step (line 68) | def before_step(self): method after_step (line 74) | def after_step(self): method state_dict (line 80) | def state_dict(self): class TrainerBase (line 88) | class TrainerBase: method __init__ (line 107) | def __init__(self) -> None: method register_hooks (line 115) | def register_hooks(self, hooks: List[Optional[HookBase]]) -> None: method train (line 133) | def train(self, start_iter: int, max_iter: int): method before_train (line 161) | def before_train(self): method after_train (line 165) | def after_train(self): method before_step (line 170) | def before_step(self): method after_step (line 178) | def after_step(self): method run_step (line 182) | def run_step(self): method state_dict (line 185) | def state_dict(self): method load_state_dict (line 200) | def load_state_dict(self, state_dict): class SimpleTrainer (line 216) | class SimpleTrainer(TrainerBase): method __init__ (line 235) | def __init__(self, model, data_loader, optimizer): method run_step (line 259) | def run_step(self): method _data_loader_iter (line 298) | def _data_loader_iter(self): method reset_data_loader (line 304) | def reset_data_loader(self, data_loader_builder): method _write_metrics (line 314) | def _write_metrics( method write_metrics (line 323) | def write_metrics( method state_dict (line 365) | def state_dict(self): method load_state_dict (line 370) | def load_state_dict(self, state_dict): class AMPTrainer (line 375) | class AMPTrainer(SimpleTrainer): method __init__ (line 381) | def __init__(self, model, data_loader, optimizer, grad_scaler=None): method run_step (line 400) | def run_step(self): method state_dict (line 428) | def state_dict(self): method load_state_dict (line 433) | def load_state_dict(self, state_dict): FILE: detectron2/detectron2/evaluation/cityscapes_evaluation.py class CityscapesEvaluator (line 18) | class CityscapesEvaluator(DatasetEvaluator): method __init__ (line 23) | def __init__(self, dataset_name): method reset (line 34) | def reset(self): class CityscapesInstanceEvaluator (line 50) | class CityscapesInstanceEvaluator(CityscapesEvaluator): method process (line 60) | def process(self, inputs, outputs): method evaluate (line 91) | def evaluate(self): class CityscapesSemSegEvaluator (line 132) | class CityscapesSemSegEvaluator(CityscapesEvaluator): method process (line 142) | def process(self, inputs, outputs): method evaluate (line 158) | def evaluate(self): FILE: detectron2/detectron2/evaluation/coco_evaluation.py class COCOEvaluator (line 34) | class COCOEvaluator(DatasetEvaluator): method __init__ (line 47) | def __init__( method reset (line 154) | def reset(self): method process (line 157) | def process(self, inputs, outputs): method evaluate (line 177) | def evaluate(self, img_ids=None): method _tasks_from_predictions (line 210) | def _tasks_from_predictions(self, predictions): method _eval_predictions (line 222) | def _eval_predictions(self, predictions, img_ids=None): method _eval_box_proposals (line 284) | def _eval_box_proposals(self, predictions): method _derive_coco_results (line 323) | def _derive_coco_results(self, coco_eval, iou_type, class_names=None): function instances_to_coco_json (line 392) | def instances_to_coco_json(instances, img_id): function _evaluate_box_proposals (line 456) | def _evaluate_box_proposals(dataset_predictions, coco_api, thresholds=No... function _evaluate_predictions_on_coco (line 567) | def _evaluate_predictions_on_coco( class COCOevalMaxDets (line 634) | class COCOevalMaxDets(COCOeval): method summarize (line 640) | def summarize(self): method __str__ (line 721) | def __str__(self): FILE: detectron2/detectron2/evaluation/evaluator.py class DatasetEvaluator (line 15) | class DatasetEvaluator: method reset (line 26) | def reset(self): method process (line 33) | def process(self, inputs, outputs): method evaluate (line 50) | def evaluate(self): class DatasetEvaluators (line 66) | class DatasetEvaluators(DatasetEvaluator): method __init__ (line 74) | def __init__(self, evaluators): method reset (line 82) | def reset(self): method process (line 86) | def process(self, inputs, outputs): method evaluate (line 90) | def evaluate(self): function inference_on_dataset (line 103) | def inference_on_dataset( function inference_context (line 213) | def inference_context(model): FILE: detectron2/detectron2/evaluation/fast_eval_api.py class COCOeval_opt (line 13) | class COCOeval_opt(COCOeval): method evaluate (line 19) | def evaluate(self): method accumulate (line 98) | def accumulate(self): FILE: detectron2/detectron2/evaluation/lvis_evaluation.py class LVISEvaluator (line 22) | class LVISEvaluator(DatasetEvaluator): method __init__ (line 28) | def __init__( method reset (line 77) | def reset(self): method process (line 80) | def process(self, inputs, outputs): method evaluate (line 99) | def evaluate(self): method _tasks_from_predictions (line 128) | def _tasks_from_predictions(self, predictions): method _eval_predictions (line 134) | def _eval_predictions(self, predictions): method _eval_box_proposals (line 180) | def _eval_box_proposals(self, predictions): function _evaluate_box_proposals (line 222) | def _evaluate_box_proposals(dataset_predictions, lvis_api, thresholds=No... function _evaluate_predictions_on_lvis (line 331) | def _evaluate_predictions_on_lvis( FILE: detectron2/detectron2/evaluation/panoptic_evaluation.py class COCOPanopticEvaluator (line 24) | class COCOPanopticEvaluator(DatasetEvaluator): method __init__ (line 32) | def __init__(self, dataset_name: str, output_dir: Optional[str] = None): method reset (line 50) | def reset(self): method _convert_category_id (line 53) | def _convert_category_id(self, segment_info): method process (line 68) | def process(self, inputs, outputs): method evaluate (line 114) | def evaluate(self): function _print_panoptic_results (line 168) | def _print_panoptic_results(pq_res): FILE: detectron2/detectron2/evaluation/pascal_voc_evaluation.py class PascalVOCDetectionEvaluator (line 20) | class PascalVOCDetectionEvaluator(DatasetEvaluator): method __init__ (line 31) | def __init__(self, dataset_name): method reset (line 51) | def reset(self): method process (line 54) | def process(self, inputs, outputs): method evaluate (line 70) | def evaluate(self): function parse_rec (line 132) | def parse_rec(filename): function voc_ap (line 155) | def voc_ap(rec, prec, use_07_metric=False): function voc_eval (line 187) | def voc_eval(detpath, annopath, imagesetfile, classname, ovthresh=0.5, u... FILE: detectron2/detectron2/evaluation/rotated_coco_evaluation.py class RotatedCOCOeval (line 15) | class RotatedCOCOeval(COCOeval): method is_rotated (line 17) | def is_rotated(box_list): method boxlist_to_tensor (line 34) | def boxlist_to_tensor(boxlist, output_box_dim): method compute_iou_dt_gt (line 57) | def compute_iou_dt_gt(self, dt, gt, is_crowd): method computeIoU (line 68) | def computeIoU(self, imgId, catId): class RotatedCOCOEvaluator (line 97) | class RotatedCOCOEvaluator(COCOEvaluator): method process (line 104) | def process(self, inputs, outputs): method instances_to_json (line 124) | def instances_to_json(self, instances, img_id): method _eval_predictions (line 148) | def _eval_predictions(self, predictions, img_ids=None): # img_ids: un... method _evaluate_predictions_on_coco (line 192) | def _evaluate_predictions_on_coco(self, coco_gt, coco_results): FILE: detectron2/detectron2/evaluation/sem_seg_evaluation.py function load_image_into_numpy_array (line 27) | def load_image_into_numpy_array( class SemSegEvaluator (line 37) | class SemSegEvaluator(DatasetEvaluator): method __init__ (line 42) | def __init__( method reset (line 113) | def reset(self): method process (line 120) | def process(self, inputs, outputs): method evaluate (line 154) | def evaluate(self): method encode_json_sem_seg (line 232) | def encode_json_sem_seg(self, sem_seg, input_file_name): method _mask_to_boundary (line 254) | def _mask_to_boundary(self, mask: np.ndarray, dilation_ratio=0.02): FILE: detectron2/detectron2/evaluation/testing.py function print_csv_format (line 9) | def print_csv_format(results): function verify_results (line 31) | def verify_results(cfg, results): function flatten_results_dict (line 68) | def flatten_results_dict(results): FILE: detectron2/detectron2/export/__init__.py function add_export_config (line 22) | def add_export_config(cfg): FILE: detectron2/detectron2/export/api.py class Caffe2Tracer (line 22) | class Caffe2Tracer: method __init__ (line 45) | def __init__(self, cfg: CfgNode, model: nn.Module, inputs): method export_caffe2 (line 65) | def export_caffe2(self): method export_onnx (line 81) | def export_onnx(self): method export_torchscript (line 96) | def export_torchscript(self): class Caffe2Model (line 110) | class Caffe2Model(nn.Module): method __init__ (line 126) | def __init__(self, predict_net, init_net): method predict_net (line 136) | def predict_net(self): method init_net (line 143) | def init_net(self): method save_protobuf (line 149) | def save_protobuf(self, output_dir): method save_graph (line 175) | def save_graph(self, output_file, inputs=None): method load_protobuf (line 198) | def load_protobuf(dir): method __call__ (line 218) | def __call__(self, inputs): FILE: detectron2/detectron2/export/c10.py class Caffe2Boxes (line 23) | class Caffe2Boxes(Boxes): method __init__ (line 30) | def __init__(self, tensor): class InstancesList (line 39) | class InstancesList(object): method __init__ (line 49) | def __init__(self, im_info, indices, extra_fields=None): method get_fields (line 59) | def get_fields(self): method has (line 73) | def has(self, name): method set (line 76) | def set(self, name, value): method __setattr__ (line 92) | def __setattr__(self, name, val): method __getattr__ (line 98) | def __getattr__(self, name): method __len__ (line 103) | def __len__(self): method flatten (line 106) | def flatten(self): method to_d2_instances_list (line 116) | def to_d2_instances_list(instances_list): class Caffe2Compatible (line 156) | class Caffe2Compatible(object): method _get_tensor_mode (line 161) | def _get_tensor_mode(self): method _set_tensor_mode (line 164) | def _set_tensor_mode(self, v): class Caffe2RPN (line 173) | class Caffe2RPN(Caffe2Compatible, rpn.RPN): method from_config (line 175) | def from_config(cls, cfg, input_shape: Dict[str, ShapeSpec]): method _generate_proposals (line 182) | def _generate_proposals( method forward (line 265) | def forward(self, images, features, gt_instances=None): method c2_postprocess (line 277) | def c2_postprocess(im_info, rpn_rois, rpn_roi_probs, tensor_mode): class Caffe2ROIPooler (line 293) | class Caffe2ROIPooler(Caffe2Compatible, poolers.ROIPooler): method c2_preprocess (line 295) | def c2_preprocess(box_lists): method forward (line 305) | def forward(self, x, box_lists): class Caffe2FastRCNNOutputsInference (line 385) | class Caffe2FastRCNNOutputsInference: method __init__ (line 386) | def __init__(self, tensor_mode): method __call__ (line 389) | def __call__(self, box_predictor, predictions, proposals): class Caffe2MaskRCNNInference (line 519) | class Caffe2MaskRCNNInference: method __call__ (line 520) | def __call__(self, pred_mask_logits, pred_instances): class Caffe2KeypointRCNNInference (line 531) | class Caffe2KeypointRCNNInference: method __init__ (line 532) | def __init__(self, use_heatmap_max_keypoint): method __call__ (line 535) | def __call__(self, pred_keypoint_logits, pred_instances): FILE: detectron2/detectron2/export/caffe2_export.py function export_onnx_model (line 34) | def export_onnx_model(model, inputs): function _op_stats (line 70) | def _op_stats(net_def): function _assign_device_option (line 79) | def _assign_device_option( function export_caffe2_detection_model (line 125) | def export_caffe2_detection_model(model: torch.nn.Module, tensor_inputs:... function run_and_save_graph (line 171) | def run_and_save_graph(predict_net, init_net, tensor_inputs, graph_save_... FILE: detectron2/detectron2/export/caffe2_inference.py class ProtobufModel (line 17) | class ProtobufModel(torch.nn.Module): method __init__ (line 26) | def __init__(self, predict_net, init_net): method _infer_output_devices (line 48) | def _infer_output_devices(self, inputs): method forward (line 71) | def forward(self, inputs): class ProtobufDetectionModel (line 125) | class ProtobufDetectionModel(torch.nn.Module): method __init__ (line 131) | def __init__(self, predict_net, init_net, *, convert_outputs=None): method _convert_inputs (line 151) | def _convert_inputs(self, batched_inputs): method forward (line 157) | def forward(self, batched_inputs): FILE: detectron2/detectron2/export/caffe2_modeling.py function assemble_rcnn_outputs_by_name (line 27) | def assemble_rcnn_outputs_by_name(image_sizes, tensor_outputs, force_mas... function _cast_to_f32 (line 95) | def _cast_to_f32(f64): function set_caffe2_compatible_tensor_mode (line 99) | def set_caffe2_compatible_tensor_mode(model, enable=True): function convert_batched_inputs_to_c2_format (line 107) | def convert_batched_inputs_to_c2_format(batched_inputs, size_divisibilit... class Caffe2MetaArch (line 135) | class Caffe2MetaArch(Caffe2Compatible, torch.nn.Module): method __init__ (line 142) | def __init__(self, cfg, torch_model): method get_caffe2_inputs (line 154) | def get_caffe2_inputs(self, batched_inputs): method encode_additional_info (line 178) | def encode_additional_info(self, predict_net, init_net): method forward (line 184) | def forward(self, inputs): method _caffe2_preprocess_image (line 199) | def _caffe2_preprocess_image(self, inputs): method get_outputs_converter (line 217) | def get_outputs_converter(predict_net, init_net): class Caffe2GeneralizedRCNN (line 245) | class Caffe2GeneralizedRCNN(Caffe2MetaArch): method __init__ (line 246) | def __init__(self, cfg, torch_model): method encode_additional_info (line 259) | def encode_additional_info(self, predict_net, init_net): method forward (line 268) | def forward(self, inputs): method get_outputs_converter (line 279) | def get_outputs_converter(predict_net, init_net): class Caffe2RetinaNet (line 289) | class Caffe2RetinaNet(Caffe2MetaArch): method __init__ (line 290) | def __init__(self, cfg, torch_model): method forward (line 295) | def forward(self, inputs): method encode_additional_info (line 316) | def encode_additional_info(self, predict_net, init_net): method _encode_anchor_generator_cfg (line 349) | def _encode_anchor_generator_cfg(self, predict_net): method get_outputs_converter (line 359) | def get_outputs_converter(predict_net, init_net): FILE: detectron2/detectron2/export/caffe2_patch.py class GenericMixin (line 22) | class GenericMixin(object): class Caffe2CompatibleConverter (line 26) | class Caffe2CompatibleConverter(object): method __init__ (line 32) | def __init__(self, replaceCls): method create_from (line 35) | def create_from(self, module): function patch (line 57) | def patch(model, target, updater, *args, **kwargs): function patch_generalized_rcnn (line 70) | def patch_generalized_rcnn(model): function mock_fastrcnn_outputs_inference (line 79) | def mock_fastrcnn_outputs_inference( function mock_mask_rcnn_inference (line 94) | def mock_mask_rcnn_inference(tensor_mode, patched_module, check=True): function mock_keypoint_rcnn_inference (line 104) | def mock_keypoint_rcnn_inference(tensor_mode, patched_module, use_heatma... class ROIHeadsPatcher (line 114) | class ROIHeadsPatcher: method __init__ (line 115) | def __init__(self, heads, use_heatmap_max_keypoint): method mock_roi_heads (line 120) | def mock_roi_heads(self, tensor_mode=True): FILE: detectron2/detectron2/export/flatten.py class Schema (line 15) | class Schema: method flatten (line 37) | def flatten(cls, obj): method __call__ (line 40) | def __call__(self, values): method _concat (line 44) | def _concat(values): method _split (line 54) | def _split(values, sizes): class ListSchema (line 68) | class ListSchema(Schema): method __call__ (line 72) | def __call__(self, values): method flatten (line 82) | def flatten(cls, obj): class TupleSchema (line 89) | class TupleSchema(ListSchema): method __call__ (line 90) | def __call__(self, values): class IdentitySchema (line 95) | class IdentitySchema(Schema): method __call__ (line 96) | def __call__(self, values): method flatten (line 100) | def flatten(cls, obj): class DictSchema (line 105) | class DictSchema(ListSchema): method __call__ (line 108) | def __call__(self, values): method flatten (line 113) | def flatten(cls, obj): class InstancesSchema (line 124) | class InstancesSchema(DictSchema): method __call__ (line 125) | def __call__(self, values): method flatten (line 131) | def flatten(cls, obj): class TensorWrapSchema (line 140) | class TensorWrapSchema(Schema): method __call__ (line 148) | def __call__(self, values): method flatten (line 152) | def flatten(cls, obj): function flatten_to_tuple (line 158) | def flatten_to_tuple(obj): class TracingAdapter (line 186) | class TracingAdapter(nn.Module): method __init__ (line 225) | def __init__( method forward (line 279) | def forward(self, *args: torch.Tensor): method _create_wrapper (line 319) | def _create_wrapper(self, traced_model): FILE: detectron2/detectron2/export/shared.py function to_device (line 25) | def to_device(t, device_str): function BilinearInterpolation (line 48) | def BilinearInterpolation(tensor_in, up_scale): function onnx_compatibale_interpolate (line 82) | def onnx_compatibale_interpolate( function mock_torch_nn_functional_interpolate (line 116) | def mock_torch_nn_functional_interpolate(): class ScopedWS (line 129) | class ScopedWS(object): method __init__ (line 130) | def __init__(self, ws_name, is_reset, is_cleanup=False): method __enter__ (line 136) | def __enter__(self): method __exit__ (line 145) | def __exit__(self, *args): function fetch_any_blob (line 152) | def fetch_any_blob(name): function get_pb_arg (line 167) | def get_pb_arg(pb, arg_name): function get_pb_arg_valf (line 174) | def get_pb_arg_valf(pb, arg_name, default_val): function get_pb_arg_floats (line 179) | def get_pb_arg_floats(pb, arg_name, default_val): function get_pb_arg_ints (line 184) | def get_pb_arg_ints(pb, arg_name, default_val): function get_pb_arg_vali (line 189) | def get_pb_arg_vali(pb, arg_name, default_val): function get_pb_arg_vals (line 194) | def get_pb_arg_vals(pb, arg_name, default_val): function get_pb_arg_valstrings (line 199) | def get_pb_arg_valstrings(pb, arg_name, default_val): function check_set_pb_arg (line 204) | def check_set_pb_arg(pb, arg_name, arg_attr, arg_value, allow_override=F... function _create_const_fill_op_from_numpy (line 222) | def _create_const_fill_op_from_numpy(name, tensor, device_option=None): function _create_const_fill_op_from_c2_int8_tensor (line 243) | def _create_const_fill_op_from_c2_int8_tensor(name, int8_tensor): function create_const_fill_op (line 265) | def create_const_fill_op( function construct_init_net_from_params (line 290) | def construct_init_net_from_params( function get_producer_map (line 314) | def get_producer_map(ssa): function get_consumer_map (line 327) | def get_consumer_map(ssa): function get_params_from_init_net (line 340) | def get_params_from_init_net( function _updater_raise (line 369) | def _updater_raise(op, input_types, output_types): function _generic_status_identifier (line 376) | def _generic_status_identifier( function infer_device_type (line 448) | def infer_device_type( function _modify_blob_names (line 491) | def _modify_blob_names(ops, blob_rename_f): function _rename_blob (line 507) | def _rename_blob(name, blob_sizes, blob_ranges): function save_graph (line 523) | def save_graph(net, file_name, graph_name="net", op_only=True, blob_size... function save_graph_base (line 528) | def save_graph_base(net, file_name, graph_name="net", op_only=True, blob... function group_norm_replace_aten_with_caffe2 (line 563) | def group_norm_replace_aten_with_caffe2(predict_net: caffe2_pb2.NetDef): function alias (line 592) | def alias(x, name, is_backward=False): function fuse_alias_placeholder (line 599) | def fuse_alias_placeholder(predict_net, init_net): class IllegalGraphTransformError (line 627) | class IllegalGraphTransformError(ValueError): function _rename_versioned_blob_in_proto (line 631) | def _rename_versioned_blob_in_proto( function rename_op_input (line 662) | def rename_op_input( function rename_op_output (line 729) | def rename_op_output(predict_net: caffe2_pb2.NetDef, op_id: int, output_... function get_sub_graph_external_input_output (line 750) | def get_sub_graph_external_input_output( class DiGraph (line 782) | class DiGraph: method __init__ (line 785) | def __init__(self): method add_edge (line 789) | def add_edge(self, u, v): method get_all_paths (line 795) | def get_all_paths(self, s, d): method from_ssa (line 816) | def from_ssa(ssa): function _get_dependency_chain (line 825) | def _get_dependency_chain(ssa, versioned_target, versioned_source): function identify_reshape_sub_graph (line 855) | def identify_reshape_sub_graph(predict_net: caffe2_pb2.NetDef) -> List[L... function remove_reshape_for_fc (line 882) | def remove_reshape_for_fc(predict_net, params): function fuse_copy_between_cpu_and_gpu (line 952) | def fuse_copy_between_cpu_and_gpu(predict_net: caffe2_pb2.NetDef): function remove_dead_end_ops (line 1010) | def remove_dead_end_ops(net_def: caffe2_pb2.NetDef): FILE: detectron2/detectron2/export/torchscript.py function scripting_with_instances (line 13) | def scripting_with_instances(model, fields): function dump_torchscript_IR (line 63) | def dump_torchscript_IR(model, dir): FILE: detectron2/detectron2/export/torchscript_patch.py function _clear_jit_cache (line 20) | def _clear_jit_cache(): function _add_instances_conversion_methods (line 28) | def _add_instances_conversion_methods(newInstances): function patch_instances (line 51) | def patch_instances(fields): function _gen_instance_class (line 90) | def _gen_instance_class(fields): function _gen_instance_module (line 290) | def _gen_instance_module(fields): function _import (line 309) | def _import(path): function patch_builtin_len (line 316) | def patch_builtin_len(modules=()): function patch_nonscriptable_classes (line 342) | def patch_nonscriptable_classes(): function freeze_training_mode (line 392) | def freeze_training_mode(model): FILE: detectron2/detectron2/layers/aspp.py class ASPP (line 14) | class ASPP(nn.Module): method __init__ (line 19) | def __init__( method forward (line 129) | def forward(self, x): FILE: detectron2/detectron2/layers/batch_norm.py class FrozenBatchNorm2d (line 13) | class FrozenBatchNorm2d(nn.Module): method __init__ (line 35) | def __init__(self, num_features, eps=1e-5): method forward (line 44) | def forward(self, x): method _load_from_state_dict (line 67) | def _load_from_state_dict( method __repr__ (line 84) | def __repr__(self): method convert_frozen_batchnorm (line 88) | def convert_frozen_batchnorm(cls, module): function get_norm (line 121) | def get_norm(norm, out_channels): class NaiveSyncBatchNorm (line 152) | class NaiveSyncBatchNorm(BatchNorm2d): method __init__ (line 180) | def __init__(self, *args, stats_mode="", **kwargs): method forward (line 185) | def forward(self, input): class CycleBatchNormList (line 233) | class CycleBatchNormList(nn.ModuleList): method __init__ (line 249) | def __init__(self, length: int, bn_class=nn.BatchNorm2d, **kwargs): method forward (line 265) | def forward(self, x): method extra_repr (line 276) | def extra_repr(self): class LayerNorm (line 280) | class LayerNorm(nn.Module): method __init__ (line 288) | def __init__(self, normalized_shape, eps=1e-6): method forward (line 295) | def forward(self, x): FILE: detectron2/detectron2/layers/blocks.py class CNNBlockBase (line 16) | class CNNBlockBase(nn.Module): method __init__ (line 29) | def __init__(self, in_channels, out_channels, stride): method freeze (line 43) | def freeze(self): class DepthwiseSeparableConv2d (line 58) | class DepthwiseSeparableConv2d(nn.Module): method __init__ (line 66) | def __init__( method forward (line 110) | def forward(self, x): FILE: detectron2/detectron2/layers/csrc/ROIAlignRotated/ROIAlignRotated.h function namespace (line 5) | namespace detectron2 { FILE: detectron2/detectron2/layers/csrc/ROIAlignRotated/ROIAlignRotated_cpu.cpp type detectron2 (line 12) | namespace detectron2 { type PreCalc (line 16) | struct PreCalc { function pre_calc_for_bilinear_interpolate (line 28) | void pre_calc_for_bilinear_interpolate( function bilinear_interpolate_gradient (line 132) | void bilinear_interpolate_gradient( function add (line 195) | inline void add(T* address, const T& val) { function ROIAlignRotatedForward (line 202) | void ROIAlignRotatedForward( function ROIAlignRotatedBackward (line 313) | void ROIAlignRotatedBackward( function ROIAlignRotated_forward_cpu (line 418) | at::Tensor ROIAlignRotated_forward_cpu( function ROIAlignRotated_backward_cpu (line 466) | at::Tensor ROIAlignRotated_backward_cpu( FILE: detectron2/detectron2/layers/csrc/box_iou_rotated/box_iou_rotated.h function namespace (line 5) | namespace detectron2 { FILE: detectron2/detectron2/layers/csrc/box_iou_rotated/box_iou_rotated_cpu.cpp type detectron2 (line 5) | namespace detectron2 { function box_iou_rotated_cpu_kernel (line 8) | void box_iou_rotated_cpu_kernel( function box_iou_rotated_cpu (line 23) | at::Tensor box_iou_rotated_cpu( FILE: detectron2/detectron2/layers/csrc/box_iou_rotated/box_iou_rotated_utils.h function namespace (line 17) | namespace detectron2 { FILE: detectron2/detectron2/layers/csrc/cocoeval/cocoeval.cpp type detectron2 (line 10) | namespace detectron2 { type COCOeval (line 12) | namespace COCOeval { function SortInstancesByDetectionScore (line 18) | void SortInstancesByDetectionScore( function SortInstancesByIgnore (line 34) | void SortInstancesByIgnore( function MatchDetectionsToGroundTruth (line 61) | void MatchDetectionsToGroundTruth( function EvaluateImages (line 142) | std::vector EvaluateImages( function list_to_vec (line 203) | std::vector list_to_vec(const py::list& l) { function BuildSortedDetectionList (line 223) | int BuildSortedDetectionList( function ComputePrecisionRecallCurve (line 284) | void ComputePrecisionRecallCurve( function Accumulate (line 372) | py::dict Accumulate( FILE: detectron2/detectron2/layers/csrc/cocoeval/cocoeval.h function namespace (line 12) | namespace detectron2 { FILE: detectron2/detectron2/layers/csrc/deformable/deform_conv.h function namespace (line 5) | namespace detectron2 { FILE: detectron2/detectron2/layers/csrc/nms_rotated/nms_rotated.h function namespace (line 5) | namespace detectron2 { FILE: detectron2/detectron2/layers/csrc/nms_rotated/nms_rotated_cpu.cpp type detectron2 (line 5) | namespace detectron2 { function nms_rotated_cpu_kernel (line 8) | at::Tensor nms_rotated_cpu_kernel( function nms_rotated_cpu (line 62) | at::Tensor nms_rotated_cpu( FILE: detectron2/detectron2/layers/csrc/vision.cpp type detectron2 (line 10) | namespace detectron2 { function get_cuda_version (line 16) | std::string get_cuda_version() { function has_cuda (line 41) | bool has_cuda() { function get_compiler_version (line 51) | std::string get_compiler_version() { function PYBIND11_MODULE (line 77) | PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) { function TORCH_LIBRARY (line 111) | TORCH_LIBRARY(detectron2, m) { FILE: detectron2/detectron2/layers/deform_conv.py class _DeformConv (line 16) | class _DeformConv(Function): method forward (line 18) | def forward( method backward (line 85) | def backward(ctx, grad_output): method _output_size (line 146) | def _output_size(input, weight, padding, dilation, stride): method _cal_im2col_step (line 165) | def _cal_im2col_step(input_size, default_size): class _ModulatedDeformConv (line 187) | class _ModulatedDeformConv(Function): method forward (line 189) | def forward( method backward (line 246) | def backward(ctx, grad_output): method _infer_shape (line 298) | def _infer_shape(ctx, input, weight): class DeformConv (line 316) | class DeformConv(nn.Module): method __init__ (line 317) | def __init__( method forward (line 369) | def forward(self, x, offset): method extra_repr (line 400) | def extra_repr(self): class ModulatedDeformConv (line 413) | class ModulatedDeformConv(nn.Module): method __init__ (line 414) | def __init__( method forward (line 463) | def forward(self, x, offset, mask): method extra_repr (line 492) | def extra_repr(self): FILE: detectron2/detectron2/layers/losses.py function diou_loss (line 5) | def diou_loss( function ciou_loss (line 66) | def ciou_loss( FILE: detectron2/detectron2/layers/mask_ops.py function _do_paste_mask (line 17) | def _do_paste_mask(masks, boxes, img_h: int, img_w: int, skip_empty: boo... function paste_masks_in_image (line 74) | def paste_masks_in_image( function paste_mask_in_image_old (line 155) | def paste_mask_in_image_old(mask, box, img_h, img_w, threshold): function pad_masks (line 219) | def pad_masks(masks, padding): function scale_boxes (line 237) | def scale_boxes(boxes, scale): function _paste_masks_tensor_shape (line 264) | def _paste_masks_tensor_shape( FILE: detectron2/detectron2/layers/nms.py function batched_nms (line 9) | def batched_nms( function nms_rotated (line 25) | def nms_rotated(boxes, scores, iou_threshold): function batched_nms_rotated (line 91) | def batched_nms_rotated(boxes, scores, idxs, iou_threshold): FILE: detectron2/detectron2/layers/roi_align.py class ROIAlign (line 7) | class ROIAlign(nn.Module): method __init__ (line 8) | def __init__(self, output_size, spatial_scale, sampling_ratio, aligned... method forward (line 49) | def forward(self, input, rois): method __repr__ (line 67) | def __repr__(self): FILE: detectron2/detectron2/layers/roi_align_rotated.py class _ROIAlignRotated (line 9) | class _ROIAlignRotated(Function): method forward (line 11) | def forward(ctx, input, roi, output_size, spatial_scale, sampling_ratio): method backward (line 24) | def backward(ctx, grad_output): class ROIAlignRotated (line 48) | class ROIAlignRotated(nn.Module): method __init__ (line 49) | def __init__(self, output_size, spatial_scale, sampling_ratio): method forward (line 69) | def forward(self, input, rois): method __repr__ (line 85) | def __repr__(self): FILE: detectron2/detectron2/layers/rotated_boxes.py function pairwise_iou_rotated (line 6) | def pairwise_iou_rotated(boxes1, boxes2): FILE: detectron2/detectron2/layers/shape_spec.py class ShapeSpec (line 8) | class ShapeSpec: FILE: detectron2/detectron2/layers/wrappers.py function shapes_to_tensor (line 17) | def shapes_to_tensor(x: List[int], device: Optional[torch.device] = None... function cat (line 39) | def cat(tensors: List[torch.Tensor], dim: int = 0): function empty_input_loss_func_wrapper (line 49) | def empty_input_loss_func_wrapper(loss_func): class _NewEmptyTensorOp (line 64) | class _NewEmptyTensorOp(torch.autograd.Function): method forward (line 66) | def forward(ctx, x, new_shape): method backward (line 71) | def backward(ctx, grad): class Conv2d (line 76) | class Conv2d(torch.nn.Conv2d): method __init__ (line 81) | def __init__(self, *args, **kwargs): method forward (line 98) | def forward(self, x): function nonzero_tuple (line 129) | def nonzero_tuple(x): function move_device_like (line 143) | def move_device_like(src: torch.Tensor, dst: torch.Tensor) -> torch.Tensor: FILE: detectron2/detectron2/model_zoo/configs/Misc/torchvision_imagenet_R_50.py function build_data_loader (line 40) | def build_data_loader(dataset, batch_size, num_workers, training=True): class ClassificationNet (line 50) | class ClassificationNet(nn.Module): method __init__ (line 51) | def __init__(self, model: nn.Module): method device (line 56) | def device(self): method forward (line 59) | def forward(self, inputs): class ClassificationAcc (line 69) | class ClassificationAcc(DatasetEvaluator): method reset (line 70) | def reset(self): method process (line 73) | def process(self, inputs, outputs): method evaluate (line 78) | def evaluate(self): FILE: detectron2/detectron2/model_zoo/configs/common/coco_schedule.py function default_X_scheduler (line 7) | def default_X_scheduler(num_X): FILE: detectron2/detectron2/model_zoo/model_zoo.py class _ModelZooUrls (line 12) | class _ModelZooUrls(object): method query (line 99) | def query(config_path: str) -> Optional[str]: function get_checkpoint_url (line 111) | def get_checkpoint_url(config_path): function get_config_file (line 128) | def get_config_file(config_path): function get_config (line 147) | def get_config(config_path, trained: bool = False): function get (line 180) | def get(config_path, trained: bool = False, device: Optional[str] = None): FILE: detectron2/detectron2/modeling/anchor_generator.py class BufferList (line 21) | class BufferList(nn.Module): method __init__ (line 26) | def __init__(self, buffers): method __len__ (line 32) | def __len__(self): method __iter__ (line 35) | def __iter__(self): function _create_grid_offsets (line 39) | def _create_grid_offsets( function _broadcast_params (line 58) | def _broadcast_params(params, num_features, name): class DefaultAnchorGenerator (line 86) | class DefaultAnchorGenerator(nn.Module): method __init__ (line 98) | def __init__(self, *, sizes, aspect_ratios, strides, offset=0.5): method from_config (line 128) | def from_config(cls, cfg, input_shape: List[ShapeSpec]): method _calculate_anchors (line 136) | def _calculate_anchors(self, sizes, aspect_ratios): method num_cell_anchors (line 144) | def num_cell_anchors(self): method num_anchors (line 152) | def num_anchors(self): method _grid_anchors (line 165) | def _grid_anchors(self, grid_sizes: List[List[int]]): method generate_cell_anchors (line 181) | def generate_cell_anchors(self, sizes=(32, 64, 128, 256, 512), aspect_... method forward (line 218) | def forward(self, features: List[torch.Tensor]): class RotatedAnchorGenerator (line 235) | class RotatedAnchorGenerator(nn.Module): method __init__ (line 247) | def __init__(self, *, sizes, aspect_ratios, strides, angles, offset=0.5): method from_config (line 280) | def from_config(cls, cfg, input_shape: List[ShapeSpec]): method _calculate_anchors (line 289) | def _calculate_anchors(self, sizes, aspect_ratios, angles): method num_cell_anchors (line 297) | def num_cell_anchors(self): method num_anchors (line 304) | def num_anchors(self): method _grid_anchors (line 318) | def _grid_anchors(self, grid_sizes): method generate_cell_anchors (line 329) | def generate_cell_anchors( method forward (line 365) | def forward(self, features): function build_anchor_generator (line 381) | def build_anchor_generator(cfg, input_shape): FILE: detectron2/detectron2/modeling/backbone/backbone.py class Backbone (line 11) | class Backbone(nn.Module, metaclass=ABCMeta): method __init__ (line 16) | def __init__(self): method forward (line 23) | def forward(self): method size_divisibility (line 33) | def size_divisibility(self) -> int: method padding_constraints (line 44) | def padding_constraints(self) -> Dict[str, int]: method output_shape (line 63) | def output_shape(self): FILE: detectron2/detectron2/modeling/backbone/build.py function build_backbone (line 20) | def build_backbone(cfg, input_shape=None): FILE: detectron2/detectron2/modeling/backbone/fpn.py class FPN (line 17) | class FPN(Backbone): method __init__ (line 25) | def __init__( method size_divisibility (line 119) | def size_divisibility(self): method padding_constraints (line 123) | def padding_constraints(self): method forward (line 126) | def forward(self, x): method output_shape (line 169) | def output_shape(self): function _assert_strides_are_log2_contiguous (line 178) | def _assert_strides_are_log2_contiguous(strides): class LastLevelMaxPool (line 188) | class LastLevelMaxPool(nn.Module): method __init__ (line 194) | def __init__(self): method forward (line 199) | def forward(self, x): class LastLevelP6P7 (line 203) | class LastLevelP6P7(nn.Module): method __init__ (line 209) | def __init__(self, in_channels, out_channels, in_feature="res5"): method forward (line 218) | def forward(self, c5): function build_resnet_fpn_backbone (line 225) | def build_resnet_fpn_backbone(cfg, input_shape: ShapeSpec): function build_retinanet_resnet_fpn_backbone (line 248) | def build_retinanet_resnet_fpn_backbone(cfg, input_shape: ShapeSpec): FILE: detectron2/detectron2/modeling/backbone/mvit.py function attention_pool (line 24) | def attention_pool(x, pool, norm=None): class MultiScaleAttention (line 36) | class MultiScaleAttention(nn.Module): method __init__ (line 39) | def __init__( method forward (line 131) | def forward(self, x): class MultiScaleBlock (line 180) | class MultiScaleBlock(nn.Module): method __init__ (line 183) | def __init__( method forward (line 257) | def forward(self, x): class MViT (line 272) | class MViT(Backbone): method __init__ (line 277) | def __init__( method _init_weights (line 420) | def _init_weights(self, m): method forward (line 429) | def forward(self, x): FILE: detectron2/detectron2/modeling/backbone/regnet.py function conv2d (line 28) | def conv2d(w_in, w_out, k, *, stride=1, groups=1, bias=False): function gap2d (line 35) | def gap2d(): function pool2d (line 40) | def pool2d(k, *, stride=1): function init_weights (line 46) | def init_weights(m): class ResStem (line 60) | class ResStem(CNNBlockBase): method __init__ (line 63) | def __init__(self, w_in, w_out, norm, activation_class): method forward (line 70) | def forward(self, x): class SimpleStem (line 76) | class SimpleStem(CNNBlockBase): method __init__ (line 79) | def __init__(self, w_in, w_out, norm, activation_class): method forward (line 85) | def forward(self, x): class SE (line 91) | class SE(nn.Module): method __init__ (line 94) | def __init__(self, w_in, w_se, activation_class): method forward (line 104) | def forward(self, x): class VanillaBlock (line 108) | class VanillaBlock(CNNBlockBase): method __init__ (line 111) | def __init__(self, w_in, w_out, stride, norm, activation_class, _params): method forward (line 120) | def forward(self, x): class BasicTransform (line 126) | class BasicTransform(nn.Module): method __init__ (line 129) | def __init__(self, w_in, w_out, stride, norm, activation_class, _params): method forward (line 138) | def forward(self, x): class ResBasicBlock (line 144) | class ResBasicBlock(CNNBlockBase): method __init__ (line 147) | def __init__(self, w_in, w_out, stride, norm, activation_class, params): method forward (line 156) | def forward(self, x): class BottleneckTransform (line 161) | class BottleneckTransform(nn.Module): method __init__ (line 164) | def __init__(self, w_in, w_out, stride, norm, activation_class, params): method forward (line 180) | def forward(self, x): class ResBottleneckBlock (line 186) | class ResBottleneckBlock(CNNBlockBase): method __init__ (line 189) | def __init__(self, w_in, w_out, stride, norm, activation_class, params): method forward (line 198) | def forward(self, x): class AnyStage (line 203) | class AnyStage(nn.Module): method __init__ (line 206) | def __init__(self, w_in, w_out, stride, d, block_class, norm, activati... method forward (line 213) | def forward(self, x): class AnyNet (line 219) | class AnyNet(Backbone): method __init__ (line 222) | def __init__( method forward (line 305) | def forward(self, x): method output_shape (line 324) | def output_shape(self): method freeze (line 332) | def freeze(self, freeze_at=0): function adjust_block_compatibility (line 356) | def adjust_block_compatibility(ws, bs, gs): function generate_regnet_parameters (line 369) | def generate_regnet_parameters(w_a, w_0, w_m, d, q=8): class RegNet (line 387) | class RegNet(AnyNet): method __init__ (line 390) | def __init__( FILE: detectron2/detectron2/modeling/backbone/resnet.py class BasicBlock (line 32) | class BasicBlock(CNNBlockBase): method __init__ (line 38) | def __init__(self, in_channels, out_channels, *, stride=1, norm="BN"): method forward (line 85) | def forward(self, x): class BottleneckBlock (line 100) | class BottleneckBlock(CNNBlockBase): method __init__ (line 107) | def __init__( method forward (line 194) | def forward(self, x): class DeformBottleneckBlock (line 213) | class DeformBottleneckBlock(CNNBlockBase): method __init__ (line 219) | def __init__( method forward (line 303) | def forward(self, x): class BasicStem (line 330) | class BasicStem(CNNBlockBase): method __init__ (line 336) | def __init__(self, in_channels=3, out_channels=64, norm="BN"): method forward (line 355) | def forward(self, x): class ResNet (line 362) | class ResNet(Backbone): method __init__ (line 367) | def __init__(self, stem, stages, num_classes=None, out_features=None, ... method forward (line 435) | def forward(self, x): method output_shape (line 460) | def output_shape(self): method freeze (line 468) | def freeze(self, freeze_at=0): method make_stage (line 493) | def make_stage(block_class, num_blocks, *, in_channels, out_channels, ... method make_default_stages (line 548) | def make_default_stages(depth, block_class=None, **kwargs): function make_stage (line 606) | def make_stage(*args, **kwargs): function build_resnet_backbone (line 614) | def build_resnet_backbone(cfg, input_shape): FILE: detectron2/detectron2/modeling/backbone/swin.py class Mlp (line 26) | class Mlp(nn.Module): method __init__ (line 29) | def __init__( method forward (line 40) | def forward(self, x): function window_partition (line 49) | def window_partition(x, window_size): function window_reverse (line 63) | def window_reverse(windows, window_size, H, W): class WindowAttention (line 79) | class WindowAttention(nn.Module): method __init__ (line 93) | def __init__( method forward (line 137) | def forward(self, x, mask=None): class SwinTransformerBlock (line 180) | class SwinTransformerBlock(nn.Module): method __init__ (line 197) | def __init__( method forward (line 241) | def forward(self, x, mask_matrix): class PatchMerging (line 304) | class PatchMerging(nn.Module): method __init__ (line 311) | def __init__(self, dim, norm_layer=nn.LayerNorm): method forward (line 317) | def forward(self, x, H, W): class BasicLayer (line 346) | class BasicLayer(nn.Module): method __init__ (line 365) | def __init__( method forward (line 413) | def forward(self, x, H, W): class PatchEmbed (line 463) | class PatchEmbed(nn.Module): method __init__ (line 472) | def __init__(self, patch_size=4, in_chans=3, embed_dim=96, norm_layer=... method forward (line 486) | def forward(self, x): class SwinTransformer (line 505) | class SwinTransformer(Backbone): method __init__ (line 533) | def __init__( method _freeze_stages (line 633) | def _freeze_stages(self): method _init_weights (line 650) | def _init_weights(self, m): method size_divisibility (line 660) | def size_divisibility(self): method forward (line 663) | def forward(self, x): FILE: detectron2/detectron2/modeling/backbone/utils.py function window_partition (line 16) | def window_partition(x, window_size): function window_unpartition (line 40) | def window_unpartition(windows, window_size, pad_hw, hw): function get_rel_pos (line 63) | def get_rel_pos(q_size, k_size, rel_pos): function add_decomposed_rel_pos (line 96) | def add_decomposed_rel_pos(attn, q, rel_pos_h, rel_pos_w, q_size, k_size): function get_abs_pos (line 128) | def get_abs_pos(abs_pos, has_cls_token, hw): class PatchEmbed (line 160) | class PatchEmbed(nn.Module): method __init__ (line 165) | def __init__( method forward (line 182) | def forward(self, x): FILE: detectron2/detectron2/modeling/backbone/vit.py class Attention (line 28) | class Attention(nn.Module): method __init__ (line 31) | def __init__( method forward (line 68) | def forward(self, x): class ResBottleneckBlock (line 87) | class ResBottleneckBlock(CNNBlockBase): method __init__ (line 93) | def __init__( method forward (line 139) | def forward(self, x): class Block (line 148) | class Block(nn.Module): method __init__ (line 151) | def __init__( method forward (line 211) | def forward(self, x): class ViT (line 233) | class ViT(Backbone): method __init__ (line 240) | def __init__( method _init_weights (line 338) | def _init_weights(self, m): method forward (line 347) | def forward(self, x): class SimpleFeaturePyramid (line 361) | class SimpleFeaturePyramid(Backbone): method __init__ (line 367) | def __init__( method padding_constraints (line 469) | def padding_constraints(self): method forward (line 475) | def forward(self, x): function get_vit_lr_decay_rate (line 504) | def get_vit_lr_decay_rate(name, lr_decay_rate=1.0, num_layers=12): FILE: detectron2/detectron2/modeling/box_regression.py class Box2BoxTransform (line 21) | class Box2BoxTransform(object): method __init__ (line 28) | def __init__( method get_deltas (line 43) | def get_deltas(self, src_boxes, target_boxes): method apply_deltas (line 78) | def apply_deltas(self, deltas, boxes): class Box2BoxTransformRotated (line 120) | class Box2BoxTransformRotated(object): method __init__ (line 129) | def __init__( method get_deltas (line 145) | def get_deltas(self, src_boxes, target_boxes): method apply_deltas (line 183) | def apply_deltas(self, deltas, boxes): class Box2BoxTransformLinear (line 230) | class Box2BoxTransformLinear(object): method __init__ (line 236) | def __init__(self, normalize_by_size=True): method get_deltas (line 243) | def get_deltas(self, src_boxes, target_boxes): method apply_deltas (line 275) | def apply_deltas(self, deltas, boxes): function _dense_box_regression_loss (line 310) | def _dense_box_regression_loss( FILE: detectron2/detectron2/modeling/matcher.py class Matcher (line 9) | class Matcher(object): method __init__ (line 25) | def __init__( method __call__ (line 62) | def __call__(self, match_quality_matrix): method set_low_quality_matches_ (line 106) | def set_low_quality_matches_(self, match_labels, match_quality_matrix): FILE: detectron2/detectron2/modeling/meta_arch/build.py function build_model (line 16) | def build_model(cfg): FILE: detectron2/detectron2/modeling/meta_arch/dense_detector.py function permute_to_N_HWA_K (line 15) | def permute_to_N_HWA_K(tensor, K: int): class DenseDetector (line 27) | class DenseDetector(nn.Module): method __init__ (line 33) | def __init__( method device (line 69) | def device(self): method _move_to_current_device (line 72) | def _move_to_current_device(self, x): method forward (line 75) | def forward(self, batched_inputs: List[Dict[str, Tensor]]): method forward_training (line 120) | def forward_training(self, images, features, predictions, gt_instances): method preprocess_image (line 123) | def preprocess_image(self, batched_inputs: List[Dict[str, Tensor]]): method _transpose_dense_predictions (line 136) | def _transpose_dense_predictions( method _ema_update (line 160) | def _ema_update(self, name: str, value: float, initial_value: float, m... method _decode_per_level_predictions (line 186) | def _decode_per_level_predictions( method _decode_multi_level_predictions (line 230) | def _decode_multi_level_predictions( method visualize_training (line 256) | def visualize_training(self, batched_inputs, results): FILE: detectron2/detectron2/modeling/meta_arch/fcos.py class FCOS (line 25) | class FCOS(DenseDetector): method __init__ (line 30) | def __init__( method forward_training (line 86) | def forward_training(self, images, features, predictions, gt_instances): method _match_anchors (line 98) | def _match_anchors(self, gt_boxes: Boxes, anchors: List[Boxes]): method label_anchors (line 154) | def label_anchors(self, anchors: List[Boxes], gt_instances: List[Insta... method losses (line 193) | def losses( method compute_ctrness_targets (line 240) | def compute_ctrness_targets(self, anchors: List[Boxes], gt_boxes: List... method forward_inference (line 253) | def forward_inference( method inference_single_image (line 279) | def inference_single_image( class FCOSHead (line 303) | class FCOSHead(RetinaNetHead): method __init__ (line 309) | def __init__(self, *, input_shape: List[ShapeSpec], conv_dims: List[in... method forward (line 318) | def forward(self, features): FILE: detectron2/detectron2/modeling/meta_arch/panoptic_fpn.py class PanopticFPN (line 21) | class PanopticFPN(GeneralizedRCNN): method __init__ (line 27) | def __init__( method from_config (line 57) | def from_config(cls, cfg): method forward (line 90) | def forward(self, batched_inputs): method inference (line 140) | def inference(self, batched_inputs: List[Dict[str, torch.Tensor]], do_... function combine_semantic_and_instance_outputs (line 184) | def combine_semantic_and_instance_outputs( FILE: detectron2/detectron2/modeling/meta_arch/rcnn.py class GeneralizedRCNN (line 25) | class GeneralizedRCNN(nn.Module): method __init__ (line 34) | def __init__( method from_config (line 72) | def from_config(cls, cfg): method device (line 85) | def device(self): method _move_to_current_device (line 88) | def _move_to_current_device(self, x): method visualize_training (line 91) | def visualize_training(self, batched_inputs, proposals): method forward (line 126) | def forward(self, batched_inputs: List[Dict[str, torch.Tensor]]): method inference (line 178) | def inference( method preprocess_image (line 223) | def preprocess_image(self, batched_inputs: List[Dict[str, torch.Tensor... method _postprocess (line 237) | def _postprocess(instances, batched_inputs: List[Dict[str, torch.Tenso... class ProposalNetwork (line 254) | class ProposalNetwork(nn.Module): method __init__ (line 260) | def __init__( method from_config (line 282) | def from_config(cls, cfg): method device (line 292) | def device(self): method _move_to_current_device (line 295) | def _move_to_current_device(self, x): method forward (line 298) | def forward(self, batched_inputs): FILE: detectron2/detectron2/modeling/meta_arch/retinanet.py class RetinaNet (line 29) | class RetinaNet(DenseDetector): method __init__ (line 35) | def __init__( method from_config (line 116) | def from_config(cls, cfg): method forward_training (line 151) | def forward_training(self, images, features, predictions, gt_instances): method losses (line 160) | def losses(self, anchors, pred_logits, gt_labels, pred_anchor_deltas, ... method label_anchors (line 213) | def label_anchors(self, anchors, gt_instances): method forward_inference (line 257) | def forward_inference( method inference_single_image (line 275) | def inference_single_image( class RetinaNetHead (line 311) | class RetinaNetHead(nn.Module): method __init__ (line 318) | def __init__( method from_config (line 401) | def from_config(cls, cfg, input_shape: List[ShapeSpec]): method forward (line 417) | def forward(self, features: List[Tensor]): FILE: detectron2/detectron2/modeling/meta_arch/semantic_seg.py class SemanticSegmentor (line 34) | class SemanticSegmentor(nn.Module): method __init__ (line 40) | def __init__( method from_config (line 62) | def from_config(cls, cfg): method device (line 73) | def device(self): method forward (line 76) | def forward(self, batched_inputs): function build_sem_seg_head (line 134) | def build_sem_seg_head(cfg, input_shape): class SemSegFPNHead (line 143) | class SemSegFPNHead(nn.Module): method __init__ (line 153) | def __init__( method from_config (line 218) | def from_config(cls, cfg, input_shape: Dict[str, ShapeSpec]): method forward (line 231) | def forward(self, features, targets=None): method layers (line 246) | def layers(self, features): method losses (line 255) | def losses(self, predictions, targets): FILE: detectron2/detectron2/modeling/mmdet_wrapper.py function _to_container (line 21) | def _to_container(cfg): class MMDetBackbone (line 33) | class MMDetBackbone(Backbone): method __init__ (line 43) | def __init__( method forward (line 100) | def forward(self, x) -> Dict[str, Tensor]: method output_shape (line 114) | def output_shape(self) -> Dict[str, ShapeSpec]: class MMDetDetector (line 118) | class MMDetDetector(nn.Module): method __init__ (line 125) | def __init__( method forward (line 156) | def forward(self, batched_inputs: List[Dict[str, torch.Tensor]]): method device (line 223) | def device(self): function _convert_mmdet_result (line 229) | def _convert_mmdet_result(result, shape: Tuple[int, int]) -> Instances: function _parse_losses (line 257) | def _parse_losses(losses: Dict[str, Tensor]) -> Dict[str, Tensor]: FILE: detectron2/detectron2/modeling/poolers.py function assign_boxes_to_levels (line 22) | def assign_boxes_to_levels( function _convert_boxes_to_pooler_format (line 63) | def _convert_boxes_to_pooler_format(boxes: torch.Tensor, sizes: torch.Te... function convert_boxes_to_pooler_format (line 71) | def convert_boxes_to_pooler_format(box_lists: List[Boxes]): function _create_zeros (line 101) | def _create_zeros( class ROIPooler (line 113) | class ROIPooler(nn.Module): method __init__ (line 119) | def __init__( method forward (line 205) | def forward(self, x: List[torch.Tensor], box_lists: List[Boxes]): FILE: detectron2/detectron2/modeling/postprocessing.py function detector_postprocess (line 9) | def detector_postprocess( function sem_seg_postprocess (line 77) | def sem_seg_postprocess(result, img_size, output_height, output_width): FILE: detectron2/detectron2/modeling/proposal_generator/build.py function build_proposal_generator (line 15) | def build_proposal_generator(cfg, input_shape): FILE: detectron2/detectron2/modeling/proposal_generator/proposal_utils.py function _is_tracing (line 13) | def _is_tracing(): function find_top_rpn_proposals (line 22) | def find_top_rpn_proposals( function add_ground_truth_to_proposals (line 138) | def add_ground_truth_to_proposals( function add_ground_truth_to_proposals_single_image (line 167) | def add_ground_truth_to_proposals_single_image( FILE: detectron2/detectron2/modeling/proposal_generator/rpn.py function build_rpn_head (line 58) | def build_rpn_head(cfg, input_shape): class StandardRPNHead (line 67) | class StandardRPNHead(nn.Module): method __init__ (line 76) | def __init__( method _get_rpn_conv (line 126) | def _get_rpn_conv(self, in_channels, out_channels): method from_config (line 137) | def from_config(cls, cfg, input_shape): method forward (line 158) | def forward(self, features: List[torch.Tensor]): class RPN (line 181) | class RPN(nn.Module): method __init__ (line 187) | def __init__( method from_config (line 259) | def from_config(cls, cfg, input_shape: Dict[str, ShapeSpec]): method _subsample_labels (line 287) | def _subsample_labels(self, label): method label_and_sample_anchors (line 307) | def label_and_sample_anchors( method losses (line 366) | def losses( method forward (line 431) | def forward( method predict_proposals (line 482) | def predict_proposals( method _decode_proposals (line 514) | def _decode_proposals(self, anchors: List[Boxes], pred_anchor_deltas: ... FILE: detectron2/detectron2/modeling/proposal_generator/rrpn.py function find_top_rrpn_proposals (line 20) | def find_top_rrpn_proposals( class RRPN (line 131) | class RRPN(RPN): method __init__ (line 137) | def __init__(self, *args, **kwargs): method from_config (line 145) | def from_config(cls, cfg, input_shape: Dict[str, ShapeSpec]): method label_and_sample_anchors (line 151) | def label_and_sample_anchors(self, anchors: List[RotatedBoxes], gt_ins... method predict_proposals (line 198) | def predict_proposals(self, anchors, pred_objectness_logits, pred_anch... FILE: detectron2/detectron2/modeling/roi_heads/box_head.py class FastRCNNConvFCHead (line 26) | class FastRCNNConvFCHead(nn.Sequential): method __init__ (line 33) | def __init__( method from_config (line 82) | def from_config(cls, cfg, input_shape): method forward (line 94) | def forward(self, x): method output_shape (line 101) | def output_shape(self): function build_box_head (line 113) | def build_box_head(cfg, input_shape): FILE: detectron2/detectron2/modeling/roi_heads/cascade_rcnn.py class _ScaleGradient (line 20) | class _ScaleGradient(Function): method forward (line 22) | def forward(ctx, input, scale): method backward (line 27) | def backward(ctx, grad_output): class CascadeROIHeads (line 32) | class CascadeROIHeads(StandardROIHeads): method __init__ (line 38) | def __init__( method from_config (line 81) | def from_config(cls, cfg, input_shape): method _init_box_head (line 87) | def _init_box_head(cls, cfg, input_shape): method forward (line 137) | def forward(self, images, features, proposals, targets=None): method _forward_box (line 153) | def _forward_box(self, features, proposals, targets=None): method _match_and_label_boxes (line 209) | def _match_and_label_boxes(self, proposals, stage, targets): method _run_stage (line 258) | def _run_stage(self, features, proposals, stage): method _create_proposals_from_boxes (line 278) | def _create_proposals_from_boxes(self, boxes, image_sizes): FILE: detectron2/detectron2/modeling/roi_heads/fast_rcnn.py function fast_rcnn_inference (line 46) | def fast_rcnn_inference( function _log_classification_stats (line 88) | def _log_classification_stats(pred_logits, gt_classes, prefix="fast_rcnn"): function fast_rcnn_inference_single_image (line 118) | def fast_rcnn_inference_single_image( class FastRCNNOutputLayers (line 174) | class FastRCNNOutputLayers(nn.Module): method __init__ (line 183) | def __init__( method from_config (line 268) | def from_config(cls, cfg, input_shape): method forward (line 288) | def forward(self, x): method losses (line 307) | def losses(self, predictions, proposals): method get_fed_loss_classes (line 356) | def get_fed_loss_classes(self, gt_classes, num_fed_loss_classes, num_c... method sigmoid_cross_entropy_loss (line 386) | def sigmoid_cross_entropy_loss(self, pred_class_logits, gt_classes): method box_reg_loss (line 424) | def box_reg_loss(self, proposal_boxes, gt_boxes, pred_deltas, gt_class... method inference (line 465) | def inference(self, predictions: Tuple[torch.Tensor, torch.Tensor], pr... method predict_boxes_for_gt_classes (line 488) | def predict_boxes_for_gt_classes(self, predictions, proposals): method predict_boxes (line 523) | def predict_boxes( method predict_probs (line 549) | def predict_probs( FILE: detectron2/detectron2/modeling/roi_heads/keypoint_head.py function build_keypoint_head (line 32) | def build_keypoint_head(cfg, input_shape): function keypoint_rcnn_loss (line 40) | def keypoint_rcnn_loss(pred_keypoint_logits, instances, normalizer): function keypoint_rcnn_inference (line 99) | def keypoint_rcnn_inference(pred_keypoint_logits: torch.Tensor, pred_ins... class BaseKeypointRCNNHead (line 135) | class BaseKeypointRCNNHead(nn.Module): method __init__ (line 142) | def __init__(self, *, num_keypoints, loss_weight=1.0, loss_normalizer=... method from_config (line 161) | def from_config(cls, cfg, input_shape): method forward (line 179) | def forward(self, x, instances: List[Instances]): method layers (line 207) | def layers(self, x): class KRCNNConvDeconvUpsampleHead (line 218) | class KRCNNConvDeconvUpsampleHead(BaseKeypointRCNNHead, nn.Sequential): method __init__ (line 226) | def __init__(self, input_shape, *, num_keypoints, conv_dims, **kwargs): method from_config (line 262) | def from_config(cls, cfg, input_shape): method layers (line 268) | def layers(self, x): FILE: detectron2/detectron2/modeling/roi_heads/mask_head.py function mask_rcnn_loss (line 33) | def mask_rcnn_loss(pred_mask_logits: torch.Tensor, instances: List[Insta... function mask_rcnn_inference (line 115) | def mask_rcnn_inference(pred_mask_logits: torch.Tensor, pred_instances: ... class BaseMaskRCNNHead (line 161) | class BaseMaskRCNNHead(nn.Module): method __init__ (line 167) | def __init__(self, *, loss_weight: float = 1.0, vis_period: int = 0): method from_config (line 180) | def from_config(cls, cfg, input_shape): method forward (line 183) | def forward(self, x, instances: List[Instances]): method layers (line 204) | def layers(self, x): class MaskRCNNConvUpsampleHead (line 215) | class MaskRCNNConvUpsampleHead(BaseMaskRCNNHead, nn.Sequential): method __init__ (line 222) | def __init__(self, input_shape: ShapeSpec, *, num_classes, conv_dims, ... method from_config (line 272) | def from_config(cls, cfg, input_shape): method layers (line 287) | def layers(self, x): function build_mask_head (line 293) | def build_mask_head(cfg, input_shape): FILE: detectron2/detectron2/modeling/roi_heads/roi_heads.py function build_roi_heads (line 38) | def build_roi_heads(cfg, input_shape): function select_foreground_proposals (line 46) | def select_foreground_proposals( function select_proposals_with_visible_keypoints (line 78) | def select_proposals_with_visible_keypoints(proposals: List[Instances]) ... class ROIHeads (line 123) | class ROIHeads(torch.nn.Module): method __init__ (line 139) | def __init__( method from_config (line 167) | def from_config(cls, cfg): method _sample_proposals (line 181) | def _sample_proposals( method label_and_sample_proposals (line 220) | def label_and_sample_proposals( method forward (line 304) | def forward( class Res5ROIHeads (line 342) | class Res5ROIHeads(ROIHeads): method __init__ (line 351) | def __init__( method from_config (line 387) | def from_config(cls, cfg, input_shape): method _build_res5_block (line 429) | def _build_res5_block(cls, cfg): method _shared_roi_transform (line 455) | def _shared_roi_transform(self, features: List[torch.Tensor], boxes: L... method forward (line 459) | def forward( method forward_with_given_boxes (line 502) | def forward_with_given_boxes( class StandardROIHeads (line 530) | class StandardROIHeads(ROIHeads): method __init__ (line 543) | def __init__( method from_config (line 601) | def from_config(cls, cfg, input_shape): method _init_box_head (line 618) | def _init_box_head(cls, cfg, input_shape): method _init_mask_head (line 655) | def _init_mask_head(cls, cfg, input_shape): method _init_keypoint_head (line 689) | def _init_keypoint_head(cls, cfg, input_shape): method forward (line 722) | def forward( method forward_with_given_boxes (line 753) | def forward_with_given_boxes( method _forward_box (line 780) | def _forward_box(self, features: Dict[str, torch.Tensor], proposals: L... method _forward_mask (line 818) | def _forward_mask(self, features: Dict[str, torch.Tensor], instances: ... method _forward_keypoint (line 848) | def _forward_keypoint(self, features: Dict[str, torch.Tensor], instanc... FILE: detectron2/detectron2/modeling/roi_heads/rotated_fast_rcnn.py function fast_rcnn_inference_rotated (line 46) | def fast_rcnn_inference_rotated( function fast_rcnn_inference_single_image_rotated (line 84) | def fast_rcnn_inference_single_image_rotated( class RotatedFastRCNNOutputLayers (line 135) | class RotatedFastRCNNOutputLayers(FastRCNNOutputLayers): method from_config (line 141) | def from_config(cls, cfg, input_shape): method inference (line 148) | def inference(self, predictions, proposals): class RROIHeads (line 169) | class RROIHeads(StandardROIHeads): method __init__ (line 176) | def __init__(self, **kwargs): method _init_box_head (line 187) | def _init_box_head(cls, cfg, input_shape): method label_and_sample_proposals (line 218) | def label_and_sample_proposals(self, proposals, targets): FILE: detectron2/detectron2/modeling/sampling.py function subsample_labels (line 9) | def subsample_labels( FILE: detectron2/detectron2/modeling/test_time_augmentation.py class DatasetMapperTTA (line 29) | class DatasetMapperTTA: method __init__ (line 39) | def __init__(self, min_sizes: List[int], max_size: int, flip: bool): method from_config (line 51) | def from_config(cls, cfg): method __call__ (line 58) | def __call__(self, dataset_dict): class GeneralizedRCNNWithTTA (line 101) | class GeneralizedRCNNWithTTA(nn.Module): method __init__ (line 107) | def __init__(self, cfg, model, tta_mapper=None, batch_size=3): method _turn_off_roi_heads (line 137) | def _turn_off_roi_heads(self, attrs): method _batch_inference (line 162) | def _batch_inference(self, batched_inputs, detected_instances=None): method __call__ (line 188) | def __call__(self, batched_inputs): method _inference_one_image (line 206) | def _inference_one_image(self, input): method _get_augmented_inputs (line 239) | def _get_augmented_inputs(self, input): method _get_augmented_boxes (line 244) | def _get_augmented_boxes(self, augmented_inputs, tfms): method _merge_detections (line 262) | def _merge_detections(self, all_boxes, all_scores, all_classes, shape_... method _rescale_detected_boxes (line 282) | def _rescale_detected_boxes(self, augmented_inputs, merged_instances, ... method _reduce_pred_masks (line 298) | def _reduce_pred_masks(self, outputs, tfms): FILE: detectron2/detectron2/projects/__init__.py class _D2ProjectsFinder (line 16) | class _D2ProjectsFinder(importlib.abc.MetaPathFinder): method find_spec (line 17) | def find_spec(self, name, path, target=None): FILE: detectron2/detectron2/solver/build.py class GradientClipType (line 19) | class GradientClipType(Enum): function _create_gradient_clipper (line 24) | def _create_gradient_clipper(cfg: CfgNode) -> _GradientClipper: function _generate_optimizer_class_with_gradient_clipping (line 44) | def _generate_optimizer_class_with_gradient_clipping( function maybe_add_gradient_clipping (line 78) | def maybe_add_gradient_clipping( function build_optimizer (line 114) | def build_optimizer(cfg: CfgNode, model: torch.nn.Module) -> torch.optim... function get_default_optimizer_params (line 134) | def get_default_optimizer_params( function _expand_param_groups (line 230) | def _expand_param_groups(params: List[Dict[str, Any]]) -> List[Dict[str,... function reduce_param_groups (line 242) | def reduce_param_groups(params: List[Dict[str, Any]]) -> List[Dict[str, ... function build_lr_scheduler (line 262) | def build_lr_scheduler( FILE: detectron2/detectron2/solver/lr_scheduler.py class WarmupParamScheduler (line 17) | class WarmupParamScheduler(CompositeParamScheduler): method __init__ (line 22) | def __init__( class LRMultiplier (line 52) | class LRMultiplier(torch.optim.lr_scheduler._LRScheduler): method __init__ (line 86) | def __init__( method state_dict (line 110) | def state_dict(self): method get_lr (line 114) | def get_lr(self) -> List[float]: class WarmupMultiStepLR (line 132) | class WarmupMultiStepLR(torch.optim.lr_scheduler._LRScheduler): method __init__ (line 133) | def __init__( method get_lr (line 157) | def get_lr(self) -> List[float]: method _compute_values (line 166) | def _compute_values(self) -> List[float]: class WarmupCosineLR (line 171) | class WarmupCosineLR(torch.optim.lr_scheduler._LRScheduler): method __init__ (line 172) | def __init__( method get_lr (line 190) | def get_lr(self) -> List[float]: method _compute_values (line 207) | def _compute_values(self) -> List[float]: function _get_warmup_factor_at_iter (line 212) | def _get_warmup_factor_at_iter( FILE: detectron2/detectron2/structures/boxes.py class BoxMode (line 13) | class BoxMode(IntEnum): method convert (line 44) | def convert(box: _RawBoxType, from_mode: "BoxMode", to_mode: "BoxMode"... class Boxes (line 130) | class Boxes: method __init__ (line 142) | def __init__(self, tensor: torch.Tensor): method clone (line 159) | def clone(self) -> "Boxes": method to (line 168) | def to(self, device: torch.device): method area (line 172) | def area(self) -> torch.Tensor: method clip (line 183) | def clip(self, box_size: Tuple[int, int]) -> None: method nonempty (line 199) | def nonempty(self, threshold: float = 0.0) -> torch.Tensor: method __getitem__ (line 215) | def __getitem__(self, item) -> "Boxes": method __len__ (line 239) | def __len__(self) -> int: method __repr__ (line 242) | def __repr__(self) -> str: method inside_box (line 245) | def inside_box(self, box_size: Tuple[int, int], boundary_threshold: in... method get_centers (line 264) | def get_centers(self) -> torch.Tensor: method scale (line 271) | def scale(self, scale_x: float, scale_y: float) -> None: method cat (line 279) | def cat(cls, boxes_list: List["Boxes"]) -> "Boxes": method device (line 299) | def device(self) -> device: method __iter__ (line 305) | def __iter__(self): function pairwise_intersection (line 312) | def pairwise_intersection(boxes1: Boxes, boxes2: Boxes) -> torch.Tensor: function pairwise_iou (line 336) | def pairwise_iou(boxes1: Boxes, boxes2: Boxes) -> torch.Tensor: function pairwise_ioa (line 361) | def pairwise_ioa(boxes1: Boxes, boxes2: Boxes) -> torch.Tensor: function pairwise_point_box_distance (line 381) | def pairwise_point_box_distance(points: torch.Tensor, boxes: Boxes): function matched_pairwise_iou (line 400) | def matched_pairwise_iou(boxes1: Boxes, boxes2: Boxes) -> torch.Tensor: FILE: detectron2/detectron2/structures/image_list.py class ImageList (line 11) | class ImageList(object): method __init__ (line 23) | def __init__(self, tensor: torch.Tensor, image_sizes: List[Tuple[int, ... method __len__ (line 33) | def __len__(self) -> int: method __getitem__ (line 36) | def __getitem__(self, idx) -> torch.Tensor: method to (line 50) | def to(self, *args: Any, **kwargs: Any) -> "ImageList": method device (line 55) | def device(self) -> device: method from_tensors (line 59) | def from_tensors( FILE: detectron2/detectron2/structures/instances.py class Instances (line 8) | class Instances: method __init__ (line 39) | def __init__(self, image_size: Tuple[int, int], **kwargs: Any): method image_size (line 51) | def image_size(self) -> Tuple[int, int]: method __setattr__ (line 58) | def __setattr__(self, name: str, val: Any) -> None: method __getattr__ (line 64) | def __getattr__(self, name: str) -> Any: method set (line 69) | def set(self, name: str, value: Any) -> None: method has (line 83) | def has(self, name: str) -> bool: method remove (line 90) | def remove(self, name: str) -> None: method get (line 96) | def get(self, name: str) -> Any: method get_fields (line 102) | def get_fields(self) -> Dict[str, Any]: method to (line 112) | def to(self, *args: Any, **kwargs: Any) -> "Instances": method __getitem__ (line 124) | def __getitem__(self, item: Union[int, slice, torch.BoolTensor]) -> "I... method __len__ (line 144) | def __len__(self) -> int: method __iter__ (line 150) | def __iter__(self): method cat (line 154) | def cat(instance_lists: List["Instances"]) -> "Instances": method __str__ (line 186) | def __str__(self) -> str: FILE: detectron2/detectron2/structures/keypoints.py class Keypoints (line 8) | class Keypoints: method __init__ (line 21) | def __init__(self, keypoints: Union[torch.Tensor, np.ndarray, List[Lis... method __len__ (line 33) | def __len__(self) -> int: method to (line 36) | def to(self, *args: Any, **kwargs: Any) -> "Keypoints": method device (line 40) | def device(self) -> torch.device: method to_heatmap (line 43) | def to_heatmap(self, boxes: torch.Tensor, heatmap_size: int) -> torch.... method __getitem__ (line 60) | def __getitem__(self, item: Union[int, slice, torch.BoolTensor]) -> "K... method __repr__ (line 78) | def __repr__(self) -> str: method cat (line 84) | def cat(keypoints_list: List["Keypoints"]) -> "Keypoints": function _keypoints_to_heatmap (line 105) | def _keypoints_to_heatmap( function heatmaps_to_keypoints (line 165) | def heatmaps_to_keypoints(maps: torch.Tensor, rois: torch.Tensor) -> tor... FILE: detectron2/detectron2/structures/masks.py function polygon_area (line 16) | def polygon_area(x, y): function polygons_to_bitmask (line 22) | def polygons_to_bitmask(polygons: List[np.ndarray], height: int, width: ... function rasterize_polygons_within_box (line 39) | def rasterize_polygons_within_box( class BitMasks (line 88) | class BitMasks: method __init__ (line 97) | def __init__(self, tensor: Union[torch.Tensor, np.ndarray]): method to (line 111) | def to(self, *args: Any, **kwargs: Any) -> "BitMasks": method device (line 115) | def device(self) -> torch.device: method __getitem__ (line 119) | def __getitem__(self, item: Union[int, slice, torch.BoolTensor]) -> "B... method __iter__ (line 143) | def __iter__(self) -> torch.Tensor: method __repr__ (line 147) | def __repr__(self) -> str: method __len__ (line 152) | def __len__(self) -> int: method nonempty (line 155) | def nonempty(self) -> torch.Tensor: method from_polygon_masks (line 166) | def from_polygon_masks( method from_roi_masks (line 183) | def from_roi_masks(roi_masks: "ROIMasks", height: int, width: int) -> ... method crop_and_resize (line 191) | def crop_and_resize(self, boxes: torch.Tensor, mask_size: int) -> torc... method get_bounding_boxes (line 224) | def get_bounding_boxes(self) -> Boxes: method cat (line 243) | def cat(bitmasks_list: List["BitMasks"]) -> "BitMasks": class PolygonMasks (line 261) | class PolygonMasks: method __init__ (line 269) | def __init__(self, polygons: List[List[Union[torch.Tensor, np.ndarray]... method to (line 313) | def to(self, *args: Any, **kwargs: Any) -> "PolygonMasks": method device (line 317) | def device(self) -> torch.device: method get_bounding_boxes (line 320) | def get_bounding_boxes(self) -> Boxes: method nonempty (line 337) | def nonempty(self) -> torch.Tensor: method __getitem__ (line 348) | def __getitem__(self, item: Union[int, slice, List[int], torch.BoolTen... method __iter__ (line 378) | def __iter__(self) -> Iterator[List[np.ndarray]]: method __repr__ (line 386) | def __repr__(self) -> str: method __len__ (line 391) | def __len__(self) -> int: method crop_and_resize (line 394) | def crop_and_resize(self, boxes: torch.Tensor, mask_size: int) -> torc... method area (line 426) | def area(self): method cat (line 446) | def cat(polymasks_list: List["PolygonMasks"]) -> "PolygonMasks": class ROIMasks (line 466) | class ROIMasks: method __init__ (line 473) | def __init__(self, tensor: torch.Tensor): method to (line 482) | def to(self, device: torch.device) -> "ROIMasks": method device (line 486) | def device(self) -> device: method __len__ (line 489) | def __len__(self): method __getitem__ (line 492) | def __getitem__(self, item) -> "ROIMasks": method __repr__ (line 514) | def __repr__(self) -> str: method to_bitmasks (line 520) | def to_bitmasks(self, boxes: torch.Tensor, height, width, threshold=0.5): FILE: detectron2/detectron2/structures/rotated_boxes.py class RotatedBoxes (line 11) | class RotatedBoxes(Boxes): method __init__ (line 20) | def __init__(self, tensor: torch.Tensor): method clone (line 223) | def clone(self) -> "RotatedBoxes": method to (line 232) | def to(self, device: torch.device): method area (line 236) | def area(self) -> torch.Tensor: method normalize_angles (line 247) | def normalize_angles(self) -> None: method clip (line 253) | def clip(self, box_size: Tuple[int, int], clip_angle_threshold: float ... method nonempty (line 303) | def nonempty(self, threshold: float = 0.0) -> torch.Tensor: method __getitem__ (line 318) | def __getitem__(self, item) -> "RotatedBoxes": method __len__ (line 341) | def __len__(self) -> int: method __repr__ (line 344) | def __repr__(self) -> str: method inside_box (line 347) | def inside_box(self, box_size: Tuple[int, int], boundary_threshold: in... method get_centers (line 384) | def get_centers(self) -> torch.Tensor: method scale (line 391) | def scale(self, scale_x: float, scale_y: float) -> None: method cat (line 457) | def cat(cls, boxes_list: List["RotatedBoxes"]) -> "RotatedBoxes": method device (line 477) | def device(self) -> torch.device: method __iter__ (line 481) | def __iter__(self): function pairwise_iou (line 488) | def pairwise_iou(boxes1: RotatedBoxes, boxes2: RotatedBoxes) -> None: FILE: detectron2/detectron2/tracking/base_tracker.py class BaseTracker (line 15) | class BaseTracker(object): method __init__ (line 21) | def __init__(self, **kwargs): method from_config (line 29) | def from_config(cls, cfg: CfgNode_): method update (line 32) | def update(self, predictions: Instances) -> Instances: function build_tracker_head (line 53) | def build_tracker_head(cfg: CfgNode_) -> BaseTracker: FILE: detectron2/detectron2/tracking/bbox_iou_tracker.py class BBoxIOUTracker (line 17) | class BBoxIOUTracker(BaseTracker): method __init__ (line 23) | def __init__( method from_config (line 60) | def from_config(cls, cfg: CfgNode_): method update (line 89) | def update(self, instances: Instances) -> Instances: method _create_prediction_pairs (line 124) | def _create_prediction_pairs(self, instances: Instances, iou_all: np.n... method _initialize_extra_fields (line 151) | def _initialize_extra_fields(self, instances: Instances) -> Instances: method _reset_fields (line 174) | def _reset_fields(self): method _assign_new_id (line 182) | def _assign_new_id(self, instances: Instances) -> Instances: method _merge_untracked_instances (line 199) | def _merge_untracked_instances(self, instances: Instances) -> Instances: FILE: detectron2/detectron2/tracking/hungarian_tracker.py class BaseHungarianTracker (line 16) | class BaseHungarianTracker(BaseTracker): method __init__ (line 22) | def __init__( method from_config (line 54) | def from_config(cls, cfg: CfgNode_) -> Dict: method build_cost_matrix (line 57) | def build_cost_matrix(self, instances: Instances, prev_instances: Inst... method update (line 60) | def update(self, instances: Instances) -> Instances: method _initialize_extra_fields (line 74) | def _initialize_extra_fields(self, instances: Instances) -> Instances: method _process_matched_idx (line 97) | def _process_matched_idx( method _process_unmatched_idx (line 109) | def _process_unmatched_idx(self, instances: Instances, matched_idx: np... method _process_unmatched_prev_idx (line 118) | def _process_unmatched_prev_idx( FILE: detectron2/detectron2/tracking/iou_weighted_hungarian_bbox_iou_tracker.py class IOUWeightedHungarianBBoxIOUTracker (line 15) | class IOUWeightedHungarianBBoxIOUTracker(VanillaHungarianBBoxIOUTracker): method __init__ (line 22) | def __init__( method from_config (line 60) | def from_config(cls, cfg: CfgNode_): method assign_cost_matrix_values (line 89) | def assign_cost_matrix_values(self, cost_matrix: np.ndarray, bbox_pair... FILE: detectron2/detectron2/tracking/utils.py function create_prediction_pairs (line 8) | def create_prediction_pairs( FILE: detectron2/detectron2/tracking/vanilla_hungarian_bbox_iou_tracker.py class VanillaHungarianBBoxIOUTracker (line 18) | class VanillaHungarianBBoxIOUTracker(BaseHungarianTracker): method __init__ (line 24) | def __init__( method from_config (line 62) | def from_config(cls, cfg: CfgNode_): method build_cost_matrix (line 91) | def build_cost_matrix(self, instances: Instances, prev_instances: Inst... method assign_cost_matrix_values (line 116) | def assign_cost_matrix_values(self, cost_matrix: np.ndarray, bbox_pair... FILE: detectron2/detectron2/utils/analysis.py class FlopCountAnalysis (line 55) | class FlopCountAnalysis(fvcore.nn.FlopCountAnalysis): method __init__ (line 60) | def __init__(self, model, inputs): function flop_count_operators (line 71) | def flop_count_operators(model: nn.Module, inputs: list) -> typing.Defau... function activation_count_operators (line 103) | def activation_count_operators( function _wrapper_count_operators (line 128) | def _wrapper_count_operators( function find_unused_parameters (line 158) | def find_unused_parameters(model: nn.Module, inputs: Any) -> List[str]: FILE: detectron2/detectron2/utils/collect_env.py function collect_torch_env (line 17) | def collect_torch_env(): function get_env_module (line 29) | def get_env_module(): function detect_compute_compatibility (line 34) | def detect_compute_compatibility(CUDA_HOME, so_file): function collect_env_info (line 55) | def collect_env_info(): function test_nccl_ops (line 203) | def test_nccl_ops(): function _test_nccl_worker (line 214) | def _test_nccl_worker(rank, num_gpu, dist_url): FILE: detectron2/detectron2/utils/colormap.py function colormap (line 96) | def colormap(rgb=False, maximum=255): function random_color (line 112) | def random_color(rgb=False, maximum=255): function random_colors (line 128) | def random_colors(N, rgb=False, maximum=255): FILE: detectron2/detectron2/utils/comm.py function get_world_size (line 19) | def get_world_size() -> int: function get_rank (line 27) | def get_rank() -> int: function get_local_rank (line 35) | def get_local_rank() -> int: function get_local_size (line 50) | def get_local_size() -> int: function is_main_process (line 63) | def is_main_process() -> bool: function synchronize (line 67) | def synchronize(): function _get_global_gloo_group (line 88) | def _get_global_gloo_group(): function all_gather (line 99) | def all_gather(data, group=None): function gather (line 124) | def gather(data, dst=0, group=None): function shared_random_seed (line 156) | def shared_random_seed(): function reduce_dict (line 170) | def reduce_dict(input_dict, average=True): FILE: detectron2/detectron2/utils/develop.py function create_dummy_class (line 8) | def create_dummy_class(klass, dependency, message=""): function create_dummy_func (line 37) | def create_dummy_func(func, dependency, message=""): FILE: detectron2/detectron2/utils/env.py function seed_all_rng (line 27) | def seed_all_rng(seed=None): function _import_file (line 49) | def _import_file(module_name, file_path, make_importable=False): function _configure_libraries (line 58) | def _configure_libraries(): function setup_environment (line 97) | def setup_environment(): function setup_custom_environment (line 119) | def setup_custom_environment(custom_module): function fixup_module_metadata (line 135) | def fixup_module_metadata(module_name, namespace, keys=None): FILE: detectron2/detectron2/utils/events.py function get_event_storage (line 26) | def get_event_storage(): class EventWriter (line 38) | class EventWriter: method write (line 43) | def write(self): method close (line 46) | def close(self): class JSONWriter (line 50) | class JSONWriter(EventWriter): method __init__ (line 94) | def __init__(self, json_file, window_size=20): method write (line 105) | def write(self): method close (line 127) | def close(self): class TensorboardXWriter (line 131) | class TensorboardXWriter(EventWriter): method __init__ (line 136) | def __init__(self, log_dir: str, window_size: int = 20, **kwargs): method write (line 150) | def write(self): method close (line 176) | def close(self): class CommonMetricPrinter (line 181) | class CommonMetricPrinter(EventWriter): method __init__ (line 191) | def __init__(self, max_iter: Optional[int] = None, window_size: int = ... method _get_eta (line 203) | def _get_eta(self, storage) -> Optional[str]: method write (line 223) | def write(self): class EventStorage (line 274) | class EventStorage: method __init__ (line 281) | def __init__(self, start_iter=0): method put_image (line 294) | def put_image(self, img_name, img_tensor): method put_scalar (line 309) | def put_scalar(self, name, value, smoothing_hint=True): method put_scalars (line 336) | def put_scalars(self, *, smoothing_hint=True, **kwargs): method put_histogram (line 347) | def put_histogram(self, hist_name, hist_tensor, bins=1000): method history (line 377) | def history(self, name): method histories (line 387) | def histories(self): method latest (line 394) | def latest(self): method latest_with_smoothing_hint (line 402) | def latest_with_smoothing_hint(self, window_size=20): method smoothing_hints (line 419) | def smoothing_hints(self): method step (line 427) | def step(self): method iter (line 437) | def iter(self): method iter (line 446) | def iter(self, val): method iteration (line 450) | def iteration(self): method __enter__ (line 454) | def __enter__(self): method __exit__ (line 458) | def __exit__(self, exc_type, exc_val, exc_tb): method name_scope (line 463) | def name_scope(self, name): method clear_images (line 474) | def clear_images(self): method clear_histograms (line 481) | def clear_histograms(self): FILE: detectron2/detectron2/utils/file_io.py class Detectron2Handler (line 16) | class Detectron2Handler(PathHandler): method _get_supported_prefixes (line 24) | def _get_supported_prefixes(self): method _get_local_path (line 27) | def _get_local_path(self, path, **kwargs): method _open (line 31) | def _open(self, path, mode="r", **kwargs): FILE: detectron2/detectron2/utils/logger.py class _ColorfulFormatter (line 18) | class _ColorfulFormatter(logging.Formatter): method __init__ (line 19) | def __init__(self, *args, **kwargs): method formatMessage (line 26) | def formatMessage(self, record): function setup_logger (line 39) | def setup_logger( function _cached_log_stream (line 105) | def _cached_log_stream(filename): function _find_caller (line 119) | def _find_caller(): function log_first_n (line 140) | def log_first_n(lvl, msg, n=1, *, name=None, key="caller"): function log_every_n (line 175) | def log_every_n(lvl, msg, n=1, *, name=None): function log_every_n_seconds (line 191) | def log_every_n_seconds(lvl, msg, n=1, *, name=None): function create_small_table (line 209) | def create_small_table(small_dict): function _log_api_usage (line 232) | def _log_api_usage(identifier: str): FILE: detectron2/detectron2/utils/memory.py function _ignore_torch_cuda_oom (line 12) | def _ignore_torch_cuda_oom(): function retry_if_cuda_oom (line 26) | def retry_if_cuda_oom(func): FILE: detectron2/detectron2/utils/registry.py function _convert_target_to_string (line 15) | def _convert_target_to_string(t: Any) -> str: function locate (line 40) | def locate(name: str) -> Any: FILE: detectron2/detectron2/utils/serialize.py class PicklableWrapper (line 5) | class PicklableWrapper(object): method __init__ (line 15) | def __init__(self, obj): method __reduce__ (line 21) | def __reduce__(self): method __call__ (line 25) | def __call__(self, *args, **kwargs): method __getattr__ (line 28) | def __getattr__(self, attr): FILE: detectron2/detectron2/utils/testing.py function get_model_no_weights (line 29) | def get_model_no_weights(config_path): function random_boxes (line 42) | def random_boxes(num_boxes, max_coord=100, device="cpu"): function get_sample_coco_image (line 56) | def get_sample_coco_image(tensor=True): function convert_scripted_instances (line 80) | def convert_scripted_instances(instances): function assert_instances_allclose (line 95) | def assert_instances_allclose(input, other, *, rtol=1e-5, msg="", size_a... function reload_script_model (line 142) | def reload_script_model(module): function reload_lazy_config (line 153) | def reload_lazy_config(cfg): function min_torch_version (line 165) | def min_torch_version(min_version: str) -> bool: function register_custom_op_onnx_export (line 179) | def register_custom_op_onnx_export( function unregister_custom_op_onnx_export (line 193) | def unregister_custom_op_onnx_export(opname: str, opset_version: int, mi... function skipIfUnsupportedMinOpsetVersion (line 263) | def skipIfUnsupportedMinOpsetVersion(min_opset_version, current_opset_ve... function skipIfUnsupportedMinTorchVersion (line 286) | def skipIfUnsupportedMinTorchVersion(min_version): function _pytorch1111_symbolic_opset9_to (line 295) | def _pytorch1111_symbolic_opset9_to(g, self, *args): function _pytorch1111_symbolic_opset9_repeat_interleave (line 369) | def _pytorch1111_symbolic_opset9_repeat_interleave(g, self, repeats, dim... FILE: detectron2/detectron2/utils/video_visualizer.py class _DetectedInstance (line 17) | class _DetectedInstance: method __init__ (line 33) | def __init__(self, label, bbox, mask_rle, color, ttl): class VideoVisualizer (line 41) | class VideoVisualizer: method __init__ (line 42) | def __init__(self, metadata, instance_mode=ColorMode.IMAGE): method draw_instance_predictions (line 59) | def draw_instance_predictions(self, frame, predictions): method draw_sem_seg (line 143) | def draw_sem_seg(self, frame, sem_seg, area_threshold=None): method draw_panoptic_seg_predictions (line 155) | def draw_panoptic_seg_predictions( method _assign_colors (line 211) | def _assign_colors(self, instances): method _assign_colors_by_id (line 268) | def _assign_colors_by_id(self, instances: Instances) -> List: FILE: detectron2/detectron2/utils/visualizer.py class ColorMode (line 37) | class ColorMode(Enum): class GenericMask (line 59) | class GenericMask: method __init__ (line 67) | def __init__(self, mask_or_polygons, height, width): method mask (line 99) | def mask(self): method polygons (line 105) | def polygons(self): method has_holes (line 111) | def has_holes(self): method mask_to_polygons (line 119) | def mask_to_polygons(self, mask): method polygons_to_mask (line 138) | def polygons_to_mask(self, polygons): method area (line 143) | def area(self): method bbox (line 146) | def bbox(self): class _PanopticPrediction (line 155) | class _PanopticPrediction: method __init__ (line 160) | def __init__(self, panoptic_seg, segments_info, metadata=None): method non_empty_mask (line 196) | def non_empty_mask(self): method semantic_masks (line 212) | def semantic_masks(self): method instance_masks (line 220) | def instance_masks(self): function _create_text_labels (line 230) | def _create_text_labels(classes, scores, class_names, is_crowd=None): class VisImage (line 257) | class VisImage: method __init__ (line 258) | def __init__(self, img, scale=1.0): method _setup_figure (line 269) | def _setup_figure(self, img): method reset_image (line 294) | def reset_image(self, img): method save (line 302) | def save(self, filepath): method get_image (line 310) | def get_image(self): class Visualizer (line 331) | class Visualizer: method __init__ (line 357) | def __init__(self, img_rgb, metadata=None, scale=1.0, instance_mode=Co... method draw_instance_predictions (line 383) | def draw_instance_predictions(self, predictions): method draw_sem_seg (line 436) | def draw_sem_seg(self, sem_seg, area_threshold=None, alpha=0.8): method draw_panoptic_seg (line 472) | def draw_panoptic_seg(self, panoptic_seg, segments_info, area_threshol... method draw_dataset_dict (line 538) | def draw_dataset_dict(self, dic): method overlay_instances (line 607) | def overlay_instances( method overlay_rotated_instances (line 749) | def overlay_rotated_instances(self, boxes=None, labels=None, assigned_... method draw_and_connect_keypoints (line 787) | def draw_and_connect_keypoints(self, keypoints): method draw_text (line 850) | def draw_text( method draw_box (line 897) | def draw_box(self, box_coord, alpha=0.5, edge_color="g", line_style="-"): method draw_rotated_box_with_label (line 931) | def draw_rotated_box_with_label( method draw_circle (line 986) | def draw_circle(self, circle_coord, color, radius=3): method draw_line (line 1004) | def draw_line(self, x_data, y_data, color, linestyle="-", linewidth=No... method draw_binary_mask (line 1035) | def draw_binary_mask( method draw_soft_mask (line 1086) | def draw_soft_mask(self, soft_mask, color=None, *, text=None, alpha=0.5): method draw_polygon (line 1114) | def draw_polygon(self, segment, color, edge_color=None, alpha=0.5): method _jitter (line 1150) | def _jitter(self, color): method _create_grayscale_image (line 1169) | def _create_grayscale_image(self, mask=None): method _change_color_brightness (line 1180) | def _change_color_brightness(self, color, brightness_factor): method _convert_boxes (line 1205) | def _convert_boxes(self, boxes): method _convert_masks (line 1214) | def _convert_masks(self, masks_or_polygons): method _draw_text_in_mask (line 1237) | def _draw_text_in_mask(self, binary_mask, text, color): method _convert_keypoints (line 1255) | def _convert_keypoints(self, keypoints): method get_output (line 1261) | def get_output(self): FILE: detectron2/dev/packaging/gen_install_table.py function gen_header (line 23) | def gen_header(torch_versions): FILE: detectron2/docs/conf.py class GithubURLDomain (line 30) | class GithubURLDomain(Domain): method resolve_any_xref (line 39) | def resolve_any_xref(self, env, fromdocname, builder, target, node, co... function autodoc_skip_member (line 275) | def autodoc_skip_member(app, what, name, obj, skip, options): function paper_ref_role (line 349) | def paper_ref_role( function setup (line 380) | def setup(app): FILE: detectron2/projects/DeepLab/deeplab/build_solver.py function build_lr_scheduler (line 10) | def build_lr_scheduler( FILE: detectron2/projects/DeepLab/deeplab/config.py function add_deeplab_config (line 5) | def add_deeplab_config(cfg): FILE: detectron2/projects/DeepLab/deeplab/loss.py class DeepLabCE (line 6) | class DeepLabCE(nn.Module): method __init__ (line 20) | def __init__(self, ignore_label=-1, top_k_percent_pixels=1.0, weight=N... method forward (line 28) | def forward(self, logits, labels, weights=None): FILE: detectron2/projects/DeepLab/deeplab/lr_scheduler.py class WarmupPolyLR (line 17) | class WarmupPolyLR(torch.optim.lr_scheduler._LRScheduler): method __init__ (line 25) | def __init__( method get_lr (line 44) | def get_lr(self) -> List[float]: method _compute_values (line 60) | def _compute_values(self) -> List[float]: FILE: detectron2/projects/DeepLab/deeplab/resnet.py class DeepLabStem (line 15) | class DeepLabStem(CNNBlockBase): method __init__ (line 20) | def __init__(self, in_channels=3, out_channels=128, norm="BN"): method forward (line 59) | def forward(self, x): function build_resnet_deeplab_backbone (line 71) | def build_resnet_deeplab_backbone(cfg, input_shape): FILE: detectron2/projects/DeepLab/deeplab/semantic_seg.py class DeepLabV3PlusHead (line 16) | class DeepLabV3PlusHead(nn.Module): method __init__ (line 22) | def __init__( method from_config (line 191) | def from_config(cls, cfg, input_shape): method forward (line 219) | def forward(self, features, targets=None): method layers (line 237) | def layers(self, features): method losses (line 254) | def losses(self, predictions, targets): class DeepLabV3Head (line 264) | class DeepLabV3Head(nn.Module): method __init__ (line 269) | def __init__(self, cfg, input_shape: Dict[str, ShapeSpec]): method forward (line 325) | def forward(self, features, targets=None): method losses (line 342) | def losses(self, predictions, targets): FILE: detectron2/projects/DeepLab/train_net.py function build_sem_seg_train_aug (line 21) | def build_sem_seg_train_aug(cfg): class Trainer (line 40) | class Trainer(DefaultTrainer): method build_evaluator (line 49) | def build_evaluator(cls, cfg, dataset_name, output_folder=None): method build_train_loader (line 79) | def build_train_loader(cls, cfg): method build_lr_scheduler (line 87) | def build_lr_scheduler(cls, cfg, optimizer): function setup (line 95) | def setup(args): function main (line 108) | def main(args): FILE: detectron2/projects/DensePose/apply_net.py class Action (line 55) | class Action(object): method add_arguments (line 57) | def add_arguments(cls: type, parser: argparse.ArgumentParser): function register_action (line 66) | def register_action(cls: type): class InferenceAction (line 75) | class InferenceAction(Action): method add_arguments (line 77) | def add_arguments(cls: type, parser: argparse.ArgumentParser): method execute (line 90) | def execute(cls: type, args: argparse.Namespace): method setup_config (line 110) | def setup_config( method _get_input_file_list (line 124) | def _get_input_file_list(cls: type, input_spec: str): class DumpAction (line 139) | class DumpAction(InferenceAction): method add_parser (line 147) | def add_parser(cls: type, subparsers: argparse._SubParsersAction): method add_arguments (line 153) | def add_arguments(cls: type, parser: argparse.ArgumentParser): method execute_on_outputs (line 163) | def execute_on_outputs( method create_context (line 182) | def create_context(cls: type, args: argparse.Namespace, cfg: CfgNode): method postexecute (line 187) | def postexecute(cls: type, context: Dict[str, Any]): class ShowAction (line 198) | class ShowAction(InferenceAction): method add_parser (line 216) | def add_parser(cls: type, subparsers: argparse._SubParsersAction): method add_arguments (line 222) | def add_arguments(cls: type, parser: argparse.ArgumentParser): method setup_config (line 260) | def setup_config( method execute_on_outputs (line 272) | def execute_on_outputs( method postexecute (line 296) | def postexecute(cls: type, context: Dict[str, Any]): method _get_out_fname (line 300) | def _get_out_fname(cls: type, entry_idx: int, fname_base: str): method create_context (line 305) | def create_context(cls: type, args: argparse.Namespace, cfg: CfgNode) ... function create_argument_parser (line 331) | def create_argument_parser() -> argparse.ArgumentParser: function main (line 343) | def main(): FILE: detectron2/projects/DensePose/densepose/config.py function add_dataset_category_config (line 8) | def add_dataset_category_config(cfg: CN) -> None: function add_evaluation_config (line 21) | def add_evaluation_config(cfg: CN) -> None: function add_bootstrap_config (line 50) | def add_bootstrap_config(cfg: CN) -> None: function get_bootstrap_dataset_config (line 59) | def get_bootstrap_dataset_config() -> CN: function load_bootstrap_config (line 88) | def load_bootstrap_config(cfg: CN) -> None: function add_densepose_head_cse_config (line 105) | def add_densepose_head_cse_config(cfg: CN) -> None: function add_densepose_head_config (line 158) | def add_densepose_head_config(cfg: CN) -> None: function add_hrnet_config (line 237) | def add_hrnet_config(cfg: CN) -> None: function add_densepose_config (line 272) | def add_densepose_config(cfg: CN) -> None: FILE: detectron2/projects/DensePose/densepose/converters/base.py class BaseConverter (line 7) | class BaseConverter: method register (line 16) | def register(cls, from_type: Type, converter: Any = None): method _do_register (line 38) | def _do_register(cls, from_type: Type, converter: Any): method _lookup_converter (line 42) | def _lookup_converter(cls, from_type: Type) -> Any: method convert (line 64) | def convert(cls, instance: Any, *args, **kwargs): function make_int_box (line 90) | def make_int_box(box: torch.Tensor) -> IntTupleBox: FILE: detectron2/projects/DensePose/densepose/converters/chart_output_hflip.py function densepose_chart_predictor_output_hflip (line 8) | def densepose_chart_predictor_output_hflip( function _flip_iuv_semantics_tensor (line 41) | def _flip_iuv_semantics_tensor( function _flip_segm_semantics_tensor (line 64) | def _flip_segm_semantics_tensor( FILE: detectron2/projects/DensePose/densepose/converters/chart_output_to_chart_result.py function resample_uv_tensors_to_bbox (line 18) | def resample_uv_tensors_to_bbox( function resample_uv_to_bbox (line 48) | def resample_uv_to_bbox( function densepose_chart_predictor_output_to_result (line 73) | def densepose_chart_predictor_output_to_result( function resample_confidences_to_bbox (line 101) | def resample_confidences_to_bbox( function densepose_chart_predictor_output_to_result_with_confidences (line 162) | def densepose_chart_predictor_output_to_result_with_confidences( FILE: detectron2/projects/DensePose/densepose/converters/hflip.py class HFlipConverter (line 8) | class HFlipConverter(BaseConverter): method convert (line 18) | def convert(cls, predictor_outputs: Any, transform_data: Any, *args, *... FILE: detectron2/projects/DensePose/densepose/converters/segm_to_mask.py function resample_coarse_segm_tensor_to_bbox (line 13) | def resample_coarse_segm_tensor_to_bbox(coarse_segm: torch.Tensor, box_x... function resample_fine_and_coarse_segm_tensors_to_bbox (line 32) | def resample_fine_and_coarse_segm_tensors_to_bbox( function resample_fine_and_coarse_segm_to_bbox (line 65) | def resample_fine_and_coarse_segm_to_bbox(predictor_output: Any, box_xyw... function predictor_output_with_coarse_segm_to_mask (line 85) | def predictor_output_with_coarse_segm_to_mask( function predictor_output_with_fine_and_coarse_segm_to_mask (line 118) | def predictor_output_with_fine_and_coarse_segm_to_mask( FILE: detectron2/projects/DensePose/densepose/converters/to_chart_result.py class ToChartResultConverter (line 11) | class ToChartResultConverter(BaseConverter): method convert (line 21) | def convert(cls, predictor_outputs: Any, boxes: Boxes, *args, **kwargs... class ToChartResultConverterWithConfidences (line 38) | class ToChartResultConverterWithConfidences(BaseConverter): method convert (line 48) | def convert( FILE: detectron2/projects/DensePose/densepose/converters/to_mask.py class ToMaskConverter (line 12) | class ToMaskConverter(BaseConverter): method convert (line 23) | def convert( FILE: detectron2/projects/DensePose/densepose/data/build.py function _compute_num_images_per_worker (line 59) | def _compute_num_images_per_worker(cfg: CfgNode) -> int: function _map_category_id_to_contiguous_id (line 76) | def _map_category_id_to_contiguous_id(dataset_name: str, dataset_dicts: ... class _DatasetCategory (line 84) | class _DatasetCategory: function _add_category_id_to_contiguous_id_maps_to_metadata (line 112) | def _add_category_id_to_contiguous_id_maps_to_metadata( function _maybe_create_general_keep_instance_predicate (line 150) | def _maybe_create_general_keep_instance_predicate(cfg: CfgNode) -> Optio... function _maybe_create_keypoints_keep_instance_predicate (line 168) | def _maybe_create_keypoints_keep_instance_predicate(cfg: CfgNode) -> Opt... function _maybe_create_mask_keep_instance_predicate (line 185) | def _maybe_create_mask_keep_instance_predicate(cfg: CfgNode) -> Optional... function _maybe_create_densepose_keep_instance_predicate (line 195) | def _maybe_create_densepose_keep_instance_predicate(cfg: CfgNode) -> Opt... function _maybe_create_specific_keep_instance_predicate (line 214) | def _maybe_create_specific_keep_instance_predicate(cfg: CfgNode) -> Opti... function _get_train_keep_instance_predicate (line 231) | def _get_train_keep_instance_predicate(cfg: CfgNode): function _get_test_keep_instance_predicate (line 247) | def _get_test_keep_instance_predicate(cfg: CfgNode): function _maybe_filter_and_map_categories (line 252) | def _maybe_filter_and_map_categories( function _add_category_whitelists_to_metadata (line 271) | def _add_category_whitelists_to_metadata(cfg: CfgNode) -> None: function _add_category_maps_to_metadata (line 283) | def _add_category_maps_to_metadata(cfg: CfgNode) -> None: function _add_category_info_to_bootstrapping_metadata (line 294) | def _add_category_info_to_bootstrapping_metadata(dataset_name: str, data... function _maybe_add_class_to_mesh_name_map_to_metadata (line 307) | def _maybe_add_class_to_mesh_name_map_to_metadata(dataset_names: List[st... function _merge_categories (line 314) | def _merge_categories(dataset_names: Collection[str]) -> _MergedCategori... function _warn_if_merged_different_categories (line 353) | def _warn_if_merged_different_categories(merged_categories: _MergedCateg... function combine_detection_dataset_dicts (line 370) | def combine_detection_dataset_dicts( function build_detection_train_loader (line 426) | def build_detection_train_loader(cfg: CfgNode, mapper=None): function build_detection_test_loader (line 462) | def build_detection_test_loader(cfg, dataset_name, mapper=None): function build_frame_selector (line 501) | def build_frame_selector(cfg: CfgNode): function build_transform (line 515) | def build_transform(cfg: CfgNode, data_type: str): function build_combined_loader (line 522) | def build_combined_loader(cfg: CfgNode, loaders: Collection[Loader], rat... function build_bootstrap_dataset (line 527) | def build_bootstrap_dataset(dataset_name: str, cfg: CfgNode) -> Sequence... function build_data_sampler (line 551) | def build_data_sampler(cfg: CfgNode, sampler_cfg: CfgNode, embedder: Opt... function build_data_filter (line 642) | def build_data_filter(cfg: CfgNode): function build_inference_based_loader (line 649) | def build_inference_based_loader( function has_inference_based_loaders (line 681) | def has_inference_based_loaders(cfg: CfgNode) -> bool: function build_inference_based_loaders (line 689) | def build_inference_based_loaders( function build_video_list_dataset (line 704) | def build_video_list_dataset(meta: Metadata, cfg: CfgNode): class _BootstrapDatasetFactoryCatalog (line 718) | class _BootstrapDatasetFactoryCatalog(UserDict): method register (line 724) | def register(self, dataset_type: DatasetType, factory: Callable[[Metad... FILE: detectron2/projects/DensePose/densepose/data/combined_loader.py function _pooled_next (line 10) | def _pooled_next(iterator: Iterator[Any], pool: Deque[Any]): class CombinedDataLoader (line 16) | class CombinedDataLoader: method __init__ (line 23) | def __init__(self, loaders: Collection[Loader], batch_size: int, ratio... method __iter__ (line 28) | def __iter__(self) -> Iterator[List[Any]]: FILE: detectron2/projects/DensePose/densepose/data/dataset_mapper.py function build_augmentation (line 19) | def build_augmentation(cfg, is_train): class DatasetMapper (line 31) | class DatasetMapper: method __init__ (line 36) | def __init__(self, cfg, is_train=True): method __call__ (line 74) | def __call__(self, dataset_dict): method _transform_densepose (line 126) | def _transform_densepose(self, annotation, transforms): method _add_densepose_masks_as_segmentation (line 145) | def _add_densepose_masks_as_segmentation( FILE: detectron2/projects/DensePose/densepose/data/datasets/chimpnsee.py function register_dataset (line 13) | def register_dataset(datasets_root: Optional[str] = None) -> None: FILE: detectron2/projects/DensePose/densepose/data/datasets/coco.py class CocoDatasetInfo (line 27) | class CocoDatasetInfo: function get_metadata (line 131) | def get_metadata(base_path: Optional[str]) -> Dict[str, Any]: function _load_coco_annotations (line 154) | def _load_coco_annotations(json_file: str): function _add_categories_metadata (line 176) | def _add_categories_metadata(dataset_name: str, categories: List[Dict[st... function _verify_annotations_have_unique_ids (line 183) | def _verify_annotations_have_unique_ids(json_file: str, anns: List[List[... function _maybe_add_bbox (line 195) | def _maybe_add_bbox(obj: Dict[str, Any], ann_dict: Dict[str, Any]): function _maybe_add_segm (line 202) | def _maybe_add_segm(obj: Dict[str, Any], ann_dict: Dict[str, Any]): function _maybe_add_keypoints (line 214) | def _maybe_add_keypoints(obj: Dict[str, Any], ann_dict: Dict[str, Any]): function _maybe_add_densepose (line 228) | def _maybe_add_densepose(obj: Dict[str, Any], ann_dict: Dict[str, Any]): function _combine_images_with_annotations (line 234) | def _combine_images_with_annotations( function get_contiguous_id_to_category_id_map (line 273) | def get_contiguous_id_to_category_id_map(metadata): function maybe_filter_categories_cocoapi (line 283) | def maybe_filter_categories_cocoapi(dataset_name, coco_api): function maybe_filter_and_map_categories_cocoapi (line 312) | def maybe_filter_and_map_categories_cocoapi(dataset_name, coco_api): function create_video_frame_mapping (line 337) | def create_video_frame_mapping(dataset_name, dataset_dicts): function load_coco_json (line 347) | def load_coco_json(annotations_json_file: str, image_root: str, dataset_... function register_dataset (line 391) | def register_dataset(dataset_data: CocoDatasetInfo, datasets_root: Optio... function register_datasets (line 419) | def register_datasets( FILE: detectron2/projects/DensePose/densepose/data/datasets/dataset_type.py class DatasetType (line 6) | class DatasetType(Enum): FILE: detectron2/projects/DensePose/densepose/data/datasets/lvis.py function _load_lvis_annotations (line 49) | def _load_lvis_annotations(json_file: str): function _add_categories_metadata (line 71) | def _add_categories_metadata(dataset_name: str) -> None: function _verify_annotations_have_unique_ids (line 80) | def _verify_annotations_have_unique_ids(json_file: str, anns: List[List[... function _maybe_add_bbox (line 87) | def _maybe_add_bbox(obj: Dict[str, Any], ann_dict: Dict[str, Any]) -> None: function _maybe_add_segm (line 94) | def _maybe_add_segm(obj: Dict[str, Any], ann_dict: Dict[str, Any]) -> None: function _maybe_add_keypoints (line 106) | def _maybe_add_keypoints(obj: Dict[str, Any], ann_dict: Dict[str, Any]) ... function _maybe_add_densepose (line 120) | def _maybe_add_densepose(obj: Dict[str, Any], ann_dict: Dict[str, Any]) ... function _combine_images_with_annotations (line 126) | def _combine_images_with_annotations( function load_lvis_json (line 168) | def load_lvis_json(annotations_json_file: str, image_root: str, dataset_... function register_dataset (line 215) | def register_dataset(dataset_data: CocoDatasetInfo, datasets_root: Optio... function register_datasets (line 244) | def register_datasets( FILE: detectron2/projects/DensePose/densepose/data/image_list_dataset.py class ImageListDataset (line 15) | class ImageListDataset(Dataset): method __init__ (line 22) | def __init__( method __getitem__ (line 44) | def __getitem__(self, idx: int) -> Dict[str, Any]: method __len__ (line 71) | def __len__(self): FILE: detectron2/projects/DensePose/densepose/data/inference_based_loader.py function _grouper (line 12) | def _grouper(iterable: Iterable[Any], n: int, fillvalue=None) -> Iterato... class ScoreBasedFilter (line 33) | class ScoreBasedFilter: method __init__ (line 39) | def __init__(self, min_score: float = 0.8): method __call__ (line 42) | def __call__(self, model_output: ModelOutput) -> ModelOutput: class InferenceBasedLoader (line 52) | class InferenceBasedLoader: method __init__ (line 60) | def __init__( method __iter__ (line 105) | def __iter__(self) -> Iterator[List[SampledData]]: method _produce_data (line 121) | def _produce_data( FILE: detectron2/projects/DensePose/densepose/data/meshes/catalog.py class MeshInfo (line 12) | class MeshInfo: class _MeshCatalog (line 20) | class _MeshCatalog(UserDict): method __init__ (line 21) | def __init__(self, *args, **kwargs): method __setitem__ (line 27) | def __setitem__(self, key, value): method get_mesh_id (line 42) | def get_mesh_id(self, shape_name: str) -> int: method get_mesh_name (line 45) | def get_mesh_name(self, mesh_id: int) -> str: function register_mesh (line 52) | def register_mesh(mesh_info: MeshInfo, base_path: Optional[str]) -> None: function register_meshes (line 69) | def register_meshes(mesh_infos: Iterable[MeshInfo], base_path: Optional[... FILE: detectron2/projects/DensePose/densepose/data/samplers/densepose_base.py class DensePoseBaseSampler (line 14) | class DensePoseBaseSampler: method __init__ (line 21) | def __init__(self, count_per_class: int = 8): method __call__ (line 31) | def __call__(self, instances: Instances) -> DensePoseList: method _sample (line 49) | def _sample(self, instance: Instances, bbox_xywh: IntTupleBox) -> Dict... method _produce_index_sample (line 94) | def _produce_index_sample(self, values: torch.Tensor, count: int): method _produce_labels_and_results (line 111) | def _produce_labels_and_results(self, instance: Instances) -> Tuple[to... method _resample_mask (line 127) | def _resample_mask(self, output: Any) -> torch.Tensor: FILE: detectron2/projects/DensePose/densepose/data/samplers/densepose_confidence_based.py class DensePoseConfidenceBasedSampler (line 12) | class DensePoseConfidenceBasedSampler(DensePoseBaseSampler): method __init__ (line 18) | def __init__( method _produce_index_sample (line 57) | def _produce_index_sample(self, values: torch.Tensor, count: int): method _produce_labels_and_results (line 89) | def _produce_labels_and_results(self, instance) -> Tuple[torch.Tensor,... FILE: detectron2/projects/DensePose/densepose/data/samplers/densepose_cse_base.py class DensePoseCSEBaseSampler (line 18) | class DensePoseCSEBaseSampler(DensePoseBaseSampler): method __init__ (line 25) | def __init__( method _sample (line 46) | def _sample(self, instance: Instances, bbox_xywh: IntTupleBox) -> Dict... method _produce_mask_and_results (line 91) | def _produce_mask_and_results( method _resample_mask (line 118) | def _resample_mask(self, output: Any) -> torch.Tensor: FILE: detectron2/projects/DensePose/densepose/data/samplers/densepose_cse_confidence_based.py class DensePoseCSEConfidenceBasedSampler (line 16) | class DensePoseCSEConfidenceBasedSampler(DensePoseCSEBaseSampler): method __init__ (line 22) | def __init__( method _produce_index_sample (line 64) | def _produce_index_sample(self, values: torch.Tensor, count: int): method _produce_mask_and_results (line 94) | def _produce_mask_and_results( FILE: detectron2/projects/DensePose/densepose/data/samplers/densepose_cse_uniform.py class DensePoseCSEUniformSampler (line 7) | class DensePoseCSEUniformSampler(DensePoseCSEBaseSampler, DensePoseUnifo... FILE: detectron2/projects/DensePose/densepose/data/samplers/densepose_uniform.py class DensePoseUniformSampler (line 9) | class DensePoseUniformSampler(DensePoseBaseSampler): method __init__ (line 16) | def __init__(self, count_per_class: int = 8): method _produce_index_sample (line 26) | def _produce_index_sample(self, values: torch.Tensor, count: int): FILE: detectron2/projects/DensePose/densepose/data/samplers/mask_from_densepose.py class MaskFromDensePoseSampler (line 8) | class MaskFromDensePoseSampler: method __call__ (line 15) | def __call__(self, instances: Instances) -> BitMasks: FILE: detectron2/projects/DensePose/densepose/data/samplers/prediction_to_gt.py class _Sampler (line 13) | class _Sampler: class PredictionToGroundTruthSampler (line 27) | class PredictionToGroundTruthSampler: method __init__ (line 33) | def __init__(self, dataset_name: str = ""): method __call__ (line 41) | def __call__(self, model_output: List[ModelOutput]) -> List[SampledData]: method register_sampler (line 67) | def register_sampler( method remove_sampler (line 85) | def remove_sampler( FILE: detectron2/projects/DensePose/densepose/data/transform/image.py class ImageResizeTransform (line 6) | class ImageResizeTransform: method __init__ (line 13) | def __init__(self, min_size: int = 800, max_size: int = 1333): method __call__ (line 17) | def __call__(self, images: torch.Tensor) -> torch.Tensor: FILE: detectron2/projects/DensePose/densepose/data/utils.py function is_relative_local_path (line 9) | def is_relative_local_path(path: str) -> bool: function maybe_prepend_base_path (line 14) | def maybe_prepend_base_path(base_path: Optional[str], path: str): function get_class_to_mesh_name_mapping (line 27) | def get_class_to_mesh_name_mapping(cfg: CfgNode) -> Dict[int, str]: function get_category_to_class_mapping (line 34) | def get_category_to_class_mapping(dataset_cfg: CfgNode) -> Dict[str, int]: FILE: detectron2/projects/DensePose/densepose/data/video/frame_selector.py class FrameSelectionStrategy (line 13) | class FrameSelectionStrategy(Enum): class RandomKFramesSelector (line 30) | class RandomKFramesSelector(Callable): # pyre-ignore[39] method __init__ (line 35) | def __init__(self, k: int): method __call__ (line 38) | def __call__(self, frame_tss: FrameTsList) -> FrameTsList: class FirstKFramesSelector (line 50) | class FirstKFramesSelector(Callable): # pyre-ignore[39] method __init__ (line 55) | def __init__(self, k: int): method __call__ (line 58) | def __call__(self, frame_tss: FrameTsList) -> FrameTsList: class LastKFramesSelector (line 70) | class LastKFramesSelector(Callable): # pyre-ignore[39] method __init__ (line 75) | def __init__(self, k: int): method __call__ (line 78) | def __call__(self, frame_tss: FrameTsList) -> FrameTsList: FILE: detectron2/projects/DensePose/densepose/data/video/video_keyframe_dataset.py function list_keyframes (line 21) | def list_keyframes(video_fpath: str, video_stream_idx: int = 0) -> Frame... function read_keyframes (line 96) | def read_keyframes( function video_list_from_file (line 160) | def video_list_from_file(video_list_fpath: str, base_path: Optional[str]... function read_keyframe_helper_data (line 175) | def read_keyframe_helper_data(fpath: str): class VideoKeyframeDataset (line 215) | class VideoKeyframeDataset(Dataset): method __init__ (line 222) | def __init__( method __getitem__ (line 263) | def __getitem__(self, idx: int) -> Dict[str, Any]: method __len__ (line 299) | def __len__(self): FILE: detectron2/projects/DensePose/densepose/engine/trainer.py class SampleCountingLoader (line 37) | class SampleCountingLoader: method __init__ (line 38) | def __init__(self, loader): method __iter__ (line 41) | def __iter__(self): class SampleCountMetricPrinter (line 61) | class SampleCountMetricPrinter(EventWriter): method __init__ (line 62) | def __init__(self): method write (line 65) | def write(self): class Trainer (line 74) | class Trainer(DefaultTrainer): method extract_embedder_from_model (line 76) | def extract_embedder_from_model(cls, model: nn.Module) -> Optional[Emb... method test (line 88) | def test( method build_evaluator (line 150) | def build_evaluator( method build_optimizer (line 192) | def build_optimizer(cls, cfg: CfgNode, model: nn.Module): method build_test_loader (line 219) | def build_test_loader(cls, cfg: CfgNode, dataset_name): method build_train_loader (line 223) | def build_train_loader(cls, cfg: CfgNode): method build_writers (line 237) | def build_writers(self): method test_with_TTA (line 243) | def test_with_TTA(cls, cfg: CfgNode, model): FILE: detectron2/projects/DensePose/densepose/evaluation/d2_evaluator_adapter.py function _maybe_add_iscrowd_annotations (line 12) | def _maybe_add_iscrowd_annotations(cocoapi) -> None: class Detectron2COCOEvaluatorAdapter (line 18) | class Detectron2COCOEvaluatorAdapter(COCOEvaluator): method __init__ (line 19) | def __init__( method _maybe_substitute_metadata (line 33) | def _maybe_substitute_metadata(self): FILE: detectron2/projects/DensePose/densepose/evaluation/densepose_coco_evaluation.py class DensePoseEvalMode (line 40) | class DensePoseEvalMode(str, Enum): class DensePoseDataMode (line 49) | class DensePoseDataMode(str, Enum): class DensePoseCocoEval (line 62) | class DensePoseCocoEval(object): method __init__ (line 112) | def __init__( method _loadGEval (line 148) | def _loadGEval(self): method _prepare (line 182) | def _prepare(self): method evaluate (line 300) | def evaluate(self): method getDensePoseMask (line 351) | def getDensePoseMask(self, polys): method _generate_rlemask_on_image (line 360) | def _generate_rlemask_on_image(self, mask, imgId, data): method computeDPIoU (line 377) | def computeDPIoU(self, imgId, catId): method computeIoU (line 436) | def computeIoU(self, imgId, catId): method computeOks (line 465) | def computeOks(self, imgId, catId): method _extract_mask (line 536) | def _extract_mask(self, dt: Dict[str, Any]) -> np.ndarray: method _extract_iuv (line 581) | def _extract_iuv( method computeOgps_single_pair (line 617) | def computeOgps_single_pair(self, dt, gt, py, px, pt_mask): method extract_iuv_from_quantized (line 652) | def extract_iuv_from_quantized(self, dt, gt, py, px, pt_mask): method extract_iuv_from_raw (line 660) | def extract_iuv_from_raw(self, dt, gt, py, px, pt_mask): method computeOgps_single_pair_iuv (line 674) | def computeOgps_single_pair_iuv(self, dt, gt, ipoints, upoints, vpoints): method computeOgps_single_pair_cse (line 687) | def computeOgps_single_pair_cse( method computeOgps (line 719) | def computeOgps(self, imgId, catId): method evaluateImg (line 779) | def evaluateImg(self, imgId, catId, aRng, maxDet): method accumulate (line 924) | def accumulate(self, p=None): method summarize (line 1029) | def summarize(self): method __str__ (line 1160) | def __str__(self): method findAllClosestVertsUV (line 1164) | def findAllClosestVertsUV(self, U_points, V_points, Index_points): method findClosestVertsCse (line 1182) | def findClosestVertsCse(self, embedding, py, px, mask, mesh_name): method findAllClosestVertsGT (line 1191) | def findAllClosestVertsGT(self, gt): method getDistancesCse (line 1212) | def getDistancesCse(self, cVertsGT, cVerts, mesh_name): method getDistancesUV (line 1219) | def getDistancesUV(self, cVertsGT, cVerts): class Params (line 1250) | class Params: method setDetParams (line 1255) | def setDetParams(self): method setKpParams (line 1271) | def setKpParams(self): method setUvParams (line 1282) | def setUvParams(self): method __init__ (line 1292) | def __init__(self, iouType="segm"): FILE: detectron2/projects/DensePose/densepose/evaluation/evaluator.py class DensePoseCOCOEvaluator (line 45) | class DensePoseCOCOEvaluator(DatasetEvaluator): method __init__ (line 46) | def __init__( method reset (line 84) | def reset(self): method process (line 87) | def process(self, inputs, outputs): method evaluate (line 120) | def evaluate(self, img_ids=None): method _eval_predictions (line 134) | def _eval_predictions(self, predictions, multi_storage=None, img_ids=N... method _evaluate_mesh_alignment (line 165) | def _evaluate_mesh_alignment(self): method _print_mesh_alignment_results (line 180) | def _print_mesh_alignment_results(self, results: Dict[str, float], mes... function prediction_to_dict (line 198) | def prediction_to_dict(instances, img_id, embedder, class_to_mesh_name, ... function densepose_chart_predictions_to_dict (line 235) | def densepose_chart_predictions_to_dict(instances): function densepose_chart_predictions_to_storage_dict (line 261) | def densepose_chart_predictions_to_storage_dict(instances): function densepose_cse_predictions_to_dict (line 275) | def densepose_cse_predictions_to_dict(instances, embedder, class_to_mesh... function _evaluate_predictions_on_coco (line 288) | def _evaluate_predictions_on_coco( function _get_densepose_metrics (line 322) | def _get_densepose_metrics(min_threshold: float = 0.5): function _derive_results_from_coco_eval (line 334) | def _derive_results_from_coco_eval( function build_densepose_evaluator_storage (line 386) | def build_densepose_evaluator_storage(cfg: CfgNode, output_folder: str): FILE: detectron2/projects/DensePose/densepose/evaluation/mesh_alignment_evaluator.py class MeshAlignmentEvaluator (line 14) | class MeshAlignmentEvaluator: method __init__ (line 19) | def __init__(self, embedder: nn.Module, mesh_names: Optional[List[str]]): method evaluate (line 29) | def evaluate(self): FILE: detectron2/projects/DensePose/densepose/evaluation/tensor_storage.py class SizeData (line 17) | class SizeData: function _calculate_record_field_size_b (line 22) | def _calculate_record_field_size_b(data_schema: Dict[str, SizeData], fie... function _calculate_record_size_b (line 29) | def _calculate_record_size_b(data_schema: Dict[str, SizeData]) -> int: function _calculate_record_field_sizes_b (line 37) | def _calculate_record_field_sizes_b(data_schema: Dict[str, SizeData]) ->... class SingleProcessTensorStorage (line 44) | class SingleProcessTensorStorage: method __init__ (line 49) | def __init__(self, data_schema: Dict[str, SizeData], storage_impl: Bin... method get (line 76) | def get(self, record_id: int) -> Dict[str, torch.Tensor]: method put (line 106) | def put(self, data: Dict[str, torch.Tensor]) -> int: class SingleProcessFileTensorStorage (line 138) | class SingleProcessFileTensorStorage(SingleProcessTensorStorage): method __init__ (line 143) | def __init__(self, data_schema: Dict[str, SizeData], fpath: str, mode:... class SingleProcessRamTensorStorage (line 156) | class SingleProcessRamTensorStorage(SingleProcessTensorStorage): method __init__ (line 161) | def __init__(self, data_schema: Dict[str, SizeData], buf: io.BytesIO): class MultiProcessTensorStorage (line 165) | class MultiProcessTensorStorage: method __init__ (line 174) | def __init__(self, rank_to_storage: Dict[int, SingleProcessTensorStora... method get (line 177) | def get(self, rank: int, record_id: int) -> Dict[str, torch.Tensor]: method put (line 181) | def put(self, rank: int, data: Dict[str, torch.Tensor]) -> int: class MultiProcessFileTensorStorage (line 186) | class MultiProcessFileTensorStorage(MultiProcessTensorStorage): method __init__ (line 187) | def __init__(self, data_schema: Dict[str, SizeData], rank_to_fpath: Di... class MultiProcessRamTensorStorage (line 195) | class MultiProcessRamTensorStorage(MultiProcessTensorStorage): method __init__ (line 196) | def __init__(self, data_schema: Dict[str, SizeData], rank_to_buffer: D... function _ram_storage_gather (line 204) | def _ram_storage_gather( function _file_storage_gather (line 218) | def _file_storage_gather( function storage_gather (line 231) | def storage_gather( FILE: detectron2/projects/DensePose/densepose/modeling/build.py function build_densepose_predictor (line 12) | def build_densepose_predictor(cfg: CfgNode, input_channels: int): function build_densepose_data_filter (line 28) | def build_densepose_data_filter(cfg: CfgNode): function build_densepose_head (line 44) | def build_densepose_head(cfg: CfgNode, input_channels: int): function build_densepose_losses (line 60) | def build_densepose_losses(cfg: CfgNode): function build_densepose_embedder (line 75) | def build_densepose_embedder(cfg: CfgNode) -> Optional[nn.Module]: FILE: detectron2/projects/DensePose/densepose/modeling/confidence.py class DensePoseUVConfidenceType (line 9) | class DensePoseUVConfidenceType(Enum): class DensePoseUVConfidenceConfig (line 28) | class DensePoseUVConfidenceConfig: class DensePoseSegmConfidenceConfig (line 40) | class DensePoseSegmConfidenceConfig: class DensePoseConfidenceModelConfig (line 51) | class DensePoseConfidenceModelConfig: method from_cfg (line 62) | def from_cfg(cfg: CfgNode) -> "DensePoseConfidenceModelConfig": FILE: detectron2/projects/DensePose/densepose/modeling/cse/embedder.py class EmbedderType (line 18) | class EmbedderType(Enum): function create_embedder (line 29) | def create_embedder(embedder_spec: CfgNode, embedder_dim: int) -> nn.Mod... class Embedder (line 66) | class Embedder(nn.Module): method __init__ (line 74) | def __init__(self, cfg: CfgNode): method load_from_model_checkpoint (line 93) | def load_from_model_checkpoint(self, fpath: str, prefix: Optional[str]... method forward (line 114) | def forward(self, mesh_name: str) -> torch.Tensor: method has_embeddings (line 127) | def has_embeddings(self, mesh_name: str) -> bool: FILE: detectron2/projects/DensePose/densepose/modeling/cse/utils.py function squared_euclidean_distance_matrix (line 7) | def squared_euclidean_distance_matrix(pts1: torch.Tensor, pts2: torch.Te... function normalize_embeddings (line 25) | def normalize_embeddings(embeddings: torch.Tensor, epsilon: float = 1e-6... function get_closest_vertices_mask_from_ES (line 38) | def get_closest_vertices_mask_from_ES( FILE: detectron2/projects/DensePose/densepose/modeling/cse/vertex_direct_embedder.py class VertexDirectEmbedder (line 12) | class VertexDirectEmbedder(nn.Module): method __init__ (line 20) | def __init__(self, num_vertices: int, embed_dim: int): method reset_parameters (line 33) | def reset_parameters(self): method forward (line 39) | def forward(self) -> torch.Tensor: method load (line 51) | def load(self, fpath: str): FILE: detectron2/projects/DensePose/densepose/modeling/cse/vertex_feature_embedder.py class VertexFeatureEmbedder (line 12) | class VertexFeatureEmbedder(nn.Module): method __init__ (line 24) | def __init__( method reset_parameters (line 46) | def reset_parameters(self): method forward (line 50) | def forward(self) -> torch.Tensor: method load (line 62) | def load(self, fpath: str): FILE: detectron2/projects/DensePose/densepose/modeling/densepose_checkpoint.py function _rename_HRNet_weights (line 7) | def _rename_HRNet_weights(weights): class DensePoseCheckpointer (line 22) | class DensePoseCheckpointer(DetectionCheckpointer): method __init__ (line 27) | def __init__(self, model, save_dir="", *, save_to_disk=None, **checkpo... method _load_file (line 30) | def _load_file(self, filename: str) -> object: FILE: detectron2/projects/DensePose/densepose/modeling/filter.py class DensePoseDataFilter (line 11) | class DensePoseDataFilter(object): method __init__ (line 12) | def __init__(self, cfg: CfgNode): method __call__ (line 17) | def __call__(self, features: List[torch.Tensor], proposals_with_target... FILE: detectron2/projects/DensePose/densepose/modeling/hrfpn.py class HRFPN (line 33) | class HRFPN(Backbone): method __init__ (line 48) | def __init__( method init_weights (line 129) | def init_weights(self): method forward (line 135) | def forward(self, inputs): function build_hrfpn_backbone (line 165) | def build_hrfpn_backbone(cfg, input_shape: ShapeSpec) -> HRFPN: FILE: detectron2/projects/DensePose/densepose/modeling/hrnet.py function conv3x3 (line 24) | def conv3x3(in_planes, out_planes, stride=1): class BasicBlock (line 29) | class BasicBlock(nn.Module): method __init__ (line 32) | def __init__(self, inplanes, planes, stride=1, downsample=None): method forward (line 42) | def forward(self, x): class Bottleneck (line 61) | class Bottleneck(nn.Module): method __init__ (line 64) | def __init__(self, inplanes, planes, stride=1, downsample=None): method forward (line 76) | def forward(self, x): class HighResolutionModule (line 99) | class HighResolutionModule(nn.Module): method __init__ (line 112) | def __init__( method _check_branches (line 133) | def _check_branches(self, num_branches, blocks, num_blocks, num_inchan... method _make_one_branch (line 153) | def _make_one_branch(self, branch_index, block, num_blocks, num_channe... method _make_branches (line 180) | def _make_branches(self, num_branches, block, num_blocks, num_channels): method _make_fuse_layers (line 188) | def _make_fuse_layers(self): method get_num_inchannels (line 247) | def get_num_inchannels(self): method forward (line 250) | def forward(self, x): class PoseHigherResolutionNet (line 275) | class PoseHigherResolutionNet(Backbone): method __init__ (line 282) | def __init__(self, cfg, **kwargs): method _get_deconv_cfg (line 328) | def _get_deconv_cfg(self, deconv_kernel): method _make_transition_layer (line 341) | def _make_transition_layer(self, num_channels_pre_layer, num_channels_... method _make_layer (line 383) | def _make_layer(self, block, planes, blocks, stride=1): method _make_stage (line 405) | def _make_stage(self, layer_config, num_inchannels, multi_scale_output... method forward (line 434) | def forward(self, x): function build_pose_hrnet_backbone (line 472) | def build_pose_hrnet_backbone(cfg, input_shape: ShapeSpec): FILE: detectron2/projects/DensePose/densepose/modeling/inference.py function densepose_inference (line 9) | def densepose_inference(densepose_predictor_output: Any, detections: Lis... FILE: detectron2/projects/DensePose/densepose/modeling/losses/chart.py class DensePoseChartLoss (line 21) | class DensePoseChartLoss: method __init__ (line 47) | def __init__(self, cfg: CfgNode): method __call__ (line 64) | def __call__( method produce_fake_densepose_losses (line 139) | def produce_fake_densepose_losses(self, densepose_predictor_outputs: A... method produce_fake_densepose_losses_uv (line 164) | def produce_fake_densepose_losses_uv(self, densepose_predictor_outputs... method produce_fake_densepose_losses_segm (line 187) | def produce_fake_densepose_losses_segm(self, densepose_predictor_outpu... method produce_densepose_losses_uv (line 211) | def produce_densepose_losses_uv( method produce_densepose_losses_segm (line 243) | def produce_densepose_losses_segm( FILE: detectron2/projects/DensePose/densepose/modeling/losses/chart_with_confidences.py class DensePoseChartWithConfidenceLoss (line 18) | class DensePoseChartWithConfidenceLoss(DensePoseChartLoss): method __init__ (line 21) | def __init__(self, cfg: CfgNode): method produce_fake_densepose_losses_uv (line 33) | def produce_fake_densepose_losses_uv(self, densepose_predictor_outputs... method produce_densepose_losses_uv (line 71) | def produce_densepose_losses_uv( class IIDIsotropicGaussianUVLoss (line 119) | class IIDIsotropicGaussianUVLoss(nn.Module): method __init__ (line 132) | def __init__(self, sigma_lower_bound: float): method forward (line 137) | def forward( class IndepAnisotropicGaussianUVLoss (line 157) | class IndepAnisotropicGaussianUVLoss(nn.Module): method __init__ (line 173) | def __init__(self, sigma_lower_bound: float): method forward (line 178) | def forward( FILE: detectron2/projects/DensePose/densepose/modeling/losses/cse.py class DensePoseCseLoss (line 20) | class DensePoseCseLoss: method __init__ (line 28) | def __init__(self, cfg: CfgNode): method create_embed_loss (line 49) | def create_embed_loss(cls, cfg: CfgNode): method __call__ (line 54) | def __call__( method produce_fake_losses (line 95) | def produce_fake_losses( FILE: detectron2/projects/DensePose/densepose/modeling/losses/cycle_pix2shape.py function _create_pixel_dist_matrix (line 18) | def _create_pixel_dist_matrix(grid_size: int) -> torch.Tensor: function _sample_fg_pixels_randperm (line 30) | def _sample_fg_pixels_randperm(fg_mask: torch.Tensor, sample_size: int) ... function _sample_fg_pixels_multinomial (line 40) | def _sample_fg_pixels_multinomial(fg_mask: torch.Tensor, sample_size: in... class PixToShapeCycleLoss (line 48) | class PixToShapeCycleLoss(nn.Module): method __init__ (line 53) | def __init__(self, cfg: CfgNode): method forward (line 73) | def forward( method fake_value (line 149) | def fake_value(self, densepose_predictor_outputs: Any, embedder: nn.Mo... FILE: detectron2/projects/DensePose/densepose/modeling/losses/cycle_shape2shape.py class ShapeToShapeCycleLoss (line 16) | class ShapeToShapeCycleLoss(nn.Module): method __init__ (line 23) | def __init__(self, cfg: CfgNode): method _sample_random_pair (line 37) | def _sample_random_pair(self) -> Tuple[str, str]: method forward (line 51) | def forward(self, embedder: nn.Module): method fake_value (line 60) | def fake_value(self, embedder: nn.Module): method _get_embeddings_and_geodists_for_mesh (line 66) | def _get_embeddings_and_geodists_for_mesh( method _forward_one_pair (line 93) | def _forward_one_pair( FILE: detectron2/projects/DensePose/densepose/modeling/losses/embed.py class EmbeddingLoss (line 18) | class EmbeddingLoss: method __init__ (line 28) | def __init__(self, cfg: CfgNode): method __call__ (line 34) | def __call__( method fake_values (line 116) | def fake_values(self, densepose_predictor_outputs: Any, embedder: nn.M... method fake_value (line 126) | def fake_value(self, densepose_predictor_outputs: Any, embedder: nn.Mo... FILE: detectron2/projects/DensePose/densepose/modeling/losses/embed_utils.py class PackedCseAnnotations (line 13) | class PackedCseAnnotations: class CseAnnotationsAccumulator (line 26) | class CseAnnotationsAccumulator(AnnotationsAccumulator): method __init__ (line 32) | def __init__(self): method accumulate (line 46) | def accumulate(self, instances_one_image: Instances): method _do_accumulate (line 80) | def _do_accumulate(self, box_xywh_gt: torch.Tensor, box_xywh_est: torc... method pack (line 108) | def pack(self) -> Optional[PackedCseAnnotations]: FILE: detectron2/projects/DensePose/densepose/modeling/losses/mask.py class DataForMaskLoss (line 12) | class DataForMaskLoss: function extract_data_for_mask_loss_from_matches (line 23) | def extract_data_for_mask_loss_from_matches( class MaskLoss (line 71) | class MaskLoss: method __call__ (line 79) | def __call__( method fake_value (line 111) | def fake_value(self, densepose_predictor_outputs: Any) -> torch.Tensor: FILE: detectron2/projects/DensePose/densepose/modeling/losses/mask_or_segm.py class MaskOrSegmentationLoss (line 13) | class MaskOrSegmentationLoss: method __init__ (line 21) | def __init__(self, cfg: CfgNode): method __call__ (line 33) | def __call__( method fake_value (line 58) | def fake_value(self, densepose_predictor_outputs: Any) -> torch.Tensor: FILE: detectron2/projects/DensePose/densepose/modeling/losses/segm.py class SegmentationLoss (line 13) | class SegmentationLoss: method __init__ (line 21) | def __init__(self, cfg: CfgNode): method __call__ (line 31) | def __call__( method fake_value (line 69) | def fake_value(self, densepose_predictor_outputs: Any) -> torch.Tensor: FILE: detectron2/projects/DensePose/densepose/modeling/losses/soft_embed.py class SoftEmbeddingLoss (line 19) | class SoftEmbeddingLoss: method __init__ (line 31) | def __init__(self, cfg: CfgNode): method __call__ (line 38) | def __call__( method fake_values (line 130) | def fake_values(self, densepose_predictor_outputs: Any, embedder: nn.M... method fake_value (line 140) | def fake_value(self, densepose_predictor_outputs: Any, embedder: nn.Mo... FILE: detectron2/projects/DensePose/densepose/modeling/losses/utils.py function _linear_interpolation_utilities (line 16) | def _linear_interpolation_utilities(v_norm, v0_src, size_src, v0_dst, si... class BilinearInterpolationHelper (line 62) | class BilinearInterpolationHelper: method __init__ (line 86) | def __init__( method from_matches (line 104) | def from_matches( method extract_at_points (line 158) | def extract_at_points( function resample_data (line 195) | def resample_data( class AnnotationsAccumulator (line 238) | class AnnotationsAccumulator(ABC): method accumulate (line 245) | def accumulate(self, instances_one_image: Instances): method pack (line 255) | def pack(self) -> Any: class PackedChartBasedAnnotations (line 263) | class PackedChartBasedAnnotations: class ChartBasedAnnotationsAccumulator (line 303) | class ChartBasedAnnotationsAccumulator(AnnotationsAccumulator): method __init__ (line 309) | def __init__(self): method accumulate (line 324) | def accumulate(self, instances_one_image: Instances): method _do_accumulate (line 358) | def _do_accumulate( method pack (line 385) | def pack(self) -> Optional[PackedChartBasedAnnotations]: function extract_packed_annotations_from_matches (line 416) | def extract_packed_annotations_from_matches( function sample_random_indices (line 424) | def sample_random_indices( FILE: detectron2/projects/DensePose/densepose/modeling/predictors/chart.py class DensePoseChartPredictor (line 15) | class DensePoseChartPredictor(nn.Module): method __init__ (line 34) | def __init__(self, cfg: CfgNode, input_channels: int): method interp2d (line 66) | def interp2d(self, tensor_nchw: torch.Tensor): method forward (line 80) | def forward(self, head_outputs: torch.Tensor): FILE: detectron2/projects/DensePose/densepose/modeling/predictors/chart_confidence.py class DensePoseChartConfidencePredictorMixin (line 15) | class DensePoseChartConfidencePredictorMixin: method __init__ (line 32) | def __init__(self, cfg: CfgNode, input_channels: int): method _initialize_confidence_estimation_layers (line 47) | def _initialize_confidence_estimation_layers(self, cfg: CfgNode, dim_i... method forward (line 88) | def forward(self, head_outputs: torch.Tensor): method _create_output_instance (line 149) | def _create_output_instance(self, base_predictor_outputs: Any): FILE: detectron2/projects/DensePose/densepose/modeling/predictors/chart_with_confidence.py class DensePoseChartWithConfidencePredictor (line 8) | class DensePoseChartWithConfidencePredictor( FILE: detectron2/projects/DensePose/densepose/modeling/predictors/cse.py class DensePoseEmbeddingPredictor (line 15) | class DensePoseEmbeddingPredictor(nn.Module): method __init__ (line 21) | def __init__(self, cfg: CfgNode, input_channels: int): method interp2d (line 45) | def interp2d(self, tensor_nchw: torch.Tensor): method forward (line 59) | def forward(self, head_outputs): FILE: detectron2/projects/DensePose/densepose/modeling/predictors/cse_confidence.py class DensePoseEmbeddingConfidencePredictorMixin (line 15) | class DensePoseEmbeddingConfidencePredictorMixin: method __init__ (line 31) | def __init__(self, cfg: CfgNode, input_channels: int): method _initialize_confidence_estimation_layers (line 46) | def _initialize_confidence_estimation_layers(self, cfg: CfgNode, dim_i... method forward (line 60) | def forward(self, head_outputs: torch.Tensor): method _create_output_instance (line 95) | def _create_output_instance(self, base_predictor_outputs: Any): FILE: detectron2/projects/DensePose/densepose/modeling/predictors/cse_with_confidence.py class DensePoseEmbeddingWithConfidencePredictor (line 8) | class DensePoseEmbeddingWithConfidencePredictor( FILE: detectron2/projects/DensePose/densepose/modeling/roi_heads/deeplab.py class DensePoseDeepLabHead (line 15) | class DensePoseDeepLabHead(nn.Module): method __init__ (line 22) | def __init__(self, cfg: CfgNode, input_channels: int): method forward (line 60) | def forward(self, features): method _get_layer_name (line 73) | def _get_layer_name(self, i: int): class ASPPConv (line 81) | class ASPPConv(nn.Sequential): method __init__ (line 82) | def __init__(self, in_channels, out_channels, dilation): class ASPPPooling (line 93) | class ASPPPooling(nn.Sequential): method __init__ (line 94) | def __init__(self, in_channels, out_channels): method forward (line 102) | def forward(self, x): class ASPP (line 108) | class ASPP(nn.Module): method __init__ (line 109) | def __init__(self, in_channels, atrous_rates, out_channels): method forward (line 135) | def forward(self, x): class _NonLocalBlockND (line 146) | class _NonLocalBlockND(nn.Module): method __init__ (line 147) | def __init__( method forward (line 229) | def forward(self, x): class NONLocalBlock2D (line 255) | class NONLocalBlock2D(_NonLocalBlockND): method __init__ (line 256) | def __init__(self, in_channels, inter_channels=None, sub_sample=True, ... FILE: detectron2/projects/DensePose/densepose/modeling/roi_heads/roi_head.py class Decoder (line 26) | class Decoder(nn.Module): method __init__ (line 33) | def __init__(self, cfg, input_shape: Dict[str, ShapeSpec], in_features): method forward (line 74) | def forward(self, features: List[torch.Tensor]): class DensePoseROIHeads (line 85) | class DensePoseROIHeads(StandardROIHeads): method __init__ (line 90) | def __init__(self, cfg, input_shape): method _init_densepose_head (line 94) | def _init_densepose_head(self, cfg, input_shape): method _forward_densepose (line 127) | def _forward_densepose(self, features: Dict[str, torch.Tensor], instan... method forward (line 184) | def forward( method forward_with_given_boxes (line 198) | def forward_with_given_boxes( FILE: detectron2/projects/DensePose/densepose/modeling/roi_heads/v1convx.py class DensePoseV1ConvXHead (line 15) | class DensePoseV1ConvXHead(nn.Module): method __init__ (line 20) | def __init__(self, cfg: CfgNode, input_channels: int): method forward (line 44) | def forward(self, features: torch.Tensor): method _get_layer_name (line 62) | def _get_layer_name(self, i: int): FILE: detectron2/projects/DensePose/densepose/modeling/test_time_augmentation.py class DensePoseDatasetMapperTTA (line 15) | class DensePoseDatasetMapperTTA(DatasetMapperTTA): method __init__ (line 16) | def __init__(self, cfg): method __call__ (line 20) | def __call__(self, dataset_dict): class DensePoseGeneralizedRCNNWithTTA (line 38) | class DensePoseGeneralizedRCNNWithTTA(GeneralizedRCNNWithTTA): method __init__ (line 39) | def __init__(self, cfg, model, transform_data, tta_mapper=None, batch_... method _inference_one_image (line 55) | def _inference_one_image(self, input): method _get_augmented_boxes (line 93) | def _get_augmented_boxes(self, augmented_inputs, tfms): method _reduce_pred_densepose (line 114) | def _reduce_pred_densepose(self, outputs, tfms): method _incremental_avg_dp (line 136) | def _incremental_avg_dp(self, avg, new_el, idx): function _inverse_rotation (line 145) | def _inverse_rotation(densepose_attrs, boxes, transform): function rotate_box_inverse (line 185) | def rotate_box_inverse(rot_tfm, rotated_box): FILE: detectron2/projects/DensePose/densepose/modeling/utils.py function initialize_module_params (line 6) | def initialize_module_params(module: nn.Module) -> None: FILE: detectron2/projects/DensePose/densepose/structures/chart.py class DensePoseChartPredictorOutput (line 9) | class DensePoseChartPredictorOutput: method __len__ (line 32) | def __len__(self): method __getitem__ (line 38) | def __getitem__( method to (line 62) | def to(self, device: torch.device): FILE: detectron2/projects/DensePose/densepose/structures/chart_confidence.py function decorate_predictor_output_class_with_confidences (line 10) | def decorate_predictor_output_class_with_confidences(BasePredictorOutput... FILE: detectron2/projects/DensePose/densepose/structures/chart_result.py class DensePoseChartResult (line 9) | class DensePoseChartResult: method to (line 25) | def to(self, device: torch.device): class DensePoseChartResultWithConfidences (line 35) | class DensePoseChartResultWithConfidences: method to (line 55) | def to(self, device: torch.device): class DensePoseChartResultQuantized (line 78) | class DensePoseChartResultQuantized: method to (line 95) | def to(self, device: torch.device): class DensePoseChartResultCompressed (line 104) | class DensePoseChartResultCompressed: function quantize_densepose_chart_result (line 120) | def quantize_densepose_chart_result(result: DensePoseChartResult) -> Den... function compress_quantized_densepose_chart_result (line 136) | def compress_quantized_densepose_chart_result( function decompress_compressed_densepose_chart_result (line 162) | def decompress_compressed_densepose_chart_result( FILE: detectron2/projects/DensePose/densepose/structures/cse.py class DensePoseEmbeddingPredictorOutput (line 9) | class DensePoseEmbeddingPredictorOutput: method __len__ (line 21) | def __len__(self): method __getitem__ (line 27) | def __getitem__( method to (line 46) | def to(self, device: torch.device): FILE: detectron2/projects/DensePose/densepose/structures/cse_confidence.py function decorate_cse_predictor_output_class_with_confidences (line 10) | def decorate_cse_predictor_output_class_with_confidences(BasePredictorOu... FILE: detectron2/projects/DensePose/densepose/structures/data_relative.py class DensePoseDataRelative (line 11) | class DensePoseDataRelative(object): method __init__ (line 50) | def __init__(self, annotation, cleanup=False): method to (line 75) | def to(self, device): method extract_segmentation_mask (line 90) | def extract_segmentation_mask(annotation): method validate_annotation (line 114) | def validate_annotation(annotation): method cleanup_annotation (line 158) | def cleanup_annotation(annotation): method apply_transform (line 172) | def apply_transform(self, transforms, densepose_transform_data): method _transform_pts (line 177) | def _transform_pts(self, transforms, dp_transform_data): method _flip_iuv_semantics (line 195) | def _flip_iuv_semantics(self, dp_transform_data: DensePoseTransformDat... method _flip_vertices (line 213) | def _flip_vertices(self): method _transform_segm (line 220) | def _transform_segm(self, transforms, dp_transform_data): method _flip_segm_semantics (line 233) | def _flip_segm_semantics(self, dp_transform_data): method _transform_segm_rotation (line 240) | def _transform_segm_rotation(self, rotation): FILE: detectron2/projects/DensePose/densepose/structures/list.py class DensePoseList (line 7) | class DensePoseList(object): method __init__ (line 11) | def __init__(self, densepose_datas, boxes_xyxy_abs, image_size_hw, dev... method to (line 31) | def to(self, device): method __iter__ (line 36) | def __iter__(self): method __len__ (line 39) | def __len__(self): method __repr__ (line 42) | def __repr__(self): method __getitem__ (line 49) | def __getitem__(self, item): FILE: detectron2/projects/DensePose/densepose/structures/mesh.py function _maybe_copy_to_device (line 13) | def _maybe_copy_to_device( class Mesh (line 21) | class Mesh: method __init__ (line 22) | def __init__( method to (line 79) | def to(self, device: torch.device): method vertices (line 94) | def vertices(self): method faces (line 100) | def faces(self): method geodists (line 106) | def geodists(self): method symmetry (line 112) | def symmetry(self): method texcoords (line 118) | def texcoords(self): method get_geodists (line 123) | def get_geodists(self): method _compute_geodists (line 128) | def _compute_geodists(self): function load_mesh_data (line 134) | def load_mesh_data( function load_mesh_auxiliary_data (line 146) | def load_mesh_auxiliary_data( function load_mesh_symmetry (line 156) | def load_mesh_symmetry( function create_mesh (line 171) | def create_mesh(mesh_name: str, device: Optional[torch.device] = None) -... FILE: detectron2/projects/DensePose/densepose/structures/transform_data.py function normalized_coords_transform (line 6) | def normalized_coords_transform(x0, y0, w, h): class DensePoseTransformData (line 19) | class DensePoseTransformData(object): method __init__ (line 27) | def __init__(self, uv_symmetries: Dict[str, torch.Tensor], device: tor... method to (line 33) | def to(self, device: torch.device, copy: bool = False) -> "DensePoseTr... method load (line 52) | def load(io: Union[str, BinaryIO]): FILE: detectron2/projects/DensePose/densepose/utils/dbhelper.py class EntrySelector (line 5) | class EntrySelector(object): method from_string (line 11) | def from_string(spec: str) -> "EntrySelector": class AllEntrySelector (line 17) | class AllEntrySelector(EntrySelector): method __call__ (line 24) | def __call__(self, entry): class FieldEntrySelector (line 28) | class FieldEntrySelector(EntrySelector): class _FieldEntryValuePredicate (line 52) | class _FieldEntryValuePredicate(object): method __init__ (line 57) | def __init__(self, name: str, typespec: Optional[str], value: str): method __call__ (line 64) | def __call__(self, entry): class _FieldEntryRangePredicate (line 67) | class _FieldEntryRangePredicate(object): method __init__ (line 72) | def __init__(self, name: str, typespec: Optional[str], vmin: str, vm... method __call__ (line 80) | def __call__(self, entry): method __init__ (line 85) | def __init__(self, spec: str): method __call__ (line 88) | def __call__(self, entry: Dict[str, Any]): method _parse_specifier_into_predicates (line 94) | def _parse_specifier_into_predicates(self, spec: str): method _parse_field_name_type (line 119) | def _parse_field_name_type(self, field_name_with_type: str) -> Tuple[s... method _is_range_spec (line 133) | def _is_range_spec(self, field_value_or_range): method _get_range_spec (line 137) | def _get_range_spec(self, field_value_or_range): method _parse_error (line 146) | def _parse_error(self, msg): FILE: detectron2/projects/DensePose/densepose/utils/logger.py function verbosity_to_level (line 5) | def verbosity_to_level(verbosity) -> int: FILE: detectron2/projects/DensePose/densepose/utils/transform.py function load_for_dataset (line 8) | def load_for_dataset(dataset_name): function load_from_cfg (line 14) | def load_from_cfg(cfg): FILE: detectron2/projects/DensePose/densepose/vis/base.py class MatrixVisualizer (line 11) | class MatrixVisualizer(object): method __init__ (line 16) | def __init__( method visualize (line 32) | def visualize(self, image_bgr, mask, matrix, bbox_xywh): method _resize (line 59) | def _resize(self, mask, matrix, w, h): method _check_image (line 66) | def _check_image(self, image_rgb): method _check_mask_matrix (line 71) | def _check_mask_matrix(self, mask, matrix): class RectangleVisualizer (line 77) | class RectangleVisualizer(object): method __init__ (line 81) | def __init__(self, color=_COLOR_GREEN, thickness=1): method visualize (line 85) | def visualize(self, image_bgr, bbox_xywh, color=None, thickness=None): class PointsVisualizer (line 93) | class PointsVisualizer(object): method __init__ (line 97) | def __init__(self, color_bgr=_COLOR_GREEN, r=5): method visualize (line 101) | def visualize(self, image_bgr, pts_xy, colors_bgr=None, rs=None): class TextVisualizer (line 110) | class TextVisualizer(object): method __init__ (line 115) | def __init__( method visualize (line 139) | def visualize(self, image_bgr, txt, topleft_xy): method get_text_size_wh (line 167) | def get_text_size_wh(self, txt): class CompoundVisualizer (line 174) | class CompoundVisualizer(object): method __init__ (line 175) | def __init__(self, visualizers): method visualize (line 178) | def visualize(self, image_bgr, data): method __str__ (line 189) | def __str__(self): FILE: detectron2/projects/DensePose/densepose/vis/bounding_box.py class BoundingBoxVisualizer (line 5) | class BoundingBoxVisualizer(object): method __init__ (line 6) | def __init__(self): method visualize (line 9) | def visualize(self, image_bgr, boxes_xywh): class ScoredBoundingBoxVisualizer (line 15) | class ScoredBoundingBoxVisualizer(object): method __init__ (line 16) | def __init__(self, bbox_visualizer_params=None, score_visualizer_param... method visualize (line 24) | def visualize(self, image_bgr, scored_bboxes): FILE: detectron2/projects/DensePose/densepose/vis/densepose_data_points.py class DensePoseDataCoarseSegmentationVisualizer (line 11) | class DensePoseDataCoarseSegmentationVisualizer(object): method __init__ (line 16) | def __init__(self, inplace=True, cmap=cv2.COLORMAP_PARULA, alpha=0.7, ... method visualize (line 24) | def visualize( class DensePoseDataPointsVisualizer (line 39) | class DensePoseDataPointsVisualizer(object): method __init__ (line 40) | def __init__(self, densepose_data_to_value_fn=None, cmap=cv2.COLORMAP_... method visualize (line 45) | def visualize( function _densepose_data_u_for_cmap (line 69) | def _densepose_data_u_for_cmap(densepose_data): function _densepose_data_v_for_cmap (line 74) | def _densepose_data_v_for_cmap(densepose_data): function _densepose_data_i_for_cmap (line 79) | def _densepose_data_i_for_cmap(densepose_data): class DensePoseDataPointsUVisualizer (line 88) | class DensePoseDataPointsUVisualizer(DensePoseDataPointsVisualizer): method __init__ (line 89) | def __init__(self, **kwargs): class DensePoseDataPointsVVisualizer (line 95) | class DensePoseDataPointsVVisualizer(DensePoseDataPointsVisualizer): method __init__ (line 96) | def __init__(self, **kwargs): class DensePoseDataPointsIVisualizer (line 102) | class DensePoseDataPointsIVisualizer(DensePoseDataPointsVisualizer): method __init__ (line 103) | def __init__(self, **kwargs): FILE: detectron2/projects/DensePose/densepose/vis/densepose_outputs_iuv.py class DensePoseOutputsVisualizer (line 12) | class DensePoseOutputsVisualizer(object): method __init__ (line 13) | def __init__( method visualize (line 27) | def visualize( class DensePoseOutputsUVisualizer (line 89) | class DensePoseOutputsUVisualizer(DensePoseOutputsVisualizer): method __init__ (line 90) | def __init__(self, inplace=True, cmap=cv2.COLORMAP_PARULA, alpha=0.7, ... class DensePoseOutputsVVisualizer (line 94) | class DensePoseOutputsVVisualizer(DensePoseOutputsVisualizer): method __init__ (line 95) | def __init__(self, inplace=True, cmap=cv2.COLORMAP_PARULA, alpha=0.7, ... class DensePoseOutputsFineSegmentationVisualizer (line 99) | class DensePoseOutputsFineSegmentationVisualizer(DensePoseOutputsVisuali... method __init__ (line 100) | def __init__(self, inplace=True, cmap=cv2.COLORMAP_PARULA, alpha=0.7, ... FILE: detectron2/projects/DensePose/densepose/vis/densepose_outputs_vertex.py function get_xyz_vertex_embedding (line 22) | def get_xyz_vertex_embedding(mesh_name: str, device: torch.device): class DensePoseOutputsVertexVisualizer (line 40) | class DensePoseOutputsVertexVisualizer(object): method __init__ (line 41) | def __init__( method visualize (line 65) | def visualize( method extract_and_check_outputs_and_boxes (line 97) | def extract_and_check_outputs_and_boxes(self, outputs_boxes_xywh_class... function get_texture_atlases (line 131) | def get_texture_atlases(json_str: Optional[str]) -> Optional[Dict[str, O... class DensePoseOutputsTextureVisualizer (line 142) | class DensePoseOutputsTextureVisualizer(DensePoseOutputsVertexVisualizer): method __init__ (line 143) | def __init__( method visualize (line 173) | def visualize( method generate_image_with_texture (line 217) | def generate_image_with_texture(self, bbox_image_bgr, uv_array, mask, ... FILE: detectron2/projects/DensePose/densepose/vis/densepose_results.py class DensePoseResultsVisualizer (line 14) | class DensePoseResultsVisualizer(object): method visualize (line 15) | def visualize( method create_visualization_context (line 34) | def create_visualization_context(self, image_bgr: Image): method visualize_iuv_arr (line 37) | def visualize_iuv_arr(self, context, iuv_arr: np.ndarray, bbox_xywh) -... method context_to_image_bgr (line 40) | def context_to_image_bgr(self, context): method get_image_bgr_from_context (line 43) | def get_image_bgr_from_context(self, context): class DensePoseMaskedColormapResultsVisualizer (line 47) | class DensePoseMaskedColormapResultsVisualizer(DensePoseResultsVisualizer): method __init__ (line 48) | def __init__( method context_to_image_bgr (line 64) | def context_to_image_bgr(self, context): method visualize_iuv_arr (line 67) | def visualize_iuv_arr(self, context, iuv_arr: np.ndarray, bbox_xywh) -... function _extract_i_from_iuvarr (line 76) | def _extract_i_from_iuvarr(iuv_arr): function _extract_u_from_iuvarr (line 80) | def _extract_u_from_iuvarr(iuv_arr): function _extract_v_from_iuvarr (line 84) | def _extract_v_from_iuvarr(iuv_arr): class DensePoseResultsMplContourVisualizer (line 88) | class DensePoseResultsMplContourVisualizer(DensePoseResultsVisualizer): method __init__ (line 89) | def __init__(self, levels=10, **kwargs): method create_visualization_context (line 93) | def create_visualization_context(self, image_bgr: Image): method context_to_image_bgr (line 112) | def context_to_image_bgr(self, context): method visualize_iuv_arr (line 122) | def visualize_iuv_arr(self, context, iuv_arr: np.ndarray, bbox_xywh: B... class DensePoseResultsCustomContourVisualizer (line 137) | class DensePoseResultsCustomContourVisualizer(DensePoseResultsVisualizer): method __init__ (line 142) | def __init__(self, levels=10, **kwargs): method visualize_iuv_arr (line 159) | def visualize_iuv_arr(self, context, iuv_arr: np.ndarray, bbox_xywh: B... method _contours (line 167) | def _contours(self, image_bgr, arr, segm, bbox_xywh): method _draw_line (line 213) | def _draw_line( method _bin_code_2_lines (line 239) | def _bin_code_2_lines(self, arr, v, bin_code, multi_idx, Nw, Nh, offset): class DensePoseResultsFineSegmentationVisualizer (line 319) | class DensePoseResultsFineSegmentationVisualizer(DensePoseMaskedColormap... method __init__ (line 320) | def __init__(self, inplace=True, cmap=cv2.COLORMAP_PARULA, alpha=0.7, ... class DensePoseResultsUVisualizer (line 332) | class DensePoseResultsUVisualizer(DensePoseMaskedColormapResultsVisualiz... method __init__ (line 333) | def __init__(self, inplace=True, cmap=cv2.COLORMAP_PARULA, alpha=0.7, ... class DensePoseResultsVVisualizer (line 345) | class DensePoseResultsVVisualizer(DensePoseMaskedColormapResultsVisualiz... method __init__ (line 346) | def __init__(self, inplace=True, cmap=cv2.COLORMAP_PARULA, alpha=0.7, ... FILE: detectron2/projects/DensePose/densepose/vis/densepose_results_textures.py function get_texture_atlas (line 13) | def get_texture_atlas(path: Optional[str]) -> Optional[np.ndarray]: class DensePoseResultsVisualizerWithTexture (line 27) | class DensePoseResultsVisualizerWithTexture(DensePoseResultsVisualizer): method __init__ (line 34) | def __init__(self, texture_atlas, **kwargs): method visualize (line 39) | def visualize( method get_texture (line 59) | def get_texture(self): method generate_image_with_texture (line 76) | def generate_image_with_texture(self, texture_image, alpha, bbox_image... FILE: detectron2/projects/DensePose/densepose/vis/extractor.py function extract_scores_from_instances (line 24) | def extract_scores_from_instances(instances: Instances, select=None): function extract_boxes_xywh_from_instances (line 30) | def extract_boxes_xywh_from_instances(instances: Instances, select=None): function create_extractor (line 39) | def create_extractor(visualizer: object): class BoundingBoxExtractor (line 60) | class BoundingBoxExtractor(object): method __call__ (line 65) | def __call__(self, instances: Instances): class ScoredBoundingBoxExtractor (line 70) | class ScoredBoundingBoxExtractor(object): method __call__ (line 75) | def __call__(self, instances: Instances, select=None): class DensePoseResultExtractor (line 86) | class DensePoseResultExtractor(object): method __call__ (line 91) | def __call__( class DensePoseOutputsExtractor (line 108) | class DensePoseOutputsExtractor(object): method __call__ (line 113) | def __call__( class CompoundExtractor (line 141) | class CompoundExtractor(object): method __init__ (line 146) | def __init__(self, extractors): method __call__ (line 149) | def __call__(self, instances: Instances, select=None): class NmsFilteredExtractor (line 157) | class NmsFilteredExtractor(object): method __init__ (line 162) | def __init__(self, extractor, iou_threshold): method __call__ (line 166) | def __call__(self, instances: Instances, select=None): class ScoreThresholdedExtractor (line 183) | class ScoreThresholdedExtractor(object): method __init__ (line 188) | def __init__(self, extractor, min_score): method __call__ (line 192) | def __call__(self, instances: Instances, select=None): FILE: detectron2/projects/DensePose/query_db.py class Action (line 39) | class Action(object): method add_arguments (line 41) | def add_arguments(cls: type, parser: argparse.ArgumentParser): function register_action (line 50) | def register_action(cls: type): class EntrywiseAction (line 59) | class EntrywiseAction(Action): method add_arguments (line 61) | def add_arguments(cls: type, parser: argparse.ArgumentParser): method execute (line 78) | def execute(cls: type, args: argparse.Namespace): method create_context (line 92) | def create_context(cls: type, args: argparse.Namespace) -> Dict[str, A... class PrintAction (line 98) | class PrintAction(EntrywiseAction): method add_parser (line 106) | def add_parser(cls: type, subparsers: argparse._SubParsersAction): method add_arguments (line 112) | def add_arguments(cls: type, parser: argparse.ArgumentParser): method execute_on_entry (line 116) | def execute_on_entry(cls: type, entry: Dict[str, Any], context: Dict[s... class ShowAction (line 124) | class ShowAction(EntrywiseAction): method add_parser (line 140) | def add_parser(cls: type, subparsers: argparse._SubParsersAction): method add_arguments (line 146) | def add_arguments(cls: type, parser: argparse.ArgumentParser): method execute_on_entry (line 162) | def execute_on_entry(cls: type, entry: Dict[str, Any], context: Dict[s... method _get_out_fname (line 179) | def _get_out_fname(cls: type, entry_idx: int, fname_base: str): method create_context (line 184) | def create_context(cls: type, args: argparse.Namespace) -> Dict[str, A... method _extract_data_for_visualizers_from_entry (line 199) | def _extract_data_for_visualizers_from_entry( function setup_dataset (line 218) | def setup_dataset(dataset_name): function create_argument_parser (line 227) | def create_argument_parser() -> argparse.ArgumentParser: function main (line 239) | def main(): FILE: detectron2/projects/DensePose/setup.py function get_detectron2_current_version (line 19) | def get_detectron2_current_version(): FILE: detectron2/projects/DensePose/tests/common.py function _get_base_config_dir (line 20) | def _get_base_config_dir(): function _get_evolution_config_dir (line 27) | def _get_evolution_config_dir(): function _get_hrnet_config_dir (line 34) | def _get_hrnet_config_dir(): function _get_quick_schedules_config_dir (line 41) | def _get_quick_schedules_config_dir(): function _collect_config_files (line 48) | def _collect_config_files(config_dir): function get_config_files (line 68) | def get_config_files(): function get_evolution_config_files (line 75) | def get_evolution_config_files(): function get_hrnet_config_files (line 82) | def get_hrnet_config_files(): function get_quick_schedules_config_files (line 89) | def get_quick_schedules_config_files(): function get_model_config (line 96) | def get_model_config(config_file): function get_model (line 110) | def get_model(config_file): function setup (line 118) | def setup(config_file): FILE: detectron2/projects/DensePose/tests/test_chart_based_annotations_accumulator.py class TestChartBasedAnnotationsAccumulator (line 19) | class TestChartBasedAnnotationsAccumulator(unittest.TestCase): method test_chart_based_annotations_accumulator_no_gt_densepose (line 20) | def test_chart_based_annotations_accumulator_no_gt_densepose(self): method test_chart_based_annotations_accumulator_gt_densepose_none (line 27) | def test_chart_based_annotations_accumulator_gt_densepose_none(self): method test_chart_based_annotations_accumulator_gt_densepose (line 35) | def test_chart_based_annotations_accumulator_gt_densepose(self): FILE: detectron2/projects/DensePose/tests/test_combine_data_loader.py function _grouper (line 10) | def _grouper(iterable: Iterable[Any], n: int, fillvalue=None) -> Iterato... class TestCombinedDataLoader (line 30) | class TestCombinedDataLoader(unittest.TestCase): method test_combine_loaders_1 (line 31) | def test_combine_loaders_1(self): FILE: detectron2/projects/DensePose/tests/test_cse_annotations_accumulator.py class TestCseAnnotationsAccumulator (line 12) | class TestCseAnnotationsAccumulator(unittest.TestCase): method test_cse_annotations_accumulator_nodp (line 13) | def test_cse_annotations_accumulator_nodp(self): method test_cse_annotations_accumulator_sparsedp (line 19) | def test_cse_annotations_accumulator_sparsedp(self): method test_cse_annotations_accumulator_fulldp (line 25) | def test_cse_annotations_accumulator_fulldp(self): method test_cse_annotations_accumulator_combined (line 31) | def test_cse_annotations_accumulator_combined(self): method _test_template (line 39) | def _test_template(self, instances_lst): method _create_instances_nodp (line 46) | def _create_instances_nodp(self): method _create_instances_sparsedp (line 70) | def _create_instances_sparsedp(self): method _create_instances_fulldp (line 111) | def _create_instances_fulldp(self): method _create_dp_data (line 170) | def _create_dp_data(self, anns, blob_def=None): method _check_correspondence (line 179) | def _check_correspondence(self, packed_anns, instances_lst): FILE: detectron2/projects/DensePose/tests/test_dataset_loaded_annotations.py class TestDatasetLoadedAnnotations (line 12) | class TestDatasetLoadedAnnotations(unittest.TestCase): method generic_coco_test (line 36) | def generic_coco_test(self, dataset_info): method generic_lvis_test (line 42) | def generic_lvis_test(self, dataset_info): method generic_test (line 48) | def generic_test(self, dataset_info, n_inst, loader_fun): function coco_test_fun (line 66) | def coco_test_fun(dataset_info): function lvis_test_fun (line 78) | def lvis_test_fun(dataset_info): FILE: detectron2/projects/DensePose/tests/test_frame_selector.py class TestFrameSelector (line 9) | class TestFrameSelector(unittest.TestCase): method test_frame_selector_random_k_1 (line 10) | def test_frame_selector_random_k_1(self): method test_frame_selector_random_k_2 (line 20) | def test_frame_selector_random_k_2(self): method test_frame_selector_first_k_1 (line 30) | def test_frame_selector_first_k_1(self): method test_frame_selector_first_k_2 (line 38) | def test_frame_selector_first_k_2(self): method test_frame_selector_last_k_1 (line 46) | def test_frame_selector_last_k_1(self): method test_frame_selector_last_k_2 (line 54) | def test_frame_selector_last_k_2(self): FILE: detectron2/projects/DensePose/tests/test_image_list_dataset.py function temp_image (line 15) | def temp_image(height, width): class TestImageListDataset (line 24) | class TestImageListDataset(unittest.TestCase): method test_image_list_dataset (line 25) | def test_image_list_dataset(self): method test_image_list_dataset_with_transform (line 37) | def test_image_list_dataset_with_transform(self): FILE: detectron2/projects/DensePose/tests/test_image_resize_transform.py class TestImageResizeTransform (line 9) | class TestImageResizeTransform(unittest.TestCase): method test_image_resize_1 (line 10) | def test_image_resize_1(self): FILE: detectron2/projects/DensePose/tests/test_model_e2e.py function make_model_inputs (line 12) | def make_model_inputs(image, instances=None): function make_empty_instances (line 19) | def make_empty_instances(h, w): class ModelE2ETest (line 27) | class ModelE2ETest(unittest.TestCase): method setUp (line 30) | def setUp(self): method _test_eval (line 33) | def _test_eval(self, sizes): class DensePoseRCNNE2ETest (line 39) | class DensePoseRCNNE2ETest(ModelE2ETest): method test_empty_data (line 42) | def test_empty_data(self): FILE: detectron2/projects/DensePose/tests/test_setup.py class TestSetup (line 14) | class TestSetup(unittest.TestCase): method _test_setup (line 15) | def _test_setup(self, config_file): method test_setup_configs (line 18) | def test_setup_configs(self): method test_setup_evolution_configs (line 23) | def test_setup_evolution_configs(self): method test_setup_hrnet_configs (line 28) | def test_setup_hrnet_configs(self): method test_setup_quick_schedules_configs (line 33) | def test_setup_quick_schedules_configs(self): FILE: detectron2/projects/DensePose/tests/test_structures.py class TestStructures (line 8) | class TestStructures(unittest.TestCase): method test_normalized_coords_transform (line 9) | def test_normalized_coords_transform(self): FILE: detectron2/projects/DensePose/tests/test_tensor_storage.py class TestSingleProcessRamTensorStorage (line 21) | class TestSingleProcessRamTensorStorage(unittest.TestCase): method test_read_write_1 (line 22) | def test_read_write_1(self): class TestSingleProcessFileTensorStorage (line 52) | class TestSingleProcessFileTensorStorage(unittest.TestCase): method test_read_write_1 (line 53) | def test_read_write_1(self): function _find_free_port (line 87) | def _find_free_port(): function launch (line 102) | def launch(main_func, nprocs, args=()): function distributed_worker (line 111) | def distributed_worker(local_rank, main_func, nprocs, dist_url, args): function ram_read_write_worker (line 122) | def ram_read_write_worker(): function file_read_write_worker (line 183) | def file_read_write_worker(rank_to_fpath): class TestMultiProcessRamTensorStorage (line 244) | class TestMultiProcessRamTensorStorage(unittest.TestCase): method test_read_write_1 (line 245) | def test_read_write_1(self): class TestMultiProcessFileTensorStorage (line 249) | class TestMultiProcessFileTensorStorage(unittest.TestCase): method test_read_write_1 (line 250) | def test_read_write_1(self): FILE: detectron2/projects/DensePose/tests/test_video_keyframe_dataset.py function _create_video_frames (line 21) | def _create_video_frames(num_frames, height, width): function temp_video (line 34) | def temp_video(num_frames, height, width, fps, lossless=False, video_cod... class TestVideoKeyframeDataset (line 55) | class TestVideoKeyframeDataset(unittest.TestCase): method test_read_keyframes_all (line 56) | def test_read_keyframes_all(self): method test_read_keyframes_with_selector (line 69) | def test_read_keyframes_with_selector(self): method test_read_keyframes_with_selector_with_transform (line 84) | def test_read_keyframes_with_selector_with_transform(self): FILE: detectron2/projects/DensePose/train_net.py function setup (line 26) | def setup(args): function main (line 38) | def main(args): FILE: detectron2/projects/Panoptic-DeepLab/panoptic_deeplab/config.py function add_panoptic_deeplab_config (line 8) | def add_panoptic_deeplab_config(cfg): FILE: detectron2/projects/Panoptic-DeepLab/panoptic_deeplab/dataset_mapper.py class PanopticDeeplabDatasetMapper (line 19) | class PanopticDeeplabDatasetMapper: method __init__ (line 29) | def __init__( method from_config (line 55) | def from_config(cls, cfg): method __call__ (line 87) | def __call__(self, dataset_dict): FILE: detectron2/projects/Panoptic-DeepLab/panoptic_deeplab/panoptic_seg.py class PanopticDeepLab (line 37) | class PanopticDeepLab(nn.Module): method __init__ (line 42) | def __init__(self, cfg): method device (line 64) | def device(self): method forward (line 67) | def forward(self, batched_inputs): class PanopticDeepLabSemSegHead (line 223) | class PanopticDeepLabSemSegHead(DeepLabV3PlusHead): method __init__ (line 229) | def __init__( method from_config (line 319) | def from_config(cls, cfg, input_shape): method forward (line 325) | def forward(self, features, targets=None, weights=None): method layers (line 340) | def layers(self, features): method losses (line 347) | def losses(self, predictions, targets, weights=None): function build_ins_embed_branch (line 356) | def build_ins_embed_branch(cfg, input_shape): class PanopticDeepLabInsEmbedHead (line 365) | class PanopticDeepLabInsEmbedHead(DeepLabV3PlusHead): method __init__ (line 371) | def __init__( method from_config (line 476) | def from_config(cls, cfg, input_shape): method forward (line 503) | def forward( method layers (line 536) | def layers(self, features): method center_losses (line 547) | def center_losses(self, predictions, targets, weights): method offset_losses (line 559) | def offset_losses(self, predictions, targets, weights): FILE: detectron2/projects/Panoptic-DeepLab/panoptic_deeplab/post_processing.py function find_instance_center (line 9) | def find_instance_center(center_heatmap, threshold=0.1, nms_kernel=3, to... function group_pixels (line 44) | def group_pixels(center_points, offsets): function get_instance_segmentation (line 79) | def get_instance_segmentation( function merge_semantic_and_instance (line 111) | def merge_semantic_and_instance( function get_panoptic_segmentation (line 165) | def get_panoptic_segmentation( FILE: detectron2/projects/Panoptic-DeepLab/panoptic_deeplab/target_generator.py class PanopticDeepLabTargetGenerator (line 7) | class PanopticDeepLabTargetGenerator(object): method __init__ (line 12) | def __init__( method __call__ (line 52) | def __call__(self, panoptic, segments_info): FILE: detectron2/projects/Panoptic-DeepLab/train_net.py function build_sem_seg_train_aug (line 33) | def build_sem_seg_train_aug(cfg): class Trainer (line 45) | class Trainer(DefaultTrainer): method build_evaluator (line 54) | def build_evaluator(cls, cfg, dataset_name, output_folder=None): method build_train_loader (line 95) | def build_train_loader(cls, cfg): method build_lr_scheduler (line 100) | def build_lr_scheduler(cls, cfg, optimizer): method build_optimizer (line 108) | def build_optimizer(cls, cfg, model): function setup (line 132) | def setup(args): function main (line 145) | def main(args): FILE: detectron2/projects/PointRend/point_rend/color_augmentation.py class ColorAugSSDTransform (line 8) | class ColorAugSSDTransform(Transform): method __init__ (line 27) | def __init__( method apply_coords (line 43) | def apply_coords(self, coords): method apply_segmentation (line 46) | def apply_segmentation(self, segmentation): method apply_image (line 49) | def apply_image(self, img, interp=None): method convert (line 65) | def convert(self, img, alpha=1, beta=0): method brightness (line 70) | def brightness(self, img): method contrast (line 77) | def contrast(self, img): method saturation (line 82) | def saturation(self, img): method hue (line 91) | def hue(self, img): FILE: detectron2/projects/PointRend/point_rend/config.py function add_pointrend_config (line 7) | def add_pointrend_config(cfg): FILE: detectron2/projects/PointRend/point_rend/mask_head.py function calculate_uncertainty (line 29) | def calculate_uncertainty(logits, classes): class ConvFCHead (line 52) | class ConvFCHead(nn.Module): method __init__ (line 62) | def __init__( method from_config (line 121) | def from_config(cls, cfg, input_shape): method forward (line 137) | def forward(self, x): method _load_from_state_dict (line 147) | def _load_from_state_dict( class PointRendMaskHead (line 168) | class PointRendMaskHead(nn.Module): method __init__ (line 169) | def __init__(self, cfg, input_shape: Dict[str, ShapeSpec]): method _init_roi_head (line 188) | def _init_roi_head(self, cfg, input_shape): method _init_point_head (line 191) | def _init_point_head(self, cfg, input_shape): method forward (line 219) | def forward(self, features, instances): method _roi_pooler (line 245) | def _roi_pooler(self, features: List[Tensor], boxes: List[Boxes]): method _sample_train_points (line 269) | def _sample_train_points(self, coarse_mask, instances): method _point_pooler (line 288) | def _point_pooler(self, features, proposal_boxes, point_coords): method _get_point_logits (line 297) | def _get_point_logits(self, point_fine_grained_features, point_coords,... method _subdivision_inference (line 302) | def _subdivision_inference(self, features, mask_representations, insta... class ImplicitPointRendMaskHead (line 363) | class ImplicitPointRendMaskHead(PointRendMaskHead): method __init__ (line 364) | def __init__(self, cfg, input_shape: Dict[str, ShapeSpec]): method _init_roi_head (line 367) | def _init_roi_head(self, cfg, input_shape): method _init_point_head (line 372) | def _init_point_head(self, cfg, input_shape): method forward (line 397) | def forward(self, features, instances): method _uniform_sample_train_points (line 421) | def _uniform_sample_train_points(self, instances): method _get_point_logits (line 434) | def _get_point_logits(self, fine_grained_features, point_coords, param... FILE: detectron2/projects/PointRend/point_rend/point_features.py function point_sample (line 19) | def point_sample(input, point_coords, **kwargs): function generate_regular_grid_point_coords (line 45) | def generate_regular_grid_point_coords(R, side_size, device): function get_uncertain_point_coords_with_randomness (line 63) | def get_uncertain_point_coords_with_randomness( function get_uncertain_point_coords_on_grid (line 119) | def get_uncertain_point_coords_on_grid(uncertainty_map, num_points): function point_sample_fine_grained_features (line 146) | def point_sample_fine_grained_features(features_list, feature_scales, bo... function get_point_coords_wrt_image (line 192) | def get_point_coords_wrt_image(boxes_coords, point_coords): function sample_point_labels (line 219) | def sample_point_labels(instances, point_coords): FILE: detectron2/projects/PointRend/point_rend/point_head.py function roi_mask_point_loss (line 20) | def roi_mask_point_loss(mask_logits, instances, point_labels): class StandardPointHead (line 80) | class StandardPointHead(nn.Module): method __init__ (line 86) | def __init__(self, cfg, input_shape: ShapeSpec): method forward (line 123) | def forward(self, fine_grained_features, coarse_features): class ImplicitPointHead (line 133) | class ImplicitPointHead(nn.Module): method __init__ (line 139) | def __init__(self, cfg, input_shape: ShapeSpec): method forward (line 187) | def forward(self, fine_grained_features, point_coords, parameters): method _dynamic_mlp (line 227) | def _dynamic_mlp(features, weights, biases, num_instances): method _parse_params (line 238) | def _parse_params( function build_point_head (line 277) | def build_point_head(cfg, input_channels): FILE: detectron2/projects/PointRend/point_rend/roi_heads.py class PointRendROIHeads (line 8) | class PointRendROIHeads(StandardROIHeads): method _load_from_state_dict (line 16) | def _load_from_state_dict( method _init_mask_head (line 37) | def _init_mask_head(cls, cfg, input_shape): FILE: detectron2/projects/PointRend/point_rend/semantic_seg.py function calculate_uncertainty (line 19) | def calculate_uncertainty(sem_seg_logits): class PointRendSemSegHead (line 37) | class PointRendSemSegHead(nn.Module): method __init__ (line 43) | def __init__(self, cfg, input_shape: Dict[str, ShapeSpec]): method _init_point_head (line 53) | def _init_point_head(self, cfg, input_shape: Dict[str, ShapeSpec]): method forward (line 68) | def forward(self, features, targets=None): FILE: detectron2/projects/PointRend/train_net.py function build_sem_seg_train_aug (line 30) | def build_sem_seg_train_aug(cfg): class Trainer (line 51) | class Trainer(DefaultTrainer): method build_evaluator (line 60) | def build_evaluator(cls, cfg, dataset_name, output_folder=None): method build_train_loader (line 96) | def build_train_loader(cls, cfg): function setup (line 104) | def setup(args): function main (line 117) | def main(args): FILE: detectron2/projects/PointSup/point_sup/config.py function add_point_sup_config (line 5) | def add_point_sup_config(cfg): FILE: detectron2/projects/PointSup/point_sup/dataset_mapper.py class PointSupDatasetMapper (line 19) | class PointSupDatasetMapper: method __init__ (line 28) | def __init__( method from_config (line 58) | def from_config(cls, cfg, is_train: bool = True): method __call__ (line 72) | def __call__(self, dataset_dict): FILE: detectron2/projects/PointSup/point_sup/detection_utils.py function annotations_to_instances (line 16) | def annotations_to_instances(annos, image_size, sample_points=0): function transform_instance_annotations (line 66) | def transform_instance_annotations( FILE: detectron2/projects/PointSup/point_sup/mask_head.py class MaskRCNNConvUpsamplePointSupHead (line 21) | class MaskRCNNConvUpsamplePointSupHead(MaskRCNNConvUpsampleHead): method forward (line 31) | def forward(self, x, instances: List[Instances]) -> Any: class ImplicitPointRendPointSupHead (line 71) | class ImplicitPointRendPointSupHead(ImplicitPointRendMaskHead): method _uniform_sample_train_points (line 72) | def _uniform_sample_train_points(self, instances): FILE: detectron2/projects/PointSup/point_sup/point_utils.py function get_point_coords_from_point_annotation (line 7) | def get_point_coords_from_point_annotation(instances): function get_point_coords_wrt_box (line 55) | def get_point_coords_wrt_box(boxes_coords, point_coords): FILE: detectron2/projects/PointSup/point_sup/register_point_annotations.py function register_coco_instances_with_points (line 13) | def register_coco_instances_with_points(name, metadata, json_file, image... function register_all_coco_train_points (line 53) | def register_all_coco_train_points(root): FILE: detectron2/projects/PointSup/tools/prepare_coco_point_annotations_without_masks.py function get_point_annotations (line 16) | def get_point_annotations(input_filename, output_filename, num_points_pe... FILE: detectron2/projects/PointSup/train_net.py class Trainer (line 23) | class Trainer(DefaultTrainer): method build_evaluator (line 32) | def build_evaluator(cls, cfg, dataset_name, output_folder=None): method build_train_loader (line 56) | def build_train_loader(cls, cfg): function setup (line 64) | def setup(args): function main (line 80) | def main(args): FILE: detectron2/projects/Rethinking-BatchNorm/configs/mask_rcnn_BNhead_batch_stats.py class BatchNormBatchStat (line 5) | class BatchNormBatchStat(BatchNorm2d): method forward (line 10) | def forward(self, input): FILE: detectron2/projects/Rethinking-BatchNorm/configs/mask_rcnn_BNhead_shuffle.py function concat_all_gather (line 10) | def concat_all_gather(input): function batch_shuffle (line 23) | def batch_shuffle(x): function batch_unshuffle (line 52) | def batch_unshuffle(x, idx_unshuffle): function wrap_shuffle (line 58) | def wrap_shuffle(module_type, method): FILE: detectron2/projects/Rethinking-BatchNorm/configs/retinanet_SyncBNhead_SharedTraining.py function apply_sequential (line 8) | def apply_sequential(inputs, modules): class RetinaNetHead_SharedTrainingBN (line 23) | class RetinaNetHead_SharedTrainingBN(RetinaNetHead): method forward (line 24) | def forward(self, features: List[Tensor]): FILE: detectron2/projects/TensorMask/setup.py function get_extensions (line 11) | def get_extensions(): FILE: detectron2/projects/TensorMask/tensormask/arch.py function permute_all_cls_and_box_to_N_HWA_K_and_concat (line 23) | def permute_all_cls_and_box_to_N_HWA_K_and_concat(pred_logits, pred_anch... function _assignment_rule (line 42) | def _assignment_rule( function _paste_mask_lists_in_image (line 136) | def _paste_mask_lists_in_image(masks, boxes, image_shape, threshold=0.5): function _postprocess (line 182) | def _postprocess(results, result_mask_info, output_height, output_width,... class TensorMaskAnchorGenerator (line 229) | class TensorMaskAnchorGenerator(DefaultAnchorGenerator): method grid_anchors_with_unit_lengths_and_indexes (line 235) | def grid_anchors_with_unit_lengths_and_indexes(self, grid_sizes): method forward (line 270) | def forward(self, features): class TensorMask (line 301) | class TensorMask(nn.Module): method __init__ (line 308) | def __init__(self, cfg): method device (line 355) | def device(self): method forward (line 358) | def forward(self, batched_inputs): method losses (line 416) | def losses( method get_ground_truth (line 503) | def get_ground_truth(self, anchors, unit_lengths, indexes, targets): method inference (line 633) | def inference(self, pred_logits, pred_deltas, pred_masks, anchors, ind... method inference_single_image (line 675) | def inference_single_image( method preprocess_image (line 744) | def preprocess_image(self, batched_inputs): class TensorMaskHead (line 754) | class TensorMaskHead(nn.Module): method __init__ (line 755) | def __init__(self, cfg, num_levels, num_anchors, mask_sizes, input_sha... method forward (line 857) | def forward(self, features): FILE: detectron2/projects/TensorMask/tensormask/config.py function add_tensormask_config (line 7) | def add_tensormask_config(cfg): FILE: detectron2/projects/TensorMask/tensormask/layers/csrc/SwapAlign2Nat/SwapAlign2Nat.h function namespace (line 5) | namespace tensormask { FILE: detectron2/projects/TensorMask/tensormask/layers/csrc/vision.cpp type tensormask (line 6) | namespace tensormask { function PYBIND11_MODULE (line 8) | PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) { FILE: detectron2/projects/TensorMask/tensormask/layers/swap_align2nat.py class _SwapAlign2Nat (line 9) | class _SwapAlign2Nat(Function): method forward (line 11) | def forward(ctx, X, lambda_val, pad_val): method backward (line 20) | def backward(ctx, gY): class SwapAlign2Nat (line 32) | class SwapAlign2Nat(nn.Module): method __init__ (line 48) | def __init__(self, lambda_val, pad_val=-6.0): method forward (line 53) | def forward(self, X): method __repr__ (line 56) | def __repr__(self): FILE: detectron2/projects/TensorMask/tests/test_swap_align2nat.py class SwapAlign2NatTest (line 11) | class SwapAlign2NatTest(unittest.TestCase): method test_swap_align2nat_gradcheck_cuda (line 13) | def test_swap_align2nat_gradcheck_cuda(self): method _swap_align2nat (line 21) | def _swap_align2nat(self, tensor, lambda_val): FILE: detectron2/projects/TensorMask/train_net.py class Trainer (line 21) | class Trainer(DefaultTrainer): method build_evaluator (line 23) | def build_evaluator(cls, cfg, dataset_name, output_folder=None): function setup (line 29) | def setup(args): function main (line 42) | def main(args): FILE: detectron2/projects/TridentNet/train_net.py class Trainer (line 20) | class Trainer(DefaultTrainer): method build_evaluator (line 22) | def build_evaluator(cls, cfg, dataset_name, output_folder=None): function setup (line 28) | def setup(args): function main (line 41) | def main(args): FILE: detectron2/projects/TridentNet/tridentnet/config.py function add_tridentnet_config (line 7) | def add_tridentnet_config(cfg): FILE: detectron2/projects/TridentNet/tridentnet/trident_backbone.py class TridentBottleneckBlock (line 15) | class TridentBottleneckBlock(ResNetBlockBase): method __init__ (line 16) | def __init__( method forward (line 95) | def forward(self, x): function make_trident_stage (line 119) | def make_trident_stage(block_class, num_blocks, **kwargs): function build_trident_resnet_backbone (line 129) | def build_trident_resnet_backbone(cfg, input_shape): FILE: detectron2/projects/TridentNet/tridentnet/trident_conv.py class TridentConv (line 10) | class TridentConv(nn.Module): method __init__ (line 11) | def __init__( method forward (line 58) | def forward(self, inputs): method extra_repr (line 96) | def extra_repr(self): FILE: detectron2/projects/TridentNet/tridentnet/trident_rcnn.py function merge_branch_instances (line 8) | def merge_branch_instances(instances, num_branch, nms_thresh, topk_per_i... class TridentRes5ROIHeads (line 48) | class TridentRes5ROIHeads(Res5ROIHeads): method __init__ (line 54) | def __init__(self, cfg, input_shape): method forward (line 60) | def forward(self, images, features, proposals, targets=None): class TridentStandardROIHeads (line 83) | class TridentStandardROIHeads(StandardROIHeads): method __init__ (line 89) | def __init__(self, cfg, input_shape): method forward (line 95) | def forward(self, images, features, proposals, targets=None): FILE: detectron2/projects/TridentNet/tridentnet/trident_rpn.py class TridentRPN (line 10) | class TridentRPN(RPN): method __init__ (line 15) | def __init__(self, cfg, input_shape): method forward (line 21) | def forward(self, images, features, gt_instances=None): FILE: detectron2/setup.py function get_version (line 17) | def get_version(): function get_extensions (line 40) | def get_extensions(): function get_model_zoo_configs (line 106) | def get_model_zoo_configs() -> List[str]: FILE: detectron2/tests/config/test_instantiate_config.py class TestClass (line 18) | class TestClass: method __init__ (line 19) | def __init__(self, int_arg, list_arg=None, dict_arg=None, extra_arg=No... method __call__ (line 25) | def __call__(self, call_arg): class TestConstruction (line 30) | class TestConstruction(unittest.TestCase): method test_basic_construct (line 31) | def test_basic_construct(self): method test_instantiate_other_obj (line 52) | def test_instantiate_other_obj(self): method test_instantiate_lazy_target (line 62) | def test_instantiate_lazy_target(self): method test_instantiate_list (line 68) | def test_instantiate_list(self): method test_instantiate_dataclass (line 76) | def test_instantiate_dataclass(self): method test_instantiate_dataclass_as_subconfig (line 85) | def test_instantiate_dataclass_as_subconfig(self): method test_bad_lazycall (line 94) | def test_bad_lazycall(self): method test_interpolation (line 98) | def test_interpolation(self): FILE: detectron2/tests/config/test_lazy_config.py class TestLazyPythonConfig (line 11) | class TestLazyPythonConfig(unittest.TestCase): method setUp (line 12) | def setUp(self): method test_load (line 15) | def test_load(self): method test_save_load (line 27) | def test_save_load(self): method test_failed_save (line 41) | def test_failed_save(self): method test_overrides (line 49) | def test_overrides(self): method test_invalid_overrides (line 55) | def test_invalid_overrides(self): method test_to_py (line 60) | def test_to_py(self): FILE: detectron2/tests/config/test_yacs_config.py class TestConfigVersioning (line 29) | class TestConfigVersioning(unittest.TestCase): method test_upgrade_downgrade_consistency (line 30) | def test_upgrade_downgrade_consistency(self): method _merge_cfg_str (line 39) | def _merge_cfg_str(self, cfg, merge_str): method test_auto_upgrade (line 49) | def test_auto_upgrade(self): method test_guess_v1 (line 59) | def test_guess_v1(self): class _TestClassA (line 66) | class _TestClassA(torch.nn.Module): method __init__ (line 68) | def __init__(self, arg1, arg2, arg3=3): method from_config (line 78) | def from_config(cls, cfg): class _TestClassB (line 83) | class _TestClassB(_TestClassA): method __init__ (line 85) | def __init__(self, input_shape, arg1, arg2, arg3=3): method from_config (line 93) | def from_config(cls, cfg, input_shape): # test extra positional arg i... class _LegacySubClass (line 99) | class _LegacySubClass(_TestClassB): method __init__ (line 101) | def __init__(self, cfg, input_shape, arg4=4): class _NewSubClassNewInit (line 108) | class _NewSubClassNewInit(_TestClassB): method __init__ (line 111) | def __init__(self, input_shape, arg4=4, **kwargs): class _LegacySubClassNotCfg (line 118) | class _LegacySubClassNotCfg(_TestClassB): method __init__ (line 120) | def __init__(self, config, input_shape): class _TestClassC (line 127) | class _TestClassC(_TestClassB): method from_config (line 129) | def from_config(cls, cfg, input_shape, **kwargs): # test extra kwarg ... class _TestClassD (line 136) | class _TestClassD(_TestClassA): method __init__ (line 138) | def __init__(self, input_shape: ShapeSpec, arg1: int, arg2, arg3=3): function _test_func (line 147) | def _test_func(arg1, arg2=2, arg3=3, arg4=4): class TestConfigurable (line 151) | class TestConfigurable(unittest.TestCase): method testInitWithArgs (line 152) | def testInitWithArgs(self): method testPatchedAttr (line 158) | def testPatchedAttr(self): method testInitWithCfg (line 162) | def testInitWithCfg(self): method testInitWithCfgOverwrite (line 187) | def testInitWithCfgOverwrite(self): method testInitWithCfgWrongArgs (line 206) | def testInitWithCfgWrongArgs(self): method testBadClass (line 217) | def testBadClass(self): method testFuncWithCfg (line 250) | def testFuncWithCfg(self): method testOmegaConf (line 264) | def testOmegaConf(self): FILE: detectron2/tests/data/test_coco.py function make_mask (line 14) | def make_mask(): function uncompressed_rle (line 29) | def uncompressed_rle(mask): function make_dataset_dicts (line 45) | def make_dataset_dicts(mask, compressed: bool = True): class TestRLEToJson (line 77) | class TestRLEToJson(unittest.TestCase): method test (line 78) | def test(self): method test_uncompressed_RLE (line 100) | def test_uncompressed_RLE(self): class TestConvertCOCO (line 108) | class TestConvertCOCO(unittest.TestCase): method generate_data (line 110) | def generate_data(): method test_convert_to_coco (line 134) | def test_convert_to_coco(self): FILE: detectron2/tests/data/test_coco_evaluation.py class TestCOCOeval (line 20) | class TestCOCOeval(unittest.TestCase): method test_fast_eval (line 21) | def test_fast_eval(self): method test_unknown_category (line 126) | def test_unknown_category(self): FILE: detectron2/tests/data/test_dataset.py function _a_slow_func (line 26) | def _a_slow_func(x): class TestDatasetFromList (line 30) | class TestDatasetFromList(unittest.TestCase): method test_using_lazy_path (line 33) | def test_using_lazy_path(self): class TestMapDataset (line 45) | class TestMapDataset(unittest.TestCase): method map_func (line 47) | def map_func(x): method test_map_style (line 52) | def test_map_style(self): method test_iter_style (line 59) | def test_iter_style(self): method test_pickleability (line 71) | def test_pickleability(self): class TestAspectRatioGrouping (line 78) | class TestAspectRatioGrouping(unittest.TestCase): method test_reiter_leak (line 79) | def test_reiter_leak(self): class TestDataLoader (line 95) | class TestDataLoader(unittest.TestCase): method _get_kwargs (line 96) | def _get_kwargs(self): method test_build_dataloader_train (line 104) | def test_build_dataloader_train(self): method test_build_iterable_dataloader_train (line 109) | def test_build_iterable_dataloader_train(self): method test_build_iterable_dataloader_from_cfg (line 116) | def test_build_iterable_dataloader_from_cfg(self): method _check_is_range (line 132) | def _check_is_range(self, data_loader, N): method test_build_batch_dataloader_inference (line 139) | def test_build_batch_dataloader_inference(self): method test_build_dataloader_inference (line 147) | def test_build_dataloader_inference(self): method test_build_iterable_dataloader_inference (line 163) | def test_build_iterable_dataloader_inference(self): FILE: detectron2/tests/data/test_detection_utils.py class TestTransformAnnotations (line 15) | class TestTransformAnnotations(unittest.TestCase): method test_transform_simple_annotation (line 16) | def test_transform_simple_annotation(self): method test_transform_empty_annotation (line 32) | def test_transform_empty_annotation(self): method test_flip_keypoints (line 35) | def test_flip_keypoints(self): method test_crop (line 67) | def test_crop(self): method test_transform_RLE (line 85) | def test_transform_RLE(self): method test_transform_RLE_resize (line 108) | def test_transform_RLE_resize(self): method test_gen_crop (line 130) | def test_gen_crop(self): method test_gen_crop_outside_boxes (line 136) | def test_gen_crop_outside_boxes(self): method test_read_sem_seg (line 141) | def test_read_sem_seg(self): method test_read_exif_orientation (line 157) | def test_read_exif_orientation(self): method test_opencv_exif_orientation (line 165) | def test_opencv_exif_orientation(self): FILE: detectron2/tests/data/test_rotation_transform.py class TestRotationTransform (line 8) | class TestRotationTransform(unittest.TestCase): method assertEqualsArrays (line 9) | def assertEqualsArrays(self, a1, a2): method randomData (line 12) | def randomData(self, h=5, w=5): method test180 (line 17) | def test180(self): method test45_coords (line 24) | def test45_coords(self): method test90 (line 33) | def test90(self): method test90_expand (line 40) | def test90_expand(self): # non-square image method test_center_expand (line 47) | def test_center_expand(self): method test_inverse_transform (line 60) | def test_inverse_transform(self): FILE: detectron2/tests/data/test_sampler.py class TestGroupedBatchSampler (line 21) | class TestGroupedBatchSampler(unittest.TestCase): method test_missing_group_id (line 22) | def test_missing_group_id(self): method test_groups (line 30) | def test_groups(self): class TestSamplerDeterministic (line 39) | class TestSamplerDeterministic(unittest.TestCase): method test_to_iterable (line 40) | def test_to_iterable(self): method test_training_sampler_seed (line 63) | def test_training_sampler_seed(self): class TestRepeatFactorTrainingSampler (line 75) | class TestRepeatFactorTrainingSampler(unittest.TestCase): method test_repeat_factors_from_category_frequency (line 76) | def test_repeat_factors_from_category_frequency(self): class TestInferenceSampler (line 93) | class TestInferenceSampler(unittest.TestCase): method test_local_indices (line 94) | def test_local_indices(self): FILE: detectron2/tests/data/test_transforms.py function polygon_allclose (line 20) | def polygon_allclose(poly1, poly2): class TestTransforms (line 33) | class TestTransforms(unittest.TestCase): method setUp (line 34) | def setUp(self): method test_apply_rotated_boxes (line 37) | def test_apply_rotated_boxes(self): method test_resize_and_crop (line 55) | def test_resize_and_crop(self): method test_apply_rotated_boxes_unequal_scaling_factor (line 94) | def test_apply_rotated_boxes_unequal_scaling_factor(self): method test_print_augmentation (line 128) | def test_print_augmentation(self): method test_random_apply_prob_out_of_range_check (line 141) | def test_random_apply_prob_out_of_range_check(self): method test_random_apply_wrapping_aug_probability_occured_evaluation (line 150) | def test_random_apply_wrapping_aug_probability_occured_evaluation(self): method test_random_apply_wrapping_std_transform_probability_occured_evaluation (line 160) | def test_random_apply_wrapping_std_transform_probability_occured_evalu... method test_random_apply_probability_not_occured_evaluation (line 169) | def test_random_apply_probability_not_occured_evaluation(self): method test_augmentation_input_args (line 179) | def test_augmentation_input_args(self): method test_augmentation_list (line 211) | def test_augmentation_list(self): method test_color_transforms (line 222) | def test_color_transforms(self): method test_resize_transform (line 236) | def test_resize_transform(self): method test_resize_shorted_edge_scriptable (line 245) | def test_resize_shorted_edge_scriptable(self): method test_extent_transform (line 260) | def test_extent_transform(self): FILE: detectron2/tests/export/test_c10.py class TestCaffe2RPN (line 16) | class TestCaffe2RPN(unittest.TestCase): method test_instantiation (line 17) | def test_instantiation(self): FILE: detectron2/tests/layers/test_blocks.py class TestBlocks (line 16) | class TestBlocks(unittest.TestCase): method test_separable_conv (line 17) | def test_separable_conv(self): method test_aspp (line 20) | def test_aspp(self): method test_frozen_batchnorm_fp16 (line 26) | def test_frozen_batchnorm_fp16(self): method test_resnet_unused_stages (line 42) | def test_resnet_unused_stages(self): FILE: detectron2/tests/layers/test_deformable.py class DeformableTest (line 14) | class DeformableTest(unittest.TestCase): method test_forward_output (line 16) | def test_forward_output(self): method test_forward_output_on_cpu (line 60) | def test_forward_output_on_cpu(self): method test_forward_output_on_cpu_equals_output_on_gpu (line 88) | def test_forward_output_on_cpu_equals_output_on_gpu(self): method test_small_input (line 113) | def test_small_input(self): method test_raise_exception (line 136) | def test_raise_exception(self): method test_repr (line 157) | def test_repr(self): FILE: detectron2/tests/layers/test_losses.py class TestLosses (line 9) | class TestLosses(unittest.TestCase): method test_diou_loss (line 10) | def test_diou_loss(self): method test_ciou_loss (line 45) | def test_ciou_loss(self): FILE: detectron2/tests/layers/test_mask_ops.py function iou_between_full_image_bit_masks (line 29) | def iou_between_full_image_bit_masks(a, b): function rasterize_polygons_with_grid_sample (line 35) | def rasterize_polygons_with_grid_sample(full_image_bit_mask, box, mask_s... class TestMaskCropPaste (line 60) | class TestMaskCropPaste(unittest.TestCase): method setUp (line 61) | def setUp(self): method test_crop_paste_consistency (line 69) | def test_crop_paste_consistency(self): method process_annotation (line 101) | def process_annotation(self, ann, mask_side_len=28): method test_polygon_area (line 141) | def test_polygon_area(self): method test_paste_mask_scriptable (line 156) | def test_paste_mask_scriptable(self): function benchmark_paste (line 168) | def benchmark_paste(): FILE: detectron2/tests/layers/test_nms.py class TestNMS (line 10) | class TestNMS(unittest.TestCase): method _create_tensors (line 11) | def _create_tensors(self, N): method test_nms_scriptability (line 16) | def test_nms_scriptability(self): FILE: detectron2/tests/layers/test_nms_rotated.py function nms_edit_distance (line 13) | def nms_edit_distance(keep1, keep2): class TestNMSRotated (line 43) | class TestNMSRotated(unittest.TestCase): method reference_horizontal_nms (line 44) | def reference_horizontal_nms(self, boxes, scores, iou_threshold): method _create_tensors (line 68) | def _create_tensors(self, N, device="cpu"): method test_batched_nms_rotated_0_degree_cpu (line 73) | def test_batched_nms_rotated_0_degree_cpu(self, device="cpu"): method test_batched_nms_rotated_0_degree_cuda (line 97) | def test_batched_nms_rotated_0_degree_cuda(self): method test_nms_rotated_0_degree_cpu (line 100) | def test_nms_rotated_0_degree_cpu(self, device="cpu"): method test_nms_rotated_0_degree_cuda (line 115) | def test_nms_rotated_0_degree_cuda(self): method test_nms_rotated_90_degrees_cpu (line 118) | def test_nms_rotated_90_degrees_cpu(self): method test_nms_rotated_180_degrees_cpu (line 137) | def test_nms_rotated_180_degrees_cpu(self): class TestScriptable (line 153) | class TestScriptable(unittest.TestCase): method setUp (line 154) | def setUp(self): method test_scriptable_cpu (line 161) | def test_scriptable_cpu(self): method test_scriptable_cuda (line 166) | def test_scriptable_cuda(self): FILE: detectron2/tests/layers/test_roi_align.py class ROIAlignTest (line 13) | class ROIAlignTest(unittest.TestCase): method test_forward_output (line 14) | def test_forward_output(self): method test_resize (line 52) | def test_resize(self): method test_grid_sample_equivalence (line 64) | def test_grid_sample_equivalence(self): method _simple_roialign (line 79) | def _simple_roialign(self, img, box, resolution, sampling_ratio=0, ali... method _simple_roialign_with_grad (line 96) | def _simple_roialign_with_grad(self, img, box, resolution, device): method test_empty_box (line 111) | def test_empty_box(self): method test_empty_batch (line 123) | def test_empty_batch(self): function grid_sample_roi_align (line 131) | def grid_sample_roi_align(input, boxes, output_size, scale, sampling_rat... function benchmark_roi_align (line 156) | def benchmark_roi_align(): FILE: detectron2/tests/layers/test_roi_align_rotated.py class ROIAlignRotatedTest (line 14) | class ROIAlignRotatedTest(unittest.TestCase): method _box_to_rotated_box (line 15) | def _box_to_rotated_box(self, box, angle): method _rot90 (line 24) | def _rot90(self, img, num): method test_forward_output_0_90_180_270 (line 30) | def test_forward_output_0_90_180_270(self): method test_resize (line 73) | def test_resize(self): method _simple_roi_align_rotated (line 87) | def _simple_roi_align_rotated(self, img, box, resolution): method test_empty_box (line 102) | def test_empty_box(self): method test_roi_align_rotated_gradcheck_cpu (line 107) | def test_roi_align_rotated_gradcheck_cpu(self): method test_roi_align_rotated_gradient_cuda (line 128) | def test_roi_align_rotated_gradient_cuda(self): FILE: detectron2/tests/modeling/test_anchor_generator.py class TestAnchorGenerator (line 13) | class TestAnchorGenerator(unittest.TestCase): method test_default_anchor_generator (line 14) | def test_default_anchor_generator(self): method test_default_anchor_generator_centered (line 44) | def test_default_anchor_generator_centered(self): method test_rrpn_anchor_generator (line 76) | def test_rrpn_anchor_generator(self): FILE: detectron2/tests/modeling/test_backbone.py class TestBackBone (line 14) | class TestBackBone(unittest.TestCase): method test_resnet_scriptability (line 15) | def test_resnet_scriptability(self): method test_fpn_scriptability (line 26) | def test_fpn_scriptability(self): FILE: detectron2/tests/modeling/test_box2box_transform.py class TestBox2BoxTransform (line 16) | class TestBox2BoxTransform(unittest.TestCase): method test_reconstruction (line 17) | def test_reconstruction(self): method test_apply_deltas_tracing (line 33) | def test_apply_deltas_tracing(self): function random_rotated_boxes (line 46) | def random_rotated_boxes(mean_box, std_length, std_angle, N): class TestBox2BoxTransformRotated (line 52) | class TestBox2BoxTransformRotated(unittest.TestCase): method test_reconstruction (line 53) | def test_reconstruction(self): class TestBox2BoxTransformLinear (line 76) | class TestBox2BoxTransformLinear(unittest.TestCase): method test_reconstruction (line 77) | def test_reconstruction(self): FILE: detectron2/tests/modeling/test_fast_rcnn.py class FastRCNNTest (line 16) | class FastRCNNTest(unittest.TestCase): method test_fast_rcnn (line 17) | def test_fast_rcnn(self): method test_fast_rcnn_empty_batch (line 47) | def test_fast_rcnn_empty_batch(self, device="cpu"): method test_fast_rcnn_empty_batch_cuda (line 67) | def test_fast_rcnn_empty_batch_cuda(self): method test_fast_rcnn_rotated (line 70) | def test_fast_rcnn_rotated(self): method test_predict_boxes_tracing (line 104) | def test_predict_boxes_tracing(self): method test_predict_probs_tracing (line 137) | def test_predict_probs_tracing(self): FILE: detectron2/tests/modeling/test_matcher.py class TestMatcher (line 10) | class TestMatcher(unittest.TestCase): method test_scriptability (line 11) | def test_scriptability(self): FILE: detectron2/tests/modeling/test_mmdet.py class TestMMDetWrapper (line 16) | class TestMMDetWrapper(unittest.TestCase): method test_backbone (line 17) | def test_backbone(self): method test_detector (line 44) | def test_detector(self): FILE: detectron2/tests/modeling/test_model_e2e.py function typecheck_hook (line 16) | def typecheck_hook(model, *, in_dtype=None, out_dtype=None): function create_model_input (line 51) | def create_model_input(img, inst=None): function get_empty_instance (line 58) | def get_empty_instance(h, w): function get_regular_bitmask_instances (line 66) | def get_regular_bitmask_instances(h, w): class InstanceModelE2ETest (line 75) | class InstanceModelE2ETest: method setUp (line 76) | def setUp(self): method _test_eval (line 80) | def _test_eval(self, input_sizes): method _test_train (line 85) | def _test_train(self, input_sizes, instances): method _inf_tensor (line 97) | def _inf_tensor(self, *shape): method _nan_tensor (line 100) | def _nan_tensor(self, *shape): method test_empty_data (line 103) | def test_empty_data(self): method test_eval_tocpu (line 109) | def test_eval_tocpu(self): class MaskRCNNE2ETest (line 117) | class MaskRCNNE2ETest(InstanceModelE2ETest, unittest.TestCase): method test_half_empty_data (line 120) | def test_half_empty_data(self): method test_roiheads_inf_nan_data (line 139) | def test_roiheads_inf_nan_data(self): method test_autocast (line 157) | def test_autocast(self): class RetinaNetE2ETest (line 173) | class RetinaNetE2ETest(InstanceModelE2ETest, unittest.TestCase): method test_inf_nan_data (line 176) | def test_inf_nan_data(self): method test_autocast (line 197) | def test_autocast(self): class FCOSE2ETest (line 210) | class FCOSE2ETest(InstanceModelE2ETest, unittest.TestCase): class SemSegE2ETest (line 214) | class SemSegE2ETest(unittest.TestCase): method setUp (line 217) | def setUp(self): method _test_eval (line 221) | def _test_eval(self, input_sizes): method test_forward (line 226) | def test_forward(self): FILE: detectron2/tests/modeling/test_roi_heads.py class ROIHeadsTest (line 38) | class ROIHeadsTest(unittest.TestCase): method test_roi_heads (line 39) | def test_roi_heads(self): method test_rroi_heads (line 94) | def test_rroi_heads(self): method test_box_head_scriptability (line 150) | def test_box_head_scriptability(self): method test_mask_head_scriptability (line 163) | def test_mask_head_scriptability(self): method test_keypoint_head_scriptability (line 192) | def test_keypoint_head_scriptability(self): method test_StandardROIHeads_scriptability (line 227) | def test_StandardROIHeads_scriptability(self): method test_PointRend_mask_head_tracing (line 278) | def test_PointRend_mask_head_tracing(self): FILE: detectron2/tests/modeling/test_roi_pooler.py class TestROIPooler (line 13) | class TestROIPooler(unittest.TestCase): method _test_roialignv2_roialignrotated_match (line 14) | def _test_roialignv2_roialignrotated_match(self, device): method test_roialignv2_roialignrotated_match_cpu (line 61) | def test_roialignv2_roialignrotated_match_cpu(self): method test_roialignv2_roialignrotated_match_cuda (line 65) | def test_roialignv2_roialignrotated_match_cuda(self): method _test_scriptability (line 68) | def _test_scriptability(self, device): method test_scriptability_cpu (line 100) | def test_scriptability_cpu(self): method test_scriptability_gpu (line 104) | def test_scriptability_gpu(self): method test_no_images (line 107) | def test_no_images(self): method test_roi_pooler_tracing (line 117) | def test_roi_pooler_tracing(self): FILE: detectron2/tests/modeling/test_rpn.py class RPNTest (line 21) | class RPNTest(unittest.TestCase): method get_gt_and_features (line 22) | def get_gt_and_features(self): method test_rpn (line 35) | def test_rpn(self): method verify_rpn (line 69) | def verify_rpn(self, conv_dims, expected_conv_dims): method test_rpn_larger_num_convs (line 79) | def test_rpn_larger_num_convs(self): method test_rpn_conv_dims_not_set (line 97) | def test_rpn_conv_dims_not_set(self): method test_rpn_scriptability (line 102) | def test_rpn_scriptability(self): method test_rrpn (line 124) | def test_rrpn(self): method test_find_rpn_proposals_inf (line 197) | def test_find_rpn_proposals_inf(self): method test_find_rpn_proposals_tracing (line 204) | def test_find_rpn_proposals_tracing(self): method test_append_gt_to_proposal (line 232) | def test_append_gt_to_proposal(self): FILE: detectron2/tests/structures/test_boxes.py class TestBoxMode (line 12) | class TestBoxMode(unittest.TestCase): method _convert_xy_to_wh (line 13) | def _convert_xy_to_wh(self, x): method _convert_xywha_to_xyxy (line 16) | def _convert_xywha_to_xyxy(self, x): method _convert_xywh_to_xywha (line 19) | def _convert_xywh_to_xywha(self, x): method test_convert_int_mode (line 22) | def test_convert_int_mode(self): method test_box_convert_list (line 25) | def test_box_convert_list(self): method test_box_convert_array (line 36) | def test_box_convert_array(self): method test_box_convert_cpu_tensor (line 44) | def test_box_convert_cpu_tensor(self): method test_box_convert_cuda_tensor (line 54) | def test_box_convert_cuda_tensor(self): method test_box_convert_xywha_to_xyxy_list (line 64) | def test_box_convert_xywha_to_xyxy_list(self): method test_box_convert_xywha_to_xyxy_array (line 74) | def test_box_convert_xywha_to_xyxy_array(self): method test_box_convert_xywha_to_xyxy_tensor (line 89) | def test_box_convert_xywha_to_xyxy_tensor(self): method test_box_convert_xywh_to_xywha_list (line 105) | def test_box_convert_xywh_to_xywha_list(self): method test_box_convert_xywh_to_xywha_array (line 115) | def test_box_convert_xywh_to_xywha_array(self): method test_box_convert_xywh_to_xywha_tensor (line 125) | def test_box_convert_xywh_to_xywha_tensor(self): method test_json_serializable (line 136) | def test_json_serializable(self): method test_json_deserializable (line 143) | def test_json_deserializable(self): class TestBoxIOU (line 152) | class TestBoxIOU(unittest.TestCase): method create_boxes (line 153) | def create_boxes(self): method test_pairwise_iou (line 168) | def test_pairwise_iou(self): method test_pairwise_ioa (line 180) | def test_pairwise_ioa(self): class TestBoxes (line 189) | class TestBoxes(unittest.TestCase): method test_empty_cat (line 190) | def test_empty_cat(self): method test_to (line 194) | def test_to(self): method test_scriptability (line 198) | def test_scriptability(self): FILE: detectron2/tests/structures/test_imagelist.py class TestImageList (line 10) | class TestImageList(unittest.TestCase): method test_imagelist_padding_tracing (line 11) | def test_imagelist_padding_tracing(self): method test_imagelist_scriptability (line 44) | def test_imagelist_scriptability(self): method test_imagelist_from_tensors_scriptability (line 59) | def test_imagelist_from_tensors_scriptability(self): FILE: detectron2/tests/structures/test_instances.py class TestInstances (line 11) | class TestInstances(unittest.TestCase): method test_int_indexing (line 12) | def test_int_indexing(self): method test_script_new_fields (line 26) | def test_script_new_fields(self): method test_script_access_fields (line 74) | def test_script_access_fields(self): method test_script_len (line 85) | def test_script_len(self): method test_script_has (line 116) | def test_script_has(self): method test_script_to (line 132) | def test_script_to(self): method test_script_getitem (line 149) | def test_script_getitem(self): method test_from_to_instances (line 170) | def test_from_to_instances(self): method test_script_init_args (line 182) | def test_script_init_args(self): method test_script_cat (line 198) | def test_script_cat(self): FILE: detectron2/tests/structures/test_keypoints.py class TestKeypoints (line 8) | class TestKeypoints(unittest.TestCase): method test_cat_keypoints (line 9) | def test_cat_keypoints(self): FILE: detectron2/tests/structures/test_masks.py class TestBitMask (line 8) | class TestBitMask(unittest.TestCase): method test_get_bounding_box (line 9) | def test_get_bounding_box(self): method test_from_empty_polygons (line 41) | def test_from_empty_polygons(self): method test_getitem (line 45) | def test_getitem(self): FILE: detectron2/tests/structures/test_rotated_boxes.py class TestRotatedBoxesLayer (line 18) | class TestRotatedBoxesLayer(unittest.TestCase): method test_iou_0_dim_cpu (line 19) | def test_iou_0_dim_cpu(self): method test_iou_0_dim_cuda (line 33) | def test_iou_0_dim_cuda(self): method test_iou_half_overlap_cpu (line 46) | def test_iou_half_overlap_cpu(self): method test_iou_half_overlap_cuda (line 54) | def test_iou_half_overlap_cuda(self): method test_iou_precision (line 61) | def test_iou_precision(self): method test_iou_too_many_boxes_cuda (line 71) | def test_iou_too_many_boxes_cuda(self): method test_iou_extreme (line 78) | def test_iou_extreme(self): method test_iou_issue_2154 (line 97) | def test_iou_issue_2154(self): method test_iou_issue_2167 (line 119) | def test_iou_issue_2167(self): class TestRotatedBoxesStructure (line 150) | class TestRotatedBoxesStructure(unittest.TestCase): method test_clip_area_0_degree (line 151) | def test_clip_area_0_degree(self): method test_clip_area_arbitrary_angle (line 180) | def test_clip_area_arbitrary_angle(self): method test_normalize_angles (line 208) | def test_normalize_angles(self): method test_pairwise_iou_0_degree (line 243) | def test_pairwise_iou_0_degree(self): method test_pairwise_iou_45_degrees (line 273) | def test_pairwise_iou_45_degrees(self): method test_pairwise_iou_orthogonal (line 288) | def test_pairwise_iou_orthogonal(self): method test_pairwise_iou_large_close_boxes (line 297) | def test_pairwise_iou_large_close_boxes(self): method test_pairwise_iou_many_boxes (line 314) | def test_pairwise_iou_many_boxes(self): method test_pairwise_iou_issue1207_simplified (line 344) | def test_pairwise_iou_issue1207_simplified(self): method test_pairwise_iou_issue1207 (line 355) | def test_pairwise_iou_issue1207(self): method test_empty_cat (line 367) | def test_empty_cat(self): method test_scriptability (line 371) | def test_scriptability(self): function benchmark_rotated_iou (line 396) | def benchmark_rotated_iou(): FILE: detectron2/tests/test_checkpoint.py class TestCheckpointer (line 11) | class TestCheckpointer(unittest.TestCase): method setUp (line 12) | def setUp(self): method create_complex_model (line 15) | def create_complex_model(self): method test_complex_model_loaded (line 32) | def test_complex_model_loaded(self): FILE: detectron2/tests/test_engine.py class _SimpleModel (line 22) | class _SimpleModel(nn.Module): method __init__ (line 24) | def __init__(self, sleep_sec=0): method from_config (line 30) | def from_config(cls, cfg): method forward (line 33) | def forward(self, x): class TestTrainer (line 39) | class TestTrainer(unittest.TestCase): method _data_loader (line 40) | def _data_loader(self, device): method test_simple_trainer (line 45) | def test_simple_trainer(self, device="cpu"): method test_simple_trainer_reset_dataloader (line 52) | def test_simple_trainer_reset_dataloader(self, device="cpu"): method test_simple_trainer_cuda (line 62) | def test_simple_trainer_cuda(self): method test_writer_hooks (line 65) | def test_writer_hooks(self): method test_default_trainer (line 96) | def test_default_trainer(self): method test_checkpoint_resume (line 111) | def test_checkpoint_resume(self): method test_eval_hook (line 149) | def test_eval_hook(self): method test_best_checkpointer (line 161) | def test_best_checkpointer(self): method test_setup_config (line 187) | def test_setup_config(self): FILE: detectron2/tests/test_events.py class TestEventWriter (line 10) | class TestEventWriter(unittest.TestCase): method testScalar (line 11) | def testScalar(self): method testScalarMismatchedPeriod (line 27) | def testScalarMismatchedPeriod(self): method testPrintETA (line 48) | def testPrintETA(self): FILE: detectron2/tests/test_export_caffe2.py class TestCaffe2Export (line 29) | class TestCaffe2Export(unittest.TestCase): method setUp (line 30) | def setUp(self): method _test_model (line 33) | def _test_model(self, config_path, device="cpu"): method testMaskRCNN (line 54) | def testMaskRCNN(self): method testMaskRCNNGPU (line 58) | def testMaskRCNNGPU(self): method testRetinaNet (line 61) | def testRetinaNet(self): FILE: detectron2/tests/test_export_onnx.py class TestONNXTracingExport (line 28) | class TestONNXTracingExport(unittest.TestCase): method testMaskRCNNFPN (line 29) | def testMaskRCNNFPN(self): method testMaskRCNNC4 (line 41) | def testMaskRCNNC4(self): method testCascadeRCNN (line 51) | def testCascadeRCNN(self): method testRetinaNet (line 60) | def testRetinaNet(self): method testMaskRCNNFPN_batched (line 69) | def testMaskRCNNFPN_batched(self): method testMaskRCNNFPN_with_postproc (line 80) | def testMaskRCNNFPN_with_postproc(self): method setUp (line 95) | def setUp(self): method tearDown (line 104) | def tearDown(self): method _test_model (line 108) | def _test_model( method _test_model_zoo_from_config_path (line 142) | def _test_model_zoo_from_config_path( method _test_model_from_config_path (line 158) | def _test_model_from_config_path( FILE: detectron2/tests/test_export_torchscript.py class TestScripting (line 41) | class TestScripting(unittest.TestCase): method testMaskRCNNFPN (line 42) | def testMaskRCNNFPN(self): method testMaskRCNNC4 (line 46) | def testMaskRCNNC4(self): method testRetinaNet (line 49) | def testRetinaNet(self): method _test_rcnn_model (line 52) | def _test_rcnn_model(self, config_path): method _test_retinanet_model (line 75) | def _test_retinanet_model(self, config_path): class TestTracing (line 98) | class TestTracing(unittest.TestCase): method testMaskRCNNFPN (line 99) | def testMaskRCNNFPN(self): method testMaskRCNNFPN_with_postproc (line 106) | def testMaskRCNNFPN_with_postproc(self): method testMaskRCNNC4 (line 114) | def testMaskRCNNC4(self): method testCascadeRCNN (line 122) | def testCascadeRCNN(self): method testRetinaNet (line 131) | def testRetinaNet(self): method _check_torchscript_no_hardcoded_device (line 137) | def _check_torchscript_no_hardcoded_device(self, jitfile, extract_dir,... method _get_device_casting_test_cases (line 149) | def _get_device_casting_test_cases(self, model): method _test_model (line 163) | def _test_model(self, config_path, inference_func, batch=1): method testMaskRCNNFPN_batched (line 201) | def testMaskRCNNFPN_batched(self): method testKeypointHead (line 210) | def testKeypointHead(self): class TestTorchscriptUtils (line 245) | class TestTorchscriptUtils(unittest.TestCase): method test_dump_IR_tracing (line 247) | def test_dump_IR_tracing(self): method test_dump_IR_function (line 270) | def test_dump_IR_function(self): method test_flatten_basic (line 285) | def test_flatten_basic(self): method _check_schema (line 296) | def _check_schema(self, schema): method test_flatten_instances_boxes (line 306) | def test_flatten_instances_boxes(self): method test_allow_non_tensor (line 320) | def test_allow_non_tensor(self): FILE: detectron2/tests/test_model_analysis.py class RetinaNetTest (line 12) | class RetinaNetTest(unittest.TestCase): method setUp (line 13) | def setUp(self): method test_flop (line 16) | def test_flop(self): method test_param_count (line 22) | def test_param_count(self): class FasterRCNNTest (line 28) | class FasterRCNNTest(unittest.TestCase): method setUp (line 29) | def setUp(self): method test_flop (line 32) | def test_flop(self): method test_flop_with_output_shape (line 42) | def test_flop_with_output_shape(self): method test_param_count (line 47) | def test_param_count(self): class MaskRCNNTest (line 53) | class MaskRCNNTest(unittest.TestCase): method setUp (line 54) | def setUp(self): method test_flop (line 57) | def test_flop(self): class UnusedParamTest (line 67) | class UnusedParamTest(unittest.TestCase): method test_unused (line 68) | def test_unused(self): FILE: detectron2/tests/test_model_zoo.py class TestModelZoo (line 12) | class TestModelZoo(unittest.TestCase): method test_get_returns_model (line 13) | def test_get_returns_model(self): method test_get_invalid_model (line 18) | def test_get_invalid_model(self): method test_get_url (line 21) | def test_get_url(self): method _build_lazy_model (line 30) | def _build_lazy_model(self, name): method test_mask_rcnn_fpn (line 34) | def test_mask_rcnn_fpn(self): method test_mask_rcnn_c4 (line 37) | def test_mask_rcnn_c4(self): method test_panoptic_fpn (line 40) | def test_panoptic_fpn(self): method test_schedule (line 43) | def test_schedule(self): FILE: detectron2/tests/test_packaging.py class TestProjects (line 7) | class TestProjects(unittest.TestCase): method test_import (line 8) | def test_import(self): class TestCollectEnv (line 22) | class TestCollectEnv(unittest.TestCase): method test (line 23) | def test(self): FILE: detectron2/tests/test_registry.py class A (line 9) | class A: class B (line 10) | class B: class TestLocate (line 14) | class TestLocate(unittest.TestCase): method _test_obj (line 15) | def _test_obj(self, obj): method test_basic (line 20) | def test_basic(self): method test_inside_class (line 23) | def test_inside_class(self): method test_builtin (line 27) | def test_builtin(self): method test_pytorch_optim (line 31) | def test_pytorch_optim(self): method test_failure (line 35) | def test_failure(self): method test_compress_target (line 39) | def test_compress_target(self): FILE: detectron2/tests/test_scheduler.py class TestScheduler (line 13) | class TestScheduler(TestCase): method test_warmup_multistep (line 14) | def test_warmup_multistep(self): method test_warmup_cosine (line 45) | def test_warmup_cosine(self): method test_warmup_cosine_end_value (line 70) | def test_warmup_cosine_end_value(self): FILE: detectron2/tests/test_solver.py class TestOptimizer (line 6) | class TestOptimizer(unittest.TestCase): method testExpandParamsGroups (line 7) | def testExpandParamsGroups(self): method testReduceParamGroups (line 34) | def testReduceParamGroups(self): FILE: detectron2/tests/test_visualizer.py class TestVisualizer (line 16) | class TestVisualizer(unittest.TestCase): method _random_data (line 17) | def _random_data(self): method metadata (line 36) | def metadata(self): method test_draw_dataset_dict (line 39) | def test_draw_dataset_dict(self): method test_draw_rotated_dataset_dict (line 69) | def test_draw_rotated_dataset_dict(self): method test_overlay_instances (line 93) | def test_overlay_instances(self): method test_overlay_instances_no_boxes (line 110) | def test_overlay_instances_no_boxes(self): method test_draw_instance_predictions (line 115) | def test_draw_instance_predictions(self): method test_BWmode_nomask (line 130) | def test_BWmode_nomask(self): method test_draw_empty_mask_predictions (line 148) | def test_draw_empty_mask_predictions(self): method test_correct_output_shape (line 160) | def test_correct_output_shape(self): method test_overlay_rotated_instances (line 166) | def test_overlay_rotated_instances(self): method test_draw_no_metadata (line 183) | def test_draw_no_metadata(self): method test_draw_binary_mask (line 195) | def test_draw_binary_mask(self): method test_draw_soft_mask (line 216) | def test_draw_soft_mask(self): method test_border_mask_with_holes (line 234) | def test_border_mask_with_holes(self): method test_border_polygons (line 255) | def test_border_polygons(self): FILE: detectron2/tests/tracking/test_bbox_iou_tracker.py class TestBBoxIOUTracker (line 15) | class TestBBoxIOUTracker(unittest.TestCase): method setUp (line 16) | def setUp(self): method _convertDictPredictionToInstance (line 60) | def _convertDictPredictionToInstance(self, prediction: Dict) -> Instan... method test_init (line 73) | def test_init(self): method test_from_config (line 87) | def test_from_config(self): method test_initialize_extra_fields (line 101) | def test_initialize_extra_fields(self): method test_assign_new_id (line 118) | def test_assign_new_id(self): method test_update (line 137) | def test_update(self): FILE: detectron2/tests/tracking/test_hungarian_tracker.py class TestBaseHungarianTracker (line 11) | class TestBaseHungarianTracker(unittest.TestCase): method setUp (line 12) | def setUp(self): method _convertDictPredictionToInstance (line 56) | def _convertDictPredictionToInstance(self, prediction: Dict) -> Instan... method test_init (line 69) | def test_init(self): method test_initialize_extra_fields (line 83) | def test_initialize_extra_fields(self): FILE: detectron2/tests/tracking/test_iou_weighted_hungarian_bbox_iou_tracker.py class TestIOUWeightedHungarianBBoxIOUTracker (line 17) | class TestIOUWeightedHungarianBBoxIOUTracker(unittest.TestCase): method setUp (line 18) | def setUp(self): method _convertDictPredictionToInstance (line 62) | def _convertDictPredictionToInstance(self, prediction: Dict) -> Instan... method test_init (line 75) | def test_init(self): method test_from_config (line 89) | def test_from_config(self): method test_initialize_extra_fields (line 103) | def test_initialize_extra_fields(self): method test_process_matched_idx (line 120) | def test_process_matched_idx(self): method test_process_unmatched_idx (line 140) | def test_process_unmatched_idx(self): method test_process_unmatched_prev_idx (line 161) | def test_process_unmatched_prev_idx(self): method test_assign_cost_matrix_values (line 184) | def test_assign_cost_matrix_values(self): method test_update (line 206) | def test_update(self): FILE: detectron2/tests/tracking/test_vanilla_hungarian_bbox_iou_tracker.py class TestVanillaHungarianBBoxIOUTracker (line 17) | class TestVanillaHungarianBBoxIOUTracker(unittest.TestCase): method setUp (line 18) | def setUp(self): method _convertDictPredictionToInstance (line 62) | def _convertDictPredictionToInstance(self, prediction: Dict) -> Instan... method test_init (line 75) | def test_init(self): method test_from_config (line 89) | def test_from_config(self): method test_initialize_extra_fields (line 103) | def test_initialize_extra_fields(self): method test_process_matched_idx (line 120) | def test_process_matched_idx(self): method test_process_unmatched_idx (line 140) | def test_process_unmatched_idx(self): method test_process_unmatched_prev_idx (line 161) | def test_process_unmatched_prev_idx(self): method test_assign_cost_matrix_values (line 184) | def test_assign_cost_matrix_values(self): method test_update (line 206) | def test_update(self): FILE: detectron2/tools/analyze_model.py function setup (line 25) | def setup(args): function do_flop (line 40) | def do_flop(cfg): function do_activation (line 71) | def do_activation(cfg): function do_parameter (line 100) | def do_parameter(cfg): function do_structure (line 108) | def do_structure(cfg): FILE: detectron2/tools/benchmark.py function setup (line 36) | def setup(args): function create_data_benchmark (line 50) | def create_data_benchmark(cfg, args): function RAM_msg (line 62) | def RAM_msg(): function benchmark_data (line 69) | def benchmark_data(args): function benchmark_data_advanced (line 81) | def benchmark_data_advanced(args): function benchmark_train (line 97) | def benchmark_train(args): function benchmark_eval (line 134) | def benchmark_eval(args): FILE: detectron2/tools/deploy/export_model.py function setup_cfg (line 29) | def setup_cfg(args): function export_caffe2_tracing (line 40) | def export_caffe2_tracing(cfg, torch_model, inputs): function export_scripting (line 63) | def export_scripting(torch_model): function export_tracing (line 108) | def export_tracing(torch_model, inputs): function get_sample_inputs (line 154) | def get_sample_inputs(args): FILE: detectron2/tools/deploy/torchscript_mask_rcnn.cpp function get_caffe2_tracing_inputs (line 22) | c10::IValue get_caffe2_tracing_inputs(cv::Mat& img, c10::Device device) { function get_tracing_inputs (line 41) | c10::IValue get_tracing_inputs(cv::Mat& img, c10::Device device) { function get_scripting_inputs (line 54) | c10::IValue get_scripting_inputs(cv::Mat& img, c10::Device device) { function get_inputs (line 69) | c10::IValue type MaskRCNNOutputs (line 81) | struct MaskRCNNOutputs { method num_instances (line 83) | int num_instances() const { function MaskRCNNOutputs (line 88) | MaskRCNNOutputs get_outputs(std::string export_method, c10::IValue outpu... method num_instances (line 83) | int num_instances() const { function main (line 122) | int main(int argc, const char* argv[]) { FILE: detectron2/tools/lazyconfig_train_net.py function do_test (line 35) | def do_test(cfg, model): function do_train (line 44) | def do_train(args, cfg): function main (line 107) | def main(args): FILE: detectron2/tools/lightning_train_net.py class TrainingModule (line 42) | class TrainingModule(LightningModule): method __init__ (line 43) | def __init__(self, cfg): method on_save_checkpoint (line 54) | def on_save_checkpoint(self, checkpoint: Dict[str, Any]) -> None: method on_load_checkpoint (line 57) | def on_load_checkpoint(self, checkpointed_state: Dict[str, Any]) -> None: method setup (line 61) | def setup(self, stage: str): method training_step (line 77) | def training_step(self, batch, batch_idx): method training_step_end (line 109) | def training_step_end(self, training_step_outpus): method training_epoch_end (line 113) | def training_epoch_end(self, training_step_outputs): method _process_dataset_evaluation_results (line 122) | def _process_dataset_evaluation_results(self) -> OrderedDict: method _reset_dataset_evaluators (line 133) | def _reset_dataset_evaluators(self): method on_validation_epoch_start (line 140) | def on_validation_epoch_start(self, _outputs): method validation_epoch_end (line 143) | def validation_epoch_end(self, _outputs): method validation_step (line 157) | def validation_step(self, batch, batch_idx: int, dataloader_idx: int =... method configure_optimizers (line 163) | def configure_optimizers(self): class DataModule (line 170) | class DataModule(LightningDataModule): method __init__ (line 171) | def __init__(self, cfg): method train_dataloader (line 175) | def train_dataloader(self): method val_dataloader (line 178) | def val_dataloader(self): function main (line 185) | def main(args): function train (line 190) | def train(cfg, args): function setup (line 223) | def setup(args): FILE: detectron2/tools/plain_train_net.py function get_evaluator (line 56) | def get_evaluator(cfg, dataset_name, output_folder=None): function do_test (line 96) | def do_test(cfg, model): function do_train (line 113) | def do_train(cfg, model, resume=False): function setup (line 172) | def setup(args): function main (line 186) | def main(args): FILE: detectron2/tools/train_net.py function build_evaluator (line 42) | def build_evaluator(cfg, dataset_name, output_folder=None): class Trainer (line 82) | class Trainer(DefaultTrainer): method build_evaluator (line 91) | def build_evaluator(cls, cfg, dataset_name, output_folder=None): method test_with_TTA (line 95) | def test_with_TTA(cls, cfg, model): function setup (line 112) | def setup(args): function main (line 124) | def main(args): FILE: detectron2/tools/visualize_data.py function setup (line 17) | def setup(args): function parse_args (line 27) | def parse_args(in_args=None): function output (line 57) | def output(vis, fname): FILE: detectron2/tools/visualize_json_results.py function create_instances (line 19) | def create_instances(predictions, image_size): function dataset_id_map (line 64) | def dataset_id_map(ds_id): function dataset_id_map (line 70) | def dataset_id_map(ds_id): FILE: tools/get_cc_tags.py function map_name (line 162) | def map_name(x): FILE: tools/get_tags_for_VLDet_concepts.py function map_name (line 10) | def map_name(x): FILE: train_net.py function do_test (line 55) | def do_test(cfg, model): function do_train (line 94) | def do_train(cfg, model, resume=False): function setup (line 203) | def setup(args): function main (line 223) | def main(args): FILE: vldet/config.py function add_vldet_config (line 4) | def add_vldet_config(cfg): FILE: vldet/custom_solver.py function match_name_keywords (line 11) | def match_name_keywords(n, name_keywords): function build_custom_optimizer (line 19) | def build_custom_optimizer(cfg: CfgNode, model: torch.nn.Module) -> torc... FILE: vldet/data/custom_build_augmentation.py function build_custom_augmentation (line 13) | def build_custom_augmentation(cfg, is_train, scale=None, size=None, \ FILE: vldet/data/custom_dataset_dataloader.py function _custom_train_loader_from_config (line 32) | def _custom_train_loader_from_config(cfg, mapper=None, *, dataset=None, ... function build_custom_train_loader (line 89) | def build_custom_train_loader( function build_multi_dataset_batch_data_loader (line 130) | def build_multi_dataset_batch_data_loader( function get_detection_dataset_dicts_with_source (line 160) | def get_detection_dataset_dicts_with_source( class MultiDatasetSampler (line 195) | class MultiDatasetSampler(Sampler): method __init__ (line 196) | def __init__( method __iter__ (line 250) | def __iter__(self): method _infinite_indices (line 256) | def _infinite_indices(self): class MDAspectRatioGroupedDataset (line 268) | class MDAspectRatioGroupedDataset(torch.utils.data.IterableDataset): method __init__ (line 269) | def __init__(self, dataset, batch_size, num_datasets): method __iter__ (line 276) | def __iter__(self): class DIFFMDAspectRatioGroupedDataset (line 288) | class DIFFMDAspectRatioGroupedDataset(torch.utils.data.IterableDataset): method __init__ (line 289) | def __init__(self, dataset, batch_sizes, num_datasets): method __iter__ (line 296) | def __iter__(self): function repeat_factors_from_tag_frequency (line 308) | def repeat_factors_from_tag_frequency(dataset_dicts, repeat_thresh): FILE: vldet/data/custom_dataset_mapper.py class CustomDatasetMapper (line 26) | class CustomDatasetMapper(DatasetMapper): method __init__ (line 28) | def __init__(self, is_train: bool, method from_config (line 62) | def from_config(cls, cfg, is_train: bool = True): method __call__ (line 93) | def __call__(self, dataset_dict): function build_transform_gen (line 192) | def build_transform_gen(cfg, is_train): class DetrDatasetMapper (line 216) | class DetrDatasetMapper: method __init__ (line 227) | def __init__(self, cfg, is_train=True): method __call__ (line 245) | def __call__(self, dataset_dict): FILE: vldet/data/datasets/coco_zeroshot.py function _zero_shot_setting_weight (line 86) | def _zero_shot_setting_weight(): function _get_metadata (line 102) | def _get_metadata(cat): FILE: vldet/data/datasets/imagenet.py function custom_register_imagenet_instances (line 8) | def custom_register_imagenet_instances(name, metadata, json_file, image_... FILE: vldet/data/datasets/lvis_v1.py function custom_register_lvis_instances (line 16) | def custom_register_lvis_instances(name, metadata, json_file, image_root): function custom_load_lvis_json (line 27) | def custom_load_lvis_json(json_file, image_root, dataset_name=None): function get_lvis_22k_meta (line 133) | def get_lvis_22k_meta(): FILE: vldet/data/datasets/objects365.py function _get_builtin_metadata (line 746) | def _get_builtin_metadata(): FILE: vldet/data/datasets/oid.py function _get_builtin_metadata (line 510) | def _get_builtin_metadata(cats): FILE: vldet/data/datasets/register_oid.py function register_oid_instances (line 29) | def register_oid_instances(name, metadata, json_file, image_root): function load_coco_json_mem_efficient (line 43) | def load_coco_json_mem_efficient(json_file, image_root, dataset_name=Non... FILE: vldet/data/tar_dataset.py class DiskTarDataset (line 18) | class DiskTarDataset(Dataset): method __init__ (line 19) | def __init__(self, method __len__ (line 53) | def __len__(self): method __getitem__ (line 56) | def __getitem__(self, index): method __repr__ (line 83) | def __repr__(self): class _TarDataset (line 87) | class _TarDataset(object): method __init__ (line 89) | def __init__(self, filename, npy_index_dir, preload=False): method __len__ (line 106) | def __len__(self): method load_index (line 109) | def load_index(self): method __getitem__ (line 116) | def __getitem__(self, idx): FILE: vldet/data/transforms/custom_augmentation_impl.py class EfficientDetResizeCrop (line 25) | class EfficientDetResizeCrop(Augmentation): method __init__ (line 31) | def __init__( method get_transform (line 41) | def get_transform(self, img): FILE: vldet/data/transforms/custom_transform.py class EfficientDetResizeCropTransform (line 28) | class EfficientDetResizeCropTransform(Transform): method __init__ (line 32) | def __init__(self, scaled_h, scaled_w, offset_y, offset_x, img_scale, \ method apply_image (line 46) | def apply_image(self, img, interp=None): method apply_coords (line 84) | def apply_coords(self, coords): method apply_segmentation (line 92) | def apply_segmentation(self, segmentation): method inverse (line 97) | def inverse(self): method inverse_apply_coords (line 101) | def inverse_apply_coords(self, coords): method inverse_apply_box (line 109) | def inverse_apply_box(self, box: np.ndarray) -> np.ndarray: FILE: vldet/evaluation/custom_coco_eval.py class CustomCOCOEvaluator (line 28) | class CustomCOCOEvaluator(COCOEvaluator): method _derive_coco_results (line 29) | def _derive_coco_results(self, coco_eval, iou_type, class_names=None): FILE: vldet/evaluation/oideval.py function compute_average_precision (line 35) | def compute_average_precision(precision, recall): class OIDEval (line 79) | class OIDEval: method __init__ (line 80) | def __init__( method _to_mask (line 163) | def _to_mask(self, anns, lvis): method _prepare (line 168) | def _prepare(self): method evaluate (line 209) | def evaluate(self): method _get_gt_dt (line 241) | def _get_gt_dt(self, img_id, cat_id): method compute_iou (line 262) | def compute_iou(self, img_id, cat_id): method evaluate_img_google (line 289) | def evaluate_img_google(self, img_id, cat_id, area_rng): method accumulate (line 386) | def accumulate(self): method _summarize (line 489) | def _summarize(self, summary_type): method summarize (line 498) | def summarize(self): method run (line 506) | def run(self): method print_results (line 512) | def print_results(self): method get_results (line 537) | def get_results(self): class Params (line 543) | class Params: method __init__ (line 544) | def __init__(self, iou_type): class OIDEvaluator (line 565) | class OIDEvaluator(DatasetEvaluator): method __init__ (line 566) | def __init__(self, dataset_name, cfg, distributed, output_dir=None): method reset (line 581) | def reset(self): method process (line 585) | def process(self, inputs, outputs): method evaluate (line 593) | def evaluate(self): function _evaluate_predictions_on_oid (line 640) | def _evaluate_predictions_on_oid( FILE: vldet/modeling/backbone/swintransformer.py class Mlp (line 28) | class Mlp(nn.Module): method __init__ (line 31) | def __init__(self, in_features, hidden_features=None, out_features=Non... method forward (line 40) | def forward(self, x): function window_partition (line 49) | def window_partition(x, window_size): function window_reverse (line 63) | def window_reverse(windows, window_size, H, W): class WindowAttention (line 79) | class WindowAttention(nn.Module): method __init__ (line 92) | def __init__(self, dim, window_size, num_heads, qkv_bias=True, qk_scal... method forward (line 126) | def forward(self, x, mask=None): class SwinTransformerBlock (line 160) | class SwinTransformerBlock(nn.Module): method __init__ (line 177) | def __init__(self, dim, num_heads, window_size=7, shift_size=0, method forward (line 201) | def forward(self, x, mask_matrix): class PatchMerging (line 260) | class PatchMerging(nn.Module): method __init__ (line 266) | def __init__(self, dim, norm_layer=nn.LayerNorm): method forward (line 272) | def forward(self, x, H, W): class BasicLayer (line 301) | class BasicLayer(nn.Module): method __init__ (line 319) | def __init__(self, method forward (line 361) | def forward(self, x, H, W): class PatchEmbed (line 403) | class PatchEmbed(nn.Module): method __init__ (line 412) | def __init__(self, patch_size=4, in_chans=3, embed_dim=96, norm_layer=... method forward (line 426) | def forward(self, x): class SwinTransformer (line 445) | class SwinTransformer(Backbone): method __init__ (line 473) | def __init__(self, method _freeze_stages (line 561) | def _freeze_stages(self): method init_weights (line 578) | def init_weights(self, pretrained=None): method forward (line 602) | def forward(self, x): method train (line 631) | def train(self, mode=True): function build_swintransformer_backbone (line 696) | def build_swintransformer_backbone(cfg, input_shape): function build_swintransformer_fpn_backbone (line 717) | def build_swintransformer_fpn_backbone(cfg, input_shape: ShapeSpec): function build_swintransformer_bifpn_backbone (line 735) | def build_swintransformer_bifpn_backbone(cfg, input_shape: ShapeSpec): FILE: vldet/modeling/backbone/timm.py class CustomResNet (line 28) | class CustomResNet(ResNet): method __init__ (line 29) | def __init__(self, **kwargs): method forward (line 34) | def forward(self, x): method load_pretrained (line 51) | def load_pretrained(self, cached_file): function create_timm_resnet (line 65) | def create_timm_resnet(variant, out_indices, pretrained=False, **kwargs): class LastLevelP6P7_P5 (line 82) | class LastLevelP6P7_P5(nn.Module): method __init__ (line 85) | def __init__(self, in_channels, out_channels): method forward (line 94) | def forward(self, c5): function freeze_module (line 100) | def freeze_module(x): class TIMM (line 109) | class TIMM(Backbone): method __init__ (line 110) | def __init__(self, base_name, out_levels, freeze_at=0, norm='FrozenBN'): method freeze (line 136) | def freeze(self, freeze_at=0): method forward (line 146) | def forward(self, x): method size_divisibility (line 152) | def size_divisibility(self): function build_timm_backbone (line 157) | def build_timm_backbone(cfg, input_shape): function build_p67_timm_fpn_backbone (line 168) | def build_p67_timm_fpn_backbone(cfg, input_shape): function build_p35_timm_fpn_backbone (line 185) | def build_p35_timm_fpn_backbone(cfg, input_shape): FILE: vldet/modeling/debug.py function _get_color_image (line 11) | def _get_color_image(heatmap): function _blend_image (line 22) | def _blend_image(image, color_map, a=0.7): function _blend_image_heatmaps (line 27) | def _blend_image_heatmaps(image, color_maps, a=0.7): function _decompose_level (line 35) | def _decompose_level(x, shapes_per_level, N): function _imagelist_to_tensor (line 52) | def _imagelist_to_tensor(images): function _ind2il (line 65) | def _ind2il(ind, shapes_per_level, N): function debug_train (line 75) | def debug_train( function debug_test (line 143) | def debug_test( function debug_second_stage (line 220) | def debug_second_stage(images, instances, proposals=None, vis_thresh=0.3, FILE: vldet/modeling/meta_arch/custom_rcnn.py class CustomRCNN (line 27) | class CustomRCNN(GeneralizedRCNN): method __init__ (line 32) | def __init__( method from_config (line 66) | def from_config(cls, cfg): method inference (line 86) | def inference( method forward (line 108) | def forward(self, batched_inputs: List[Dict[str, torch.Tensor]]): method _sync_caption_features (line 188) | def _sync_caption_features(self, caption_features, ann_type, BS): method _sample_cls_inds (line 204) | def _sample_cls_inds(self, gt_instances, ann_type='box'): FILE: vldet/modeling/roi_heads/res5_roi_heads.py class CustomRes5ROIHeads (line 28) | class CustomRes5ROIHeads(Res5ROIHeads): method __init__ (line 30) | def __init__(self, **kwargs): method from_config (line 64) | def from_config(cls, cfg, input_shape): method _shared_roi_transform (line 69) | def _shared_roi_transform(self, features: List[torch.Tensor], boxes: L... method forward (line 75) | def forward(self, images, features, proposals, targets=None, method get_top_proposals (line 186) | def get_top_proposals(self, proposals): method _add_image_box (line 196) | def _add_image_box(self, p, use_score=False): FILE: vldet/modeling/roi_heads/vldet_fast_rcnn.py class VLDetFastRCNNOutputLayers (line 31) | class VLDetFastRCNNOutputLayers(FastRCNNOutputLayers): method __init__ (line 33) | def __init__( method from_config (line 136) | def from_config(cls, cfg, input_shape): method losses (line 165) | def losses(self, predictions, proposals, \ method sigmoid_cross_entropy_loss (line 205) | def sigmoid_cross_entropy_loss(self, pred_class_logits, gt_classes): method softmax_cross_entropy_loss (line 239) | def softmax_cross_entropy_loss(self, pred_class_logits, gt_classes): method box_reg_loss (line 272) | def box_reg_loss( method inference (line 305) | def inference(self, predictions, proposals): method predict_probs (line 327) | def predict_probs(self, predictions, proposals): method align_sinkhorn_loss (line 340) | def align_sinkhorn_loss(self, predictions, proposals, targets, classif... method align_contrastive_loss (line 393) | def align_contrastive_loss(self, predictions, proposals, targets, clas... method align_BCE_loss (line 434) | def align_BCE_loss(self, predictions, proposals, targets, classifier_i... method image_label_losses (line 460) | def image_label_losses(self, predictions, proposals, image_labels, \ method forward (line 559) | def forward(self, x, ann_type='box', classifier_info=(None,None,None)): method _caption_loss (line 593) | def _caption_loss(self, score, classifier_info, idx, B): method _wsddn_loss (line 633) | def _wsddn_loss(self, score, prop_score, label): method _max_score_loss (line 648) | def _max_score_loss(self, score, label): method _min_loss_loss (line 658) | def _min_loss_loss(self, score, label): method _first_loss (line 671) | def _first_loss(self, score, label): method _image_loss (line 681) | def _image_loss(self, score, label): method _max_size_loss (line 691) | def _max_size_loss(self, score, label, neg_concept_list, p): function put_label_distribution (line 709) | def put_label_distribution(storage, hist_name, hist_counts, num_classes): FILE: vldet/modeling/roi_heads/vldet_roi_heads.py class DeticCascadeROIHeads (line 29) | class DeticCascadeROIHeads(CascadeROIHeads): method __init__ (line 31) | def __init__( method from_config (line 59) | def from_config(cls, cfg, input_shape): method _init_box_head (line 77) | def _init_box_head(self, cfg, input_shape): method _forward_box (line 93) | def _forward_box(self, features, proposals, targets=None, method forward (line 203) | def forward(self, images, features, proposals, targets=None, method get_top_proposals (line 235) | def get_top_proposals(self, proposals): method _add_image_box (line 258) | def _add_image_box(self, p): method _get_empty_mask_loss (line 274) | def _get_empty_mask_loss(self, features, proposals, device): method _create_proposals_from_boxes (line 282) | def _create_proposals_from_boxes(self, boxes, image_sizes, logits, ann... method _run_stage (line 309) | def _run_stage(self, features, proposals, stage, \ FILE: vldet/modeling/roi_heads/zero_shot_classifier.py class ZeroShotClassifier (line 9) | class ZeroShotClassifier(nn.Module): method __init__ (line 11) | def __init__( method from_config (line 82) | def from_config(cls, cfg, input_shape): method forward (line 96) | def forward(self, input_x, ann_type='box', classifier=None): class SinkhornDistance (line 125) | class SinkhornDistance(torch.nn.Module): method __init__ (line 126) | def __init__(self, eps=1e-3, max_iter=100, reduction='none'): method forward (line 132) | def forward(self, mu, nu, C): method M (line 154) | def M(self, C, u, v): FILE: vldet/modeling/text/text_encoder.py class LayerNorm (line 17) | class LayerNorm(nn.LayerNorm): method forward (line 20) | def forward(self, x: torch.Tensor): class QuickGELU (line 26) | class QuickGELU(nn.Module): method forward (line 27) | def forward(self, x: torch.Tensor): class ResidualAttentionBlock (line 31) | class ResidualAttentionBlock(nn.Module): method __init__ (line 32) | def __init__(self, d_model: int, n_head: int, attn_mask: torch.Tensor ... method attention (line 45) | def attention(self, x: torch.Tensor): method forward (line 49) | def forward(self, x: torch.Tensor): class Transformer (line 55) | class Transformer(nn.Module): method __init__ (line 56) | def __init__(self, width: int, layers: int, heads: int, attn_mask: tor... method forward (line 64) | def forward(self, x: torch.Tensor): class CLIPTEXT (line 67) | class CLIPTEXT(nn.Module): method __init__ (line 68) | def __init__(self, method initialize_parameters (line 99) | def initialize_parameters(self): method build_attention_mask (line 115) | def build_attention_mask(self): method device (line 124) | def device(self): method dtype (line 128) | def dtype(self): method tokenize (line 131) | def tokenize(self, method encode_text (line 154) | def encode_text(self, text): method forward (line 165) | def forward(self, captions): function build_text_encoder (line 174) | def build_text_encoder(pretrain=True, visual_type="ViT-B/32"): class my_tokenizer (line 203) | class my_tokenizer(): method __init__ (line 204) | def __init__(self): method tokenize (line 208) | def tokenize(self, function build_RN50_text_encoder (line 232) | def build_RN50_text_encoder(pretrain=True): FILE: vldet/modeling/utils.py function load_ot_weight_mask (line 8) | def load_ot_weight_mask(): function load_class_freq (line 12) | def load_class_freq( function get_fed_loss_inds (line 21) | def get_fed_loss_inds(gt_classes, num_sample_cats, C, weight=None): function reset_cls_test (line 37) | def reset_cls_test(model, cls_path, num_classes): FILE: vldet/predictor.py function get_clip_embeddings (line 17) | def get_clip_embeddings(vocabulary, prompt='a '): class VisualizationDemo (line 39) | class VisualizationDemo(object): method __init__ (line 40) | def __init__(self, cfg, args, method run_on_image (line 70) | def run_on_image(self, image): method _frame_from_video (line 101) | def _frame_from_video(self, video): method run_on_video (line 109) | def run_on_video(self, video): class AsyncPredictor (line 165) | class AsyncPredictor: class _StopToken (line 172) | class _StopToken: class _PredictWorker (line 175) | class _PredictWorker(mp.Process): method __init__ (line 176) | def __init__(self, cfg, task_queue, result_queue): method run (line 182) | def run(self): method __init__ (line 193) | def __init__(self, cfg, num_gpus: int = 1): method put (line 220) | def put(self, image): method get (line 224) | def get(self): method __len__ (line 240) | def __len__(self): method __call__ (line 243) | def __call__(self, image): method shutdown (line 247) | def shutdown(self): method default_buffer_size (line 252) | def default_buffer_size(self):