SYMBOL INDEX (3240 symbols across 393 files) FILE: app.py function init_demo_detector (line 65) | def init_demo_detector(config, checkpoint=None, device='cuda:0', cfg_opt... function inference_demo_detector (line 112) | def inference_demo_detector(model, imgs): function inference (line 176) | def inference(img, config): function main (line 252) | def main(): FILE: mmdet/__init__.py function digit_version (line 7) | def digit_version(version_str): FILE: mmdet/apis/inference.py function init_detector (line 18) | def init_detector(config, checkpoint=None, device='cuda:0', cfg_options=... class LoadImage (line 66) | class LoadImage: method __call__ (line 72) | def __call__(self, results): function inference_detector (line 99) | def inference_detector(model, imgs): function async_inference_detector (line 165) | async def async_inference_detector(model, imgs): function show_result_pyplot (line 222) | def show_result_pyplot(model, FILE: mmdet/apis/test.py function single_gpu_test (line 17) | def single_gpu_test(model, function multi_gpu_test (line 81) | def multi_gpu_test(model, data_loader, tmpdir=None, gpu_collect=False): function collect_results_cpu (line 136) | def collect_results_cpu(result_part, size, tmpdir=None): function collect_results_gpu (line 179) | def collect_results_gpu(result_part, size): FILE: mmdet/apis/train.py function init_random_seed (line 19) | def init_random_seed(seed=None, device='cuda'): function set_random_seed (line 52) | def set_random_seed(seed, deterministic=False): function auto_scale_lr (line 71) | def auto_scale_lr(cfg, distributed, logger): function train_detector (line 117) | def train_detector(model, FILE: mmdet/core/anchor/anchor_generator.py class AnchorGenerator (line 13) | class AnchorGenerator: method __init__ (line 61) | def __init__(self, method num_base_anchors (line 116) | def num_base_anchors(self): method num_base_priors (line 121) | def num_base_priors(self): method num_levels (line 127) | def num_levels(self): method gen_base_anchors (line 131) | def gen_base_anchors(self): method gen_single_level_base_anchors (line 151) | def gen_single_level_base_anchors(self, method _meshgrid (line 196) | def _meshgrid(self, x, y, row_major=True): method grid_priors (line 216) | def grid_priors(self, featmap_sizes, dtype=torch.float32, device='cuda'): method single_level_grid_priors (line 241) | def single_level_grid_priors(self, method sparse_priors (line 283) | def sparse_priors(self, method grid_anchors (line 318) | def grid_anchors(self, featmap_sizes, device='cuda'): method single_level_grid_anchors (line 347) | def single_level_grid_anchors(self, method valid_flags (line 392) | def valid_flags(self, featmap_sizes, pad_shape, device='cuda'): method single_level_valid_flags (line 419) | def single_level_valid_flags(self, method __repr__ (line 451) | def __repr__(self): class SSDAnchorGenerator (line 471) | class SSDAnchorGenerator(AnchorGenerator): method __init__ (line 492) | def __init__(self, method gen_base_anchors (line 571) | def gen_base_anchors(self): method __repr__ (line 592) | def __repr__(self): class LegacyAnchorGenerator (line 610) | class LegacyAnchorGenerator(AnchorGenerator): method gen_single_level_base_anchors (line 658) | def gen_single_level_base_anchors(self, class LegacySSDAnchorGenerator (line 709) | class LegacySSDAnchorGenerator(SSDAnchorGenerator, LegacyAnchorGenerator): method __init__ (line 716) | def __init__(self, class YOLOAnchorGenerator (line 734) | class YOLOAnchorGenerator(AnchorGenerator): method __init__ (line 744) | def __init__(self, strides, base_sizes): method num_levels (line 757) | def num_levels(self): method gen_base_anchors (line 761) | def gen_base_anchors(self): method gen_single_level_base_anchors (line 778) | def gen_single_level_base_anchors(self, base_sizes_per_level, center=N... method responsible_flags (line 806) | def responsible_flags(self, featmap_sizes, gt_bboxes, device='cuda'): method single_level_responsible_flags (line 831) | def single_level_responsible_flags(self, FILE: mmdet/core/anchor/builder.py function build_prior_generator (line 11) | def build_prior_generator(cfg, default_args=None): function build_anchor_generator (line 15) | def build_anchor_generator(cfg, default_args=None): FILE: mmdet/core/anchor/point_generator.py class PointGenerator (line 10) | class PointGenerator: method _meshgrid (line 12) | def _meshgrid(self, x, y, row_major=True): method grid_points (line 20) | def grid_points(self, featmap_size, stride=16, device='cuda'): method valid_flags (line 30) | def valid_flags(self, featmap_size, valid_size, device='cuda'): class MlvlPointGenerator (line 44) | class MlvlPointGenerator: method __init__ (line 55) | def __init__(self, strides, offset=0.5): method num_levels (line 60) | def num_levels(self): method num_base_priors (line 65) | def num_base_priors(self): method _meshgrid (line 70) | def _meshgrid(self, x, y, row_major=True): method grid_priors (line 80) | def grid_priors(self, method single_level_grid_priors (line 119) | def single_level_grid_priors(self, method valid_flags (line 177) | def valid_flags(self, featmap_sizes, pad_shape, device='cuda'): method single_level_valid_flags (line 205) | def single_level_valid_flags(self, method sparse_priors (line 234) | def sparse_priors(self, FILE: mmdet/core/anchor/utils.py function images_to_levels (line 5) | def images_to_levels(target, num_levels): function anchor_inside_flags (line 21) | def anchor_inside_flags(flat_anchors, function calc_region (line 50) | def calc_region(bbox, ratio, featmap_size=None): FILE: mmdet/core/bbox/assigners/approx_max_iou_assigner.py class ApproxMaxIoUAssigner (line 10) | class ApproxMaxIoUAssigner(MaxIoUAssigner): method __init__ (line 40) | def __init__(self, method assign (line 60) | def assign(self, FILE: mmdet/core/bbox/assigners/ascend_assign_result.py class AscendAssignResult (line 5) | class AscendAssignResult(util_mixins.NiceRepr): method __init__ (line 20) | def __init__(self, FILE: mmdet/core/bbox/assigners/ascend_max_iou_assigner.py class AscendMaxIoUAssigner (line 12) | class AscendMaxIoUAssigner(BaseAssigner): method __init__ (line 47) | def __init__(self, method assign (line 67) | def assign(self, method batch_assign_wrt_overlaps (line 120) | def batch_assign_wrt_overlaps(self, FILE: mmdet/core/bbox/assigners/assign_result.py class AssignResult (line 7) | class AssignResult(util_mixins.NiceRepr): method __init__ (line 43) | def __init__(self, num_gts, gt_inds, max_overlaps, labels=None): method num_preds (line 52) | def num_preds(self): method set_extra_property (line 56) | def set_extra_property(self, key, value): method get_extra_property (line 61) | def get_extra_property(self, key): method info (line 66) | def info(self): method __nice__ (line 78) | def __nice__(self): method random (line 98) | def random(cls, **kwargs): method add_gt_ (line 192) | def add_gt_(self, gt_labels): FILE: mmdet/core/bbox/assigners/atss_assigner.py class ATSSAssigner (line 13) | class ATSSAssigner(BaseAssigner): method __init__ (line 29) | def __init__(self, method assign (line 52) | def assign(self, FILE: mmdet/core/bbox/assigners/base_assigner.py class BaseAssigner (line 5) | class BaseAssigner(metaclass=ABCMeta): method assign (line 9) | def assign(self, bboxes, gt_bboxes, gt_bboxes_ignore=None, gt_labels=N... FILE: mmdet/core/bbox/assigners/center_region_assigner.py function scale_boxes (line 10) | def scale_boxes(bboxes, scale): function is_located_in (line 37) | def is_located_in(points, bboxes): function bboxes_area (line 55) | def bboxes_area(bboxes): class CenterRegionAssigner (line 72) | class CenterRegionAssigner(BaseAssigner): method __init__ (line 94) | def __init__(self, method get_gt_priorities (line 108) | def get_gt_priorities(self, gt_bboxes): method assign (line 126) | def assign(self, bboxes, gt_bboxes, gt_bboxes_ignore=None, gt_labels=N... method assign_one_hot_gt_indices (line 257) | def assign_one_hot_gt_indices(self, FILE: mmdet/core/bbox/assigners/grid_assigner.py class GridAssigner (line 11) | class GridAssigner(BaseAssigner): method __init__ (line 31) | def __init__(self, method assign (line 43) | def assign(self, bboxes, box_responsible_flags, gt_bboxes, gt_labels=N... FILE: mmdet/core/bbox/assigners/hungarian_assigner.py class HungarianAssigner (line 13) | class HungarianAssigner(BaseAssigner): method __init__ (line 41) | def __init__(self, method assign (line 49) | def assign(self, FILE: mmdet/core/bbox/assigners/mask_hungarian_assigner.py class MaskHungarianAssigner (line 12) | class MaskHungarianAssigner(BaseAssigner): method __init__ (line 33) | def __init__(self, method assign (line 42) | def assign(self, FILE: mmdet/core/bbox/assigners/max_iou_assigner.py class MaxIoUAssigner (line 11) | class MaxIoUAssigner(BaseAssigner): method __init__ (line 46) | def __init__(self, method assign (line 66) | def assign(self, bboxes, gt_bboxes, gt_bboxes_ignore=None, gt_labels=N... method assign_wrt_overlaps (line 133) | def assign_wrt_overlaps(self, overlaps, gt_labels=None): FILE: mmdet/core/bbox/assigners/point_assigner.py class PointAssigner (line 10) | class PointAssigner(BaseAssigner): method __init__ (line 20) | def __init__(self, scale=4, pos_num=3): method assign (line 24) | def assign(self, points, gt_bboxes, gt_bboxes_ignore=None, gt_labels=N... FILE: mmdet/core/bbox/assigners/region_assigner.py function calc_region (line 10) | def calc_region(bbox, ratio, stride, featmap_size=None): function anchor_ctr_inside_region_flags (line 27) | def anchor_ctr_inside_region_flags(anchors, stride, region): class RegionAssigner (line 38) | class RegionAssigner(BaseAssigner): method __init__ (line 54) | def __init__(self, center_ratio=0.2, ignore_ratio=0.5): method assign (line 58) | def assign(self, FILE: mmdet/core/bbox/assigners/sim_ota_assigner.py class SimOTAAssigner (line 14) | class SimOTAAssigner(BaseAssigner): method __init__ (line 28) | def __init__(self, method assign (line 38) | def assign(self, method _assign (line 95) | def _assign(self, method get_in_gt_and_in_center_info (line 186) | def get_in_gt_and_in_center_info(self, priors, gt_bboxes): method dynamic_k_matching (line 230) | def dynamic_k_matching(self, cost, pairwise_ious, num_gt, valid_mask): FILE: mmdet/core/bbox/assigners/task_aligned_assigner.py class TaskAlignedAssigner (line 13) | class TaskAlignedAssigner(BaseAssigner): method __init__ (line 31) | def __init__(self, topk, iou_calculator=dict(type='BboxOverlaps2D')): method assign (line 36) | def assign(self, FILE: mmdet/core/bbox/assigners/uniform_assigner.py class UniformAssigner (line 12) | class UniformAssigner(BaseAssigner): method __init__ (line 25) | def __init__(self, method assign (line 35) | def assign(self, FILE: mmdet/core/bbox/builder.py function build_assigner (line 9) | def build_assigner(cfg, **default_args): function build_sampler (line 14) | def build_sampler(cfg, **default_args): function build_bbox_coder (line 19) | def build_bbox_coder(cfg, **default_args): FILE: mmdet/core/bbox/coder/base_bbox_coder.py class BaseBBoxCoder (line 5) | class BaseBBoxCoder(metaclass=ABCMeta): method __init__ (line 8) | def __init__(self, **kwargs): method encode (line 12) | def encode(self, bboxes, gt_bboxes): method decode (line 16) | def decode(self, bboxes, bboxes_pred): FILE: mmdet/core/bbox/coder/bucketing_bbox_coder.py class BucketingBBoxCoder (line 13) | class BucketingBBoxCoder(BaseBBoxCoder): method __init__ (line 35) | def __init__(self, method encode (line 50) | def encode(self, bboxes, gt_bboxes): method decode (line 72) | def decode(self, bboxes, pred_bboxes, max_shape=None): function generat_buckets (line 96) | def generat_buckets(proposals, num_buckets, scale_factor=1.0): function bbox2bucket (line 145) | def bbox2bucket(proposals, function bucket2bbox (line 269) | def bucket2bbox(proposals, FILE: mmdet/core/bbox/coder/delta_xywh_bbox_coder.py class DeltaXYWHBBoxCoder (line 13) | class DeltaXYWHBBoxCoder(BaseBBoxCoder): method __init__ (line 34) | def __init__(self, method encode (line 47) | def encode(self, bboxes, gt_bboxes): method decode (line 65) | def decode(self, function bbox2delta (line 118) | def bbox2delta(proposals, gt, means=(0., 0., 0., 0.), stds=(1., 1., 1., ... function delta2bbox (line 164) | def delta2bbox(rois, function onnx_delta2bbox (line 263) | def onnx_delta2bbox(rois, FILE: mmdet/core/bbox/coder/distance_point_bbox_coder.py class DistancePointBBoxCoder (line 8) | class DistancePointBBoxCoder(BaseBBoxCoder): method __init__ (line 19) | def __init__(self, clip_border=True): method encode (line 23) | def encode(self, points, gt_bboxes, max_dis=None, eps=0.1): method decode (line 41) | def decode(self, points, pred_bboxes, max_shape=None): FILE: mmdet/core/bbox/coder/legacy_delta_xywh_bbox_coder.py class LegacyDeltaXYWHBBoxCoder (line 11) | class LegacyDeltaXYWHBBoxCoder(BaseBBoxCoder): method __init__ (line 34) | def __init__(self, method encode (line 41) | def encode(self, bboxes, gt_bboxes): method decode (line 59) | def decode(self, function legacy_bbox2delta (line 85) | def legacy_bbox2delta(proposals, function legacy_delta2bbox (line 134) | def legacy_delta2bbox(rois, FILE: mmdet/core/bbox/coder/pseudo_bbox_coder.py class PseudoBBoxCoder (line 7) | class PseudoBBoxCoder(BaseBBoxCoder): method __init__ (line 10) | def __init__(self, **kwargs): method encode (line 13) | def encode(self, bboxes, gt_bboxes): method decode (line 17) | def decode(self, bboxes, pred_bboxes): FILE: mmdet/core/bbox/coder/tblr_bbox_coder.py class TBLRBBoxCoder (line 10) | class TBLRBBoxCoder(BaseBBoxCoder): method __init__ (line 26) | def __init__(self, normalizer=4.0, clip_border=True): method encode (line 31) | def encode(self, bboxes, gt_bboxes): method decode (line 50) | def decode(self, bboxes, pred_bboxes, max_shape=None): function bboxes2tblr (line 77) | def bboxes2tblr(priors, gts, normalizer=4.0, normalize_by_wh=True): function tblr2bboxes (line 124) | def tblr2bboxes(priors, FILE: mmdet/core/bbox/coder/yolo_bbox_coder.py class YOLOBBoxCoder (line 10) | class YOLOBBoxCoder(BaseBBoxCoder): method __init__ (line 22) | def __init__(self, eps=1e-6): method encode (line 27) | def encode(self, bboxes, gt_bboxes, stride): method decode (line 62) | def decode(self, bboxes, pred_bboxes, stride): FILE: mmdet/core/bbox/demodata.py function random_boxes (line 8) | def random_boxes(num=1, scale=1, rng=None): FILE: mmdet/core/bbox/iou_calculators/builder.py function build_iou_calculator (line 7) | def build_iou_calculator(cfg, default_args=None): FILE: mmdet/core/bbox/iou_calculators/iou2d_calculator.py function cast_tensor_type (line 7) | def cast_tensor_type(x, scale=1., dtype=None): function fp16_clamp (line 14) | def fp16_clamp(x, min=None, max=None): class BboxOverlaps2D (line 23) | class BboxOverlaps2D: method __init__ (line 26) | def __init__(self, scale=1., dtype=None): method __call__ (line 30) | def __call__(self, bboxes1, bboxes2, mode='iou', is_aligned=False): method __repr__ (line 67) | def __repr__(self): function bbox_overlaps (line 74) | def bbox_overlaps(bboxes1, bboxes2, mode='iou', is_aligned=False, eps=1e... FILE: mmdet/core/bbox/match_costs/builder.py function build_match_cost (line 7) | def build_match_cost(cfg, default_args=None): FILE: mmdet/core/bbox/match_costs/match_cost.py class BBoxL1Cost (line 11) | class BBoxL1Cost: method __init__ (line 29) | def __init__(self, weight=1., box_format='xyxy'): method __call__ (line 34) | def __call__(self, bbox_pred, gt_bboxes): class FocalLossCost (line 55) | class FocalLossCost: method __init__ (line 80) | def __init__(self, method _focal_loss_cost (line 92) | def _focal_loss_cost(self, cls_pred, gt_labels): method _mask_focal_loss_cost (line 111) | def _mask_focal_loss_cost(self, cls_pred, gt_labels): method __call__ (line 136) | def __call__(self, cls_pred, gt_labels): class ClassificationCost (line 153) | class ClassificationCost: method __init__ (line 174) | def __init__(self, weight=1.): method __call__ (line 177) | def __call__(self, cls_pred, gt_labels): class IoUCost (line 197) | class IoUCost: method __init__ (line 215) | def __init__(self, iou_mode='giou', weight=1.): method __call__ (line 219) | def __call__(self, bboxes, gt_bboxes): class DiceCost (line 239) | class DiceCost: method __init__ (line 254) | def __init__(self, weight=1., pred_act=False, eps=1e-3, naive_dice=True): method binary_mask_dice_loss (line 260) | def binary_mask_dice_loss(self, mask_preds, gt_masks): method __call__ (line 283) | def __call__(self, mask_preds, gt_masks): class CrossEntropyLossCost (line 299) | class CrossEntropyLossCost: method __init__ (line 315) | def __init__(self, weight=1., use_sigmoid=True): method _binary_cross_entropy (line 320) | def _binary_cross_entropy(self, cls_pred, gt_labels): method __call__ (line 344) | def __call__(self, cls_pred, gt_labels): FILE: mmdet/core/bbox/samplers/base_sampler.py class BaseSampler (line 9) | class BaseSampler(metaclass=ABCMeta): method __init__ (line 12) | def __init__(self, method _sample_pos (line 26) | def _sample_pos(self, assign_result, num_expected, **kwargs): method _sample_neg (line 31) | def _sample_neg(self, assign_result, num_expected, **kwargs): method sample (line 35) | def sample(self, FILE: mmdet/core/bbox/samplers/combined_sampler.py class CombinedSampler (line 7) | class CombinedSampler(BaseSampler): method __init__ (line 10) | def __init__(self, pos_sampler, neg_sampler, **kwargs): method _sample_pos (line 15) | def _sample_pos(self, **kwargs): method _sample_neg (line 19) | def _sample_neg(self, **kwargs): FILE: mmdet/core/bbox/samplers/instance_balanced_pos_sampler.py class InstanceBalancedPosSampler (line 10) | class InstanceBalancedPosSampler(RandomSampler): method _sample_pos (line 14) | def _sample_pos(self, assign_result, num_expected, **kwargs): FILE: mmdet/core/bbox/samplers/iou_balanced_neg_sampler.py class IoUBalancedNegSampler (line 10) | class IoUBalancedNegSampler(RandomSampler): method __init__ (line 30) | def __init__(self, method sample_via_interval (line 47) | def sample_via_interval(self, max_overlaps, full_set, num_expected): method _sample_neg (line 89) | def _sample_neg(self, assign_result, num_expected, **kwargs): FILE: mmdet/core/bbox/samplers/mask_pseudo_sampler.py class MaskPseudoSampler (line 13) | class MaskPseudoSampler(BaseSampler): method __init__ (line 16) | def __init__(self, **kwargs): method _sample_pos (line 19) | def _sample_pos(self, **kwargs): method _sample_neg (line 23) | def _sample_neg(self, **kwargs): method sample (line 27) | def sample(self, assign_result, masks, gt_masks, **kwargs): FILE: mmdet/core/bbox/samplers/mask_sampling_result.py class MaskSamplingResult (line 10) | class MaskSamplingResult(SamplingResult): method __init__ (line 13) | def __init__(self, pos_inds, neg_inds, masks, gt_masks, assign_result, method masks (line 37) | def masks(self): method __nice__ (line 41) | def __nice__(self): method info (line 50) | def info(self): FILE: mmdet/core/bbox/samplers/ohem_sampler.py class OHEMSampler (line 10) | class OHEMSampler(BaseSampler): method __init__ (line 16) | def __init__(self, method hard_mining (line 34) | def hard_mining(self, inds, num_expected, bboxes, labels, feats): method _sample_pos (line 55) | def _sample_pos(self, method _sample_neg (line 83) | def _sample_neg(self, FILE: mmdet/core/bbox/samplers/pseudo_sampler.py class PseudoSampler (line 10) | class PseudoSampler(BaseSampler): method __init__ (line 13) | def __init__(self, **kwargs): method _sample_pos (line 16) | def _sample_pos(self, **kwargs): method _sample_neg (line 20) | def _sample_neg(self, **kwargs): method sample (line 24) | def sample(self, assign_result, bboxes, gt_bboxes, *args, **kwargs): FILE: mmdet/core/bbox/samplers/random_sampler.py class RandomSampler (line 9) | class RandomSampler(BaseSampler): method __init__ (line 21) | def __init__(self, method random_choice (line 32) | def random_choice(self, gallery, num): method _sample_pos (line 64) | def _sample_pos(self, assign_result, num_expected, **kwargs): method _sample_neg (line 74) | def _sample_neg(self, assign_result, num_expected, **kwargs): FILE: mmdet/core/bbox/samplers/sampling_result.py class SamplingResult (line 7) | class SamplingResult(util_mixins.NiceRepr): method __init__ (line 26) | def __init__(self, pos_inds, neg_inds, bboxes, gt_bboxes, assign_result, method bboxes (line 53) | def bboxes(self): method to (line 57) | def to(self, device): method __nice__ (line 72) | def __nice__(self): method info (line 81) | def info(self): method random (line 94) | def random(cls, rng=None, **kwargs): FILE: mmdet/core/bbox/samplers/score_hlr_sampler.py class ScoreHLRSampler (line 12) | class ScoreHLRSampler(BaseSampler): method __init__ (line 33) | def __init__(self, method random_choice (line 63) | def random_choice(gallery, num): method _sample_pos (line 92) | def _sample_pos(self, assign_result, num_expected, **kwargs): method _sample_neg (line 100) | def _sample_neg(self, method sample (line 216) | def sample(self, FILE: mmdet/core/bbox/transforms.py function find_inside_bboxes (line 6) | def find_inside_bboxes(bboxes, img_h, img_w): function bbox_flip (line 22) | def bbox_flip(bboxes, img_shape, direction='horizontal'): function bbox_mapping (line 51) | def bbox_mapping(bboxes, function bbox_mapping_back (line 63) | def bbox_mapping_back(bboxes, function bbox2roi (line 75) | def bbox2roi(bbox_list): function roi2bbox (line 97) | def roi2bbox(rois): function bbox2result (line 116) | def bbox2result(bboxes, labels, num_classes): function distance2bbox (line 136) | def distance2bbox(points, distance, max_shape=None): function bbox2distance (line 189) | def bbox2distance(points, bbox, max_dis=None, eps=0.1): function bbox_rescale (line 213) | def bbox_rescale(bboxes, scale_factor=1.0): function bbox_cxcywh_to_xyxy (line 245) | def bbox_cxcywh_to_xyxy(bbox): function bbox_xyxy_to_cxcywh (line 259) | def bbox_xyxy_to_cxcywh(bbox): FILE: mmdet/core/data_structures/general_data.py class GeneralData (line 10) | class GeneralData(NiceRepr): method __init__ (line 87) | def __init__(self, meta_info=None, data=None): method set_meta_info (line 97) | def set_meta_info(self, meta_info): method set_data (line 129) | def set_data(self, data): method new (line 141) | def new(self, meta_info=None, data=None): method keys (line 159) | def keys(self): method meta_info_keys (line 166) | def meta_info_keys(self): method values (line 173) | def values(self): method meta_info_values (line 180) | def meta_info_values(self): method items (line 187) | def items(self): method meta_info_items (line 191) | def meta_info_items(self): method __setattr__ (line 195) | def __setattr__(self, name, val): method __delattr__ (line 211) | def __delattr__(self, item): method __getitem__ (line 228) | def __getitem__(self, name): method get (line 231) | def get(self, *args): method pop (line 235) | def pop(self, *args): method __contains__ (line 252) | def __contains__(self, item): method to (line 257) | def to(self, *args, **kwargs): method cpu (line 267) | def cpu(self): method npu (line 277) | def npu(self): method mlu (line 287) | def mlu(self): method cuda (line 297) | def cuda(self): method detach (line 307) | def detach(self): method numpy (line 317) | def numpy(self): method __nice__ (line 326) | def __nice__(self): FILE: mmdet/core/data_structures/instance_data.py class InstanceData (line 10) | class InstanceData(GeneralData): method __setattr__ (line 66) | def __setattr__(self, name, value): method __getitem__ (line 90) | def __getitem__(self, item): method cat (line 151) | def cat(instances_list): method __len__ (line 183) | def __len__(self): FILE: mmdet/core/evaluation/bbox_overlaps.py function bbox_overlaps (line 5) | def bbox_overlaps(bboxes1, FILE: mmdet/core/evaluation/class_names.py function wider_face_classes (line 5) | def wider_face_classes(): function voc_classes (line 9) | def voc_classes(): function imagenet_det_classes (line 17) | def imagenet_det_classes(): function imagenet_vid_classes (line 58) | def imagenet_vid_classes(): function coco_classes (line 68) | def coco_classes(): function cityscapes_classes (line 86) | def cityscapes_classes(): function oid_challenge_classes (line 93) | def oid_challenge_classes(): function oid_v6_classes (line 188) | def oid_v6_classes(): function objects365v1_classes (line 306) | def objects365v1_classes(): function objects365v2_classes (line 376) | def objects365v2_classes(): function get_classes (line 462) | def get_classes(dataset): FILE: mmdet/core/evaluation/eval_hooks.py function _calc_dynamic_intervals (line 12) | def _calc_dynamic_intervals(start_interval, dynamic_interval_list): class EvalHook (line 24) | class EvalHook(BaseEvalHook): method __init__ (line 26) | def __init__(self, *args, dynamic_intervals=None, **kwargs): method _decide_interval (line 35) | def _decide_interval(self, runner): method before_train_epoch (line 42) | def before_train_epoch(self, runner): method before_train_iter (line 47) | def before_train_iter(self, runner): method _do_evaluate (line 51) | def _do_evaluate(self, runner): class DistEvalHook (line 73) | class DistEvalHook(BaseDistEvalHook): method __init__ (line 75) | def __init__(self, *args, dynamic_intervals=None, **kwargs): method _decide_interval (line 84) | def _decide_interval(self, runner): method before_train_epoch (line 91) | def before_train_epoch(self, runner): method before_train_iter (line 96) | def before_train_iter(self, runner): method _do_evaluate (line 100) | def _do_evaluate(self, runner): FILE: mmdet/core/evaluation/mean_ap.py function average_precision (line 13) | def average_precision(recalls, precisions, mode='area'): function tpfp_imagenet (line 60) | def tpfp_imagenet(det_bboxes, function tpfp_default (line 169) | def tpfp_default(det_bboxes, function tpfp_openimages (line 272) | def tpfp_openimages(det_bboxes, function get_cls_results (line 477) | def get_cls_results(det_results, annotations, class_id): function get_cls_group_ofs (line 504) | def get_cls_group_ofs(annotations, class_id): function eval_map (line 525) | def eval_map(det_results, function print_map_summary (line 717) | def print_map_summary(mean_ap, FILE: mmdet/core/evaluation/recall.py function _recalls (line 11) | def _recalls(all_ious, proposal_nums, thrs): function set_recall_param (line 44) | def set_recall_param(proposal_nums, iou_thrs): function eval_recalls (line 65) | def eval_recalls(gts, function print_recall_summary (line 117) | def print_recall_summary(recalls, function plot_num_recall (line 150) | def plot_num_recall(recalls, proposal_nums): function plot_iou_recall (line 175) | def plot_iou_recall(recalls, iou_thrs): FILE: mmdet/core/export/model_wrappers.py class DeployBaseDetector (line 12) | class DeployBaseDetector(BaseDetector): method __init__ (line 15) | def __init__(self, class_names, device_id): method simple_test (line 20) | def simple_test(self, img, img_metas, **kwargs): method aug_test (line 23) | def aug_test(self, imgs, img_metas, **kwargs): method extract_feat (line 26) | def extract_feat(self, imgs): method forward_train (line 29) | def forward_train(self, imgs, img_metas, **kwargs): method val_step (line 32) | def val_step(self, data, optimizer): method train_step (line 35) | def train_step(self, data, optimizer): method forward_test (line 38) | def forward_test(self, *, img, img_metas, **kwargs): method async_simple_test (line 41) | def async_simple_test(self, img, img_metas, **kwargs): method forward (line 44) | def forward(self, img, img_metas, return_loss=True, **kwargs): class ONNXRuntimeDetector (line 96) | class ONNXRuntimeDetector(DeployBaseDetector): method __init__ (line 99) | def __init__(self, onnx_file, class_names, device_id): method forward_test (line 130) | def forward_test(self, imgs, img_metas, **kwargs): class TensorRTDetector (line 152) | class TensorRTDetector(DeployBaseDetector): method __init__ (line 155) | def __init__(self, engine_file, class_names, device_id, output_names=N... method forward_test (line 177) | def forward_test(self, imgs, img_metas, **kwargs): FILE: mmdet/core/export/onnx_helper.py function dynamic_clip_for_onnx (line 7) | def dynamic_clip_for_onnx(x1, y1, x2, y2, max_shape): function get_k_for_topk (line 46) | def get_k_for_topk(k, size): function add_dummy_nms_for_onnx (line 82) | def add_dummy_nms_for_onnx(boxes, class DummyONNXNMSop (line 201) | class DummyONNXNMSop(torch.autograd.Function): method forward (line 208) | def forward(ctx, boxes, scores, max_output_boxes_per_class, iou_thresh... method symbolic (line 214) | def symbolic(g, boxes, scores, max_output_boxes_per_class, iou_threshold, FILE: mmdet/core/export/pytorch2onnx.py function generate_inputs_and_wrap_model (line 10) | def generate_inputs_and_wrap_model(config_path, function build_model_from_cfg (line 65) | def build_model_from_cfg(config_path, checkpoint_path, cfg_options=None): function preprocess_example_input (line 102) | def preprocess_example_input(input_config): FILE: mmdet/core/hook/checkloss_hook.py class CheckInvalidLossHook (line 7) | class CheckInvalidLossHook(Hook): method __init__ (line 18) | def __init__(self, interval=50): method after_train_iter (line 21) | def after_train_iter(self, runner): FILE: mmdet/core/hook/ema.py class BaseEMAHook (line 8) | class BaseEMAHook(Hook): method __init__ (line 32) | def __init__(self, method before_run (line 45) | def before_run(self, runner): method get_momentum (line 67) | def get_momentum(self, runner): method after_train_iter (line 71) | def after_train_iter(self, runner): method after_train_epoch (line 84) | def after_train_epoch(self, runner): method before_train_epoch (line 89) | def before_train_epoch(self, runner): method _swap_ema_parameters (line 94) | def _swap_ema_parameters(self): class ExpMomentumEMAHook (line 104) | class ExpMomentumEMAHook(BaseEMAHook): method __init__ (line 112) | def __init__(self, total_iter=2000, **kwargs): class LinearMomentumEMAHook (line 119) | class LinearMomentumEMAHook(BaseEMAHook): method __init__ (line 127) | def __init__(self, warm_up=100, **kwargs): FILE: mmdet/core/hook/memory_profiler_hook.py class MemoryProfilerHook (line 6) | class MemoryProfilerHook(Hook): method __init__ (line 15) | def __init__(self, interval=50): method after_iter (line 34) | def after_iter(self, runner): FILE: mmdet/core/hook/set_epoch_info_hook.py class SetEpochInfoHook (line 7) | class SetEpochInfoHook(Hook): method before_train_epoch (line 10) | def before_train_epoch(self, runner): FILE: mmdet/core/hook/sync_norm_hook.py function get_norm_states (line 11) | def get_norm_states(module): class SyncNormHook (line 21) | class SyncNormHook(Hook): method __init__ (line 30) | def __init__(self, num_last_epochs=15, interval=1): method before_train_epoch (line 34) | def before_train_epoch(self, runner): method after_train_epoch (line 40) | def after_train_epoch(self, runner): FILE: mmdet/core/hook/sync_random_size_hook.py class SyncRandomSizeHook (line 12) | class SyncRandomSizeHook(Hook): method __init__ (line 33) | def __init__(self, method after_train_epoch (line 52) | def after_train_epoch(self, runner): FILE: mmdet/core/hook/wandblogger_hook.py class MMDetWandbHook (line 21) | class MMDetWandbHook(WandbLoggerHook): method __init__ (line 95) | def __init__(self, method import_wandb (line 114) | def import_wandb(self): method before_run (line 134) | def before_run(self, runner): method after_train_epoch (line 206) | def after_train_epoch(self, runner): method after_train_iter (line 240) | def after_train_iter(self, runner): method _after_train_iter (line 252) | def _after_train_iter(self, runner): method after_run (line 283) | def after_run(self, runner): method _update_wandb_config (line 286) | def _update_wandb_config(self, runner): method _log_ckpt_as_artifact (line 298) | def _log_ckpt_as_artifact(self, model_path, aliases, metadata=None): method _get_eval_results (line 311) | def _get_eval_results(self): method _init_data_table (line 318) | def _init_data_table(self): method _init_pred_table (line 323) | def _init_pred_table(self): method _add_ground_truth (line 328) | def _add_ground_truth(self, runner): method _log_predictions (line 403) | def _log_predictions(self, results): method _get_wandb_bboxes (line 463) | def _get_wandb_bboxes(self, bboxes, labels, log_gt=True): method _get_wandb_masks (line 515) | def _get_wandb_masks(self, method _log_data_table (line 563) | def _log_data_table(self): method _log_eval_table (line 580) | def _log_eval_table(self, idx): FILE: mmdet/core/hook/yolox_lrupdater_hook.py class YOLOXLrUpdaterHook (line 8) | class YOLOXLrUpdaterHook(CosineAnnealingLrUpdaterHook): method __init__ (line 23) | def __init__(self, num_last_epochs, **kwargs): method get_warmup_lr (line 27) | def get_warmup_lr(self, cur_iters): method get_lr (line 44) | def get_lr(self, runner, base_lr): FILE: mmdet/core/hook/yolox_mode_switch_hook.py class YOLOXModeSwitchHook (line 7) | class YOLOXModeSwitchHook(Hook): method __init__ (line 21) | def __init__(self, method before_train_epoch (line 28) | def before_train_epoch(self, runner): FILE: mmdet/core/mask/mask_target.py function mask_target (line 7) | def mask_target(pos_proposals_list, pos_assigned_gt_inds_list, gt_masks_... function mask_target_single (line 67) | def mask_target_single(pos_proposals, pos_assigned_gt_inds, gt_masks, cfg): FILE: mmdet/core/mask/structures.py class BaseInstanceMasks (line 12) | class BaseInstanceMasks(metaclass=ABCMeta): method rescale (line 16) | def rescale(self, scale, interpolation='nearest'): method resize (line 29) | def resize(self, out_shape, interpolation='nearest'): method flip (line 41) | def flip(self, flip_direction='horizontal'): method pad (line 52) | def pad(self, out_shape, pad_val): method crop (line 64) | def crop(self, bbox): method crop_and_resize (line 75) | def crop_and_resize(self, method expand (line 104) | def expand(self, expanded_h, expanded_w, top, left): method areas (line 109) | def areas(self): method to_ndarray (line 113) | def to_ndarray(self): method to_tensor (line 121) | def to_tensor(self, dtype, device): method translate (line 133) | def translate(self, method shear (line 153) | def shear(self, method rotate (line 175) | def rotate(self, out_shape, angle, center=None, scale=1.0, fill_val=0): class BitmapMasks (line 193) | class BitmapMasks(BaseInstanceMasks): method __init__ (line 222) | def __init__(self, masks, height, width): method __getitem__ (line 239) | def __getitem__(self, index): method __iter__ (line 251) | def __iter__(self): method __repr__ (line 254) | def __repr__(self): method __len__ (line 261) | def __len__(self): method rescale (line 265) | def rescale(self, scale, interpolation='nearest'): method resize (line 278) | def resize(self, out_shape, interpolation='nearest'): method flip (line 290) | def flip(self, flip_direction='horizontal'): method pad (line 303) | def pad(self, out_shape, pad_val=0): method crop (line 314) | def crop(self, bbox): method crop_and_resize (line 333) | def crop_and_resize(self, method expand (line 369) | def expand(self, expanded_h, expanded_w, top, left): method translate (line 381) | def translate(self, method shear (line 431) | def shear(self, method rotate (line 466) | def rotate(self, out_shape, angle, center=None, scale=1.0, fill_val=0): method areas (line 499) | def areas(self): method to_ndarray (line 503) | def to_ndarray(self): method to_tensor (line 507) | def to_tensor(self, dtype, device): method random (line 512) | def random(cls, method get_bboxes (line 532) | def get_bboxes(self): class PolygonMasks (line 548) | class PolygonMasks(BaseInstanceMasks): method __init__ (line 588) | def __init__(self, masks, height, width): method __getitem__ (line 598) | def __getitem__(self, index): method __iter__ (line 621) | def __iter__(self): method __repr__ (line 624) | def __repr__(self): method __len__ (line 631) | def __len__(self): method rescale (line 635) | def rescale(self, scale, interpolation=None): method resize (line 644) | def resize(self, out_shape, interpolation=None): method flip (line 663) | def flip(self, flip_direction='horizontal'): method crop (line 687) | def crop(self, bbox): method pad (line 716) | def pad(self, out_shape, pad_val=0): method expand (line 720) | def expand(self, *args, **kwargs): method crop_and_resize (line 724) | def crop_and_resize(self, method translate (line 765) | def translate(self, method shear (line 799) | def shear(self, method rotate (line 831) | def rotate(self, out_shape, angle, center=None, scale=1.0, fill_val=0): method to_bitmap (line 860) | def to_bitmap(self): method areas (line 866) | def areas(self): method _polygon_area (line 884) | def _polygon_area(self, x, y): method to_ndarray (line 900) | def to_ndarray(self): method to_tensor (line 910) | def to_tensor(self, dtype, device): method random (line 920) | def random(cls, method get_bboxes (line 1039) | def get_bboxes(self): function polygon_to_bitmap (line 1058) | def polygon_to_bitmap(polygons, height, width): function bitmap_to_polygon (line 1075) | def bitmap_to_polygon(bitmap): FILE: mmdet/core/mask/utils.py function split_combined_polys (line 8) | def split_combined_polys(polys, poly_lens, polys_per_mask): function encode_mask_results (line 38) | def encode_mask_results(mask_results): function mask2bbox (line 68) | def mask2bbox(masks): FILE: mmdet/core/optimizers/builder.py function build_optimizer_constructor (line 11) | def build_optimizer_constructor(cfg): function build_optimizer (line 22) | def build_optimizer(model, cfg): FILE: mmdet/core/optimizers/layer_decay_optimizer_constructor.py function get_layer_id_for_convnext (line 10) | def get_layer_id_for_convnext(var_name, max_layer_id): function get_stage_id_for_convnext (line 53) | def get_stage_id_for_convnext(var_name, max_stage_id): class LearningRateDecayOptimizerConstructor (line 79) | class LearningRateDecayOptimizerConstructor(DefaultOptimizerConstructor): method add_params (line 83) | def add_params(self, params, module, **kwargs): FILE: mmdet/core/post_processing/bbox_nms.py function multiclass_nms (line 8) | def multiclass_nms(multi_bboxes, function fast_nms (line 98) | def fast_nms(multi_bboxes, FILE: mmdet/core/post_processing/matrix_nms.py function mask_matrix_nms (line 5) | def mask_matrix_nms(masks, FILE: mmdet/core/post_processing/merge_augs.py function merge_aug_proposals (line 13) | def merge_aug_proposals(aug_proposals, img_metas, cfg): function merge_aug_bboxes (line 84) | def merge_aug_bboxes(aug_bboxes, aug_scores, img_metas, rcnn_test_cfg): function merge_aug_scores (line 113) | def merge_aug_scores(aug_scores): function merge_aug_masks (line 121) | def merge_aug_masks(aug_masks, img_metas, rcnn_test_cfg, weights=None): FILE: mmdet/core/utils/dist_utils.py function _allreduce_coalesced (line 15) | def _allreduce_coalesced(tensors, world_size, bucket_size_mb=-1): function allreduce_grads (line 37) | def allreduce_grads(params, coalesce=True, bucket_size_mb=-1): class DistOptimizerHook (line 59) | class DistOptimizerHook(OptimizerHook): method __init__ (line 62) | def __init__(self, *args, **kwargs): function reduce_mean (line 68) | def reduce_mean(tensor): function obj2tensor (line 77) | def obj2tensor(pyobj, device='cuda'): function tensor2obj (line 83) | def tensor2obj(tensor): function _get_global_gloo_group (line 89) | def _get_global_gloo_group(): function all_reduce_dict (line 98) | def all_reduce_dict(py_dict, op='sum', group=None, to_float=True): function sync_random_seed (line 157) | def sync_random_seed(seed=None, device='cuda'): FILE: mmdet/core/utils/misc.py function multi_apply (line 11) | def multi_apply(func, *args, **kwargs): function unmap (line 33) | def unmap(data, count, inds, fill=0): function mask2ndarray (line 46) | def mask2ndarray(mask): function flip_tensor (line 65) | def flip_tensor(src_tensor, flip_direction): function select_single_mlvl (line 88) | def select_single_mlvl(mlvl_tensors, batch_id, detach=True): function filter_scores_and_topk (line 119) | def filter_scores_and_topk(scores, score_thr, topk, results=None): function center_of_mass (line 168) | def center_of_mass(mask, esp=1e-6): function generate_coordinate (line 190) | def generate_coordinate(featmap_sizes, device='cuda'): FILE: mmdet/core/visualization/image.py function color_val_matplotlib (line 25) | def color_val_matplotlib(color): function _get_adaptive_scales (line 40) | def _get_adaptive_scales(areas, min_area=800, max_area=30000): function _get_bias_color (line 63) | def _get_bias_color(base, max_dist=30): function draw_bboxes (line 81) | def draw_bboxes(ax, bboxes, color='g', alpha=0.8, thickness=2): function draw_labels (line 114) | def draw_labels(ax, function draw_masks (line 166) | def draw_masks(ax, img, masks, color=None, with_edge=True, alpha=0.8): function imshow_det_bboxes (line 208) | def imshow_det_bboxes(img, function imshow_gt_det_bboxes (line 380) | def imshow_gt_det_bboxes(img, FILE: mmdet/core/visualization/palette.py function palette_val (line 6) | def palette_val(palette): function get_palette (line 22) | def get_palette(palette, num_classes): FILE: mmdet/datasets/api_wrappers/coco_api.py class COCO (line 11) | class COCO(_COCO): method __init__ (line 18) | def __init__(self, annotation_file=None): method get_ann_ids (line 27) | def get_ann_ids(self, img_ids=[], cat_ids=[], area_rng=[], iscrowd=None): method get_cat_ids (line 30) | def get_cat_ids(self, cat_names=[], sup_names=[], cat_ids=[]): method get_img_ids (line 33) | def get_img_ids(self, img_ids=[], cat_ids=[]): method load_anns (line 36) | def load_anns(self, ids): method load_cats (line 39) | def load_cats(self, ids): method load_imgs (line 42) | def load_imgs(self, ids): FILE: mmdet/datasets/api_wrappers/panoptic_evaluation.py function pq_compute_single_core (line 23) | def pq_compute_single_core(proc_id, function pq_compute_multi_core (line 173) | def pq_compute_multi_core(matched_annotations_list, FILE: mmdet/datasets/builder.py function _concat_dataset (line 32) | def _concat_dataset(cfg, default_args=None): function build_dataset (line 59) | def build_dataset(cfg, default_args=None): function build_dataloader (line 87) | def build_dataloader(dataset, function worker_init_fn (line 209) | def worker_init_fn(worker_id, num_workers, rank, seed): FILE: mmdet/datasets/cityscapes.py class CityscapesDataset (line 21) | class CityscapesDataset(CocoDataset): method _filter_imgs (line 29) | def _filter_imgs(self, min_size=32): method _parse_ann_info (line 57) | def _parse_ann_info(self, img_info, ann_info): method results2txt (line 111) | def results2txt(self, results, outfile_prefix): method format_results (line 177) | def format_results(self, results, txtfile_prefix=None): method evaluate (line 211) | def evaluate(self, method _evaluate_cityscapes (line 279) | def _evaluate_cityscapes(self, results, txtfile_prefix, logger): FILE: mmdet/datasets/coco.py class CocoDataset (line 23) | class CocoDataset(CustomDataset): method load_annotations (line 62) | def load_annotations(self, ann_file): method get_ann_info (line 91) | def get_ann_info(self, idx): method get_cat_ids (line 106) | def get_cat_ids(self, idx): method _filter_imgs (line 121) | def _filter_imgs(self, min_size=32): method _parse_ann_info (line 145) | def _parse_ann_info(self, img_info, ann_info): method xyxy2xywh (line 204) | def xyxy2xywh(self, bbox): method _proposal2json (line 224) | def _proposal2json(self, results): method _det2json (line 239) | def _det2json(self, results): method _segm2json (line 256) | def _segm2json(self, results): method results2json (line 294) | def results2json(self, results, outfile_prefix): method fast_eval_recall (line 334) | def fast_eval_recall(self, results, proposal_nums, iou_thrs, logger=No... method format_results (line 358) | def format_results(self, results, jsonfile_prefix=None, **kwargs): method evaluate_det_segm (line 386) | def evaluate_det_segm(self, method evaluate (line 592) | def evaluate(self, FILE: mmdet/datasets/coco_occluded.py class OccludedSeparatedCocoDataset (line 16) | class OccludedSeparatedCocoDataset(CocoDataset): method __init__ (line 49) | def __init__( method evaluate (line 66) | def evaluate(self, method evaluate_occluded_separated (line 92) | def evaluate_occluded_separated(self, method compute_recall (line 156) | def compute_recall(self, method mask_iou (line 213) | def mask_iou(self, mask1, mask2): FILE: mmdet/datasets/coco_panoptic.py class COCOPanoptic (line 28) | class COCOPanoptic(COCO): method __init__ (line 37) | def __init__(self, annotation_file=None): method createIndex (line 46) | def createIndex(self): method load_anns (line 89) | def load_anns(self, ids=[]): class CocoPanopticDataset (line 114) | class CocoPanopticDataset(CocoDataset): method __init__ (line 259) | def __init__(self, method load_annotations (line 284) | def load_annotations(self, ann_file): method get_ann_info (line 306) | def get_ann_info(self, idx): method _parse_ann_info (line 322) | def _parse_ann_info(self, img_info, ann_info): method _filter_imgs (line 385) | def _filter_imgs(self, min_size=32): method _pan2json (line 410) | def _pan2json(self, results, outfile_prefix): method results2json (line 452) | def results2json(self, results, outfile_prefix): method evaluate_pan_json (line 503) | def evaluate_pan_json(self, method evaluate (line 568) | def evaluate(self, function parse_pq_results (line 641) | def parse_pq_results(pq_results): function print_panoptic_table (line 656) | def print_panoptic_table(pq_results, classwise_results=None, logger=None): FILE: mmdet/datasets/custom.py class CustomDataset (line 18) | class CustomDataset(Dataset): method __init__ (line 59) | def __init__(self, method __len__ (line 133) | def __len__(self): method load_annotations (line 137) | def load_annotations(self, ann_file): method load_proposals (line 141) | def load_proposals(self, proposal_file): method get_ann_info (line 145) | def get_ann_info(self, idx): method get_cat_ids (line 157) | def get_cat_ids(self, idx): method pre_pipeline (line 169) | def pre_pipeline(self, results): method _filter_imgs (line 178) | def _filter_imgs(self, min_size=32): method _set_group_flag (line 189) | def _set_group_flag(self): method _rand_another (line 201) | def _rand_another(self, idx): method __getitem__ (line 206) | def __getitem__(self, idx): method prepare_train_img (line 226) | def prepare_train_img(self, idx): method prepare_test_img (line 245) | def prepare_test_img(self, idx): method get_classes (line 264) | def get_classes(cls, classes=None): method get_cat2imgs (line 290) | def get_cat2imgs(self): method format_results (line 309) | def format_results(self, results, **kwargs): method evaluate (line 312) | def evaluate(self, method __repr__ (line 371) | def __repr__(self): FILE: mmdet/datasets/dataset_wrappers.py class ConcatDataset (line 17) | class ConcatDataset(_ConcatDataset): method __init__ (line 30) | def __init__(self, datasets, separate_eval=True): method get_cat_ids (line 50) | def get_cat_ids(self, idx): method get_ann_info (line 72) | def get_ann_info(self, idx): method evaluate (line 94) | def evaluate(self, results, logger=None, **kwargs): class RepeatDataset (line 154) | class RepeatDataset: method __init__ (line 167) | def __init__(self, dataset, times): method __getitem__ (line 177) | def __getitem__(self, idx): method get_cat_ids (line 180) | def get_cat_ids(self, idx): method get_ann_info (line 192) | def get_ann_info(self, idx): method __len__ (line 204) | def __len__(self): class ClassBalancedDataset (line 211) | class ClassBalancedDataset: method __init__ (line 247) | def __init__(self, dataset, oversample_thr, filter_empty_gt=True): method _get_repeat_factors (line 267) | def _get_repeat_factors(self, dataset, repeat_thr): method __getitem__ (line 316) | def __getitem__(self, idx): method get_ann_info (line 320) | def get_ann_info(self, idx): method __len__ (line 332) | def __len__(self): class MultiImageMixDataset (line 338) | class MultiImageMixDataset: method __init__ (line 362) | def __init__(self, method __len__ (line 398) | def __len__(self): method __getitem__ (line 401) | def __getitem__(self, idx): method update_skip_type_keys (line 446) | def update_skip_type_keys(self, skip_type_keys): FILE: mmdet/datasets/deepfashion.py class DeepFashionDataset (line 7) | class DeepFashionDataset(CocoDataset): FILE: mmdet/datasets/lvis.py class LVISV05Dataset (line 18) | class LVISV05Dataset(CocoDataset): method load_annotations (line 272) | def load_annotations(self, ann_file): method evaluate (line 311) | def evaluate(self, class LVISV1Dataset (line 475) | class LVISV1Dataset(LVISDataset): method load_annotations (line 717) | def load_annotations(self, ann_file): FILE: mmdet/datasets/objects365.py class Objects365V1Dataset (line 17) | class Objects365V1Dataset(CocoDataset): method load_annotations (line 88) | def load_annotations(self, ann_file): class Objects365V2Dataset (line 127) | class Objects365V2Dataset(CocoDataset): method load_annotations (line 199) | def load_annotations(self, ann_file): FILE: mmdet/datasets/openimages.py class OpenImagesDataset (line 21) | class OpenImagesDataset(CustomDataset): method __init__ (line 63) | def __init__(self, method get_classes_from_csv (line 127) | def get_classes_from_csv(self, label_file): method load_annotations (line 150) | def load_annotations(self, ann_file): method get_ann_info (line 220) | def get_ann_info(self, idx): method get_meta_from_file (line 291) | def get_meta_from_file(self, meta_file=''): method get_meta_from_pipeline (line 308) | def get_meta_from_pipeline(self, results): method get_img_shape (line 319) | def get_img_shape(self, metas): method prepare_test_img (line 332) | def prepare_test_img(self, idx): method _filter_imgs (line 344) | def _filter_imgs(self, min_size=32): method _set_group_flag (line 352) | def _set_group_flag(self): method get_relation_matrix (line 357) | def get_relation_matrix(self, hierarchy_file): method _convert_hierarchy_tree (line 380) | def _convert_hierarchy_tree(self, method add_supercategory_ann (line 426) | def add_supercategory_ann(self, annotations): method process_results (line 457) | def process_results(self, det_results, annotations, method load_image_label_from_csv (line 503) | def load_image_label_from_csv(self, image_level_ann_file): method get_image_level_ann (line 538) | def get_image_level_ann(self, image_level_ann_file): method denormalize_gt_bboxes (line 591) | def denormalize_gt_bboxes(self, annotations): method get_cat_ids (line 604) | def get_cat_ids(self, idx): method evaluate (line 615) | def evaluate(self, class OpenImagesChallengeDataset (line 727) | class OpenImagesChallengeDataset(OpenImagesDataset): method __init__ (line 730) | def __init__(self, ann_file, **kwargs): method get_classes_from_csv (line 735) | def get_classes_from_csv(self, label_file): method load_annotations (line 765) | def load_annotations(self, ann_file): method prepare_train_img (line 805) | def prepare_train_img(self, idx): method prepare_test_img (line 817) | def prepare_test_img(self, idx): method get_relation_matrix (line 830) | def get_relation_matrix(self, hierarchy_file): method get_ann_info (line 844) | def get_ann_info(self, idx): method load_image_label_from_csv (line 857) | def load_image_label_from_csv(self, image_level_ann_file): FILE: mmdet/datasets/pipelines/auto_augment.py function level_to_value (line 14) | def level_to_value(level, max_value): function enhance_level_to_value (line 19) | def enhance_level_to_value(level, a=1.8, b=0.1): function random_negative (line 24) | def random_negative(value, random_negative_prob): function bbox2fields (line 29) | def bbox2fields(): class AutoAugment (line 47) | class AutoAugment: method __init__ (line 90) | def __init__(self, policies): method __call__ (line 104) | def __call__(self, results): method __repr__ (line 108) | def __repr__(self): class Shear (line 113) | class Shear: method __init__ (line 136) | def __init__(self, method _shear_img (line 180) | def _shear_img(self, method _shear_bboxes (line 205) | def _shear_bboxes(self, results, magnitude): method _shear_masks (line 235) | def _shear_masks(self, method _shear_seg (line 251) | def _shear_seg(self, method _filter_invalid (line 267) | def _filter_invalid(self, results, min_bbox_size=0): method __call__ (line 286) | def __call__(self, results): method __repr__ (line 317) | def __repr__(self): class Rotate (line 331) | class Rotate: method __init__ (line 357) | def __init__(self, method _rotate_img (line 408) | def _rotate_img(self, results, angle, center=None, scale=1.0): method _rotate_bboxes (line 427) | def _rotate_bboxes(self, results, rotate_matrix): method _rotate_masks (line 462) | def _rotate_masks(self, method _rotate_seg (line 474) | def _rotate_seg(self, method _filter_invalid (line 487) | def _filter_invalid(self, results, min_bbox_size=0): method __call__ (line 506) | def __call__(self, results): method __repr__ (line 532) | def __repr__(self): class Translate (line 546) | class Translate: method __init__ (line 572) | def __init__(self, method _translate_img (line 613) | def _translate_img(self, results, offset, direction='horizontal'): method _translate_bboxes (line 628) | def _translate_bboxes(self, results, offset): method _translate_masks (line 646) | def _translate_masks(self, method _translate_seg (line 657) | def _translate_seg(self, method _filter_invalid (line 668) | def _filter_invalid(self, results, min_size=0): method __call__ (line 687) | def __call__(self, results): class ColorTransform (line 713) | class ColorTransform: method __init__ (line 722) | def __init__(self, level, prob=0.5): method _adjust_color_img (line 733) | def _adjust_color_img(self, results, factor=1.0): method __call__ (line 740) | def __call__(self, results): method __repr__ (line 754) | def __repr__(self): class EqualizeTransform (line 762) | class EqualizeTransform: method __init__ (line 770) | def __init__(self, prob=0.5): method _imequalize (line 775) | def _imequalize(self, results): method __call__ (line 781) | def __call__(self, results): method __repr__ (line 795) | def __repr__(self): class BrightnessTransform (line 801) | class BrightnessTransform: method __init__ (line 810) | def __init__(self, level, prob=0.5): method _adjust_brightness_img (line 821) | def _adjust_brightness_img(self, results, factor=1.0): method __call__ (line 828) | def __call__(self, results): method __repr__ (line 842) | def __repr__(self): class ContrastTransform (line 850) | class ContrastTransform: method __init__ (line 859) | def __init__(self, level, prob=0.5): method _adjust_contrast_img (line 870) | def _adjust_contrast_img(self, results, factor=1.0): method __call__ (line 876) | def __call__(self, results): method __repr__ (line 890) | def __repr__(self): FILE: mmdet/datasets/pipelines/compose.py class Compose (line 10) | class Compose: method __init__ (line 18) | def __init__(self, transforms): method __call__ (line 30) | def __call__(self, data): method __repr__ (line 46) | def __repr__(self): FILE: mmdet/datasets/pipelines/formatting.py function to_tensor (line 12) | def to_tensor(data): class ToTensor (line 38) | class ToTensor: method __init__ (line 45) | def __init__(self, keys): method __call__ (line 48) | def __call__(self, results): method __repr__ (line 62) | def __repr__(self): class ImageToTensor (line 67) | class ImageToTensor: method __init__ (line 78) | def __init__(self, keys): method __call__ (line 81) | def __call__(self, results): method __repr__ (line 99) | def __repr__(self): class Transpose (line 104) | class Transpose: method __init__ (line 112) | def __init__(self, keys, order): method __call__ (line 116) | def __call__(self, results): method __repr__ (line 130) | def __repr__(self): class ToDataContainer (line 136) | class ToDataContainer: method __init__ (line 147) | def __init__(self, method __call__ (line 152) | def __call__(self, results): method __repr__ (line 170) | def __repr__(self): class DefaultFormatBundle (line 175) | class DefaultFormatBundle: method __init__ (line 200) | def __init__(self, method __call__ (line 206) | def __call__(self, results): method _add_default_meta_keys (line 259) | def _add_default_meta_keys(self, results): method __repr__ (line 284) | def __repr__(self): class Collect (line 290) | class Collect: method __init__ (line 329) | def __init__(self, method __call__ (line 337) | def __call__(self, results): method __repr__ (line 360) | def __repr__(self): class WrapFieldsToLists (line 366) | class WrapFieldsToLists: method __call__ (line 386) | def __call__(self, results): method __repr__ (line 402) | def __repr__(self): FILE: mmdet/datasets/pipelines/instaboost.py class InstaBoost (line 8) | class InstaBoost: method __init__ (line 35) | def __init__(self, method _load_anns (line 56) | def _load_anns(self, results): method _parse_anns (line 78) | def _parse_anns(self, results, anns, img): method __call__ (line 99) | def __call__(self, results): method __repr__ (line 115) | def __repr__(self): FILE: mmdet/datasets/pipelines/loading.py class LoadImageFromFile (line 18) | class LoadImageFromFile: method __init__ (line 37) | def __init__(self, method __call__ (line 48) | def __call__(self, results): method __repr__ (line 81) | def __repr__(self): class LoadImageFromWebcam (line 91) | class LoadImageFromWebcam(LoadImageFromFile): method __call__ (line 98) | def __call__(self, results): class LoadMultiChannelImageFromFiles (line 123) | class LoadMultiChannelImageFromFiles: method __init__ (line 143) | def __init__(self, method __call__ (line 152) | def __call__(self, results): method __repr__ (line 197) | def __repr__(self): class LoadAnnotations (line 206) | class LoadAnnotations: method __init__ (line 228) | def __init__(self, method _load_bboxes (line 245) | def _load_bboxes(self, results): method _load_labels (line 277) | def _load_labels(self, results): method _poly2mask (line 290) | def _poly2mask(self, mask_ann, img_h, img_w): method process_polygons (line 317) | def process_polygons(self, polygons): method _load_masks (line 334) | def _load_masks(self, results): method _load_semantic_seg (line 359) | def _load_semantic_seg(self, results): method __call__ (line 380) | def __call__(self, results): method __repr__ (line 403) | def __repr__(self): class LoadPanopticAnnotations (line 415) | class LoadPanopticAnnotations(LoadAnnotations): method __init__ (line 432) | def __init__(self, method _load_masks_and_semantic_segs (line 453) | def _load_masks_and_semantic_segs(self, results): method __call__ (line 500) | def __call__(self, results): class LoadProposals (line 526) | class LoadProposals: method __init__ (line 536) | def __init__(self, num_max_proposals=None): method __call__ (line 539) | def __call__(self, results): method __repr__ (line 565) | def __repr__(self): class FilterAnnotations (line 571) | class FilterAnnotations: method __init__ (line 587) | def __init__(self, method __call__ (line 601) | def __call__(self, results): method __repr__ (line 639) | def __repr__(self): FILE: mmdet/datasets/pipelines/test_time_aug.py class MultiScaleFlipAug (line 11) | class MultiScaleFlipAug: method __init__ (line 54) | def __init__(self, method __call__ (line 85) | def __call__(self, results): method __repr__ (line 116) | def __repr__(self): FILE: mmdet/datasets/pipelines/transforms.py class Resize (line 31) | class Resize: method __init__ (line 76) | def __init__(self, method random_select (line 111) | def random_select(img_scales): method random_sample (line 129) | def random_sample(img_scales): method random_sample_ratio (line 156) | def random_sample_ratio(img_scale, ratio_range): method _random_scale (line 182) | def _random_scale(self, results): method _resize_img (line 215) | def _resize_img(self, results): method _resize_bboxes (line 248) | def _resize_bboxes(self, results): method _resize_masks (line 258) | def _resize_masks(self, results): method _resize_seg (line 268) | def _resize_seg(self, results): method __call__ (line 285) | def __call__(self, results): method __repr__ (line 322) | def __repr__(self): class RandomFlip (line 333) | class RandomFlip: method __init__ (line 370) | def __init__(self, flip_ratio=None, direction='horizontal'): method bbox_flip (line 396) | def bbox_flip(self, bboxes, img_shape, direction): method __call__ (line 430) | def __call__(self, results): method __repr__ (line 485) | def __repr__(self): class RandomShift (line 490) | class RandomShift: method __init__ (line 501) | def __init__(self, shift_ratio=0.5, max_shift_px=32, filter_thr_px=1): method __call__ (line 513) | def __call__(self, results): method __repr__ (line 573) | def __repr__(self): class Pad (line 580) | class Pad: method __init__ (line 596) | def __init__(self, method _pad_img (line 622) | def _pad_img(self, results): method _pad_masks (line 640) | def _pad_masks(self, results): method _pad_seg (line 647) | def _pad_seg(self, results): method __call__ (line 655) | def __call__(self, results): method __repr__ (line 669) | def __repr__(self): class Normalize (line 679) | class Normalize: method __init__ (line 691) | def __init__(self, mean, std, to_rgb=True): method __call__ (line 696) | def __call__(self, results): method __repr__ (line 713) | def __repr__(self): class RandomCrop (line 720) | class RandomCrop: method __init__ (line 756) | def __init__(self, method _crop_data (line 787) | def _crop_data(self, results, crop_size, allow_negative_crop): method _get_crop_size (line 854) | def _get_crop_size(self, image_size): method __call__ (line 884) | def __call__(self, results): method __repr__ (line 900) | def __repr__(self): class SegRescale (line 910) | class SegRescale: method __init__ (line 920) | def __init__(self, scale_factor=1, backend='cv2'): method __call__ (line 924) | def __call__(self, results): method __repr__ (line 943) | def __repr__(self): class PhotoMetricDistortion (line 948) | class PhotoMetricDistortion: method __init__ (line 969) | def __init__(self, method __call__ (line 979) | def __call__(self, results): method __repr__ (line 1040) | def __repr__(self): class Expand (line 1052) | class Expand: method __init__ (line 1065) | def __init__(self, method __call__ (line 1081) | def __call__(self, results): method __repr__ (line 1135) | def __repr__(self): class MinIoURandomCrop (line 1144) | class MinIoURandomCrop: method __init__ (line 1163) | def __init__(self, method __call__ (line 1181) | def __call__(self, results): method __repr__ (line 1275) | def __repr__(self): class Corrupt (line 1284) | class Corrupt: method __init__ (line 1295) | def __init__(self, corruption, severity=1): method __call__ (line 1299) | def __call__(self, results): method __repr__ (line 1320) | def __repr__(self): class Albu (line 1328) | class Albu: method __init__ (line 1370) | def __init__(self, method albu_builder (line 1413) | def albu_builder(self, cfg): method mapper (line 1448) | def mapper(d, keymap): method __call__ (line 1464) | def __call__(self, results): method __repr__ (line 1526) | def __repr__(self): class RandomCenterCropPad (line 1532) | class RandomCenterCropPad: method __init__ (line 1620) | def __init__(self, method _get_border (line 1666) | def _get_border(self, border, size): method _filter_boxes (line 1685) | def _filter_boxes(self, patch, boxes): method _crop_image_and_paste (line 1701) | def _crop_image_and_paste(self, image, center, size): method _train_aug (line 1752) | def _train_aug(self, results): method _test_aug (line 1820) | def _test_aug(self, results): method __call__ (line 1854) | def __call__(self, results): method __repr__ (line 1866) | def __repr__(self): class CutOut (line 1881) | class CutOut: method __init__ (line 1904) | def __init__(self, method __call__ (line 1925) | def __call__(self, results): method __repr__ (line 1945) | def __repr__(self): class Mosaic (line 1955) | class Mosaic: method __init__ (line 2008) | def __init__(self, method __call__ (line 2029) | def __call__(self, results): method get_indexes (line 2045) | def get_indexes(self, dataset): method _mosaic_transform (line 2058) | def _mosaic_transform(self, results): method _mosaic_combine (line 2155) | def _mosaic_combine(self, loc, center_position_xy, img_shape_wh): method _filter_box_candidates (line 2216) | def _filter_box_candidates(self, bboxes, labels): method __repr__ (line 2225) | def __repr__(self): class MixUp (line 2236) | class MixUp: method __init__ (line 2292) | def __init__(self, method __call__ (line 2316) | def __call__(self, results): method get_indexes (line 2329) | def get_indexes(self, dataset): method _mixup_transform (line 2347) | def _mixup_transform(self, results): method _filter_box_candidates (line 2470) | def _filter_box_candidates(self, bbox1, bbox2): method __repr__ (line 2485) | def __repr__(self): class RandomAffine (line 2500) | class RandomAffine: method __init__ (line 2539) | def __init__(self, method __call__ (line 2566) | def __call__(self, results): method filter_gt_bboxes (line 2649) | def filter_gt_bboxes(self, origin_bboxes, wrapped_bboxes): method __repr__ (line 2664) | def __repr__(self): method _get_rotation_matrix (line 2679) | def _get_rotation_matrix(rotate_degrees): method _get_scaling_matrix (line 2688) | def _get_scaling_matrix(scale_ratio): method _get_share_matrix (line 2695) | def _get_share_matrix(scale_ratio): method _get_shear_matrix (line 2702) | def _get_shear_matrix(x_shear_degrees, y_shear_degrees): method _get_translation_matrix (line 2711) | def _get_translation_matrix(x, y): class YOLOXHSVRandomAug (line 2718) | class YOLOXHSVRandomAug: method __init__ (line 2729) | def __init__(self, hue_delta=5, saturation_delta=30, value_delta=30): method __call__ (line 2734) | def __call__(self, results): method __repr__ (line 2753) | def __repr__(self): class CopyPaste (line 2762) | class CopyPaste: method __init__ (line 2794) | def __init__( method get_indexes (line 2807) | def get_indexes(self, dataset): method gen_masks_from_bboxes (line 2817) | def gen_masks_from_bboxes(self, bboxes, img_shape): method get_gt_masks (line 2837) | def get_gt_masks(self, results): method __call__ (line 2853) | def __call__(self, results): method _select_object (line 2879) | def _select_object(self, results): method _copy_paste (line 2898) | def _copy_paste(self, dst_results, src_results): method get_updated_masks (line 2956) | def get_updated_masks(self, masks, composed_mask): method __repr__ (line 2962) | def __repr__(self): FILE: mmdet/datasets/samplers/class_aware_sampler.py class ClassAwareSampler (line 11) | class ClassAwareSampler(Sampler): method __init__ (line 40) | def __init__(self, method __iter__ (line 85) | def __iter__(self): method __len__ (line 131) | def __len__(self): method set_epoch (line 134) | def set_epoch(self, epoch): class RandomCycleIter (line 138) | class RandomCycleIter: method __init__ (line 156) | def __init__(self, data, generator=None): method __iter__ (line 163) | def __iter__(self): method __len__ (line 166) | def __len__(self): method __next__ (line 169) | def __next__(self): FILE: mmdet/datasets/samplers/distributed_sampler.py class DistributedSampler (line 11) | class DistributedSampler(_DistributedSampler): method __init__ (line 13) | def __init__(self, method __iter__ (line 31) | def __iter__(self): FILE: mmdet/datasets/samplers/group_sampler.py class GroupSampler (line 10) | class GroupSampler(Sampler): method __init__ (line 12) | def __init__(self, dataset, samples_per_gpu=1): method __iter__ (line 23) | def __iter__(self): method __len__ (line 47) | def __len__(self): class DistributedGroupSampler (line 51) | class DistributedGroupSampler(Sampler): method __init__ (line 72) | def __init__(self, method __iter__ (line 101) | def __iter__(self): method __len__ (line 144) | def __len__(self): method set_epoch (line 147) | def set_epoch(self, epoch): FILE: mmdet/datasets/samplers/infinite_sampler.py class InfiniteGroupBatchSampler (line 12) | class InfiniteGroupBatchSampler(Sampler): method __init__ (line 37) | def __init__(self, method _infinite_indices (line 71) | def _infinite_indices(self): method _indices_of_rank (line 82) | def _indices_of_rank(self): method __iter__ (line 87) | def __iter__(self): method __len__ (line 97) | def __len__(self): method set_epoch (line 101) | def set_epoch(self, epoch): class InfiniteBatchSampler (line 106) | class InfiniteBatchSampler(Sampler): method __init__ (line 128) | def __init__(self, method _infinite_indices (line 155) | def _infinite_indices(self): method _indices_of_rank (line 166) | def _indices_of_rank(self): method __iter__ (line 171) | def __iter__(self): method __len__ (line 180) | def __len__(self): method set_epoch (line 184) | def set_epoch(self, epoch): FILE: mmdet/datasets/utils.py function replace_ImageToTensor (line 15) | def replace_ImageToTensor(pipelines): function get_loading_pipeline (line 75) | def get_loading_pipeline(pipeline): class NumClassCheckHook (line 118) | class NumClassCheckHook(Hook): method _check_head (line 120) | def _check_head(self, runner): method before_train_epoch (line 152) | def before_train_epoch(self, runner): method before_val_epoch (line 160) | def before_val_epoch(self, runner): FILE: mmdet/datasets/voc.py class VOCDataset (line 12) | class VOCDataset(XMLDataset): method __init__ (line 25) | def __init__(self, **kwargs): method evaluate (line 34) | def evaluate(self, FILE: mmdet/datasets/wider_face.py class WIDERFaceDataset (line 12) | class WIDERFaceDataset(XMLDataset): method __init__ (line 22) | def __init__(self, **kwargs): method load_annotations (line 25) | def load_annotations(self, ann_file): FILE: mmdet/datasets/xml_style.py class XMLDataset (line 14) | class XMLDataset(CustomDataset): method __init__ (line 25) | def __init__(self, method load_annotations (line 38) | def load_annotations(self, ann_file): method _filter_imgs (line 69) | def _filter_imgs(self, min_size=32): method get_ann_info (line 90) | def get_ann_info(self, idx): method get_cat_ids (line 156) | def get_cat_ids(self, idx): FILE: mmdet/models/backbones/csp_darknet.py class Focus (line 14) | class Focus(nn.Module): method __init__ (line 30) | def __init__(self, method forward (line 49) | def forward(self, x): class SPPBottleneck (line 67) | class SPPBottleneck(BaseModule): method __init__ (line 85) | def __init__(self, method forward (line 116) | def forward(self, x): class CSPDarknet (line 124) | class CSPDarknet(BaseModule): method __init__ (line 177) | def __init__(self, method _freeze_stages (line 261) | def _freeze_stages(self): method train (line 269) | def train(self, mode=True): method forward (line 277) | def forward(self, x): FILE: mmdet/models/backbones/darknet.py class ResBlock (line 14) | class ResBlock(BaseModule): method __init__ (line 33) | def __init__(self, method forward (line 50) | def forward(self, x): class Darknet (line 60) | class Darknet(BaseModule): method __init__ (line 101) | def __init__(self, method forward (line 153) | def forward(self, x): method _freeze_stages (line 163) | def _freeze_stages(self): method train (line 171) | def train(self, mode=True): method make_conv_res_block (line 180) | def make_conv_res_block(in_channels, FILE: mmdet/models/backbones/detectors_resnet.py class Bottleneck (line 16) | class Bottleneck(_Bottleneck): method __init__ (line 36) | def __init__(self, method rfp_forward (line 73) | def rfp_forward(self, x, rfp_feat): class ResLayer (line 120) | class ResLayer(Sequential): method __init__ (line 146) | def __init__(self, class DetectoRS_ResNet (line 212) | class DetectoRS_ResNet(ResNet): method __init__ (line 234) | def __init__(self, method init_weights (line 296) | def init_weights(self): method make_res_layer (line 325) | def make_res_layer(self, **kwargs): method forward (line 329) | def forward(self, x): method rfp_forward (line 336) | def rfp_forward(self, x, rfp_feats): FILE: mmdet/models/backbones/detectors_resnext.py class Bottleneck (line 11) | class Bottleneck(_Bottleneck): method __init__ (line 14) | def __init__(self, class DetectoRS_ResNeXt (line 99) | class DetectoRS_ResNeXt(DetectoRS_ResNet): method __init__ (line 113) | def __init__(self, groups=1, base_width=4, **kwargs): method make_res_layer (line 118) | def make_res_layer(self, **kwargs): FILE: mmdet/models/backbones/efficientnet.py class EdgeResidual (line 16) | class EdgeResidual(BaseModule): method __init__ (line 41) | def __init__(self, method forward (line 91) | def forward(self, x): function model_scaling (line 115) | def model_scaling(layer_setting, arch_setting): class EfficientNet (line 159) | class EfficientNet(BaseModule): method __init__ (line 254) | def __init__(self, method make_layer (line 327) | def make_layer(self): method forward (line 395) | def forward(self, x): method _freeze_stages (line 404) | def _freeze_stages(self): method train (line 411) | def train(self, mode=True): FILE: mmdet/models/backbones/hourglass.py class HourglassModule (line 12) | class HourglassModule(BaseModule): method __init__ (line 30) | def __init__(self, method forward (line 80) | def forward(self, x): class HourglassNet (line 97) | class HourglassNet(BaseModule): method __init__ (line 131) | def __init__(self, method init_weights (line 195) | def init_weights(self): method forward (line 203) | def forward(self, x): FILE: mmdet/models/backbones/hrnet.py class HRModule (line 13) | class HRModule(BaseModule): method __init__ (line 20) | def __init__(self, method _check_branches (line 49) | def _check_branches(self, num_branches, num_blocks, in_channels, method _make_one_branch (line 66) | def _make_one_branch(self, method _make_branches (line 112) | def _make_branches(self, num_branches, block, num_blocks, num_channels): method _make_fuse_layers (line 121) | def _make_fuse_layers(self): method forward (line 183) | def forward(self, x): class HRNet (line 204) | class HRNet(BaseModule): method __init__ (line 281) | def __init__(self, method norm1 (line 403) | def norm1(self): method norm2 (line 408) | def norm2(self): method _make_transition_layer (line 412) | def _make_transition_layer(self, num_channels_pre_layer, method _make_layer (line 458) | def _make_layer(self, block, inplanes, planes, blocks, stride=1): method _make_stage (line 505) | def _make_stage(self, layer_config, in_channels, multiscale_output=True): method forward (line 545) | def forward(self, x): method train (line 581) | def train(self, mode=True): FILE: mmdet/models/backbones/mobilenet_v2.py class MobileNetV2 (line 14) | class MobileNetV2(BaseModule): method __init__ (line 46) | def __init__(self, method make_layer (line 138) | def make_layer(self, out_channels, num_blocks, stride, expand_ratio): method _freeze_stages (line 167) | def _freeze_stages(self): method forward (line 177) | def forward(self, x): method train (line 188) | def train(self, mode=True): FILE: mmdet/models/backbones/pvt.py class MixFFN (line 23) | class MixFFN(BaseModule): method __init__ (line 47) | def __init__(self, method forward (line 93) | def forward(self, x, hw_shape, identity=None): class SpatialReductionAttention (line 102) | class SpatialReductionAttention(MultiheadAttention): method __init__ (line 129) | def __init__(self, method forward (line 169) | def forward(self, x, hw_shape, identity=None): method legacy_forward (line 200) | def legacy_forward(self, x, hw_shape, identity=None): class PVTEncoderLayer (line 219) | class PVTEncoderLayer(BaseModule): method __init__ (line 245) | def __init__(self, method forward (line 284) | def forward(self, x, hw_shape): class AbsolutePositionEmbedding (line 291) | class AbsolutePositionEmbedding(BaseModule): method __init__ (line 301) | def __init__(self, pos_shape, pos_dim, drop_rate=0., init_cfg=None): method init_weights (line 319) | def init_weights(self): method resize_pos_embed (line 322) | def resize_pos_embed(self, pos_embed, input_shape, mode='bilinear'): method forward (line 351) | def forward(self, x, hw_shape, mode='bilinear'): class PyramidVisionTransformer (line 357) | class PyramidVisionTransformer(BaseModule): method __init__ (line 410) | def __init__(self, method init_weights (line 523) | def init_weights(self): method forward (line 563) | def forward(self, x): class PyramidVisionTransformerV2 (line 580) | class PyramidVisionTransformerV2(PyramidVisionTransformer): method __init__ (line 584) | def __init__(self, **kwargs): FILE: mmdet/models/backbones/regnet.py class RegNet (line 14) | class RegNet(ResNet): method __init__ (line 90) | def __init__(self, method _make_stem_layer (line 238) | def _make_stem_layer(self, in_channels, base_channels): method generate_regnet (line 252) | def generate_regnet(self, method quantize_float (line 285) | def quantize_float(number, divisor): method adjust_width_group (line 297) | def adjust_width_group(self, widths, bottleneck_ratio, groups): method get_stages_from_blocks (line 322) | def get_stages_from_blocks(self, widths): method forward (line 344) | def forward(self, x): FILE: mmdet/models/backbones/res2net.py class Bottle2neck (line 15) | class Bottle2neck(_Bottleneck): method __init__ (line 18) | def __init__(self, method forward (line 106) | def forward(self, x): class Res2Layer (line 163) | class Res2Layer(Sequential): method __init__ (line 182) | def __init__(self, class Res2Net (line 243) | class Res2Net(ResNet): method __init__ (line 303) | def __init__(self, method make_res_layer (line 322) | def make_res_layer(self, **kwargs): FILE: mmdet/models/backbones/resnest.py class RSoftmax (line 17) | class RSoftmax(nn.Module): method __init__ (line 25) | def __init__(self, radix, groups): method forward (line 30) | def forward(self, x): class SplitAttentionConv2d (line 41) | class SplitAttentionConv2d(BaseModule): method __init__ (line 64) | def __init__(self, method norm0 (line 116) | def norm0(self): method norm1 (line 121) | def norm1(self): method forward (line 125) | def forward(self, x): class Bottleneck (line 154) | class Bottleneck(_Bottleneck): method __init__ (line 173) | def __init__(self, method forward (line 234) | def forward(self, x): class ResNeSt (line 278) | class ResNeSt(ResNetV1d): method __init__ (line 299) | def __init__(self, method make_res_layer (line 313) | def make_res_layer(self, **kwargs): FILE: mmdet/models/backbones/resnet.py class BasicBlock (line 14) | class BasicBlock(BaseModule): method __init__ (line 17) | def __init__(self, method norm1 (line 58) | def norm1(self): method norm2 (line 63) | def norm2(self): method forward (line 67) | def forward(self, x): class Bottleneck (line 97) | class Bottleneck(BaseModule): method __init__ (line 100) | def __init__(self, method make_block_plugins (line 219) | def make_block_plugins(self, in_channels, plugins): method forward_plugin (line 242) | def forward_plugin(self, x, plugin_names): method norm1 (line 249) | def norm1(self): method norm2 (line 254) | def norm2(self): method norm3 (line 259) | def norm3(self): method forward (line 263) | def forward(self, x): class ResNet (line 306) | class ResNet(BaseModule): method __init__ (line 369) | def __init__(self, method make_stage_plugins (line 494) | def make_stage_plugins(self, plugins, stage_idx): method make_res_layer (line 556) | def make_res_layer(self, **kwargs): method norm1 (line 561) | def norm1(self): method _make_stem_layer (line 565) | def _make_stem_layer(self, in_channels, stem_channels): method _freeze_stages (line 613) | def _freeze_stages(self): method forward (line 631) | def forward(self, x): method train (line 648) | def train(self, mode=True): class ResNetV1d (line 661) | class ResNetV1d(ResNet): method __init__ (line 670) | def __init__(self, **kwargs): FILE: mmdet/models/backbones/resnext.py class Bottleneck (line 12) | class Bottleneck(_Bottleneck): method __init__ (line 15) | def __init__(self, method _del_block_plugins (line 98) | def _del_block_plugins(self, plugin_names): class ResNeXt (line 110) | class ResNeXt(ResNet): method __init__ (line 143) | def __init__(self, groups=1, base_width=4, **kwargs): method make_res_layer (line 148) | def make_res_layer(self, **kwargs): FILE: mmdet/models/backbones/ssd_vgg.py class SSDVGG (line 13) | class SSDVGG(VGG, BaseModule): method __init__ (line 50) | def __init__(self, method init_weights (line 105) | def init_weights(self, pretrained=None): method forward (line 108) | def forward(self, x): class L2Norm (line 122) | class L2Norm(ssd_neck.L2Norm): method __init__ (line 124) | def __init__(self, **kwargs): FILE: mmdet/models/backbones/swin.py class WindowMSA (line 22) | class WindowMSA(BaseModule): method __init__ (line 41) | def __init__(self, method init_weights (line 78) | def init_weights(self): method forward (line 81) | def forward(self, x, mask=None): method double_step_seq (line 122) | def double_step_seq(step1, len1, step2, len2): class ShiftWindowMSA (line 128) | class ShiftWindowMSA(BaseModule): method __init__ (line 151) | def __init__(self, method forward (line 180) | def forward(self, query, hw_shape): method window_reverse (line 256) | def window_reverse(self, windows, H, W): method window_partition (line 272) | def window_partition(self, x): class SwinBlock (line 288) | class SwinBlock(BaseModule): method __init__ (line 313) | def __init__(self, method forward (line 358) | def forward(self, x, hw_shape): class SwinBlockSequence (line 381) | class SwinBlockSequence(BaseModule): method __init__ (line 410) | def __init__(self, method forward (line 455) | def forward(self, x, hw_shape): class SwinTransformer (line 467) | class SwinTransformer(BaseModule): method __init__ (line 524) | def __init__(self, method train (line 642) | def train(self, mode=True): method _freeze_stages (line 647) | def _freeze_stages(self): method init_weights (line 669) | def init_weights(self): method forward (line 744) | def forward(self, x): FILE: mmdet/models/backbones/trident_resnet.py class TridentConv (line 14) | class TridentConv(BaseModule): method __init__ (line 33) | def __init__(self, method extra_repr (line 61) | def extra_repr(self): method forward (line 73) | def forward(self, inputs): class TridentBottleneck (line 93) | class TridentBottleneck(Bottleneck): method __init__ (line 106) | def __init__(self, trident_dilations, test_branch_idx, concat_output, method forward (line 128) | def forward(self, x): function make_trident_res_layer (line 182) | def make_trident_res_layer(block, class TridentResNet (line 235) | class TridentResNet(ResNet): method __init__ (line 256) | def __init__(self, depth, num_branch, test_branch_idx, trident_dilations, FILE: mmdet/models/builder.py function build_backbone (line 18) | def build_backbone(cfg): function build_neck (line 23) | def build_neck(cfg): function build_roi_extractor (line 28) | def build_roi_extractor(cfg): function build_shared_head (line 33) | def build_shared_head(cfg): function build_head (line 38) | def build_head(cfg): function build_loss (line 43) | def build_loss(cfg): function build_detector (line 48) | def build_detector(cfg, train_cfg=None, test_cfg=None): FILE: mmdet/models/dense_heads/anchor_free_head.py class AnchorFreeHead (line 18) | class AnchorFreeHead(BaseDenseHead, BBoxTestMixin): method __init__ (line 46) | def __init__(self, method _init_layers (line 107) | def _init_layers(self): method _init_cls_convs (line 113) | def _init_cls_convs(self): method _init_reg_convs (line 133) | def _init_reg_convs(self): method _init_predictor (line 153) | def _init_predictor(self): method _load_from_state_dict (line 159) | def _load_from_state_dict(self, state_dict, prefix, local_metadata, st... method forward (line 197) | def forward(self, feats): method forward_single (line 215) | def forward_single(self, x): method loss (line 240) | def loss(self, method get_targets (line 268) | def get_targets(self, points, gt_bboxes_list, gt_labels_list): method _get_points_single (line 282) | def _get_points_single(self, method get_points (line 310) | def get_points(self, featmap_sizes, dtype, device, flatten=False): method aug_test (line 334) | def aug_test(self, feats, img_metas, rescale=False): FILE: mmdet/models/dense_heads/anchor_head.py class AnchorHead (line 17) | class AnchorHead(BaseDenseHead, BBoxTestMixin): method __init__ (line 39) | def __init__(self, method num_anchors (line 115) | def num_anchors(self): method anchor_generator (line 122) | def anchor_generator(self): method _init_layers (line 127) | def _init_layers(self): method forward_single (line 135) | def forward_single(self, x): method forward (line 152) | def forward(self, feats): method get_anchors (line 171) | def get_anchors(self, featmap_sizes, img_metas, device='cuda'): method _get_targets_single (line 201) | def _get_targets_single(self, method get_targets (line 299) | def get_targets(self, method loss_single (line 402) | def loss_single(self, cls_score, bbox_pred, anchors, labels, label_wei... method loss (line 453) | def loss(self, method aug_test (line 522) | def aug_test(self, feats, img_metas, rescale=False): FILE: mmdet/models/dense_heads/ascend_anchor_head.py class AscendAnchorHead (line 13) | class AscendAnchorHead(AnchorHead): method __init__ (line 35) | def __init__(self, method get_batch_gt_bboxes (line 72) | def get_batch_gt_bboxes(self, gt_bboxes_list, num_images, gt_nums, dev... method get_batch_gt_bboxes_ignore (line 109) | def get_batch_gt_bboxes_ignore(self, gt_bboxes_ignore_list, num_images, method get_batch_gt_labels (line 130) | def get_batch_gt_labels(self, gt_labels_list, num_images, gt_nums, dev... method _get_targets_concat (line 153) | def _get_targets_concat(self, method get_targets (line 255) | def get_targets(self, FILE: mmdet/models/dense_heads/ascend_retina_head.py class AscendRetinaHead (line 8) | class AscendRetinaHead(RetinaHead, AscendAnchorHead): method __init__ (line 27) | def __init__(self, method get_targets (line 59) | def get_targets(self, FILE: mmdet/models/dense_heads/ascend_ssd_head.py class AscendSSDHead (line 13) | class AscendSSDHead(SSDHead, AscendAnchorHead): method __init__ (line 44) | def __init__(self, method get_static_anchors (line 92) | def get_static_anchors(self, featmap_sizes, img_metas, device='cuda'): method get_targets (line 113) | def get_targets(self, method batch_loss (line 180) | def batch_loss(self, batch_cls_score, batch_bbox_pred, batch_anchor, method loss (line 261) | def loss(self, FILE: mmdet/models/dense_heads/atss_head.py class ATSSHead (line 14) | class ATSSHead(AnchorHead): method __init__ (line 24) | def __init__(self, method _init_layers (line 65) | def _init_layers(self): method forward (line 109) | def forward(self, feats): method forward_single (line 127) | def forward_single(self, x, scale): method loss_single (line 156) | def loss_single(self, anchors, cls_score, bbox_pred, centerness, labels, method loss (line 230) | def loss(self, method centerness_target (line 305) | def centerness_target(self, anchors, gts): method get_targets (line 322) | def get_targets(self, method _get_target_single (line 386) | def _get_target_single(self, method get_num_level_anchors_inside (line 496) | def get_num_level_anchors_inside(self, num_level_anchors, inside_flags): FILE: mmdet/models/dense_heads/autoassign_head.py class CenterPrior (line 21) | class CenterPrior(nn.Module): method __init__ (line 37) | def __init__(self, method forward (line 49) | def forward(self, anchor_points_list, gt_bboxes, labels, class AutoAssignHead (line 128) | class AutoAssignHead(FCOSHead): method __init__ (line 148) | def __init__(self, method init_weights (line 167) | def init_weights(self): method forward_single (line 179) | def forward_single(self, x, scale, stride): method get_pos_loss_single (line 207) | def get_pos_loss_single(self, cls_score, objectness, reg_loss, gt_labels, method get_neg_loss_single (line 251) | def get_neg_loss_single(self, cls_score, objectness, gt_labels, ious, method loss (line 307) | def loss(self, method get_targets (line 439) | def get_targets(self, points, gt_bboxes_list): method _get_target_single (line 468) | def _get_target_single(self, gt_bboxes, points): method _get_points_single (line 506) | def _get_points_single(self, FILE: mmdet/models/dense_heads/base_dense_head.py class BaseDenseHead (line 12) | class BaseDenseHead(BaseModule, metaclass=ABCMeta): method __init__ (line 15) | def __init__(self, init_cfg=None): method init_weights (line 18) | def init_weights(self): method loss (line 27) | def loss(self, **kwargs): method get_bboxes (line 32) | def get_bboxes(self, method _get_bboxes_single (line 109) | def _get_bboxes_single(self, method _bbox_post_process (line 226) | def _bbox_post_process(self, method forward_train (line 303) | def forward_train(self, method simple_test (line 343) | def simple_test(self, feats, img_metas, rescale=False): method onnx_export (line 363) | def onnx_export(self, FILE: mmdet/models/dense_heads/base_mask_head.py class BaseMaskHead (line 7) | class BaseMaskHead(BaseModule, metaclass=ABCMeta): method __init__ (line 10) | def __init__(self, init_cfg): method loss (line 14) | def loss(self, **kwargs): method get_results (line 18) | def get_results(self, **kwargs): method forward_train (line 22) | def forward_train(self, method simple_test (line 73) | def simple_test(self, method onnx_export (line 114) | def onnx_export(self, img, img_metas): FILE: mmdet/models/dense_heads/cascade_rpn_head.py class AdaptiveConv (line 20) | class AdaptiveConv(BaseModule): method __init__ (line 42) | def __init__(self, method forward (line 79) | def forward(self, x, offset): class StageCascadeRPNHead (line 96) | class StageCascadeRPNHead(RPNHead): method __init__ (line 112) | def __init__(self, method _init_layers (line 153) | def _init_layers(self): method forward_single (line 164) | def forward_single(self, x, offset): method forward (line 174) | def forward(self, feats, offset_list=None): method _region_targets_single (line 180) | def _region_targets_single(self, method region_targets (line 236) | def region_targets(self, method get_targets (line 286) | def get_targets(self, method anchor_offset (line 328) | def anchor_offset(self, anchor_list, anchor_strides, featmap_sizes): method loss_single (line 406) | def loss_single(self, cls_score, bbox_pred, anchors, labels, label_wei... method loss (line 436) | def loss(self, method get_bboxes (line 505) | def get_bboxes(self, method _get_bboxes_single (line 547) | def _get_bboxes_single(self, method refine_bboxes (line 672) | def refine_bboxes(self, anchor_list, bbox_preds, img_metas): class CascadeRPNHead (line 690) | class CascadeRPNHead(BaseDenseHead): method __init__ (line 705) | def __init__(self, num_stages, stages, train_cfg, test_cfg, init_cfg=N... method loss (line 720) | def loss(self): method get_bboxes (line 724) | def get_bboxes(self): method forward_train (line 728) | def forward_train(self, method simple_test_rpn (line 773) | def simple_test_rpn(self, x, img_metas): method aug_test_rpn (line 798) | def aug_test_rpn(self, x, img_metas): FILE: mmdet/models/dense_heads/centernet_head.py class CenterNetHead (line 18) | class CenterNetHead(BaseDenseHead, BBoxTestMixin): method __init__ (line 38) | def __init__(self, method _build_head (line 64) | def _build_head(self, in_channel, feat_channel, out_channel): method init_weights (line 72) | def init_weights(self): method forward (line 81) | def forward(self, feats): method forward_single (line 98) | def forward_single(self, feat): method loss (line 116) | def loss(self, method get_targets (line 181) | def get_targets(self, gt_bboxes, gt_labels, feat_shape, img_shape): method get_bboxes (line 252) | def get_bboxes(self, method _get_bboxes_single (line 297) | def _get_bboxes_single(self, method decode_heatmap (line 351) | def decode_heatmap(self, method _bboxes_nms (line 402) | def _bboxes_nms(self, bboxes, labels, cfg): FILE: mmdet/models/dense_heads/centripetal_head.py class CentripetalHead (line 13) | class CentripetalHead(CornerHead): method __init__ (line 48) | def __init__(self, method _init_centripetal_layers (line 73) | def _init_centripetal_layers(self): method _init_layers (line 133) | def _init_layers(self): method init_weights (line 141) | def init_weights(self): method forward_single (line 157) | def forward_single(self, x, lvl_ind): method loss (line 208) | def loss(self, method loss_single (line 284) | def loss_single(self, tl_hmp, br_hmp, tl_off, br_off, tl_guiding_shift, method get_bboxes (line 367) | def get_bboxes(self, FILE: mmdet/models/dense_heads/corner_head.py class BiCornerPool (line 21) | class BiCornerPool(BaseModule): method __init__ (line 34) | def __init__(self, method forward (line 64) | def forward(self, x): class CornerHead (line 85) | class CornerHead(BaseDenseHead, BBoxTestMixin): method __init__ (line 118) | def __init__(self, method _make_layers (line 158) | def _make_layers(self, out_channels, in_channels=256, feat_channels=256): method _init_corner_kpt_layers (line 165) | def _init_corner_kpt_layers(self): method _init_corner_emb_layers (line 203) | def _init_corner_emb_layers(self): method _init_layers (line 221) | def _init_layers(self): method init_weights (line 230) | def init_weights(self): method forward (line 248) | def forward(self, feats): method forward_single (line 280) | def forward_single(self, x, lvl_ind, return_pool=False): method get_targets (line 325) | def get_targets(self, method loss (line 514) | def loss(self, method loss_single (line 576) | def loss_single(self, tl_hmp, br_hmp, tl_emb, br_emb, tl_off, br_off, method get_bboxes (line 655) | def get_bboxes(self, method _get_bboxes_single (line 704) | def _get_bboxes_single(self, method _bboxes_nms (line 777) | def _bboxes_nms(self, bboxes, labels, cfg): method decode_heatmap (line 795) | def decode_heatmap(self, method onnx_export (line 1031) | def onnx_export(self, FILE: mmdet/models/dense_heads/ddod_head.py class DDODHead (line 17) | class DDODHead(AnchorHead): method __init__ (line 37) | def __init__(self, method _init_layers (line 63) | def _init_layers(self): method init_weights (line 110) | def init_weights(self): method forward (line 121) | def forward(self, feats): method forward_single (line 142) | def forward_single(self, x, scale): method loss_cls_single (line 171) | def loss_cls_single(self, cls_score, labels, label_weights, method loss_reg_single (line 198) | def loss_reg_single(self, anchors, bbox_pred, iou_pred, labels, method calc_reweight_factor (line 275) | def calc_reweight_factor(self, labels_list): method loss (line 295) | def loss(self, method process_predictions_and_anchors (line 413) | def process_predictions_and_anchors(self, anchor_list, valid_flag_list, method get_cls_targets (line 483) | def get_cls_targets(self, method get_reg_targets (line 561) | def get_reg_targets(self, method _get_target_single (line 634) | def _get_target_single(self, method get_num_level_anchors_inside (line 761) | def get_num_level_anchors_inside(self, num_level_anchors, inside_flags): FILE: mmdet/models/dense_heads/deformable_detr_head.py class DeformableDETRHead (line 17) | class DeformableDETRHead(DETRHead): method __init__ (line 36) | def __init__(self, method _init_layers (line 50) | def _init_layers(self): method init_weights (line 83) | def init_weights(self): method forward (line 97) | def forward(self, mlvl_feats, img_metas): method loss (line 184) | def loss(self, method get_bboxes (line 269) | def get_bboxes(self, FILE: mmdet/models/dense_heads/dense_test_mixins.py class BBoxTestMixin (line 14) | class BBoxTestMixin(object): method simple_test_bboxes (line 17) | def simple_test_bboxes(self, feats, img_metas, rescale=False): method aug_test_bboxes (line 41) | def aug_test_bboxes(self, feats, img_metas, rescale=False): method simple_test_rpn (line 116) | def simple_test_rpn(self, x, img_metas): method aug_test_rpn (line 133) | def aug_test_rpn(self, feats, img_metas): method async_simple_test_rpn (line 169) | async def async_simple_test_rpn(self, x, img_metas): method merge_aug_bboxes (line 179) | def merge_aug_bboxes(self, aug_bboxes, aug_scores, img_metas): FILE: mmdet/models/dense_heads/detr_head.py class DETRHead (line 18) | class DETRHead(AnchorFreeHead): method __init__ (line 52) | def __init__(self, method _init_layers (line 152) | def _init_layers(self): method init_weights (line 167) | def init_weights(self): method _load_from_state_dict (line 172) | def _load_from_state_dict(self, state_dict, prefix, local_metadata, st... method forward (line 202) | def forward(self, feats, img_metas): method forward_single (line 226) | def forward_single(self, x, img_metas): method loss (line 268) | def loss(self, method loss_single (line 334) | def loss_single(self, method get_targets (line 419) | def get_targets(self, method _get_target_single (line 476) | def _get_target_single(self, method forward_train (line 547) | def forward_train(self, method get_bboxes (line 583) | def get_bboxes(self, method _get_bboxes_single (line 628) | def _get_bboxes_single(self, method simple_test_bboxes (line 685) | def simple_test_bboxes(self, feats, img_metas, rescale=False): method forward_onnx (line 707) | def forward_onnx(self, feats, img_metas): method forward_single_onnx (line 735) | def forward_single_onnx(self, x, img_metas): method onnx_export (line 775) | def onnx_export(self, all_cls_scores_list, all_bbox_preds_list, img_me... FILE: mmdet/models/dense_heads/embedding_rpn_head.py class EmbeddingRPNHead (line 11) | class EmbeddingRPNHead(BaseModule): method __init__ (line 26) | def __init__(self, method _init_layers (line 38) | def _init_layers(self): method init_weights (line 44) | def init_weights(self): method _decode_init_proposals (line 54) | def _decode_init_proposals(self, imgs, img_metas): method forward_dummy (line 95) | def forward_dummy(self, img, img_metas): method forward_train (line 102) | def forward_train(self, img, img_metas): method simple_test_rpn (line 106) | def simple_test_rpn(self, img, img_metas): method simple_test (line 110) | def simple_test(self, img, img_metas): method aug_test_rpn (line 114) | def aug_test_rpn(self, feats, img_metas): FILE: mmdet/models/dense_heads/fcos_head.py class FCOSHead (line 17) | class FCOSHead(AnchorFreeHead): method __init__ (line 60) | def __init__(self, method _init_layers (line 106) | def _init_layers(self): method forward (line 112) | def forward(self, feats): method forward_single (line 133) | def forward_single(self, x, scale, stride): method loss (line 168) | def loss(self, method get_targets (line 270) | def get_targets(self, points, gt_bboxes_list, gt_labels_list): method _get_target_single (line 331) | def _get_target_single(self, gt_bboxes, gt_labels, points, regress_ran... method centerness_target (line 415) | def centerness_target(self, pos_bbox_targets): method _get_points_single (line 436) | def _get_points_single(self, FILE: mmdet/models/dense_heads/fovea_head.py class FeatureAlign (line 18) | class FeatureAlign(BaseModule): method __init__ (line 20) | def __init__(self, method forward (line 43) | def forward(self, x, shape): class FoveaHead (line 50) | class FoveaHead(AnchorFreeHead): method __init__ (line 55) | def __init__(self, method _init_layers (line 81) | def _init_layers(self): method forward_single (line 121) | def forward_single(self, x): method loss (line 134) | def loss(self, method get_targets (line 186) | def get_targets(self, gt_bbox_list, gt_label_list, featmap_sizes, poin... method _get_target_single (line 208) | def _get_target_single(self, method _get_bboxes_single (line 272) | def _get_bboxes_single(self, method _bbox_decode (line 358) | def _bbox_decode(self, priors, bbox_pred, base_len, max_shape): method _get_points_single (line 374) | def _get_points_single(self, *args, **kwargs): FILE: mmdet/models/dense_heads/free_anchor_retina_head.py class FreeAnchorRetinaHead (line 13) | class FreeAnchorRetinaHead(RetinaHead): method __init__ (line 34) | def __init__(self, method loss (line 54) | def loss(self, method positive_bag_loss (line 221) | def positive_bag_loss(self, matched_cls_prob, matched_box_prob): method negative_bag_loss (line 248) | def negative_bag_loss(self, cls_prob, box_prob): FILE: mmdet/models/dense_heads/fsaf_head.py class FSAFHead (line 15) | class FSAFHead(RetinaHead): method __init__ (line 43) | def __init__(self, *args, score_threshold=None, init_cfg=None, **kwargs): method forward_single (line 63) | def forward_single(self, x): method _get_targets_single (line 80) | def _get_targets_single(self, method loss (line 188) | def loss(self, method calculate_pos_recall (line 317) | def calculate_pos_recall(self, cls_scores, labels_list, pos_inds): method collect_loss_level_single (line 351) | def collect_loss_level_single(self, cls_loss, reg_loss, assigned_gt_inds, method reweight_loss_single (line 382) | def reweight_loss_single(self, cls_loss, reg_loss, assigned_gt_inds, FILE: mmdet/models/dense_heads/ga_retina_head.py class GARetinaHead (line 11) | class GARetinaHead(GuidedAnchorHead): method __init__ (line 14) | def __init__(self, method _init_layers (line 45) | def _init_layers(self): method forward_single (line 92) | def forward_single(self, x): FILE: mmdet/models/dense_heads/ga_rpn_head.py class GARPNHead (line 16) | class GARPNHead(GuidedAnchorHead): method __init__ (line 19) | def __init__(self, method _init_layers (line 34) | def _init_layers(self): method forward_single (line 40) | def forward_single(self, x): method loss (line 49) | def loss(self, method _get_bboxes_single (line 72) | def _get_bboxes_single(self, FILE: mmdet/models/dense_heads/gfl_head.py class Integral (line 16) | class Integral(nn.Module): method __init__ (line 29) | def __init__(self, reg_max=16): method forward (line 35) | def forward(self, x): class GFLHead (line 53) | class GFLHead(AnchorHead): method __init__ (line 88) | def __init__(self, method _init_layers (line 128) | def _init_layers(self): method forward (line 161) | def forward(self, feats): method forward_single (line 179) | def forward_single(self, x, scale): method anchor_center (line 205) | def anchor_center(self, anchors): method loss_single (line 218) | def loss_single(self, anchors, cls_score, bbox_pred, labels, label_wei... method loss (line 307) | def loss(self, method _get_bboxes_single (line 380) | def _get_bboxes_single(self, method get_targets (line 473) | def get_targets(self, method _get_target_single (line 537) | def _get_target_single(self, method get_num_level_anchors_inside (line 643) | def get_num_level_anchors_inside(self, num_level_anchors, inside_flags): FILE: mmdet/models/dense_heads/guided_anchor_head.py class FeatureAdaption (line 16) | class FeatureAdaption(BaseModule): method __init__ (line 31) | def __init__(self, method forward (line 54) | def forward(self, x, shape): class GuidedAnchorHead (line 61) | class GuidedAnchorHead(AnchorHead): method __init__ (line 97) | def __init__( method num_anchors (line 212) | def num_anchors(self): method _init_layers (line 217) | def _init_layers(self): method forward_single (line 233) | def forward_single(self, x): method forward (line 246) | def forward(self, feats): method get_sampled_approxs (line 249) | def get_sampled_approxs(self, featmap_sizes, img_metas, device='cuda'): method get_anchors (line 299) | def get_anchors(self, method _get_guided_anchors_single (line 350) | def _get_guided_anchors_single(self, method ga_loc_targets (line 384) | def ga_loc_targets(self, gt_bboxes_list, featmap_sizes): method _ga_shape_target_single (line 486) | def _ga_shape_target_single(self, method ga_shape_targets (line 549) | def ga_shape_targets(self, method loss_shape_single (line 615) | def loss_shape_single(self, shape_pred, bbox_anchors, bbox_gts, method loss_loc_single (line 639) | def loss_loc_single(self, loc_pred, loc_target, loc_weight, method loss (line 650) | def loss(self, method get_bboxes (line 756) | def get_bboxes(self, method _get_bboxes_single (line 800) | def _get_bboxes_single(self, FILE: mmdet/models/dense_heads/lad_head.py class LADHead (line 11) | class LADHead(PAAHead): method get_label_assignment (line 16) | def get_label_assignment(self, method forward_train (line 121) | def forward_train(self, method loss (line 160) | def loss(self, FILE: mmdet/models/dense_heads/ld_head.py class LDHead (line 11) | class LDHead(GFLHead): method __init__ (line 26) | def __init__(self, method loss_single (line 38) | def loss_single(self, anchors, cls_score, bbox_pred, labels, label_wei... method forward_train (line 142) | def forward_train(self, method loss (line 185) | def loss(self, FILE: mmdet/models/dense_heads/mask2former_head.py class Mask2FormerHead (line 21) | class Mask2FormerHead(MaskFormerHead): method __init__ (line 58) | def __init__(self, method init_weights (line 137) | def init_weights(self): method _get_target_single (line 148) | def _get_target_single(self, cls_score, mask_pred, gt_labels, gt_masks, method loss_single (line 218) | def loss_single(self, cls_scores, mask_preds, gt_labels_list, method forward_head (line 309) | def forward_head(self, decoder_out, mask_feature, attn_mask_target_size): method forward (line 351) | def forward(self, feats, img_metas): FILE: mmdet/models/dense_heads/maskformer_head.py class MaskFormerHead (line 17) | class MaskFormerHead(AnchorFreeHead): method __init__ (line 53) | def __init__(self, method init_weights (line 128) | def init_weights(self): method preprocess_gt (line 138) | def preprocess_gt(self, gt_labels_list, gt_masks_list, gt_semantic_segs, method get_targets (line 174) | def get_targets(self, cls_scores_list, mask_preds_list, gt_labels_list, method _get_target_single (line 218) | def _get_target_single(self, cls_score, mask_pred, gt_labels, gt_masks, method loss (line 279) | def loss(self, all_cls_scores, all_mask_preds, gt_labels_list, method loss_single (line 323) | def loss_single(self, cls_scores, mask_preds, gt_labels_list, method forward (line 415) | def forward(self, feats, img_metas): method forward_train (line 480) | def forward_train(self, method simple_test (line 527) | def simple_test(self, feats, img_metas, **kwargs): FILE: mmdet/models/dense_heads/nasfcos_head.py class NASFCOSHead (line 12) | class NASFCOSHead(FCOSHead): method __init__ (line 20) | def __init__(self, *args, init_cfg=None, **kwargs): method _init_layers (line 39) | def _init_layers(self): FILE: mmdet/models/dense_heads/paa_head.py function levels_to_images (line 18) | def levels_to_images(mlvl_tensor): class PAAHead (line 46) | class PAAHead(ATSSHead): method __init__ (line 74) | def __init__(self, method loss (line 87) | def loss(self, method get_pos_loss (line 202) | def get_pos_loss(self, anchors, cls_score, bbox_pred, label, label_wei... method paa_reassign (line 258) | def paa_reassign(self, pos_losses, label, label_weight, bbox_weight, method gmm_separation_scheme (line 367) | def gmm_separation_scheme(self, gmm_assignment, scores, pos_inds_gmm): method get_targets (line 402) | def get_targets( method _get_targets_single (line 494) | def _get_targets_single(self, method get_bboxes (line 521) | def get_bboxes(self, method _get_bboxes_single (line 537) | def _get_bboxes_single(self, method _bbox_post_process (line 620) | def _bbox_post_process(self, method score_voting (line 693) | def score_voting(self, det_bboxes, det_labels, mlvl_bboxes, FILE: mmdet/models/dense_heads/pisa_retinanet_head.py class PISARetinaHead (line 12) | class PISARetinaHead(RetinaHead): method loss (line 23) | def loss(self, FILE: mmdet/models/dense_heads/pisa_ssd_head.py class PISASSDHead (line 12) | class PISASSDHead(SSDHead): method loss (line 14) | def loss(self, FILE: mmdet/models/dense_heads/reppoints_head.py class RepPointsHead (line 17) | class RepPointsHead(AnchorFreeHead): method __init__ (line 36) | def __init__(self, method _init_layers (line 126) | def _init_layers(self): method points2bbox (line 170) | def points2bbox(self, pts, y_first=True): method gen_grid_from_reg (line 221) | def gen_grid_from_reg(self, reg, previous_boxes): method forward (line 255) | def forward(self, feats): method forward_single (line 258) | def forward_single(self, x): method get_points (line 304) | def get_points(self, featmap_sizes, img_metas, device): method centers_to_bboxes (line 332) | def centers_to_bboxes(self, point_list): method offset_to_pts (line 350) | def offset_to_pts(self, center_list, pred_list): method _point_target_single (line 371) | def _point_target_single(self, method get_targets (line 442) | def get_targets(self, method loss_single (line 525) | def loss_single(self, cls_score, pts_pred_init, pts_pred_refine, labels, method loss (line 563) | def loss(self, method _get_bboxes_single (line 659) | def _get_bboxes_single(self, method _bbox_decode (line 756) | def _bbox_decode(self, points, bbox_pred, stride, max_shape): FILE: mmdet/models/dense_heads/retina_head.py class RetinaHead (line 10) | class RetinaHead(AnchorHead): method __init__ (line 29) | def __init__(self, method _init_layers (line 61) | def _init_layers(self): method forward_single (line 94) | def forward_single(self, x): FILE: mmdet/models/dense_heads/retina_sepbn_head.py class RetinaSepBNHead (line 10) | class RetinaSepBNHead(AnchorHead): method __init__ (line 18) | def __init__(self, method _init_layers (line 36) | def _init_layers(self): method init_weights (line 78) | def init_weights(self): method forward (line 89) | def forward(self, feats): FILE: mmdet/models/dense_heads/rpn_head.py class RPNHead (line 15) | class RPNHead(AnchorHead): method __init__ (line 24) | def __init__(self, method _init_layers (line 33) | def _init_layers(self): method forward_single (line 62) | def forward_single(self, x): method loss (line 70) | def loss(self, method _get_bboxes_single (line 103) | def _get_bboxes_single(self, method _bbox_post_process (line 189) | def _bbox_post_process(self, mlvl_scores, mlvl_bboxes, mlvl_valid_anch... method onnx_export (line 237) | def onnx_export(self, x, img_metas): FILE: mmdet/models/dense_heads/sabl_retina_head.py class SABLRetinaHead (line 21) | class SABLRetinaHead(BaseDenseHead, BBoxTestMixin): method __init__ (line 54) | def __init__(self, method num_anchors (line 158) | def num_anchors(self): method _init_layers (line 163) | def _init_layers(self): method forward_single (line 194) | def forward_single(self, x): method forward (line 207) | def forward(self, feats): method get_anchors (line 210) | def get_anchors(self, featmap_sizes, img_metas, device='cuda'): method get_target (line 231) | def get_target(self, method _get_target_single (line 331) | def _get_target_single(self, method loss_single (line 448) | def loss_single(self, cls_score, bbox_pred, labels, label_weights, method loss (line 481) | def loss(self, method get_bboxes (line 535) | def get_bboxes(self, method _get_bboxes_single (line 567) | def _get_bboxes_single(self, FILE: mmdet/models/dense_heads/solo_head.py class SOLOHead (line 17) | class SOLOHead(BaseMaskHead): method __init__ (line 50) | def __init__( method _init_layers (line 103) | def _init_layers(self): method resize_feats (line 133) | def resize_feats(self, feats): method forward (line 155) | def forward(self, feats): method loss (line 201) | def loss(self, method _get_targets_single (line 291) | def _get_targets_single(self, method get_results (line 439) | def get_results(self, mlvl_mask_preds, mlvl_cls_scores, img_metas, method _get_results_single (line 488) | def _get_results_single(self, cls_scores, mask_preds, img_meta, cfg=No... class DecoupledSOLOHead (line 590) | class DecoupledSOLOHead(SOLOHead): method __init__ (line 599) | def __init__(self, method _init_layers (line 623) | def _init_layers(self): method forward (line 667) | def forward(self, feats): method loss (line 728) | def loss(self, method _get_targets_single (line 831) | def _get_targets_single(self, method get_results (line 874) | def get_results(self, method _get_results_single (line 939) | def _get_results_single(self, cls_scores, mask_preds_x, mask_preds_y, class DecoupledSOLOLightHead (line 1063) | class DecoupledSOLOLightHead(DecoupledSOLOHead): method __init__ (line 1073) | def __init__(self, method _init_layers (line 1100) | def _init_layers(self): method forward (line 1143) | def forward(self, feats): FILE: mmdet/models/dense_heads/solov2_head.py class MaskFeatModule (line 19) | class MaskFeatModule(BaseModule): method __init__ (line 42) | def __init__(self, method _init_layers (line 66) | def _init_layers(self): method forward (line 134) | def forward(self, feats): class SOLOV2Head (line 154) | class SOLOV2Head(SOLOHead): method __init__ (line 170) | def __init__(self, method _init_layers (line 211) | def _init_layers(self): method forward (line 254) | def forward(self, feats): method _get_targets_single (line 294) | def _get_targets_single(self, method loss (line 462) | def loss(self, method get_results (line 584) | def get_results(self, mlvl_kernel_preds, mlvl_cls_scores, mask_feats, method _get_results_single (line 645) | def _get_results_single(self, FILE: mmdet/models/dense_heads/ssd_head.py class SSDHead (line 19) | class SSDHead(AnchorHead): method __init__ (line 50) | def __init__(self, method num_anchors (line 116) | def num_anchors(self): method _init_layers (line 125) | def _init_layers(self): method forward (line 196) | def forward(self, feats): method loss_single (line 220) | def loss_single(self, cls_score, bbox_pred, anchor, labels, label_weig... method loss (line 279) | def loss(self, FILE: mmdet/models/dense_heads/tood_head.py class TaskDecomposition (line 17) | class TaskDecomposition(nn.Module): method __init__ (line 28) | def __init__(self, method init_weights (line 58) | def init_weights(self): method forward (line 64) | def forward(self, feat, avg_feat=None): class TOODHead (line 90) | class TOODHead(ATSSHead): method __init__ (line 113) | def __init__(self, method _init_layers (line 142) | def _init_layers(self): method init_weights (line 191) | def init_weights(self): method forward (line 210) | def forward(self, feats): method deform_sampling (line 284) | def deform_sampling(self, feat, offset): method anchor_center (line 297) | def anchor_center(self, anchors): method loss_single (line 310) | def loss_single(self, anchors, cls_score, bbox_pred, labels, label_wei... method loss (line 383) | def loss(self, method _get_bboxes_single (line 462) | def _get_bboxes_single(self, method get_targets (line 549) | def get_targets(self, method _get_target_single (line 664) | def _get_target_single(self, FILE: mmdet/models/dense_heads/vfnet_head.py class VFNetHead (line 22) | class VFNetHead(ATSSHead, FCOSHead): method __init__ (line 68) | def __init__(self, method num_anchors (line 176) | def num_anchors(self): method anchor_generator (line 186) | def anchor_generator(self): method _init_layers (line 191) | def _init_layers(self): method forward (line 226) | def forward(self, feats): method forward_single (line 248) | def forward_single(self, x, scale, scale_refine, stride, reg_denom): method star_dcn_offset (line 309) | def star_dcn_offset(self, bbox_pred, gradient_mul, stride): method loss (line 351) | def loss(self, method get_targets (line 500) | def get_targets(self, cls_scores, mlvl_points, gt_bboxes, gt_labels, method _get_target_single (line 535) | def _get_target_single(self, *args, **kwargs): method get_fcos_targets (line 542) | def get_fcos_targets(self, points, gt_bboxes_list, gt_labels_list): method get_anchors (line 568) | def get_anchors(self, featmap_sizes, img_metas, device='cuda'): method get_atss_targets (line 598) | def get_atss_targets(self, method transform_bbox_targets (line 677) | def transform_bbox_targets(self, decoded_bboxes, mlvl_points, num_imgs): method _load_from_state_dict (line 703) | def _load_from_state_dict(self, state_dict, prefix, local_metadata, st... method _get_points_single (line 709) | def _get_points_single(self, FILE: mmdet/models/dense_heads/yolact_head.py class YOLACTHead (line 16) | class YOLACTHead(AnchorHead): method __init__ (line 44) | def __init__(self, method _init_layers (line 89) | def _init_layers(self): method forward_single (line 117) | def forward_single(self, x): method loss (line 140) | def loss(self, method loss_single_OHEM (line 261) | def loss_single_OHEM(self, cls_score, bbox_pred, anchors, labels, method get_bboxes (line 297) | def get_bboxes(self, method _get_bboxes_single (line 358) | def _get_bboxes_single(self, class YOLACTSegmHead (line 457) | class YOLACTSegmHead(BaseModule): method __init__ (line 472) | def __init__(self, method _init_layers (line 490) | def _init_layers(self): method forward (line 495) | def forward(self, x): method loss (line 509) | def loss(self, segm_pred, gt_masks, gt_labels): method get_targets (line 542) | def get_targets(self, segm_pred, gt_masks, gt_labels): method simple_test (line 572) | def simple_test(self, feats, img_metas, rescale=False): class YOLACTProtonet (line 580) | class YOLACTProtonet(BaseModule): method __init__ (line 599) | def __init__(self, method _init_layers (line 625) | def _init_layers(self): method forward_dummy (line 662) | def forward_dummy(self, x): method forward (line 666) | def forward(self, x, coeff_pred, bboxes, img_meta, sampling_results=No... method loss (line 743) | def loss(self, mask_pred, gt_masks, gt_bboxes, img_meta, sampling_resu... method get_targets (line 816) | def get_targets(self, mask_pred, gt_masks, pos_assigned_gt_inds): method get_seg_masks (line 841) | def get_seg_masks(self, mask_pred, label_pred, img_meta, rescale): method crop (line 876) | def crop(self, masks, boxes, padding=1): method sanitize_coordinates (line 910) | def sanitize_coordinates(self, x1, x2, img_size, padding=0, cast=True): method simple_test (line 941) | def simple_test(self, class InterpolateModule (line 1004) | class InterpolateModule(BaseModule): method __init__ (line 1010) | def __init__(self, *args, init_cfg=None, **kwargs): method forward (line 1016) | def forward(self, x): FILE: mmdet/models/dense_heads/yolo_head.py class YOLOV3Head (line 23) | class YOLOV3Head(BaseDenseHead, BBoxTestMixin): method __init__ (line 51) | def __init__(self, method anchor_generator (line 125) | def anchor_generator(self): method num_anchors (line 132) | def num_anchors(self): method num_levels (line 142) | def num_levels(self): method num_attrib (line 146) | def num_attrib(self): method _init_layers (line 152) | def _init_layers(self): method init_weights (line 170) | def init_weights(self): method forward (line 186) | def forward(self, feats): method get_bboxes (line 209) | def get_bboxes(self, method loss (line 301) | def loss(self, method loss_single (line 352) | def loss_single(self, pred_map, target_map, neg_map): method get_targets (line 397) | def get_targets(self, anchor_list, responsible_flag_list, gt_bboxes_list, method _get_targets_single (line 433) | def _get_targets_single(self, anchors, responsible_flags, gt_bboxes, method aug_test (line 494) | def aug_test(self, feats, img_metas, rescale=False): method onnx_export (line 513) | def onnx_export(self, pred_maps, img_metas, with_nms=True): FILE: mmdet/models/dense_heads/yolof_head.py function levels_to_images (line 15) | def levels_to_images(mlvl_tensor): class YOLOFHead (line 43) | class YOLOFHead(AnchorHead): method __init__ (line 56) | def __init__(self, method _init_layers (line 68) | def _init_layers(self): method init_weights (line 108) | def init_weights(self): method forward_single (line 119) | def forward_single(self, feature): method loss (line 137) | def loss(self, method get_targets (line 224) | def get_targets(self, method _get_targets_single (line 311) | def _get_targets_single(self, FILE: mmdet/models/dense_heads/yolox_head.py class YOLOXHead (line 22) | class YOLOXHead(BaseDenseHead, BBoxTestMixin): method __init__ (line 53) | def __init__(self, method _init_layers (line 131) | def _init_layers(self): method _build_stacked_convs (line 145) | def _build_stacked_convs(self): method _build_predictor (line 169) | def _build_predictor(self): method init_weights (line 176) | def init_weights(self): method forward_single (line 185) | def forward_single(self, x, cls_convs, reg_convs, conv_cls, conv_reg, method forward (line 198) | def forward(self, feats): method get_bboxes (line 217) | def get_bboxes(self, method _bbox_decode (line 301) | def _bbox_decode(self, priors, bbox_preds): method _bboxes_nms (line 313) | def _bboxes_nms(self, cls_scores, bboxes, score_factor, cfg): method loss (line 328) | def loss(self, method _get_target_single (line 426) | def _get_target_single(self, cls_preds, objectness, priors, decoded_bb... method _get_l1_target (line 488) | def _get_l1_target(self, l1_target, gt_bboxes, priors, eps=1e-8): FILE: mmdet/models/detectors/atss.py class ATSS (line 7) | class ATSS(SingleStageDetector): method __init__ (line 10) | def __init__(self, FILE: mmdet/models/detectors/autoassign.py class AutoAssign (line 7) | class AutoAssign(SingleStageDetector): method __init__ (line 11) | def __init__(self, FILE: mmdet/models/detectors/base.py class BaseDetector (line 14) | class BaseDetector(BaseModule, metaclass=ABCMeta): method __init__ (line 17) | def __init__(self, init_cfg=None): method with_neck (line 22) | def with_neck(self): method with_shared_head (line 29) | def with_shared_head(self): method with_bbox (line 34) | def with_bbox(self): method with_mask (line 40) | def with_mask(self): method extract_feat (line 46) | def extract_feat(self, imgs): method extract_feats (line 50) | def extract_feats(self, imgs): method forward_train (line 63) | def forward_train(self, imgs, img_metas, **kwargs): method async_simple_test (line 82) | async def async_simple_test(self, img, img_metas, **kwargs): method simple_test (line 86) | def simple_test(self, img, img_metas, **kwargs): method aug_test (line 90) | def aug_test(self, imgs, img_metas, **kwargs): method aforward_test (line 94) | async def aforward_test(self, *, img, img_metas, **kwargs): method forward_test (line 112) | def forward_test(self, imgs, img_metas, **kwargs): method forward (line 157) | def forward(self, img, img_metas, return_loss=True, **kwargs): method _parse_losses (line 176) | def _parse_losses(self, losses): method train_step (line 221) | def train_step(self, data, optimizer): method val_step (line 256) | def val_step(self, data, optimizer=None): method show_result (line 276) | def show_result(self, method onnx_export (line 363) | def onnx_export(self, img, img_metas): FILE: mmdet/models/detectors/cascade_rcnn.py class CascadeRCNN (line 7) | class CascadeRCNN(TwoStageDetector): method __init__ (line 11) | def __init__(self, method show_result (line 30) | def show_result(self, data, result, **kwargs): FILE: mmdet/models/detectors/centernet.py class CenterNet (line 11) | class CenterNet(SingleStageDetector): method __init__ (line 17) | def __init__(self, method merge_aug_results (line 28) | def merge_aug_results(self, aug_results, with_nms): method aug_test (line 54) | def aug_test(self, imgs, img_metas, rescale=True): FILE: mmdet/models/detectors/cornernet.py class CornerNet (line 10) | class CornerNet(SingleStageDetector): method __init__ (line 17) | def __init__(self, method merge_aug_results (line 28) | def merge_aug_results(self, aug_results, img_metas): method aug_test (line 62) | def aug_test(self, imgs, img_metas, rescale=False): FILE: mmdet/models/detectors/ddod.py class DDOD (line 7) | class DDOD(SingleStageDetector): method __init__ (line 10) | def __init__(self, FILE: mmdet/models/detectors/deformable_detr.py class DeformableDETR (line 7) | class DeformableDETR(DETR): method __init__ (line 9) | def __init__(self, *args, **kwargs): FILE: mmdet/models/detectors/detr.py class DETR (line 11) | class DETR(SingleStageDetector): method __init__ (line 15) | def __init__(self, method forward_dummy (line 27) | def forward_dummy(self, img): method onnx_export (line 50) | def onnx_export(self, img, img_metas): FILE: mmdet/models/detectors/fast_rcnn.py class FastRCNN (line 7) | class FastRCNN(TwoStageDetector): method __init__ (line 10) | def __init__(self, method forward_test (line 27) | def forward_test(self, imgs, img_metas, proposals, **kwargs): FILE: mmdet/models/detectors/faster_rcnn.py class FasterRCNN (line 7) | class FasterRCNN(TwoStageDetector): method __init__ (line 10) | def __init__(self, FILE: mmdet/models/detectors/fcos.py class FCOS (line 7) | class FCOS(SingleStageDetector): method __init__ (line 10) | def __init__(self, FILE: mmdet/models/detectors/fovea.py class FOVEA (line 7) | class FOVEA(SingleStageDetector): method __init__ (line 10) | def __init__(self, FILE: mmdet/models/detectors/fsaf.py class FSAF (line 7) | class FSAF(SingleStageDetector): method __init__ (line 10) | def __init__(self, FILE: mmdet/models/detectors/gfl.py class GFL (line 7) | class GFL(SingleStageDetector): method __init__ (line 9) | def __init__(self, FILE: mmdet/models/detectors/grid_rcnn.py class GridRCNN (line 7) | class GridRCNN(TwoStageDetector): method __init__ (line 15) | def __init__(self, FILE: mmdet/models/detectors/htc.py class HybridTaskCascade (line 7) | class HybridTaskCascade(CascadeRCNN): method __init__ (line 10) | def __init__(self, **kwargs): method with_semantic (line 14) | def with_semantic(self): FILE: mmdet/models/detectors/kd_one_stage.py class KnowledgeDistillationSingleStageDetector (line 14) | class KnowledgeDistillationSingleStageDetector(SingleStageDetector): method __init__ (line 25) | def __init__(self, method forward_train (line 46) | def forward_train(self, method cuda (line 78) | def cuda(self, device=None): method train (line 84) | def train(self, mode=True): method __setattr__ (line 92) | def __setattr__(self, name, value): FILE: mmdet/models/detectors/lad.py class LAD (line 11) | class LAD(KnowledgeDistillationSingleStageDetector): method __init__ (line 14) | def __init__(self, method with_teacher_neck (line 42) | def with_teacher_neck(self): method extract_teacher_feat (line 47) | def extract_teacher_feat(self, img): method forward_train (line 54) | def forward_train(self, FILE: mmdet/models/detectors/mask2former.py class Mask2Former (line 7) | class Mask2Former(MaskFormer): method __init__ (line 12) | def __init__(self, FILE: mmdet/models/detectors/mask_rcnn.py class MaskRCNN (line 7) | class MaskRCNN(TwoStageDetector): method __init__ (line 10) | def __init__(self, FILE: mmdet/models/detectors/mask_scoring_rcnn.py class MaskScoringRCNN (line 7) | class MaskScoringRCNN(TwoStageDetector): method __init__ (line 13) | def __init__(self, FILE: mmdet/models/detectors/maskformer.py class MaskFormer (line 14) | class MaskFormer(SingleStageDetector): method __init__ (line 19) | def __init__(self, method forward_dummy (line 52) | def forward_dummy(self, img, img_metas): method forward_train (line 70) | def forward_train(self, method simple_test (line 113) | def simple_test(self, imgs, img_metas, **kwargs): method aug_test (line 181) | def aug_test(self, imgs, img_metas, **kwargs): method onnx_export (line 184) | def onnx_export(self, img, img_metas): method _show_pan_result (line 187) | def _show_pan_result(self, FILE: mmdet/models/detectors/nasfcos.py class NASFCOS (line 7) | class NASFCOS(SingleStageDetector): method __init__ (line 13) | def __init__(self, FILE: mmdet/models/detectors/paa.py class PAA (line 7) | class PAA(SingleStageDetector): method __init__ (line 10) | def __init__(self, FILE: mmdet/models/detectors/panoptic_fpn.py class PanopticFPN (line 7) | class PanopticFPN(TwoStagePanopticSegmentor): method __init__ (line 11) | def __init__( FILE: mmdet/models/detectors/panoptic_two_stage_segmentor.py class TwoStagePanopticSegmentor (line 14) | class TwoStagePanopticSegmentor(TwoStageDetector): method __init__ (line 21) | def __init__( method with_semantic_head (line 52) | def with_semantic_head(self): method with_panoptic_fusion_head (line 57) | def with_panoptic_fusion_head(self): method forward_dummy (line 61) | def forward_dummy(self, img): method forward_train (line 69) | def forward_train(self, method simple_test_mask (line 108) | def simple_test_mask(self, method simple_test (line 169) | def simple_test(self, img, img_metas, proposals=None, rescale=False): method show_result (line 208) | def show_result(self, FILE: mmdet/models/detectors/point_rend.py class PointRend (line 7) | class PointRend(TwoStageDetector): method __init__ (line 15) | def __init__(self, FILE: mmdet/models/detectors/queryinst.py class QueryInst (line 7) | class QueryInst(SparseRCNN): method __init__ (line 11) | def __init__(self, FILE: mmdet/models/detectors/reppoints_detector.py class RepPointsDetector (line 7) | class RepPointsDetector(SingleStageDetector): method __init__ (line 14) | def __init__(self, FILE: mmdet/models/detectors/retinanet.py class RetinaNet (line 7) | class RetinaNet(SingleStageDetector): method __init__ (line 10) | def __init__(self, FILE: mmdet/models/detectors/rpn.py class RPN (line 15) | class RPN(BaseDetector): method __init__ (line 18) | def __init__(self, method extract_feat (line 40) | def extract_feat(self, img): method forward_dummy (line 55) | def forward_dummy(self, img): method forward_train (line 61) | def forward_train(self, method simple_test (line 92) | def simple_test(self, img, img_metas, rescale=False): method aug_test (line 118) | def aug_test(self, imgs, img_metas, rescale=False): method show_result (line 143) | def show_result(self, data, result, top_k=20, **kwargs): FILE: mmdet/models/detectors/scnet.py class SCNet (line 7) | class SCNet(CascadeRCNN): method __init__ (line 10) | def __init__(self, **kwargs): FILE: mmdet/models/detectors/single_stage.py class SingleStageDetector (line 12) | class SingleStageDetector(BaseDetector): method __init__ (line 19) | def __init__(self, method extract_feat (line 41) | def extract_feat(self, img): method forward_dummy (line 48) | def forward_dummy(self, img): method forward_train (line 57) | def forward_train(self, method simple_test (line 87) | def simple_test(self, img, img_metas, rescale=False): method aug_test (line 110) | def aug_test(self, imgs, img_metas, rescale=False): method onnx_export (line 141) | def onnx_export(self, img, img_metas, with_nms=True): FILE: mmdet/models/detectors/single_stage_instance_seg.py class SingleStageInstanceSegmentor (line 17) | class SingleStageInstanceSegmentor(BaseDetector): method __init__ (line 20) | def __init__(self, method extract_feat (line 56) | def extract_feat(self, img): method forward_dummy (line 63) | def forward_dummy(self, img): method forward_train (line 71) | def forward_train(self, method simple_test (line 142) | def simple_test(self, img, img_metas, rescale=False): method format_results (line 184) | def format_results(self, results): method aug_test (line 252) | def aug_test(self, imgs, img_metas, rescale=False): method show_result (line 255) | def show_result(self, FILE: mmdet/models/detectors/solo.py class SOLO (line 7) | class SOLO(SingleStageInstanceSegmentor): method __init__ (line 13) | def __init__(self, FILE: mmdet/models/detectors/solov2.py class SOLOv2 (line 7) | class SOLOv2(SingleStageInstanceSegmentor): method __init__ (line 13) | def __init__(self, FILE: mmdet/models/detectors/sparse_rcnn.py class SparseRCNN (line 7) | class SparseRCNN(TwoStageDetector): method __init__ (line 11) | def __init__(self, *args, **kwargs): method forward_train (line 16) | def forward_train(self, method simple_test (line 67) | def simple_test(self, img, img_metas, rescale=False): method forward_dummy (line 93) | def forward_dummy(self, img): FILE: mmdet/models/detectors/tood.py class TOOD (line 7) | class TOOD(SingleStageDetector): method __init__ (line 11) | def __init__(self, method set_epoch (line 22) | def set_epoch(self, epoch): FILE: mmdet/models/detectors/trident_faster_rcnn.py class TridentFasterRCNN (line 7) | class TridentFasterRCNN(FasterRCNN): method __init__ (line 10) | def __init__(self, method simple_test (line 34) | def simple_test(self, img, img_metas, proposals=None, rescale=False): method aug_test (line 49) | def aug_test(self, imgs, img_metas, rescale=False): method forward_train (line 62) | def forward_train(self, img, img_metas, gt_bboxes, gt_labels, **kwargs): FILE: mmdet/models/detectors/two_stage.py class TwoStageDetector (line 11) | class TwoStageDetector(BaseDetector): method __init__ (line 18) | def __init__(self, method with_rpn (line 56) | def with_rpn(self): method with_roi_head (line 61) | def with_roi_head(self): method extract_feat (line 65) | def extract_feat(self, img): method forward_dummy (line 72) | def forward_dummy(self, img): method forward_train (line 90) | def forward_train(self, method async_simple_test (line 155) | async def async_simple_test(self, method simple_test (line 173) | def simple_test(self, img, img_metas, proposals=None, rescale=False): method aug_test (line 186) | def aug_test(self, imgs, img_metas, rescale=False): method onnx_export (line 197) | def onnx_export(self, img, img_metas): FILE: mmdet/models/detectors/vfnet.py class VFNet (line 7) | class VFNet(SingleStageDetector): method __init__ (line 11) | def __init__(self, FILE: mmdet/models/detectors/yolact.py class YOLACT (line 10) | class YOLACT(SingleStageDetector): method __init__ (line 13) | def __init__(self, method forward_dummy (line 28) | def forward_dummy(self, img): method forward_train (line 38) | def forward_train(self, method simple_test (line 97) | def simple_test(self, img, img_metas, rescale=False): method aug_test (line 117) | def aug_test(self, imgs, img_metas, rescale=False): FILE: mmdet/models/detectors/yolo.py class YOLOV3 (line 10) | class YOLOV3(SingleStageDetector): method __init__ (line 12) | def __init__(self, method onnx_export (line 23) | def onnx_export(self, img, img_metas): FILE: mmdet/models/detectors/yolof.py class YOLOF (line 7) | class YOLOF(SingleStageDetector): method __init__ (line 11) | def __init__(self, FILE: mmdet/models/detectors/yolox.py class YOLOX (line 15) | class YOLOX(SingleStageDetector): method __init__ (line 46) | def __init__(self, method forward_train (line 69) | def forward_train(self, method _preprocess (line 105) | def _preprocess(self, img, gt_bboxes): method _random_resize (line 119) | def _random_resize(self, device): FILE: mmdet/models/losses/accuracy.py function accuracy (line 7) | def accuracy(pred, target, topk=1, thresh=None): class Accuracy (line 54) | class Accuracy(nn.Module): method __init__ (line 56) | def __init__(self, topk=(1, ), thresh=None): method forward (line 69) | def forward(self, pred, target): FILE: mmdet/models/losses/ae_loss.py function ae_loss_per_image (line 11) | def ae_loss_per_image(tl_preds, br_preds, match): class AssociativeEmbeddingLoss (line 75) | class AssociativeEmbeddingLoss(nn.Module): method __init__ (line 88) | def __init__(self, pull_weight=0.25, push_weight=0.25): method forward (line 93) | def forward(self, pred, target, match): FILE: mmdet/models/losses/balanced_l1_loss.py function balanced_l1_loss (line 13) | def balanced_l1_loss(pred, class BalancedL1Loss (line 57) | class BalancedL1Loss(nn.Module): method __init__ (line 74) | def __init__(self, method forward (line 87) | def forward(self, FILE: mmdet/models/losses/cross_entropy_loss.py function cross_entropy (line 12) | def cross_entropy(pred, function _expand_onehot_labels (line 64) | def _expand_onehot_labels(labels, label_weights, label_channels, ignore_... function binary_cross_entropy (line 85) | def binary_cross_entropy(pred, function mask_cross_entropy (line 148) | def mask_cross_entropy(pred, class CrossEntropyLoss (line 201) | class CrossEntropyLoss(nn.Module): method __init__ (line 203) | def __init__(self, method extra_repr (line 252) | def extra_repr(self): method forward (line 257) | def forward(self, FILE: mmdet/models/losses/dice_loss.py function dice_loss (line 9) | def dice_loss(pred, class DiceLoss (line 66) | class DiceLoss(nn.Module): method __init__ (line 68) | def __init__(self, method forward (line 103) | def forward(self, FILE: mmdet/models/losses/focal_loss.py function py_sigmoid_focal_loss (line 12) | def py_sigmoid_focal_loss(pred, function py_focal_loss_with_prob (line 60) | def py_focal_loss_with_prob(pred, function sigmoid_focal_loss (line 113) | def sigmoid_focal_loss(pred, class FocalLoss (line 160) | class FocalLoss(nn.Module): method __init__ (line 162) | def __init__(self, method forward (line 196) | def forward(self, FILE: mmdet/models/losses/gaussian_focal_loss.py function gaussian_focal_loss (line 11) | def gaussian_focal_loss(pred, gaussian_target, alpha=2.0, gamma=4.0): class GaussianFocalLoss (line 33) | class GaussianFocalLoss(nn.Module): method __init__ (line 50) | def __init__(self, method forward (line 61) | def forward(self, FILE: mmdet/models/losses/gfocal_loss.py function quality_focal_loss (line 12) | def quality_focal_loss(pred, target, beta=2.0): function quality_focal_loss_with_prob (line 56) | def quality_focal_loss_with_prob(pred, target, beta=2.0): function distribution_focal_loss (line 103) | def distribution_focal_loss(pred, label): class QualityFocalLoss (line 128) | class QualityFocalLoss(nn.Module): method __init__ (line 146) | def __init__(self, method forward (line 160) | def forward(self, class DistributionFocalLoss (line 203) | class DistributionFocalLoss(nn.Module): method __init__ (line 213) | def __init__(self, reduction='mean', loss_weight=1.0): method forward (line 218) | def forward(self, FILE: mmdet/models/losses/ghm_loss.py function _expand_onehot_labels (line 10) | def _expand_onehot_labels(labels, label_weights, label_channels): class GHMC (line 23) | class GHMC(nn.Module): method __init__ (line 39) | def __init__(self, method forward (line 60) | def forward(self, class GHMR (line 122) | class GHMR(nn.Module): method __init__ (line 138) | def __init__(self, method forward (line 158) | def forward(self, FILE: mmdet/models/losses/iou_loss.py function iou_loss (line 16) | def iou_loss(pred, target, linear=False, mode='log', eps=1e-6): function bounded_iou_loss (line 55) | def bounded_iou_loss(pred, target, beta=0.2, eps=1e-3): function giou_loss (line 102) | def giou_loss(pred, target, eps=1e-7): function diou_loss (line 122) | def diou_loss(pred, target, eps=1e-7): function ciou_loss (line 177) | def ciou_loss(pred, target, eps=1e-7): class IoULoss (line 241) | class IoULoss(nn.Module): method __init__ (line 256) | def __init__(self, method forward (line 275) | def forward(self, class BoundedIoULoss (line 322) | class BoundedIoULoss(nn.Module): method __init__ (line 324) | def __init__(self, beta=0.2, eps=1e-3, reduction='mean', loss_weight=1... method forward (line 331) | def forward(self, class GIoULoss (line 358) | class GIoULoss(nn.Module): method __init__ (line 360) | def __init__(self, eps=1e-6, reduction='mean', loss_weight=1.0): method forward (line 366) | def forward(self, class DIoULoss (line 398) | class DIoULoss(nn.Module): method __init__ (line 400) | def __init__(self, eps=1e-6, reduction='mean', loss_weight=1.0): method forward (line 406) | def forward(self, class CIoULoss (line 438) | class CIoULoss(nn.Module): method __init__ (line 440) | def __init__(self, eps=1e-6, reduction='mean', loss_weight=1.0): method forward (line 446) | def forward(self, FILE: mmdet/models/losses/kd_loss.py function knowledge_distillation_kl_div_loss (line 12) | def knowledge_distillation_kl_div_loss(pred, class KnowledgeDistillationKLDivLoss (line 40) | class KnowledgeDistillationKLDivLoss(nn.Module): method __init__ (line 49) | def __init__(self, reduction='mean', loss_weight=1.0, T=10): method forward (line 56) | def forward(self, FILE: mmdet/models/losses/mse_loss.py function mse_loss (line 10) | def mse_loss(pred, target): class MSELoss (line 16) | class MSELoss(nn.Module): method __init__ (line 25) | def __init__(self, reduction='mean', loss_weight=1.0): method forward (line 30) | def forward(self, FILE: mmdet/models/losses/pisa_loss.py function isr_p (line 9) | def isr_p(cls_score, function carl_loss (line 123) | def carl_loss(cls_score, FILE: mmdet/models/losses/seesaw_loss.py function seesaw_ce_loss (line 12) | def seesaw_ce_loss(cls_score, class SeesawLoss (line 80) | class SeesawLoss(nn.Module): method __init__ (line 103) | def __init__(self, method _split_cls_score (line 138) | def _split_cls_score(self, cls_score): method get_cls_channels (line 145) | def get_cls_channels(self, num_classes): method get_activation (line 157) | def get_activation(self, cls_score): method get_accuracy (line 177) | def get_accuracy(self, cls_score, labels): method forward (line 199) | def forward(self, FILE: mmdet/models/losses/smooth_l1_loss.py function smooth_l1_loss (line 12) | def smooth_l1_loss(pred, target, beta=1.0): function l1_loss (line 37) | def l1_loss(pred, target): class SmoothL1Loss (line 56) | class SmoothL1Loss(nn.Module): method __init__ (line 67) | def __init__(self, beta=1.0, reduction='mean', loss_weight=1.0): method forward (line 73) | def forward(self, class L1Loss (line 108) | class L1Loss(nn.Module): method __init__ (line 117) | def __init__(self, reduction='mean', loss_weight=1.0): method forward (line 122) | def forward(self, FILE: mmdet/models/losses/utils.py function reduce_loss (line 9) | def reduce_loss(loss, reduction): function weight_reduce_loss (line 30) | def weight_reduce_loss(loss, weight=None, reduction='mean', avg_factor=N... function weighted_loss (line 62) | def weighted_loss(loss_func): FILE: mmdet/models/losses/varifocal_loss.py function varifocal_loss (line 11) | def varifocal_loss(pred, class VarifocalLoss (line 60) | class VarifocalLoss(nn.Module): method __init__ (line 62) | def __init__(self, method forward (line 97) | def forward(self, FILE: mmdet/models/necks/bfp.py class BFP (line 11) | class BFP(BaseModule): method __init__ (line 33) | def __init__(self, method forward (line 70) | def forward(self, inputs): FILE: mmdet/models/necks/channel_mapper.py class ChannelMapper (line 10) | class ChannelMapper(BaseModule): method __init__ (line 46) | def __init__(self, method forward (line 90) | def forward(self, inputs): FILE: mmdet/models/necks/ct_resnet_neck.py class CTResNetNeck (line 12) | class CTResNetNeck(BaseModule): method __init__ (line 24) | def __init__(self, method _make_deconv_layer (line 38) | def _make_deconv_layer(self, num_deconv_filters, num_deconv_kernels): method init_weights (line 64) | def init_weights(self): method forward (line 91) | def forward(self, inputs): FILE: mmdet/models/necks/dilated_encoder.py class Bottleneck (line 10) | class Bottleneck(nn.Module): method __init__ (line 24) | def __init__(self, method forward (line 42) | def forward(self, x): class DilatedEncoder (line 52) | class DilatedEncoder(nn.Module): method __init__ (line 68) | def __init__(self, in_channels, out_channels, block_mid_channels, method _init_layers (line 78) | def _init_layers(self): method init_weights (line 95) | def init_weights(self): method forward (line 106) | def forward(self, feature): FILE: mmdet/models/necks/dyhead.py class DyDCNv2 (line 17) | class DyDCNv2(nn.Module): method __init__ (line 32) | def __init__(self, method forward (line 45) | def forward(self, x, offset, mask): class DyHeadBlock (line 53) | class DyHeadBlock(nn.Module): method __init__ (line 69) | def __init__(self, method _init_weights (line 91) | def _init_weights(self): method forward (line 98) | def forward(self, x): class DyHead (line 132) | class DyHead(BaseModule): method __init__ (line 148) | def __init__(self, method forward (line 172) | def forward(self, inputs): FILE: mmdet/models/necks/fpg.py class Transition (line 10) | class Transition(BaseModule): method __init__ (line 18) | def __init__(self, in_channels, out_channels, init_cfg=None): method forward (line 23) | def forward(x): class UpInterpolationConv (line 27) | class UpInterpolationConv(Transition): method __init__ (line 43) | def __init__(self, method forward (line 63) | def forward(self, x): class LastConv (line 73) | class LastConv(Transition): method __init__ (line 83) | def __init__(self, method forward (line 99) | def forward(self, inputs): class FPG (line 105) | class FPG(BaseModule): method __init__ (line 150) | def __init__(self, method build_trans (line 317) | def build_trans(self, cfg, in_channels, out_channels, **extra_args): method fuse (line 323) | def fuse(self, fuse_dict): method forward (line 333) | def forward(self, inputs): FILE: mmdet/models/necks/fpn.py class FPN (line 11) | class FPN(BaseModule): method __init__ (line 62) | def __init__(self, method forward (line 152) | def forward(self, inputs): FILE: mmdet/models/necks/fpn_carafe.py class FPN_CARAFE (line 11) | class FPN_CARAFE(BaseModule): method __init__ (line 37) | def __init__(self, method init_weights (line 209) | def init_weights(self): method slice_as (line 219) | def slice_as(self, src, dst): method tensor_add (line 239) | def tensor_add(self, a, b): method forward (line 247) | def forward(self, inputs): FILE: mmdet/models/necks/hrfpn.py class HRFPN (line 13) | class HRFPN(BaseModule): method __init__ (line 33) | def __init__(self, method forward (line 77) | def forward(self, inputs): FILE: mmdet/models/necks/nas_fpn.py class NASFPN (line 11) | class NASFPN(BaseModule): method __init__ (line 33) | def __init__(self, method forward (line 127) | def forward(self, inputs): FILE: mmdet/models/necks/nasfcos_fpn.py class NASFCOS_FPN (line 12) | class NASFCOS_FPN(BaseModule): method __init__ (line 35) | def __init__(self, method forward (line 123) | def forward(self, inputs): method init_weights (line 157) | def init_weights(self): FILE: mmdet/models/necks/pafpn.py class PAFPN (line 12) | class PAFPN(FPN): method __init__ (line 46) | def __init__(self, method forward (line 100) | def forward(self, inputs): FILE: mmdet/models/necks/rfp.py class ASPP (line 12) | class ASPP(BaseModule): method __init__ (line 26) | def __init__(self, method forward (line 48) | def forward(self, x): class RFP (line 60) | class RFP(FPN): method __init__ (line 78) | def __init__(self, method init_weights (line 105) | def init_weights(self): method forward (line 117) | def forward(self, inputs): FILE: mmdet/models/necks/ssd_neck.py class SSDNeck (line 11) | class SSDNeck(BaseModule): method __init__ (line 33) | def __init__(self, method forward (line 93) | def forward(self, inputs): class L2Norm (line 106) | class L2Norm(nn.Module): method __init__ (line 108) | def __init__(self, n_dims, scale=20., eps=1e-10): method forward (line 123) | def forward(self, x): FILE: mmdet/models/necks/yolo_neck.py class DetectionBlock (line 12) | class DetectionBlock(BaseModule): method __init__ (line 35) | def __init__(self, method forward (line 55) | def forward(self, x): class YOLOV3Neck (line 65) | class YOLOV3Neck(BaseModule): method __init__ (line 92) | def __init__(self, method forward (line 120) | def forward(self, feats): FILE: mmdet/models/necks/yolox_pafpn.py class YOLOXPAFPN (line 14) | class YOLOXPAFPN(BaseModule): method __init__ (line 35) | def __init__(self, method forward (line 117) | def forward(self, inputs): FILE: mmdet/models/plugins/dropblock.py class DropBlock (line 11) | class DropBlock(nn.Module): method __init__ (line 25) | def __init__(self, drop_prob, block_size, warmup_iters=2000, **kwargs): method forward (line 35) | def forward(self, x): method _compute_gamma (line 62) | def _compute_gamma(self, feat_size): method extra_repr (line 83) | def extra_repr(self): FILE: mmdet/models/plugins/msdeformattn_pixel_decoder.py class MSDeformAttnPixelDecoder (line 16) | class MSDeformAttnPixelDecoder(BaseModule): method __init__ (line 40) | def __init__(self, method init_weights (line 135) | def init_weights(self): method forward (line 161) | def forward(self, feats): FILE: mmdet/models/plugins/pixel_decoder.py class PixelDecoder (line 12) | class PixelDecoder(BaseModule): method __init__ (line 34) | def __init__(self, method init_weights (line 79) | def init_weights(self): method forward (line 88) | def forward(self, feats, img_metas): class TransformerEncoderPixelDecoder (line 116) | class TransformerEncoderPixelDecoder(PixelDecoder): method __init__ (line 138) | def __init__(self, method init_weights (line 178) | def init_weights(self): method forward (line 192) | def forward(self, feats, img_metas): FILE: mmdet/models/roi_heads/base_roi_head.py class BaseRoIHead (line 9) | class BaseRoIHead(BaseModule, metaclass=ABCMeta): method __init__ (line 12) | def __init__(self, method with_bbox (line 38) | def with_bbox(self): method with_mask (line 43) | def with_mask(self): method with_shared_head (line 48) | def with_shared_head(self): method init_bbox_head (line 53) | def init_bbox_head(self): method init_mask_head (line 58) | def init_mask_head(self): method init_assigner_sampler (line 63) | def init_assigner_sampler(self): method forward_train (line 68) | def forward_train(self, method async_simple_test (line 79) | async def async_simple_test(self, method simple_test (line 89) | def simple_test(self, method aug_test (line 98) | def aug_test(self, x, proposal_list, img_metas, rescale=False, **kwargs): FILE: mmdet/models/roi_heads/bbox_heads/bbox_head.py class BBoxHead (line 15) | class BBoxHead(BaseModule): method __init__ (line 19) | def __init__(self, method custom_cls_channels (line 97) | def custom_cls_channels(self): method custom_activation (line 101) | def custom_activation(self): method custom_accuracy (line 105) | def custom_accuracy(self): method forward (line 109) | def forward(self, x): method _get_target_single (line 122) | def _get_target_single(self, pos_bboxes, neg_bboxes, pos_gt_bboxes, method get_targets (line 189) | def get_targets(self, method loss (line 257) | def loss(self, method get_bboxes (line 316) | def get_bboxes(self, method refine_bboxes (line 381) | def refine_bboxes(self, rois, labels, bbox_preds, pos_is_gts, img_metas): method regress_by_class (line 460) | def regress_by_class(self, rois, label, bbox_pred, img_meta): method onnx_export (line 499) | def onnx_export(self, FILE: mmdet/models/roi_heads/bbox_heads/convfc_bbox_head.py class ConvFCBBoxHead (line 11) | class ConvFCBBoxHead(BBoxHead): method __init__ (line 22) | def __init__(self, method _add_conv_fc_branch (line 118) | def _add_conv_fc_branch(self, method forward (line 159) | def forward(self, x): class Shared2FCBBoxHead (line 201) | class Shared2FCBBoxHead(ConvFCBBoxHead): method __init__ (line 203) | def __init__(self, fc_out_channels=1024, *args, **kwargs): class Shared4Conv1FCBBoxHead (line 217) | class Shared4Conv1FCBBoxHead(ConvFCBBoxHead): method __init__ (line 219) | def __init__(self, fc_out_channels=1024, *args, **kwargs): FILE: mmdet/models/roi_heads/bbox_heads/dii_head.py class DIIHead (line 18) | class DIIHead(BBoxHead): method __init__ (line 46) | def __init__(self, method init_weights (line 125) | def init_weights(self): method forward (line 141) | def forward(self, roi_feat, proposal_feat): method loss (line 201) | def loss(self, method _get_target_single (line 285) | def _get_target_single(self, pos_inds, neg_inds, pos_bboxes, neg_bboxes, method get_targets (line 359) | def get_targets(self, FILE: mmdet/models/roi_heads/bbox_heads/double_bbox_head.py class BasicResBlock (line 11) | class BasicResBlock(BaseModule): method __init__ (line 26) | def __init__(self, method forward (line 63) | def forward(self, x): class DoubleConvFCBBoxHead (line 77) | class DoubleConvFCBBoxHead(BBoxHead): method __init__ (line 91) | def __init__(self, method _add_conv_branch (line 136) | def _add_conv_branch(self): method _add_fc_branch (line 148) | def _add_fc_branch(self): method forward (line 158) | def forward(self, x_cls, x_reg): FILE: mmdet/models/roi_heads/bbox_heads/sabl_head.py class SABLHead (line 15) | class SABLHead(BaseModule): method __init__ (line 58) | def __init__(self, method custom_cls_channels (line 210) | def custom_cls_channels(self): method custom_activation (line 214) | def custom_activation(self): method custom_accuracy (line 218) | def custom_accuracy(self): method _add_fc_branch (line 221) | def _add_fc_branch(self, num_branch_fcs, in_channels, roi_feat_size, method cls_forward (line 230) | def cls_forward(self, cls_x): method attention_pool (line 237) | def attention_pool(self, reg_x): method side_aware_feature_extractor (line 250) | def side_aware_feature_extractor(self, reg_x): method reg_pred (line 271) | def reg_pred(self, x, offset_fcs, cls_fcs): method side_aware_split (line 289) | def side_aware_split(self, feat): method bbox_pred_split (line 301) | def bbox_pred_split(self, bbox_pred, num_proposals_per_img): method reg_forward (line 310) | def reg_forward(self, reg_x): method forward (line 329) | def forward(self, x): method get_targets (line 336) | def get_targets(self, sampling_results, gt_bboxes, gt_labels, method bucket_target (line 351) | def bucket_target(self, method _bucket_target_single (line 377) | def _bucket_target_single(self, pos_proposals, neg_proposals, method loss (line 440) | def loss(self, method get_bboxes (line 485) | def get_bboxes(self, method refine_bboxes (line 527) | def refine_bboxes(self, rois, labels, bbox_preds, pos_is_gts, img_metas): method regress_by_class (line 573) | def regress_by_class(self, rois, label, bbox_pred, img_meta): FILE: mmdet/models/roi_heads/bbox_heads/scnet_bbox_head.py class SCNetBBoxHead (line 7) | class SCNetBBoxHead(ConvFCBBoxHead): method _forward_shared (line 14) | def _forward_shared(self, x): method _forward_cls_reg (line 31) | def _forward_cls_reg(self, x): method forward (line 59) | def forward(self, x, return_shared_feat=False): FILE: mmdet/models/roi_heads/cascade_roi_head.py class CascadeRoIHead (line 16) | class CascadeRoIHead(BaseRoIHead, BBoxTestMixin, MaskTestMixin): method __init__ (line 22) | def __init__(self, method init_bbox_head (line 52) | def init_bbox_head(self, bbox_roi_extractor, bbox_head): method init_mask_head (line 72) | def init_mask_head(self, mask_roi_extractor, mask_head): method init_assigner_sampler (line 100) | def init_assigner_sampler(self): method forward_dummy (line 112) | def forward_dummy(self, x, proposals): method _bbox_forward (line 130) | def _bbox_forward(self, stage, x, rois): method _bbox_forward_train (line 143) | def _bbox_forward_train(self, stage, x, sampling_results, gt_bboxes, method _mask_forward (line 158) | def _mask_forward(self, stage, x, rois): method _mask_forward_train (line 170) | def _mask_forward_train(self, method forward_train (line 191) | def forward_train(self, method simple_test (line 288) | def simple_test(self, x, proposal_list, img_metas, rescale=False): method aug_test (line 458) | def aug_test(self, features, proposal_list, img_metas, rescale=False): method onnx_export (line 561) | def onnx_export(self, x, proposals, img_metas): FILE: mmdet/models/roi_heads/double_roi_head.py class DoubleHeadRoIHead (line 7) | class DoubleHeadRoIHead(StandardRoIHead): method __init__ (line 13) | def __init__(self, reg_roi_scale_factor, **kwargs): method _bbox_forward (line 17) | def _bbox_forward(self, x, rois): FILE: mmdet/models/roi_heads/dynamic_roi_head.py class DynamicRoIHead (line 14) | class DynamicRoIHead(StandardRoIHead): method __init__ (line 17) | def __init__(self, **kwargs): method forward_train (line 25) | def forward_train(self, method _bbox_forward_train (line 109) | def _bbox_forward_train(self, x, sampling_results, gt_bboxes, gt_labels, method update_hyperparameters (line 134) | def update_hyperparameters(self): FILE: mmdet/models/roi_heads/grid_roi_head.py class GridRoIHead (line 11) | class GridRoIHead(StandardRoIHead): method __init__ (line 17) | def __init__(self, grid_roi_extractor, grid_head, **kwargs): method _random_jitter (line 28) | def _random_jitter(self, sampling_results, img_metas, amplitude=0.15): method forward_dummy (line 53) | def forward_dummy(self, x, proposals): method _bbox_forward_train (line 79) | def _bbox_forward_train(self, x, sampling_results, gt_bboxes, gt_labels, method simple_test (line 117) | def simple_test(self, FILE: mmdet/models/roi_heads/htc_roi_head.py class HybridTaskCascadeRoIHead (line 14) | class HybridTaskCascadeRoIHead(CascadeRoIHead): method __init__ (line 20) | def __init__(self, method with_semantic (line 44) | def with_semantic(self): method forward_dummy (line 51) | def forward_dummy(self, x, proposals): method _bbox_forward_train (line 86) | def _bbox_forward_train(self, method _mask_forward_train (line 113) | def _mask_forward_train(self, method _bbox_forward (line 158) | def _bbox_forward(self, stage, x, rois, semantic_feat=None): method _mask_forward_test (line 176) | def _mask_forward_test(self, stage, x, bboxes, semantic_feat=None): method forward_train (line 205) | def forward_train(self, method simple_test (line 330) | def simple_test(self, x, proposal_list, img_metas, rescale=False): method aug_test (line 505) | def aug_test(self, img_feats, proposal_list, img_metas, rescale=False): FILE: mmdet/models/roi_heads/mask_heads/coarse_mask_head.py class CoarseMaskHead (line 10) | class CoarseMaskHead(FCNMaskHead): method __init__ (line 26) | def __init__(self, method init_weights (line 84) | def init_weights(self): method forward (line 88) | def forward(self, x): FILE: mmdet/models/roi_heads/mask_heads/dynamic_mask_head.py class DynamicMaskHead (line 14) | class DynamicMaskHead(FCNMaskHead): method __init__ (line 42) | def __init__(self, method init_weights (line 83) | def init_weights(self): method forward (line 92) | def forward(self, roi_feat, proposal_feat): method loss (line 125) | def loss(self, mask_pred, mask_targets, labels): method get_targets (line 139) | def get_targets(self, sampling_results, gt_masks, rcnn_train_cfg): FILE: mmdet/models/roi_heads/mask_heads/fcn_mask_head.py class FCNMaskHead (line 23) | class FCNMaskHead(BaseModule): method __init__ (line 25) | def __init__(self, method init_weights (line 115) | def init_weights(self): method forward (line 128) | def forward(self, x): method get_targets (line 138) | def get_targets(self, sampling_results, gt_masks, rcnn_train_cfg): method loss (line 148) | def loss(self, mask_pred, mask_targets, labels): method get_seg_masks (line 179) | def get_seg_masks(self, mask_pred, det_bboxes, det_labels, rcnn_test_cfg, method onnx_export (line 312) | def onnx_export(self, mask_pred, det_bboxes, det_labels, rcnn_test_cfg, function _do_paste_mask (line 344) | def _do_paste_mask(masks, boxes, img_h, img_w, skip_empty=True): FILE: mmdet/models/roi_heads/mask_heads/feature_relay_head.py class FeatureRelayHead (line 9) | class FeatureRelayHead(BaseModule): method __init__ (line 22) | def __init__(self, method forward (line 43) | def forward(self, x): FILE: mmdet/models/roi_heads/mask_heads/fused_semantic_head.py class FusedSemanticHead (line 13) | class FusedSemanticHead(BaseModule): method __init__ (line 29) | def __init__(self, method forward (line 97) | def forward(self, feats): method loss (line 115) | def loss(self, mask_pred, labels): FILE: mmdet/models/roi_heads/mask_heads/global_context_head.py class GlobalContextHead (line 11) | class GlobalContextHead(BaseModule): method __init__ (line 29) | def __init__(self, method forward (line 80) | def forward(self, feats): method loss (line 94) | def loss(self, pred, labels): FILE: mmdet/models/roi_heads/mask_heads/grid_head.py class GridHead (line 13) | class GridHead(BaseModule): method __init__ (line 15) | def __init__(self, method forward (line 155) | def forward(self, x): method calc_sub_regions (line 193) | def calc_sub_regions(self): method get_targets (line 224) | def get_targets(self, sampling_results, rcnn_train_cfg): method loss (line 292) | def loss(self, grid_pred, grid_targets): method get_bboxes (line 298) | def get_bboxes(self, det_bboxes, grid_pred, img_metas): FILE: mmdet/models/roi_heads/mask_heads/htc_mask_head.py class HTCMaskHead (line 9) | class HTCMaskHead(FCNMaskHead): method __init__ (line 11) | def __init__(self, with_conv_res=True, *args, **kwargs): method forward (line 22) | def forward(self, x, res_feat=None, return_logits=True, return_feat=Tr... FILE: mmdet/models/roi_heads/mask_heads/mask_point_head.py class MaskPointHead (line 16) | class MaskPointHead(BaseModule): method __init__ (line 42) | def __init__(self, method forward (line 88) | def forward(self, fine_grained_feats, coarse_feats): method get_targets (line 109) | def get_targets(self, rois, rel_roi_points, sampling_results, gt_masks, method _get_target_single (line 149) | def _get_target_single(self, rois, rel_roi_points, pos_assigned_gt_inds, method loss (line 167) | def loss(self, point_pred, point_targets, labels): method get_roi_rel_points_train (line 190) | def get_roi_rel_points_train(self, mask_pred, labels, cfg): method get_roi_rel_points_test (line 215) | def get_roi_rel_points_test(self, mask_pred, pred_label, cfg): FILE: mmdet/models/roi_heads/mask_heads/maskiou_head.py class MaskIoUHead (line 13) | class MaskIoUHead(BaseModule): method __init__ (line 19) | def __init__(self, method forward (line 73) | def forward(self, mask_feat, mask_pred): method loss (line 88) | def loss(self, mask_iou_pred, mask_iou_targets): method get_targets (line 98) | def get_targets(self, sampling_results, gt_masks, mask_pred, mask_targ... method _get_area_ratio (line 147) | def _get_area_ratio(self, pos_proposals, pos_assigned_gt_inds, gt_masks): method get_mask_scores (line 174) | def get_mask_scores(self, mask_iou_pred, det_bboxes, det_labels): FILE: mmdet/models/roi_heads/mask_heads/scnet_mask_head.py class SCNetMaskHead (line 8) | class SCNetMaskHead(FCNMaskHead): method __init__ (line 16) | def __init__(self, conv_to_res=True, **kwargs): FILE: mmdet/models/roi_heads/mask_heads/scnet_semantic_head.py class SCNetSemanticHead (line 8) | class SCNetSemanticHead(FusedSemanticHead): method __init__ (line 16) | def __init__(self, conv_to_res=True, **kwargs): FILE: mmdet/models/roi_heads/mask_scoring_roi_head.py class MaskScoringRoIHead (line 10) | class MaskScoringRoIHead(StandardRoIHead): method __init__ (line 16) | def __init__(self, mask_iou_head, **kwargs): method _mask_forward_train (line 21) | def _mask_forward_train(self, x, sampling_results, bbox_feats, gt_masks, method simple_test_mask (line 49) | def simple_test_mask(self, FILE: mmdet/models/roi_heads/pisa_roi_head.py class PISARoIHead (line 9) | class PISARoIHead(StandardRoIHead): method forward_train (line 13) | def forward_train(self, method _bbox_forward (line 87) | def _bbox_forward(self, x, rois): method _bbox_forward_train (line 100) | def _bbox_forward_train(self, FILE: mmdet/models/roi_heads/point_rend_roi_head.py class PointRendRoIHead (line 18) | class PointRendRoIHead(StandardRoIHead): method __init__ (line 21) | def __init__(self, point_head, *args, **kwargs): method init_point_head (line 26) | def init_point_head(self, point_head): method _mask_forward_train (line 30) | def _mask_forward_train(self, x, sampling_results, bbox_feats, gt_masks, method _mask_point_forward_train (line 45) | def _mask_point_forward_train(self, x, sampling_results, mask_pred, method _get_fine_grained_point_feats (line 66) | def _get_fine_grained_point_feats(self, x, rois, rel_roi_points, method _mask_point_forward_test (line 104) | def _mask_point_forward_test(self, x, rois, label_pred, mask_pred, method simple_test_mask (line 155) | def simple_test_mask(self, method aug_test_mask (line 217) | def aug_test_mask(self, feats, img_metas, det_bboxes, det_labels): method _onnx_get_fine_grained_point_feats (line 250) | def _onnx_get_fine_grained_point_feats(self, x, rois, rel_roi_points): method _mask_point_onnx_export (line 284) | def _mask_point_onnx_export(self, x, rois, label_pred, mask_pred): method mask_onnx_export (line 351) | def mask_onnx_export(self, x, img_metas, det_bboxes, det_labels, **kwa... FILE: mmdet/models/roi_heads/roi_extractors/base_roi_extractor.py class BaseRoIExtractor (line 10) | class BaseRoIExtractor(BaseModule, metaclass=ABCMeta): method __init__ (line 21) | def __init__(self, method num_inputs (line 33) | def num_inputs(self): method build_roi_layers (line 37) | def build_roi_layers(self, layer_cfg, featmap_strides): method roi_rescale (line 62) | def roi_rescale(self, rois, scale_factor): method forward (line 87) | def forward(self, feats, rois, roi_scale_factor=None): FILE: mmdet/models/roi_heads/roi_extractors/generic_roi_extractor.py class GenericRoIExtractor (line 10) | class GenericRoIExtractor(BaseRoIExtractor): method __init__ (line 25) | def __init__(self, method forward (line 44) | def forward(self, feats, rois, roi_scale_factor=None): FILE: mmdet/models/roi_heads/roi_extractors/single_level_roi_extractor.py class SingleRoIExtractor (line 10) | class SingleRoIExtractor(BaseRoIExtractor): method __init__ (line 26) | def __init__(self, method map_roi_levels (line 36) | def map_roi_levels(self, rois, num_levels): method forward (line 58) | def forward(self, feats, rois, roi_scale_factor=None): FILE: mmdet/models/roi_heads/scnet_roi_head.py class SCNetRoIHead (line 14) | class SCNetRoIHead(CascadeRoIHead): method __init__ (line 26) | def __init__(self, method init_mask_head (line 50) | def init_mask_head(self, mask_roi_extractor, mask_head): method with_semantic (line 57) | def with_semantic(self): method with_feat_relay (line 63) | def with_feat_relay(self): method with_glbctx (line 69) | def with_glbctx(self): method _fuse_glbctx (line 73) | def _fuse_glbctx(self, roi_feats, glbctx_feat, rois): method _slice_pos_feats (line 83) | def _slice_pos_feats(self, feats, sampling_results): method _bbox_forward (line 96) | def _bbox_forward(self, method _mask_forward (line 125) | def _mask_forward(self, method _bbox_forward_train (line 150) | def _bbox_forward_train(self, method _mask_forward_train (line 179) | def _mask_forward_train(self, method forward_train (line 206) | def forward_train(self, method simple_test (line 314) | def simple_test(self, x, proposal_list, img_metas, rescale=False): method aug_test (line 487) | def aug_test(self, img_feats, proposal_list, img_metas, rescale=False): FILE: mmdet/models/roi_heads/shared_heads/res_layer.py class ResLayer (line 13) | class ResLayer(BaseModule): method __init__ (line 15) | def __init__(self, method forward (line 70) | def forward(self, x): method train (line 75) | def train(self, mode=True): FILE: mmdet/models/roi_heads/sparse_roi_head.py class SparseRoIHead (line 12) | class SparseRoIHead(CascadeRoIHead): method __init__ (line 37) | def __init__(self, method _bbox_forward (line 88) | def _bbox_forward(self, stage, x, rois, object_feats, img_metas): method _mask_forward (line 151) | def _mask_forward(self, stage, x, rois, attn_feats): method _mask_forward_train (line 163) | def _mask_forward_train(self, stage, x, attn_feats, sampling_results, method forward_train (line 184) | def forward_train(self, method simple_test (line 276) | def simple_test(self, method aug_test (line 400) | def aug_test(self, features, proposal_list, img_metas, rescale=False): method forward_dummy (line 404) | def forward_dummy(self, x, proposal_boxes, proposal_features, img_metas): FILE: mmdet/models/roi_heads/standard_roi_head.py class StandardRoIHead (line 11) | class StandardRoIHead(BaseRoIHead, BBoxTestMixin, MaskTestMixin): method init_assigner_sampler (line 14) | def init_assigner_sampler(self): method init_bbox_head (line 23) | def init_bbox_head(self, bbox_roi_extractor, bbox_head): method init_mask_head (line 28) | def init_mask_head(self, mask_roi_extractor, mask_head): method forward_dummy (line 38) | def forward_dummy(self, x, proposals): method forward_train (line 54) | def forward_train(self, method _bbox_forward (line 118) | def _bbox_forward(self, x, rois): method _bbox_forward_train (line 131) | def _bbox_forward_train(self, x, sampling_results, gt_bboxes, gt_labels, method _mask_forward_train (line 146) | def _mask_forward_train(self, x, sampling_results, bbox_feats, gt_masks, method _mask_forward (line 181) | def _mask_forward(self, x, rois=None, pos_inds=None, bbox_feats=None): method async_simple_test (line 198) | async def async_simple_test(self, method simple_test (line 223) | def simple_test(self, method aug_test (line 269) | def aug_test(self, x, proposal_list, img_metas, rescale=False): method onnx_export (line 295) | def onnx_export(self, x, proposals, img_metas, rescale=False): method mask_onnx_export (line 308) | def mask_onnx_export(self, x, img_metas, det_bboxes, det_labels, **kwa... method bbox_onnx_export (line 350) | def bbox_onnx_export(self, x, img_metas, proposals, rcnn_test_cfg, FILE: mmdet/models/roi_heads/test_mixins.py class BBoxTestMixin (line 15) | class BBoxTestMixin: method async_test_bboxes (line 19) | async def async_test_bboxes(self, method simple_test_bboxes (line 51) | def simple_test_bboxes(self, method aug_test_bboxes (line 138) | def aug_test_bboxes(self, feats, img_metas, proposal_list, rcnn_test_c... class MaskTestMixin (line 179) | class MaskTestMixin: method async_test_mask (line 183) | async def async_test_mask(self, method simple_test_mask (line 224) | def simple_test_mask(self, method aug_test_mask (line 281) | def aug_test_mask(self, feats, img_metas, det_bboxes, det_labels): FILE: mmdet/models/roi_heads/trident_roi_head.py class TridentRoIHead (line 12) | class TridentRoIHead(StandardRoIHead): method __init__ (line 22) | def __init__(self, num_branch, test_branch_idx, **kwargs): method merge_trident_bboxes (line 27) | def merge_trident_bboxes(self, trident_det_bboxes, trident_det_labels): method simple_test (line 46) | def simple_test(self, method aug_test_bboxes (line 83) | def aug_test_bboxes(self, feats, img_metas, proposal_list, rcnn_test_c... FILE: mmdet/models/seg_heads/base_semantic_head.py class BaseSemanticHead (line 11) | class BaseSemanticHead(BaseModule, metaclass=ABCMeta): method __init__ (line 20) | def __init__(self, method loss (line 32) | def loss(self, seg_preds, gt_semantic_seg): method forward (line 55) | def forward(self, x): method forward_train (line 65) | def forward_train(self, x, gt_semantic_seg): method simple_test (line 70) | def simple_test(self, x, img_metas, rescale=False): FILE: mmdet/models/seg_heads/panoptic_fpn_head.py class PanopticFPNHead (line 14) | class PanopticFPNHead(BaseSemanticHead): method __init__ (line 52) | def __init__(self, method _set_things_to_void (line 108) | def _set_things_to_void(self, gt_semantic_seg): method loss (line 129) | def loss(self, seg_preds, gt_semantic_seg): method init_weights (line 137) | def init_weights(self): method forward (line 142) | def forward(self, x): FILE: mmdet/models/seg_heads/panoptic_fusion_heads/base_panoptic_fusion_head.py class BasePanopticFusionHead (line 9) | class BasePanopticFusionHead(BaseModule, metaclass=ABCMeta): method __init__ (line 12) | def __init__(self, method with_loss (line 31) | def with_loss(self): method forward_train (line 36) | def forward_train(self, gt_masks=None, gt_semantic_seg=None, **kwargs): method simple_test (line 40) | def simple_test(self, FILE: mmdet/models/seg_heads/panoptic_fusion_heads/heuristic_fusion_head.py class HeuristicFusionHead (line 10) | class HeuristicFusionHead(BasePanopticFusionHead): method __init__ (line 13) | def __init__(self, method forward_train (line 23) | def forward_train(self, gt_masks=None, gt_semantic_seg=None, **kwargs): method _lay_masks (line 27) | def _lay_masks(self, bboxes, labels, masks, overlap_thr=0.5): method simple_test (line 82) | def simple_test(self, det_bboxes, det_labels, mask_preds, seg_preds, FILE: mmdet/models/seg_heads/panoptic_fusion_heads/maskformer_fusion_head.py class MaskFormerFusionHead (line 12) | class MaskFormerFusionHead(BasePanopticFusionHead): method __init__ (line 14) | def __init__(self, method forward_train (line 24) | def forward_train(self, **kwargs): method panoptic_postprocess (line 28) | def panoptic_postprocess(self, mask_cls, mask_pred): method semantic_postprocess (line 94) | def semantic_postprocess(self, mask_cls, mask_pred): method instance_postprocess (line 112) | def instance_postprocess(self, mask_cls, mask_pred): method simple_test (line 164) | def simple_test(self, FILE: mmdet/models/utils/brick_wrappers.py function adaptive_avg_pool2d (line 15) | def adaptive_avg_pool2d(input, output_size): class AdaptiveAvgPool2d (line 32) | class AdaptiveAvgPool2d(nn.AdaptiveAvgPool2d): method forward (line 35) | def forward(self, x): FILE: mmdet/models/utils/builder.py function build_transformer (line 9) | def build_transformer(cfg, default_args=None): function build_linear_layer (line 17) | def build_linear_layer(cfg, *args, **kwargs): FILE: mmdet/models/utils/ckpt_convert.py function pvt_convert (line 12) | def pvt_convert(ckpt): function swin_converter (line 85) | def swin_converter(ckpt): FILE: mmdet/models/utils/conv_upsample.py class ConvUpsample (line 7) | class ConvUpsample(BaseModule): method __init__ (line 28) | def __init__(self, method forward (line 59) | def forward(self, x): FILE: mmdet/models/utils/csp_layer.py class DarknetBottleneck (line 8) | class DarknetBottleneck(BaseModule): method __init__ (line 32) | def __init__(self, method forward (line 64) | def forward(self, x): class CSPLayer (line 75) | class CSPLayer(BaseModule): method __init__ (line 96) | def __init__(self, method forward (line 143) | def forward(self, x): FILE: mmdet/models/utils/gaussian_target.py function gaussian2D (line 8) | def gaussian2D(radius, sigma=1, dtype=torch.float32, device='cpu'): function gen_gaussian_target (line 32) | def gen_gaussian_target(heatmap, center, radius, k=1): function gaussian_radius (line 68) | def gaussian_radius(det_size, min_overlap): function get_local_maximum (line 190) | def get_local_maximum(heat, kernel=3): function get_topk_from_heatmap (line 207) | def get_topk_from_heatmap(scores, k=20): function gather_feat (line 234) | def gather_feat(feat, ind, mask=None): function transpose_and_gather_feat (line 255) | def transpose_and_gather_feat(feat, ind): FILE: mmdet/models/utils/inverted_residual.py class InvertedResidual (line 11) | class InvertedResidual(BaseModule): method __init__ (line 42) | def __init__(self, method forward (line 105) | def forward(self, x): FILE: mmdet/models/utils/make_divisible.py function make_divisible (line 2) | def make_divisible(value, divisor, min_value=None, min_ratio=0.9): FILE: mmdet/models/utils/misc.py class SigmoidGeometricMean (line 6) | class SigmoidGeometricMean(Function): method forward (line 17) | def forward(ctx, x, y): method backward (line 25) | def backward(ctx, grad_output): function interpolate_as (line 35) | def interpolate_as(source, target, mode='bilinear', align_corners=False): FILE: mmdet/models/utils/normed_predictor.py class NormedLinear (line 11) | class NormedLinear(nn.Linear): method __init__ (line 21) | def __init__(self, *args, tempearture=20, power=1.0, eps=1e-6, **kwargs): method init_weights (line 28) | def init_weights(self): method forward (line 33) | def forward(self, x): class NormedConv2d (line 43) | class NormedConv2d(nn.Conv2d): method __init__ (line 55) | def __init__(self, method forward (line 68) | def forward(self, x): FILE: mmdet/models/utils/panoptic_gt_processing.py function preprocess_panoptic_gt (line 5) | def preprocess_panoptic_gt(gt_labels, gt_masks, gt_semantic_seg, num_thi... FILE: mmdet/models/utils/point_sample.py function get_uncertainty (line 6) | def get_uncertainty(mask_pred, labels): function get_uncertain_point_coords_with_randomness (line 32) | def get_uncertain_point_coords_with_randomness(mask_pred, labels, num_po... FILE: mmdet/models/utils/positional_encoding.py class SinePositionalEncoding (line 11) | class SinePositionalEncoding(BaseModule): method __init__ (line 36) | def __init__(self, method forward (line 56) | def forward(self, mask): method __repr__ (line 95) | def __repr__(self): class LearnedPositionalEncoding (line 107) | class LearnedPositionalEncoding(BaseModule): method __init__ (line 121) | def __init__(self, method forward (line 133) | def forward(self, mask): method __repr__ (line 157) | def __repr__(self): FILE: mmdet/models/utils/res_layer.py class ResLayer (line 7) | class ResLayer(Sequential): method __init__ (line 26) | def __init__(self, class SimplifiedBasicBlock (line 107) | class SimplifiedBasicBlock(BaseModule): method __init__ (line 116) | def __init__(self, method norm1 (line 162) | def norm1(self): method norm2 (line 167) | def norm2(self): method forward (line 171) | def forward(self, x): FILE: mmdet/models/utils/se_layer.py class SELayer (line 9) | class SELayer(BaseModule): method __init__ (line 28) | def __init__(self, method forward (line 55) | def forward(self, x): class DyReLU (line 62) | class DyReLU(BaseModule): method __init__ (line 88) | def __init__(self, method forward (line 118) | def forward(self, x): FILE: mmdet/models/utils/transformer.py function nlc_to_nchw (line 32) | def nlc_to_nchw(x, hw_shape): function nchw_to_nlc (line 49) | def nchw_to_nlc(x): class AdaptivePadding (line 62) | class AdaptivePadding(nn.Module): method __init__ (line 93) | def __init__(self, kernel_size=1, stride=1, dilation=1, padding='corne... method get_pad_shape (line 109) | def get_pad_shape(self, input_shape): method forward (line 121) | def forward(self, x): class PatchEmbed (line 134) | class PatchEmbed(BaseModule): method __init__ (line 162) | def __init__( method forward (line 236) | def forward(self, x): class PatchMerging (line 260) | class PatchMerging(BaseModule): method __init__ (line 291) | def __init__(self, method forward (line 340) | def forward(self, x, input_size): function inverse_sigmoid (line 388) | def inverse_sigmoid(x, eps=1e-5): class DetrTransformerDecoderLayer (line 408) | class DetrTransformerDecoderLayer(BaseTransformerLayer): method __init__ (line 430) | def __init__(self, class DetrTransformerEncoder (line 454) | class DetrTransformerEncoder(TransformerLayerSequence): method __init__ (line 462) | def __init__(self, *args, post_norm_cfg=dict(type='LN'), **kwargs): method forward (line 473) | def forward(self, *args, **kwargs): class DetrTransformerDecoder (line 486) | class DetrTransformerDecoder(TransformerLayerSequence): method __init__ (line 495) | def __init__(self, method forward (line 509) | def forward(self, query, *args, **kwargs): class Transformer (line 539) | class Transformer(BaseModule): method __init__ (line 561) | def __init__(self, encoder=None, decoder=None, init_cfg=None): method init_weights (line 567) | def init_weights(self): method forward (line 574) | def forward(self, x, mask, query_embed, pos_embed): class DeformableDetrTransformerDecoder (line 625) | class DeformableDetrTransformerDecoder(TransformerLayerSequence): method __init__ (line 634) | def __init__(self, *args, return_intermediate=False, **kwargs): method forward (line 639) | def forward(self, class DeformableDetrTransformer (line 713) | class DeformableDetrTransformer(Transformer): method __init__ (line 725) | def __init__(self, method init_layers (line 737) | def init_layers(self): method init_weights (line 751) | def init_weights(self): method gen_encoder_output_proposals (line 763) | def gen_encoder_output_proposals(self, memory, memory_padding_mask, method get_reference_points (line 831) | def get_reference_points(spatial_shapes, valid_ratios, device): method get_valid_ratio (line 865) | def get_valid_ratio(self, mask): method get_proposal_pos_embed (line 875) | def get_proposal_pos_embed(self, method forward (line 893) | def forward(self, class DynamicConv (line 1063) | class DynamicConv(BaseModule): method __init__ (line 1090) | def __init__(self, method forward (line 1124) | def forward(self, param_feature, input_feature): FILE: mmdet/utils/ascend_util.py function masked_fill (line 5) | def masked_fill(ori_tensor, mask, new_value, neg=False): function batch_images_to_levels (line 26) | def batch_images_to_levels(target, num_levels): function get_max_num_gt_division_factor (line 49) | def get_max_num_gt_division_factor(gt_nums, FILE: mmdet/utils/collect_env.py function collect_env (line 8) | def collect_env(): FILE: mmdet/utils/compat_config.py function compat_cfg (line 8) | def compat_cfg(cfg): function compat_runner_args (line 22) | def compat_runner_args(cfg): function compat_imgs_per_gpu (line 37) | def compat_imgs_per_gpu(cfg): function compat_loader_args (line 54) | def compat_loader_args(cfg): FILE: mmdet/utils/contextmanagers.py function completed (line 17) | async def completed(trace_name='', function concurrent (line 92) | async def concurrent(streamqueue: asyncio.Queue, FILE: mmdet/utils/logger.py function get_root_logger (line 8) | def get_root_logger(log_file=None, log_level=logging.INFO): function get_caller_name (line 24) | def get_caller_name(): function log_img_scale (line 37) | def log_img_scale(img_scale, shape_order='hw', skip_square=False): FILE: mmdet/utils/memory.py function cast_tensor_type (line 12) | def cast_tensor_type(inputs, src_type=None, dst_type=None): function _ignore_torch_cuda_oom (line 63) | def _ignore_torch_cuda_oom(): class AvoidOOM (line 79) | class AvoidOOM: method __init__ (line 120) | def __init__(self, to_cpu=True, test=False): method retry_if_cuda_oom (line 124) | def retry_if_cuda_oom(self, func): FILE: mmdet/utils/misc.py function find_latest_checkpoint (line 12) | def find_latest_checkpoint(path, suffix='pth'): function update_data_root (line 46) | def update_data_root(cfg, logger=None): function floordiv (line 85) | def floordiv(dividend, divisor, rounding_mode='trunc'): FILE: mmdet/utils/profiling.py function profile_time (line 11) | def profile_time(trace_name, FILE: mmdet/utils/replace_cfg_vals.py function replace_cfg_vals (line 7) | def replace_cfg_vals(ori_cfg): FILE: mmdet/utils/rfnext.py function rfnext_init_model (line 8) | def rfnext_init_model(detector, cfg): FILE: mmdet/utils/setup_env.py function setup_multi_processes (line 10) | def setup_multi_processes(cfg): FILE: mmdet/utils/split_batch.py function split_batch (line 5) | def split_batch(img, img_metas, kwargs): FILE: mmdet/utils/util_distribution.py function build_dp (line 10) | def build_dp(model, device='cuda', dim=0, *args, **kwargs): function build_ddp (line 40) | def build_ddp(model, device='cuda', *args, **kwargs): function is_npu_available (line 74) | def is_npu_available(): function is_mlu_available (line 79) | def is_mlu_available(): function get_device (line 84) | def get_device(): FILE: mmdet/utils/util_mixins.py class NiceRepr (line 42) | class NiceRepr: method __nice__ (line 76) | def __nice__(self): method __repr__ (line 87) | def __repr__(self): method __str__ (line 97) | def __str__(self): FILE: mmdet/utils/util_random.py function ensure_rng (line 6) | def ensure_rng(rng=None): FILE: mmdet/version.py function parse_version_info (line 7) | def parse_version_info(version_str): FILE: projects/instance_segment_anything/models/det_wrapper_instance_sam.py class DetWrapperInstanceSAM (line 15) | class DetWrapperInstanceSAM(BaseDetector): method __init__ (line 19) | def __init__(self, method init_weights (line 55) | def init_weights(self): method simple_test (line 58) | def simple_test(self, img, img_metas, rescale=True, ori_img=None): method aug_test (line 134) | def aug_test(self, imgs, img_metas, **kwargs): method onnx_export (line 137) | def onnx_export(self, img, img_metas): method async_simple_test (line 140) | async def async_simple_test(self, img, img_metas, **kwargs): method forward_train (line 143) | def forward_train(self, imgs, img_metas, **kwargs): method extract_feat (line 146) | def extract_feat(self, imgs): FILE: projects/instance_segment_anything/models/det_wrapper_instance_sam_cascade.py class DetWrapperInstanceSAMCascade (line 10) | class DetWrapperInstanceSAMCascade(DetWrapperInstanceSAM): method __init__ (line 11) | def __init__(self, method simple_test (line 41) | def simple_test(self, img, img_metas, rescale=True, ori_img=None): FILE: projects/instance_segment_anything/models/focalnet_dino/focalnet_dino_wrapper.py class FocalNetDINOWrapper (line 9) | class FocalNetDINOWrapper(BaseModule): method __init__ (line 10) | def __init__(self, method forward (line 23) | def forward(self, method simple_test (line 93) | def simple_test(self, img, img_metas, rescale=False): FILE: projects/instance_segment_anything/models/focalnet_dino/models/__init__.py function build_model (line 9) | def build_model(args): FILE: projects/instance_segment_anything/models/focalnet_dino/models/dino/attention.py class MultiheadAttention (line 59) | class MultiheadAttention(Module): method __init__ (line 85) | def __init__(self, embed_dim, num_heads, dropout=0., bias=True, add_bi... method _reset_parameters (line 111) | def _reset_parameters(self): method __setstate__ (line 114) | def __setstate__(self, state): method forward (line 121) | def forward(self, query, key, value, key_padding_mask=None, function multi_head_attention_forward (line 183) | def multi_head_attention_forward(query: Tensor, FILE: projects/instance_segment_anything/models/focalnet_dino/models/dino/backbone.py class FrozenBatchNorm2d (line 35) | class FrozenBatchNorm2d(torch.nn.Module): method __init__ (line 44) | def __init__(self, n): method _load_from_state_dict (line 51) | def _load_from_state_dict(self, state_dict, prefix, local_metadata, st... method forward (line 61) | def forward(self, x): class BackboneBase (line 74) | class BackboneBase(nn.Module): method __init__ (line 76) | def __init__(self, backbone: nn.Module, train_backbone: bool, num_chan... method forward (line 96) | def forward(self, tensor_list: NestedTensor): class Backbone (line 108) | class Backbone(BackboneBase): method __init__ (line 110) | def __init__(self, name: str, class Joiner (line 130) | class Joiner(nn.Sequential): method __init__ (line 131) | def __init__(self, backbone, position_embedding): method forward (line 134) | def forward(self, tensor_list: NestedTensor): function build_backbone (line 146) | def build_backbone(args): FILE: projects/instance_segment_anything/models/focalnet_dino/models/dino/convnext.py class Block (line 18) | class Block(nn.Module): method __init__ (line 29) | def __init__(self, dim, drop_path=0., layer_scale_init_value=1e-6): method forward (line 40) | def forward(self, x): class ConvNeXt (line 55) | class ConvNeXt(nn.Module): method __init__ (line 69) | def __init__(self, in_chans=3, num_classes=1000, method _init_weights (line 116) | def _init_weights(self, m): method forward_features (line 121) | def forward_features(self, x): method forward (line 138) | def forward(self, tensor_list: NestedTensor): class LayerNorm (line 152) | class LayerNorm(nn.Module): method __init__ (line 158) | def __init__(self, normalized_shape, eps=1e-6, data_format="channels_l... method forward (line 168) | def forward(self, x): function build_convnext (line 234) | def build_convnext(modelname, pretrained,backbone_dir=None, **kw): FILE: projects/instance_segment_anything/models/focalnet_dino/models/dino/deformable_transformer.py class DeformableTransformer (line 26) | class DeformableTransformer(nn.Module): method __init__ (line 28) | def __init__(self, d_model=256, nhead=8, method _reset_parameters (line 228) | def _reset_parameters(self): method get_valid_ratio (line 242) | def get_valid_ratio(self, mask): method init_ref_points (line 251) | def init_ref_points(self, use_num_queries): method forward (line 262) | def forward(self, srcs, masks, refpoint_embed, pos_embeds, tgt, attn_m... class TransformerEncoder (line 446) | class TransformerEncoder(nn.Module): method __init__ (line 448) | def __init__(self, method get_reference_points (line 489) | def get_reference_points(spatial_shapes, valid_ratios, device): method forward (line 503) | def forward(self, class TransformerDecoder (line 596) | class TransformerDecoder(nn.Module): method __init__ (line 598) | def __init__(self, decoder_layer, num_layers, norm=None, method forward (line 667) | def forward(self, tgt, memory, class DeformableTransformerEncoderLayer (line 794) | class DeformableTransformerEncoderLayer(nn.Module): method __init__ (line 795) | def __init__(self, method with_pos_embed (line 828) | def with_pos_embed(tensor, pos): method forward_ffn (line 831) | def forward_ffn(self, src): method forward (line 837) | def forward(self, src, pos, reference_points, spatial_shapes, level_st... class DeformableTransformerDecoderLayer (line 852) | class DeformableTransformerDecoderLayer(nn.Module): method __init__ (line 853) | def __init__(self, d_model=256, d_ffn=1024, method rm_self_attn_modules (line 899) | def rm_self_attn_modules(self): method with_pos_embed (line 906) | def with_pos_embed(tensor, pos): method forward_ffn (line 909) | def forward_ffn(self, tgt): method forward_sa (line 915) | def forward_sa(self, method forward_ca (line 958) | def forward_ca(self, method forward (line 994) | def forward(self, function _get_clones (line 1033) | def _get_clones(module, N, layer_share=False): function build_deformable_transformer (line 1040) | def build_deformable_transformer(args): FILE: projects/instance_segment_anything/models/focalnet_dino/models/dino/dino.py class DINO (line 38) | class DINO(nn.Module): method __init__ (line 41) | def __init__(self, backbone, transformer, num_classes, num_queries, method _reset_parameters (line 190) | def _reset_parameters(self): method init_ref_points (line 196) | def init_ref_points(self, use_num_queries): method forward (line 224) | def forward(self, samples: NestedTensor, targets: List = None): method _set_aux_loss (line 335) | def _set_aux_loss(self, outputs_class, outputs_coord): class SetCriterion (line 343) | class SetCriterion(nn.Module): method __init__ (line 350) | def __init__(self, num_classes, matcher, weight_dict, focal_alpha, los... method loss_labels (line 366) | def loss_labels(self, outputs, targets, indices, num_boxes, log=True): method loss_cardinality (line 394) | def loss_cardinality(self, outputs, targets, indices, num_boxes): method loss_boxes (line 407) | def loss_boxes(self, outputs, targets, indices, num_boxes): method loss_masks (line 434) | def loss_masks(self, outputs, targets, indices, num_boxes): method _get_src_permutation_idx (line 463) | def _get_src_permutation_idx(self, indices): method _get_tgt_permutation_idx (line 469) | def _get_tgt_permutation_idx(self, indices): method get_loss (line 475) | def get_loss(self, loss, outputs, targets, indices, num_boxes, **kwargs): method forward (line 487) | def forward(self, outputs, targets, return_indices=False): method prep_for_dn (line 644) | def prep_for_dn(self, dn_meta): class PostProcess (line 653) | class PostProcess(nn.Module): method __init__ (line 656) | def __init__(self, num_select=100, nms_iou_threshold=-1) -> None: method forward (line 662) | def forward(self, outputs, target_sizes, not_to_xyxy=False, test=False): function build_dino (line 707) | def build_dino(args): FILE: projects/instance_segment_anything/models/focalnet_dino/models/dino/dn_components.py function prepare_for_cdn (line 20) | def prepare_for_cdn(dn_args, training, num_queries, num_classes, hidden_... function dn_post_process (line 140) | def dn_post_process(outputs_class, outputs_coord, dn_meta, aux_loss, _se... FILE: projects/instance_segment_anything/models/focalnet_dino/models/dino/focal.py class Mlp (line 18) | class Mlp(nn.Module): method __init__ (line 21) | def __init__(self, in_features, hidden_features=None, out_features=Non... method forward (line 30) | def forward(self, x): class FocalModulation (line 38) | class FocalModulation(nn.Module): method __init__ (line 50) | def __init__(self, dim, proj_drop=0., focal_level=2, focal_window=7, f... method forward (line 84) | def forward(self, x): class FocalModulationBlock (line 112) | class FocalModulationBlock(nn.Module): method __init__ (line 126) | def __init__(self, dim, mlp_ratio=4., drop=0., drop_path=0., method forward (line 162) | def forward(self, x): class BasicLayer (line 193) | class BasicLayer(nn.Module): method __init__ (line 210) | def __init__(self, method forward (line 260) | def forward(self, x, H, W): class PatchEmbed (line 284) | class PatchEmbed(nn.Module): method __init__ (line 296) | def __init__(self, patch_size=4, in_chans=3, embed_dim=96, norm_layer=... method forward (line 319) | def forward(self, x): class FocalNet (line 337) | class FocalNet(nn.Module): method __init__ (line 361) | def __init__(self, method _freeze_stages (line 435) | def _freeze_stages(self): method init_weights (line 449) | def init_weights(self, pretrained=None): method forward (line 475) | def forward(self, tensor_list: NestedTensor): method train (line 508) | def train(self, mode=True): function build_focalnet (line 515) | def build_focalnet(modelname, **kw): FILE: projects/instance_segment_anything/models/focalnet_dino/models/dino/matcher.py class HungarianMatcher (line 25) | class HungarianMatcher(nn.Module): method __init__ (line 32) | def __init__(self, cost_class: float = 1, cost_bbox: float = 1, cost_g... method forward (line 48) | def forward(self, outputs, targets): class SimpleMinsumMatcher (line 98) | class SimpleMinsumMatcher(nn.Module): method __init__ (line 105) | def __init__(self, cost_class: float = 1, cost_bbox: float = 1, cost_g... method forward (line 121) | def forward(self, outputs, targets): function build_matcher (line 178) | def build_matcher(args): FILE: projects/instance_segment_anything/models/focalnet_dino/models/dino/position_encoding.py class PositionEmbeddingSine (line 24) | class PositionEmbeddingSine(nn.Module): method __init__ (line 29) | def __init__(self, num_pos_feats=64, temperature=10000, normalize=Fals... method forward (line 40) | def forward(self, tensor_list: NestedTensor): class PositionEmbeddingSineHW (line 62) | class PositionEmbeddingSineHW(nn.Module): method __init__ (line 67) | def __init__(self, num_pos_feats=64, temperatureH=10000, temperatureW=... method forward (line 79) | def forward(self, tensor_list: NestedTensor): class PositionEmbeddingLearned (line 110) | class PositionEmbeddingLearned(nn.Module): method __init__ (line 114) | def __init__(self, num_pos_feats=256): method reset_parameters (line 120) | def reset_parameters(self): method forward (line 124) | def forward(self, tensor_list: NestedTensor): function build_position_encoding (line 138) | def build_position_encoding(args): FILE: projects/instance_segment_anything/models/focalnet_dino/models/dino/segmentation.py class DETRsegm (line 36) | class DETRsegm(nn.Module): method __init__ (line 37) | def __init__(self, detr, freeze_detr=False): method forward (line 49) | def forward(self, samples: NestedTensor): function _expand (line 77) | def _expand(tensor, length: int): class MaskHeadSmallConv (line 81) | class MaskHeadSmallConv(nn.Module): method __init__ (line 87) | def __init__(self, dim, fpn_dims, context_dim): method forward (line 114) | def forward(self, x: Tensor, bbox_mask: Tensor, fpns: List[Tensor]): class MHAttentionMap (line 152) | class MHAttentionMap(nn.Module): method __init__ (line 155) | def __init__(self, query_dim, hidden_dim, num_heads, dropout=0.0, bias... method forward (line 170) | def forward(self, q, k, mask: Optional[Tensor] = None): function dice_loss (line 184) | def dice_loss(inputs, targets, num_boxes): function sigmoid_focal_loss (line 202) | def sigmoid_focal_loss(inputs, targets, num_boxes, alpha: float = 0.25, ... class PostProcessSegm (line 230) | class PostProcessSegm(nn.Module): method __init__ (line 231) | def __init__(self, threshold=0.5): method forward (line 236) | def forward(self, results, outputs, orig_target_sizes, max_target_sizes): class PostProcessPanoptic (line 253) | class PostProcessPanoptic(nn.Module): method __init__ (line 257) | def __init__(self, is_thing_map, threshold=0.85): method forward (line 268) | def forward(self, outputs, processed_sizes, target_sizes=None): FILE: projects/instance_segment_anything/models/focalnet_dino/models/dino/swin_transformer.py class Mlp (line 18) | class Mlp(nn.Module): method __init__ (line 21) | def __init__(self, in_features, hidden_features=None, out_features=Non... method forward (line 30) | def forward(self, x): function window_partition (line 39) | def window_partition(x, window_size): function window_reverse (line 53) | def window_reverse(windows, window_size, H, W): class WindowAttention (line 69) | class WindowAttention(nn.Module): method __init__ (line 82) | def __init__(self, dim, window_size, num_heads, qkv_bias=True, qk_scal... method forward (line 116) | def forward(self, x, mask=None): class SwinTransformerBlock (line 150) | class SwinTransformerBlock(nn.Module): method __init__ (line 167) | def __init__(self, dim, num_heads, window_size=7, shift_size=0, method forward (line 191) | def forward(self, x, mask_matrix): class PatchMerging (line 250) | class PatchMerging(nn.Module): method __init__ (line 256) | def __init__(self, dim, norm_layer=nn.LayerNorm): method forward (line 262) | def forward(self, x, H, W): class BasicLayer (line 291) | class BasicLayer(nn.Module): method __init__ (line 309) | def __init__(self, method forward (line 351) | def forward(self, x, H, W): class PatchEmbed (line 393) | class PatchEmbed(nn.Module): method __init__ (line 402) | def __init__(self, patch_size=4, in_chans=3, embed_dim=96, norm_layer=... method forward (line 416) | def forward(self, x): class SwinTransformer (line 435) | class SwinTransformer(nn.Module): method __init__ (line 464) | def __init__(self, method _freeze_stages (line 557) | def _freeze_stages(self): method forward_raw (line 600) | def forward_raw(self, x): method forward (line 633) | def forward(self, tensor_list: NestedTensor): method train (line 676) | def train(self, mode=True): function build_swin_transformer (line 683) | def build_swin_transformer(modelname, pretrain_img_size, **kw): FILE: projects/instance_segment_anything/models/focalnet_dino/models/dino/transformer_deformable.py class DeformableTransformer (line 29) | class DeformableTransformer(nn.Module): method __init__ (line 30) | def __init__(self, d_model=256, nhead=8, method _reset_parameters (line 72) | def _reset_parameters(self): method get_proposal_pos_embed (line 84) | def get_proposal_pos_embed(self, proposals): method gen_encoder_output_proposals (line 99) | def gen_encoder_output_proposals(self, memory, memory_padding_mask, sp... method get_valid_ratio (line 131) | def get_valid_ratio(self, mask): method forward (line 140) | def forward(self, srcs, masks, pos_embeds, query_embed=None): class DeformableTransformerEncoderLayer (line 219) | class DeformableTransformerEncoderLayer(nn.Module): method __init__ (line 220) | def __init__(self, method with_pos_embed (line 253) | def with_pos_embed(tensor, pos): method forward_ffn (line 256) | def forward_ffn(self, src): method forward (line 262) | def forward(self, src, pos, reference_points, spatial_shapes, level_st... class DeformableTransformerEncoder (line 279) | class DeformableTransformerEncoder(nn.Module): method __init__ (line 280) | def __init__(self, encoder_layer, num_layers, norm=None): method get_reference_points (line 291) | def get_reference_points(spatial_shapes, valid_ratios, device): method forward (line 305) | def forward(self, src, spatial_shapes, level_start_index, valid_ratios... class DeformableTransformerDecoderLayer (line 331) | class DeformableTransformerDecoderLayer(nn.Module): method __init__ (line 332) | def __init__(self, d_model=256, d_ffn=1024, method rm_self_attn_modules (line 378) | def rm_self_attn_modules(self): method with_pos_embed (line 385) | def with_pos_embed(tensor, pos): method forward_ffn (line 388) | def forward_ffn(self, tgt): method forward_sa (line 394) | def forward_sa(self, method forward_ca (line 440) | def forward_ca(self, method forward (line 477) | def forward(self, class DeformableTransformerDecoder (line 588) | class DeformableTransformerDecoder(nn.Module): method __init__ (line 589) | def __init__(self, decoder_layer, num_layers, return_intermediate=Fals... method forward (line 606) | def forward(self, tgt, reference_points, src, src_spatial_shapes, function _get_clones (line 647) | def _get_clones(module, N): function build_deforamble_transformer (line 651) | def build_deforamble_transformer(args): FILE: projects/instance_segment_anything/models/focalnet_dino/models/dino/util/box_loss.py function ciou (line 7) | def ciou(bboxes1, bboxes2): function diou (line 58) | def diou(bboxes1, bboxes2): FILE: projects/instance_segment_anything/models/focalnet_dino/models/dino/util/box_ops.py function box_cxcywh_to_xyxy (line 9) | def box_cxcywh_to_xyxy(x): function box_xyxy_to_cxcywh (line 16) | def box_xyxy_to_cxcywh(x): function box_iou (line 24) | def box_iou(boxes1, boxes2): function generalized_box_iou (line 41) | def generalized_box_iou(boxes1, boxes2): function box_iou_pairwise (line 69) | def box_iou_pairwise(boxes1, boxes2): function generalized_box_iou_pairwise (line 85) | def generalized_box_iou_pairwise(boxes1, boxes2): function masks_to_boxes (line 109) | def masks_to_boxes(masks): FILE: projects/instance_segment_anything/models/focalnet_dino/models/dino/util/get_param_dicts.py function match_name_keywords (line 6) | def match_name_keywords(n: str, name_keywords: list): function get_param_dict (line 15) | def get_param_dict(args, model_without_ddp: nn.Module): FILE: projects/instance_segment_anything/models/focalnet_dino/models/dino/util/logger.py class _ColorfulFormatter (line 9) | class _ColorfulFormatter(logging.Formatter): method __init__ (line 10) | def __init__(self, *args, **kwargs): method formatMessage (line 17) | def formatMessage(self, record): function setup_logger (line 31) | def setup_logger( function _cached_log_stream (line 94) | def _cached_log_stream(filename): FILE: projects/instance_segment_anything/models/focalnet_dino/models/dino/util/misc.py class SmoothedValue (line 32) | class SmoothedValue(object): method __init__ (line 37) | def __init__(self, window_size=20, fmt=None): method update (line 45) | def update(self, value, n=1): method synchronize_between_processes (line 50) | def synchronize_between_processes(self): method median (line 64) | def median(self): method avg (line 71) | def avg(self): method global_avg (line 76) | def global_avg(self): method max (line 80) | def max(self): method value (line 84) | def value(self): method __str__ (line 87) | def __str__(self): function all_gather (line 96) | def all_gather(data): function reduce_dict (line 139) | def reduce_dict(input_dict, average=True): class MetricLogger (line 166) | class MetricLogger(object): method __init__ (line 167) | def __init__(self, delimiter="\t"): method update (line 171) | def update(self, **kwargs): method __getattr__ (line 178) | def __getattr__(self, attr): method __str__ (line 186) | def __str__(self): method synchronize_between_processes (line 197) | def synchronize_between_processes(self): method add_meter (line 201) | def add_meter(self, name, meter): method log_every (line 204) | def log_every(self, iterable, print_freq, header=None, logger=None): function get_sha (line 265) | def get_sha(): function collate_fn (line 285) | def collate_fn(batch): function _max_by_axis (line 292) | def _max_by_axis(the_list): class NestedTensor (line 301) | class NestedTensor(object): method __init__ (line 302) | def __init__(self, tensors, mask: Optional[Tensor]): method imgsize (line 314) | def imgsize(self): method to (line 323) | def to(self, device): method to_img_list_single (line 334) | def to_img_list_single(self, tensor, mask): method to_img_list (line 341) | def to_img_list(self): method device (line 358) | def device(self): method decompose (line 361) | def decompose(self): method __repr__ (line 364) | def __repr__(self): method shape (line 368) | def shape(self): function nested_tensor_from_tensor_list (line 375) | def nested_tensor_from_tensor_list(tensor_list: List[Tensor]): function _onnx_nested_tensor_from_tensor_list (line 403) | def _onnx_nested_tensor_from_tensor_list(tensor_list: List[Tensor]) -> N... function setup_for_distributed (line 431) | def setup_for_distributed(is_master): function is_dist_avail_and_initialized (line 446) | def is_dist_avail_and_initialized(): function get_world_size (line 454) | def get_world_size(): function get_rank (line 460) | def get_rank(): function is_main_process (line 466) | def is_main_process(): function save_on_master (line 470) | def save_on_master(*args, **kwargs): function init_distributed_mode (line 475) | def init_distributed_mode(args): function accuracy (line 522) | def accuracy(output, target, topk=(1,)): function interpolate (line 540) | def interpolate(input, size=None, scale_factor=None, mode="nearest", ali... class color_sys (line 561) | class color_sys(): method __init__ (line 562) | def __init__(self, num_colors) -> None: method __call__ (line 572) | def __call__(self, idx): function inverse_sigmoid (line 575) | def inverse_sigmoid(x, eps=1e-3): function clean_state_dict (line 581) | def clean_state_dict(state_dict): FILE: projects/instance_segment_anything/models/focalnet_dino/models/dino/util/plot_utils.py function plot_logs (line 13) | def plot_logs(logs, fields=('class_error', 'loss_bbox_unscaled', 'mAP'),... function plot_precision_recall (line 81) | def plot_precision_recall(files, naming_scheme='iter'): FILE: projects/instance_segment_anything/models/focalnet_dino/models/dino/util/slconfig.py function check_file_exist (line 21) | def check_file_exist(filename, msg_tmpl='file "{}" does not exist'): class ConfigDict (line 25) | class ConfigDict(Dict): method __missing__ (line 27) | def __missing__(self, name): method __getattr__ (line 30) | def __getattr__(self, name): class SLConfig (line 43) | class SLConfig(object): method _validate_py_syntax (line 68) | def _validate_py_syntax(filename): method _file2dict (line 78) | def _file2dict(filename): method _merge_a_into_b (line 143) | def _merge_a_into_b(a, b): method fromfile (line 187) | def fromfile(filename): method __init__ (line 192) | def __init__(self, cfg_dict=None, cfg_text=None, filename=None): method filename (line 215) | def filename(self): method text (line 219) | def text(self): method pretty_text (line 223) | def pretty_text(self): method __repr__ (line 317) | def __repr__(self): method __len__ (line 320) | def __len__(self): method __getattr__ (line 323) | def __getattr__(self, name): method __getitem__ (line 336) | def __getitem__(self, name): method __setattr__ (line 339) | def __setattr__(self, name, value): method __setitem__ (line 344) | def __setitem__(self, name, value): method __iter__ (line 349) | def __iter__(self): method dump (line 352) | def dump(self, file=None): method merge_from_dict (line 360) | def merge_from_dict(self, options): method __setstate__ (line 392) | def __setstate__(self, state): method copy (line 396) | def copy(self): method deepcopy (line 399) | def deepcopy(self): class DictAction (line 403) | class DictAction(Action): method _parse_int_float_bool (line 411) | def _parse_int_float_bool(val): method __call__ (line 426) | def __call__(self, parser, namespace, values, option_string=None): FILE: projects/instance_segment_anything/models/focalnet_dino/models/dino/util/slio.py class BaseFileHandler (line 18) | class BaseFileHandler(metaclass=ABCMeta): method load_from_fileobj (line 21) | def load_from_fileobj(self, file, **kwargs): method dump_to_fileobj (line 25) | def dump_to_fileobj(self, obj, file, **kwargs): method dump_to_str (line 29) | def dump_to_str(self, obj, **kwargs): method load_from_path (line 32) | def load_from_path(self, filepath, mode='r', **kwargs): method dump_to_path (line 36) | def dump_to_path(self, obj, filepath, mode='w', **kwargs): class JsonHandler (line 40) | class JsonHandler(BaseFileHandler): method load_from_fileobj (line 42) | def load_from_fileobj(self, file): method dump_to_fileobj (line 45) | def dump_to_fileobj(self, obj, file, **kwargs): method dump_to_str (line 48) | def dump_to_str(self, obj, **kwargs): class PickleHandler (line 51) | class PickleHandler(BaseFileHandler): method load_from_fileobj (line 53) | def load_from_fileobj(self, file, **kwargs): method load_from_path (line 56) | def load_from_path(self, filepath, **kwargs): method dump_to_str (line 60) | def dump_to_str(self, obj, **kwargs): method dump_to_fileobj (line 64) | def dump_to_fileobj(self, obj, file, **kwargs): method dump_to_path (line 68) | def dump_to_path(self, obj, filepath, **kwargs): class YamlHandler (line 72) | class YamlHandler(BaseFileHandler): method load_from_fileobj (line 74) | def load_from_fileobj(self, file, **kwargs): method dump_to_fileobj (line 78) | def dump_to_fileobj(self, obj, file, **kwargs): method dump_to_str (line 82) | def dump_to_str(self, obj, **kwargs): function is_str (line 98) | def is_str(x): function slload (line 105) | def slload(file, file_format=None, **kwargs): function sldump (line 138) | def sldump(obj, file=None, file_format=None, **kwargs): FILE: projects/instance_segment_anything/models/focalnet_dino/models/dino/util/time_counter.py class TimeCounter (line 4) | class TimeCounter: method __init__ (line 5) | def __init__(self) -> None: method clear (line 8) | def clear(self): method timeit (line 12) | def timeit(self, name): class TimeHolder (line 18) | class TimeHolder: method __init__ (line 19) | def __init__(self) -> None: method update (line 22) | def update(self, _timedict:dict): method final_res (line 28) | def final_res(self): method __str__ (line 31) | def __str__(self): class AverageMeter (line 35) | class AverageMeter(object): method __init__ (line 37) | def __init__(self, name, fmt=':f', val_only=False): method reset (line 43) | def reset(self): method update (line 49) | def update(self, val, n=1): method __str__ (line 55) | def __str__(self): FILE: projects/instance_segment_anything/models/focalnet_dino/models/dino/util/utils.py function slprint (line 9) | def slprint(x, name='x'): function clean_state_dict (line 22) | def clean_state_dict(state_dict): function renorm (line 30) | def renorm(img: torch.FloatTensor, mean=[0.485, 0.456, 0.406], std=[0.22... class CocoClassMapper (line 52) | class CocoClassMapper(): method __init__ (line 53) | def __init__(self) -> None: method origin2compact (line 58) | def origin2compact(self, idx): method compact2origin (line 61) | def compact2origin(self, idx): function to_device (line 64) | def to_device(item, device): function get_gaussian_mean (line 77) | def get_gaussian_mean(x, axis, other_axis, softmax=True): function get_expected_points_from_map (line 102) | def get_expected_points_from_map(hm, softmax=True): class Embedder (line 123) | class Embedder: method __init__ (line 124) | def __init__(self, **kwargs): method create_embedding_fn (line 128) | def create_embedding_fn(self): method embed (line 152) | def embed(self, inputs): function get_embedder (line 156) | def get_embedder(multires, i=0): class APOPMeter (line 174) | class APOPMeter(): method __init__ (line 175) | def __init__(self) -> None: method update (line 181) | def update(self, pred, gt): method update_cm (line 192) | def update_cm(self, tp, fp, tn, fn): function inverse_sigmoid (line 198) | def inverse_sigmoid(x, eps=1e-5): function get_raw_dict (line 206) | def get_raw_dict(args): function stat_tensors (line 224) | def stat_tensors(tensor): class NiceRepr (line 239) | class NiceRepr: method __nice__ (line 273) | def __nice__(self): method __repr__ (line 284) | def __repr__(self): method __str__ (line 294) | def __str__(self): function ensure_rng (line 306) | def ensure_rng(rng=None): function random_boxes (line 336) | def random_boxes(num=1, scale=1, rng=None): class ModelEma (line 373) | class ModelEma(torch.nn.Module): method __init__ (line 374) | def __init__(self, model, decay=0.9997, device=None): method _update (line 387) | def _update(self, model, update_fn): method update (line 394) | def update(self, model): method set (line 397) | def set(self, model): class BestMetricSingle (line 400) | class BestMetricSingle(): method __init__ (line 401) | def __init__(self, init_res=0.0, better='large') -> None: method isbetter (line 409) | def isbetter(self, new_res, old_res): method update (line 415) | def update(self, new_res, ep): method __str__ (line 422) | def __str__(self) -> str: method __repr__ (line 425) | def __repr__(self) -> str: method summary (line 428) | def summary(self) -> dict: class BestMetricHolder (line 435) | class BestMetricHolder(): method __init__ (line 436) | def __init__(self, init_res=0.0, better='large', use_ema=False) -> None: method update (line 444) | def update(self, new_res, epoch, is_ema=False): method summary (line 458) | def summary(self): method __repr__ (line 468) | def __repr__(self) -> str: method __str__ (line 471) | def __str__(self) -> str: FILE: projects/instance_segment_anything/models/focalnet_dino/models/dino/util/vis_utils.py function add_box_to_img (line 10) | def add_box_to_img(img, boxes, colorlist, brands=None): function plot_dual_img (line 36) | def plot_dual_img(img, boxes, labels, idxs, probs=None): function plot_raw_img (line 66) | def plot_raw_img(img, boxes, labels): FILE: projects/instance_segment_anything/models/focalnet_dino/models/dino/util/visualizer.py function renorm (line 23) | def renorm(img: torch.FloatTensor, mean=[0.485, 0.456, 0.406], std=[0.22... class ColorMap (line 43) | class ColorMap(): method __init__ (line 44) | def __init__(self, basergb=[255,255,0]): method __call__ (line 46) | def __call__(self, attnmap): class COCOVisualizer (line 58) | class COCOVisualizer(): method __init__ (line 59) | def __init__(self) -> None: method visualize (line 62) | def visualize(self, img, tgt, caption=None, dpi=120, savedir=None, sho... method addtgt (line 90) | def addtgt(self, tgt): FILE: projects/instance_segment_anything/models/focalnet_dino/models/dino/utils.py function gen_encoder_output_proposals (line 19) | def gen_encoder_output_proposals(memory:Tensor, memory_padding_mask:Tens... class RandomBoxPerturber (line 77) | class RandomBoxPerturber(): method __init__ (line 78) | def __init__(self, x_noise_scale=0.2, y_noise_scale=0.2, w_noise_scale... method __call__ (line 81) | def __call__(self, refanchors: Tensor) -> Tensor: function sigmoid_focal_loss (line 91) | def sigmoid_focal_loss(inputs, targets, num_boxes, alpha: float = 0.25, ... class MLP (line 119) | class MLP(nn.Module): method __init__ (line 122) | def __init__(self, input_dim, hidden_dim, output_dim, num_layers): method forward (line 128) | def forward(self, x): function _get_activation_fn (line 133) | def _get_activation_fn(activation, d_model=256, batch_dim=0): function gen_sineembed_for_position (line 151) | def gen_sineembed_for_position(pos_tensor): FILE: projects/instance_segment_anything/models/hdetr/hdetr_wrapper.py class HDetrWrapper (line 9) | class HDetrWrapper(BaseModule): method __init__ (line 10) | def __init__(self, method forward (line 25) | def forward(self, method simple_test (line 128) | def simple_test(self, img, img_metas, rescale=False): FILE: projects/instance_segment_anything/models/hdetr/models/__init__.py function build_model (line 13) | def build_model(args): FILE: projects/instance_segment_anything/models/hdetr/models/backbone.py class FrozenBatchNorm2d (line 32) | class FrozenBatchNorm2d(torch.nn.Module): method __init__ (line 41) | def __init__(self, n, eps=1e-5): method _load_from_state_dict (line 49) | def _load_from_state_dict( method forward (line 73) | def forward(self, x): class BackboneBase (line 86) | class BackboneBase(nn.Module): method __init__ (line 87) | def __init__( method forward (line 110) | def forward(self, tensor_list: NestedTensor): class Backbone (line 121) | class Backbone(BackboneBase): method __init__ (line 124) | def __init__( class TransformerBackbone (line 143) | class TransformerBackbone(nn.Module): method __init__ (line 144) | def __init__( method forward (line 228) | def forward(self, tensor_list: NestedTensor): class Joiner (line 240) | class Joiner(nn.Sequential): method __init__ (line 241) | def __init__(self, backbone, position_embedding): method forward (line 246) | def forward(self, tensor_list: NestedTensor): function build_backbone (line 260) | def build_backbone(args): FILE: projects/instance_segment_anything/models/hdetr/models/deformable_detr.py function _get_clones (line 46) | def _get_clones(module, N): class DeformableDETR (line 50) | class DeformableDETR(nn.Module): method __init__ (line 53) | def __init__( method forward (line 163) | def forward(self, samples: NestedTensor): method _set_aux_loss (line 283) | def _set_aux_loss(self, outputs_class, outputs_coord): class SetCriterion (line 293) | class SetCriterion(nn.Module): method __init__ (line 300) | def __init__(self, num_classes, matcher, weight_dict, losses, focal_al... method loss_labels (line 316) | def loss_labels(self, outputs, targets, indices, num_boxes, log=True): method loss_cardinality (line 362) | def loss_cardinality(self, outputs, targets, indices, num_boxes): method loss_boxes (line 377) | def loss_boxes(self, outputs, targets, indices, num_boxes): method loss_masks (line 403) | def loss_masks(self, outputs, targets, indices, num_boxes): method _get_src_permutation_idx (line 438) | def _get_src_permutation_idx(self, indices): method _get_tgt_permutation_idx (line 446) | def _get_tgt_permutation_idx(self, indices): method get_loss (line 454) | def get_loss(self, loss, outputs, targets, indices, num_boxes, **kwargs): method forward (line 464) | def forward(self, outputs, targets): class PostProcess (line 538) | class PostProcess(nn.Module): method __init__ (line 541) | def __init__(self, topk=100): method forward (line 547) | def forward(self, outputs, target_sizes): class MLP (line 583) | class MLP(nn.Module): method __init__ (line 586) | def __init__(self, input_dim, hidden_dim, output_dim, num_layers): method forward (line 594) | def forward(self, x): function build (line 600) | def build(args): FILE: projects/instance_segment_anything/models/hdetr/models/deformable_transformer.py class DeformableTransformer (line 28) | class DeformableTransformer(nn.Module): method __init__ (line 29) | def __init__( method _reset_parameters (line 98) | def _reset_parameters(self): method get_proposal_pos_embed (line 110) | def get_proposal_pos_embed(self, proposals): method gen_encoder_output_proposals (line 129) | def gen_encoder_output_proposals(self, memory, memory_padding_mask, sp... method get_valid_ratio (line 179) | def get_valid_ratio(self, mask): method forward (line 189) | def forward(self, srcs, masks, pos_embeds, query_embed=None, self_attn... class DeformableTransformerEncoderLayer (line 294) | class DeformableTransformerEncoderLayer(nn.Module): method __init__ (line 295) | def __init__( method with_pos_embed (line 321) | def with_pos_embed(tensor, pos): method forward_ffn (line 324) | def forward_ffn(self, src): method forward (line 331) | def forward( class DeformableTransformerEncoder (line 358) | class DeformableTransformerEncoder(nn.Module): method __init__ (line 359) | def __init__(self, encoder_layer, num_layers, use_checkpoint=False): method get_reference_points (line 366) | def get_reference_points(spatial_shapes, valid_ratios, device): method forward (line 383) | def forward( class DeformableTransformerDecoderLayer (line 420) | class DeformableTransformerDecoderLayer(nn.Module): method __init__ (line 421) | def __init__( method with_pos_embed (line 452) | def with_pos_embed(tensor, pos): method forward_ffn (line 455) | def forward_ffn(self, tgt): method forward (line 462) | def forward( class DeformableTransformerDecoder (line 502) | class DeformableTransformerDecoder(nn.Module): method __init__ (line 503) | def __init__( method forward (line 522) | def forward( function _get_clones (line 602) | def _get_clones(module, N): function _get_activation_fn (line 606) | def _get_activation_fn(activation): function build_deforamble_transformer (line 617) | def build_deforamble_transformer(args): FILE: projects/instance_segment_anything/models/hdetr/models/matcher.py class HungarianMatcher (line 20) | class HungarianMatcher(nn.Module): method __init__ (line 28) | def __init__( method forward (line 46) | def forward(self, outputs, targets): function build_matcher (line 119) | def build_matcher(args): FILE: projects/instance_segment_anything/models/hdetr/models/position_encoding.py class PositionEmbeddingSine (line 20) | class PositionEmbeddingSine(nn.Module): method __init__ (line 26) | def __init__( method forward (line 39) | def forward(self, tensor_list: NestedTensor): class PositionEmbeddingLearned (line 66) | class PositionEmbeddingLearned(nn.Module): method __init__ (line 71) | def __init__(self, num_pos_feats=256): method reset_parameters (line 77) | def reset_parameters(self): method forward (line 81) | def forward(self, tensor_list: NestedTensor): function build_position_encoding (line 103) | def build_position_encoding(args): FILE: projects/instance_segment_anything/models/hdetr/models/segmentation.py class DETRsegm (line 30) | class DETRsegm(nn.Module): method __init__ (line 31) | def __init__(self, detr, freeze_detr=False): method forward (line 45) | def forward(self, samples: NestedTensor): class MaskHeadSmallConv (line 83) | class MaskHeadSmallConv(nn.Module): method __init__ (line 89) | def __init__(self, dim, fpn_dims, context_dim): method forward (line 123) | def forward(self, x, bbox_mask, fpns): class MHAttentionMap (line 164) | class MHAttentionMap(nn.Module): method __init__ (line 167) | def __init__(self, query_dim, hidden_dim, num_heads, dropout=0, bias=T... method forward (line 182) | def forward(self, q, k, mask=None): function dice_loss (line 206) | def dice_loss(inputs, targets, num_boxes): function sigmoid_focal_loss (line 224) | def sigmoid_focal_loss( class PostProcessSegm (line 254) | class PostProcessSegm(nn.Module): method __init__ (line 255) | def __init__(self, threshold=0.5): method forward (line 260) | def forward(self, results, outputs, orig_target_sizes, max_target_sizes): class PostProcessPanoptic (line 281) | class PostProcessPanoptic(nn.Module): method __init__ (line 285) | def __init__(self, is_thing_map, threshold=0.85): method forward (line 296) | def forward(self, outputs, processed_sizes, target_sizes=None): FILE: projects/instance_segment_anything/models/hdetr/models/swin_transformer.py class Mlp (line 18) | class Mlp(nn.Module): method __init__ (line 21) | def __init__( method forward (line 37) | def forward(self, x): function window_partition (line 46) | def window_partition(x, window_size): function window_reverse (line 63) | def window_reverse(windows, window_size, H, W): class WindowAttention (line 82) | class WindowAttention(nn.Module): method __init__ (line 96) | def __init__( method forward (line 144) | def forward(self, x, mask=None): class SwinTransformerBlock (line 196) | class SwinTransformerBlock(nn.Module): method __init__ (line 214) | def __init__( method forward (line 263) | def forward(self, x, mask_matrix): class PatchMerging (line 333) | class PatchMerging(nn.Module): method __init__ (line 341) | def __init__(self, dim, norm_layer=nn.LayerNorm): method forward (line 347) | def forward(self, x, H, W): class BasicLayer (line 377) | class BasicLayer(nn.Module): method __init__ (line 396) | def __init__( method forward (line 446) | def forward(self, x, H, W): class PatchEmbed (line 497) | class PatchEmbed(nn.Module): method __init__ (line 507) | def __init__(self, patch_size=4, in_chans=3, embed_dim=96, norm_layer=... method forward (line 523) | def forward(self, x): class SwinTransformer (line 542) | class SwinTransformer(nn.Module): method __init__ (line 571) | def __init__( method _freeze_stages (line 663) | def _freeze_stages(self): method init_weights (line 680) | def init_weights(self, pretrained=None): method forward (line 705) | def forward(self, x): method train (line 738) | def train(self, mode=True): FILE: projects/instance_segment_anything/models/hdetr/models/util/box_ops.py function box_cxcywh_to_xyxy (line 17) | def box_cxcywh_to_xyxy(x): function box_xyxy_to_cxcywh (line 23) | def box_xyxy_to_cxcywh(x): function box_iou (line 30) | def box_iou(boxes1, boxes2): function generalized_box_iou (line 46) | def generalized_box_iou(boxes1, boxes2): function masks_to_boxes (line 70) | def masks_to_boxes(masks): FILE: projects/instance_segment_anything/models/hdetr/models/util/misc.py class SmoothedValue (line 36) | class SmoothedValue(object): method __init__ (line 41) | def __init__(self, window_size=20, fmt=None): method update (line 49) | def update(self, value, n=1): method synchronize_between_processes (line 54) | def synchronize_between_processes(self): method median (line 68) | def median(self): method avg (line 73) | def avg(self): method global_avg (line 78) | def global_avg(self): method max (line 82) | def max(self): method value (line 86) | def value(self): method __str__ (line 89) | def __str__(self): function all_gather (line 99) | def all_gather(data): function reduce_dict (line 144) | def reduce_dict(input_dict, average=True): class MetricLogger (line 171) | class MetricLogger(object): method __init__ (line 172) | def __init__(self, delimiter="\t"): method update (line 176) | def update(self, **kwargs): method __getattr__ (line 183) | def __getattr__(self, attr): method __str__ (line 192) | def __str__(self): method synchronize_between_processes (line 198) | def synchronize_between_processes(self): method add_meter (line 202) | def add_meter(self, name, meter): method log_every (line 205) | def log_every(self, iterable, print_freq, header=None): function get_sha (line 279) | def get_sha(): function collate_fn (line 300) | def collate_fn(batch): function _max_by_axis (line 306) | def _max_by_axis(the_list): function nested_tensor_from_tensor_list (line 315) | def nested_tensor_from_tensor_list(tensor_list: List[Tensor]): class NestedTensor (line 335) | class NestedTensor(object): method __init__ (line 336) | def __init__(self, tensors, mask: Optional[Tensor]): method to (line 340) | def to(self, device, non_blocking=False): method record_stream (line 351) | def record_stream(self, *args, **kwargs): method decompose (line 356) | def decompose(self): method __repr__ (line 359) | def __repr__(self): function setup_for_distributed (line 363) | def setup_for_distributed(is_master): function is_dist_avail_and_initialized (line 379) | def is_dist_avail_and_initialized(): function get_world_size (line 387) | def get_world_size(): function get_rank (line 393) | def get_rank(): function get_local_size (line 399) | def get_local_size(): function get_local_rank (line 405) | def get_local_rank(): function is_main_process (line 411) | def is_main_process(): function save_on_master (line 415) | def save_on_master(*args, **kwargs): function init_distributed_mode (line 420) | def init_distributed_mode(args): function accuracy (line 468) | def accuracy(output, target, topk=(1,)): function interpolate (line 486) | def interpolate( function get_total_grad_norm (line 500) | def get_total_grad_norm(parameters, norm_type=2): function inverse_sigmoid (line 513) | def inverse_sigmoid(x, eps=1e-5): FILE: projects/instance_segment_anything/models/hdetr/models/util/plot_utils.py function plot_logs (line 21) | def plot_logs(logs, fields=('class_error', 'loss_bbox_unscaled', 'mAP'),... function plot_precision_recall (line 77) | def plot_precision_recall(files, naming_scheme='iter'): FILE: projects/instance_segment_anything/models/segment_anything/automatic_mask_generator.py class SamAutomaticMaskGenerator (line 35) | class SamAutomaticMaskGenerator: method __init__ (line 36) | def __init__( method generate (line 137) | def generate(self, image: np.ndarray) -> List[Dict[str, Any]]: method _generate_masks (line 197) | def _generate_masks(self, image: np.ndarray) -> MaskData: method _process_crop (line 225) | def _process_crop( method _process_batch (line 266) | def _process_batch( method postprocess_small_regions (line 324) | def postprocess_small_regions( FILE: projects/instance_segment_anything/models/segment_anything/build_sam.py function build_sam_vit_h (line 14) | def build_sam_vit_h(checkpoint=None): function build_sam_vit_l (line 27) | def build_sam_vit_l(checkpoint=None): function build_sam_vit_b (line 37) | def build_sam_vit_b(checkpoint=None): function _build_sam (line 55) | def _build_sam( FILE: projects/instance_segment_anything/models/segment_anything/modeling/common.py class MLPBlock (line 13) | class MLPBlock(nn.Module): method __init__ (line 14) | def __init__( method forward (line 25) | def forward(self, x: torch.Tensor) -> torch.Tensor: class LayerNorm2d (line 31) | class LayerNorm2d(nn.Module): method __init__ (line 32) | def __init__(self, num_channels: int, eps: float = 1e-6) -> None: method forward (line 38) | def forward(self, x: torch.Tensor) -> torch.Tensor: FILE: projects/instance_segment_anything/models/segment_anything/modeling/image_encoder.py class ImageEncoderViT (line 17) | class ImageEncoderViT(nn.Module): method __init__ (line 18) | def __init__( method forward (line 106) | def forward(self, x: torch.Tensor) -> torch.Tensor: class Block (line 119) | class Block(nn.Module): method __init__ (line 122) | def __init__( method forward (line 166) | def forward(self, x: torch.Tensor) -> torch.Tensor: class Attention (line 185) | class Attention(nn.Module): method __init__ (line 188) | def __init__( method forward (line 224) | def forward(self, x: torch.Tensor) -> torch.Tensor: function window_partition (line 243) | def window_partition(x: torch.Tensor, window_size: int) -> Tuple[torch.T... function window_unpartition (line 267) | def window_unpartition( function get_rel_pos (line 292) | def get_rel_pos(q_size: int, k_size: int, rel_pos: torch.Tensor) -> torc... function add_decomposed_rel_pos (line 325) | def add_decomposed_rel_pos( class PatchEmbed (line 364) | class PatchEmbed(nn.Module): method __init__ (line 369) | def __init__( method forward (line 391) | def forward(self, x: torch.Tensor) -> torch.Tensor: FILE: projects/instance_segment_anything/models/segment_anything/modeling/mask_decoder.py class MaskDecoder (line 16) | class MaskDecoder(nn.Module): method __init__ (line 17) | def __init__( method forward (line 71) | def forward( method predict_masks (line 112) | def predict_masks( class MLP (line 154) | class MLP(nn.Module): method __init__ (line 155) | def __init__( method forward (line 171) | def forward(self, x): FILE: projects/instance_segment_anything/models/segment_anything/modeling/prompt_encoder.py class PromptEncoder (line 16) | class PromptEncoder(nn.Module): method __init__ (line 17) | def __init__( method get_dense_pe (line 62) | def get_dense_pe(self) -> torch.Tensor: method _embed_points (line 73) | def _embed_points( method _embed_boxes (line 93) | def _embed_boxes(self, boxes: torch.Tensor) -> torch.Tensor: method _embed_masks (line 102) | def _embed_masks(self, masks: torch.Tensor) -> torch.Tensor: method _get_batch_size (line 107) | def _get_batch_size( method _get_device (line 125) | def _get_device(self) -> torch.device: method forward (line 128) | def forward( class PositionEmbeddingRandom (line 171) | class PositionEmbeddingRandom(nn.Module): method __init__ (line 176) | def __init__(self, num_pos_feats: int = 64, scale: Optional[float] = N... method _pe_encoding (line 185) | def _pe_encoding(self, coords: torch.Tensor) -> torch.Tensor: method forward (line 194) | def forward(self, size: Tuple[int, int]) -> torch.Tensor: method forward_with_coords (line 207) | def forward_with_coords( FILE: projects/instance_segment_anything/models/segment_anything/modeling/sam.py class Sam (line 18) | class Sam(nn.Module): method __init__ (line 22) | def __init__( method device (line 50) | def device(self) -> Any: method forward (line 54) | def forward( method postprocess_masks (line 133) | def postprocess_masks( method preprocess (line 164) | def preprocess(self, x: torch.Tensor) -> torch.Tensor: FILE: projects/instance_segment_anything/models/segment_anything/modeling/transformer.py class TwoWayTransformer (line 16) | class TwoWayTransformer(nn.Module): method __init__ (line 17) | def __init__( method forward (line 62) | def forward( class TwoWayAttentionBlock (line 109) | class TwoWayAttentionBlock(nn.Module): method __init__ (line 110) | def __init__( method forward (line 151) | def forward( class Attention (line 185) | class Attention(nn.Module): method __init__ (line 191) | def __init__( method _separate_heads (line 208) | def _separate_heads(self, x: Tensor, num_heads: int) -> Tensor: method _recombine_heads (line 213) | def _recombine_heads(self, x: Tensor) -> Tensor: method forward (line 218) | def forward(self, q: Tensor, k: Tensor, v: Tensor) -> Tensor: FILE: projects/instance_segment_anything/models/segment_anything/predictor.py class SamPredictor (line 18) | class SamPredictor(nn.Module): method __init__ (line 19) | def __init__( method set_image (line 35) | def set_image( method set_torch_image (line 64) | def set_torch_image( method predict (line 93) | def predict( method predict_torch (line 170) | def predict_torch( method get_image_embedding (line 246) | def get_image_embedding(self) -> torch.Tensor: method device (line 260) | def device(self) -> torch.device: method reset_image (line 263) | def reset_image(self) -> None: FILE: projects/instance_segment_anything/models/segment_anything/utils/amg.py class MaskData (line 16) | class MaskData: method __init__ (line 22) | def __init__(self, **kwargs) -> None: method __setitem__ (line 29) | def __setitem__(self, key: str, item: Any) -> None: method __delitem__ (line 35) | def __delitem__(self, key: str) -> None: method __getitem__ (line 38) | def __getitem__(self, key: str) -> Any: method items (line 41) | def items(self) -> ItemsView[str, Any]: method filter (line 44) | def filter(self, keep: torch.Tensor) -> None: method cat (line 59) | def cat(self, new_stats: "MaskData") -> None: method to_numpy (line 72) | def to_numpy(self) -> None: function is_box_near_crop_edge (line 78) | def is_box_near_crop_edge( function box_xyxy_to_xywh (line 91) | def box_xyxy_to_xywh(box_xyxy: torch.Tensor) -> torch.Tensor: function batch_iterator (line 98) | def batch_iterator(batch_size: int, *args) -> Generator[List[Any], None,... function mask_to_rle_pytorch (line 107) | def mask_to_rle_pytorch(tensor: torch.Tensor) -> List[Dict[str, Any]]: function rle_to_mask (line 138) | def rle_to_mask(rle: Dict[str, Any]) -> np.ndarray: function area_from_rle (line 152) | def area_from_rle(rle: Dict[str, Any]) -> int: function calculate_stability_score (line 156) | def calculate_stability_score( function build_point_grid (line 179) | def build_point_grid(n_per_side: int) -> np.ndarray: function build_all_layer_point_grids (line 189) | def build_all_layer_point_grids( function generate_crop_boxes (line 200) | def generate_crop_boxes( function uncrop_boxes_xyxy (line 237) | def uncrop_boxes_xyxy(boxes: torch.Tensor, crop_box: List[int]) -> torch... function uncrop_points (line 246) | def uncrop_points(points: torch.Tensor, crop_box: List[int]) -> torch.Te... function uncrop_masks (line 255) | def uncrop_masks( function remove_small_regions (line 267) | def remove_small_regions( function coco_encode_rle (line 294) | def coco_encode_rle(uncompressed_rle: Dict[str, Any]) -> Dict[str, Any]: function batched_mask_to_box (line 303) | def batched_mask_to_box(masks: torch.Tensor) -> torch.Tensor: FILE: projects/instance_segment_anything/models/segment_anything/utils/onnx.py class SamOnnxModel (line 17) | class SamOnnxModel(nn.Module): method __init__ (line 25) | def __init__( method resize_longest_image_size (line 42) | def resize_longest_image_size( method _embed_points (line 51) | def _embed_points(self, point_coords: torch.Tensor, point_labels: torc... method _embed_masks (line 69) | def _embed_masks(self, input_mask: torch.Tensor, has_mask_input: torch... method mask_postprocessing (line 76) | def mask_postprocessing(self, masks: torch.Tensor, orig_im_size: torch... method select_masks (line 92) | def select_masks( method forward (line 108) | def forward( FILE: projects/instance_segment_anything/models/segment_anything/utils/transforms.py class ResizeLongestSide (line 16) | class ResizeLongestSide: method __init__ (line 23) | def __init__(self, target_length: int) -> None: method apply_image (line 26) | def apply_image(self, image: np.ndarray) -> np.ndarray: method apply_coords (line 33) | def apply_coords(self, coords: np.ndarray, original_size: Tuple[int, .... method apply_boxes (line 47) | def apply_boxes(self, boxes: np.ndarray, original_size: Tuple[int, ...... method apply_image_torch (line 55) | def apply_image_torch(self, image: torch.Tensor) -> torch.Tensor: method apply_coords_torch (line 67) | def apply_coords_torch( method apply_boxes_torch (line 83) | def apply_boxes_torch( method get_preprocess_shape (line 94) | def get_preprocess_shape(oldh: int, oldw: int, long_side_length: int) ... FILE: projects/instance_segment_anything/ops/functions/ms_deform_attn_func.py class MSDeformAttnFunction (line 27) | class MSDeformAttnFunction(Function): method forward (line 30) | def forward( method backward (line 60) | def backward(ctx, grad_output): function ms_deform_attn_core_pytorch (line 81) | def ms_deform_attn_core_pytorch( FILE: projects/instance_segment_anything/ops/modules/ms_deform_attn.py function _is_power_of_2 (line 30) | def _is_power_of_2(n): class MSDeformAttn (line 38) | class MSDeformAttn(nn.Module): method __init__ (line 39) | def __init__(self, d_model=256, n_levels=4, n_heads=8, n_points=4): method _reset_parameters (line 76) | def _reset_parameters(self): method forward (line 99) | def forward( FILE: projects/instance_segment_anything/ops/setup.py function get_extensions (line 23) | def get_extensions(): FILE: projects/instance_segment_anything/ops/src/cpu/ms_deform_attn_cpu.cpp function ms_deform_attn_cpu_forward (line 17) | at::Tensor function ms_deform_attn_cpu_backward (line 29) | std::vector FILE: projects/instance_segment_anything/ops/src/ms_deform_attn.h function im2col_step (line 27) | int im2col_step) FILE: projects/instance_segment_anything/ops/src/vision.cpp function PYBIND11_MODULE (line 13) | PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) { FILE: projects/instance_segment_anything/ops/test.py function check_forward_equal_with_pytorch_double (line 32) | def check_forward_equal_with_pytorch_double(): function check_forward_equal_with_pytorch_float (line 48) | def check_forward_equal_with_pytorch_float(): function check_gradient_numerical (line 63) | def check_gradient_numerical(channels=4, grad_value=True, grad_sampling_... FILE: setup.py function readme (line 16) | def readme(): function get_version (line 25) | def get_version(): function make_cuda_ext (line 31) | def make_cuda_ext(name, module, sources, sources_cuda=[]): function parse_requirements (line 56) | def parse_requirements(fname='requirements.txt', with_version=True): function add_mim_extension (line 134) | def add_mim_extension(): FILE: tools/test.py function parse_args (line 24) | def parse_args(): function main (line 120) | def main():