class_docstr: Side-Aware Boundary Localization (SABL) for RetinaNet.
  
  The anchor generation, assigning and sampling in SABLRetinaHead
  are the same as GuidedAnchorHead for guided anchoring.
  
  Please refer to https://arxiv.org/abs/1912.04260 for more details.
  
  Args:
      num_classes (int): Number of classes.
      in_channels (int): Number of channels in the input feature map.
      stacked_convs (int): Number of Convs for classification             and regression branches. Defaults to 4.
      feat_channels (int): Number of hidden channels.             Defaults to 256.
      approx_anchor_generator (dict): Config dict for approx generator.
      square_anchor_generator (dict): Config dict for square generator.
      conv_cfg (dict): Config dict for ConvModule. Defaults to None.
      norm_cfg (dict): Config dict for Norm Layer. Defaults to None.
      bbox_coder (dict): Config dict for bbox coder.
      reg_decoded_bbox (bool): Whether to regress decoded bbox.             Defaults to False.
      train_cfg (dict): Training config of SABLRetinaHead.
      test_cfg (dict): Testing config of SABLRetinaHead.
      loss_cls (dict): Config of classification loss.
      loss_bbox_cls (dict): Config of classification loss for bbox branch.
      loss_bbox_reg (dict): Config of regression loss for bbox branch.
code: def get_bboxes(
      self, cls_scores, bbox_preds, img_metas, cfg=None, rescale=False
  ):
      assert len(cls_scores) == len(bbox_preds)
      num_levels = len(cls_scores)
      featmap_sizes = [featmap.size()[-2:] for featmap in cls_scores]
  
      device = cls_scores[0].device
      mlvl_anchors = self.get_anchors(
          featmap_sizes, img_metas, device=device
      )
      result_list = []
      for img_id in range(len(img_metas)):
          cls_score_list = [
              cls_scores[i][img_id].detach() for i in range(num_levels)
          ]
          bbox_cls_pred_list = [
              bbox_preds[i][0][img_id].detach()
              for i in range(num_levels)
          ]
          bbox_reg_pred_list = [
              bbox_preds[i][1][img_id].detach()
              for i in range(num_levels)
          ]
          img_shape = img_metas[img_id]["img_shape"]
          scale_factor = img_metas[img_id]["scale_factor"]
          proposals = self.get_bboxes_single(
              cls_score_list,
              bbox_cls_pred_list,
              bbox_reg_pred_list,
              mlvl_anchors[img_id],
              img_shape,
              scale_factor,
              cfg,
              rescale,
          )
          result_list.append(proposals)
      return result_list
  
imports: import numpy
  import torch
  import torch.nn
  from mmcv.cnn import ConvModule, bias_init_with_prob, normal_init
  from mmcv.runner import force_fp32
  from mmdet.core import build_anchor_generator, build_assigner, build_bbox_coder, build_sampler, images_to_levels, multi_apply, multiclass_nms, unmap
  from ..builder import HEADS, build_loss
  from .base_dense_head import BaseDenseHead
  from .guided_anchor_head import GuidedAnchorHead
label_desc: Use image node_id 11 for calling the SABLRetinaHead obj's underlying member method code with example usage: obj.get_bboxes(cls_scores, bbox_preds, img_metas, cfg, rescale) and returns: result_list