class_docstr: Guided-Anchor-based head (GA-RPN, GA-RetinaNet, etc.).
  
  This GuidedAnchorHead will predict high-quality feature guided
  anchors and locations where anchors will be kept in inference.
  There are mainly 3 categories of bounding-boxes.
  
  - Sampled 9 pairs for target assignment. (approxes)
  - The square boxes where the predicted anchors are based on. (squares)
  - Guided anchors.
  
  Please refer to https://arxiv.org/abs/1901.03278 for more details.
  
  Args:
      num_classes (int): Number of classes.
      in_channels (int): Number of channels in the input feature map.
      feat_channels (int): Number of hidden channels.
      approx_anchor_generator (dict): Config dict for approx generator
      square_anchor_generator (dict): Config dict for square generator
      anchor_coder (dict): Config dict for anchor coder
      bbox_coder (dict): Config dict for bbox coder
      deform_groups: (int): Group number of DCN in
          FeatureAdaption module.
      loc_filter_thr (float): Threshold to filter out unconcerned regions.
      loss_loc (dict): Config of location loss.
      loss_shape (dict): Config of anchor shape loss.
      loss_cls (dict): Config of classification loss.
      loss_bbox (dict): Config of bbox regression loss.
code: def get_bboxes(
      self,
      cls_scores,
      bbox_preds,
      shape_preds,
      loc_preds,
      img_metas,
      cfg=None,
      rescale=False,
  ):
      assert (
          len(cls_scores)
          == len(bbox_preds)
          == len(shape_preds)
          == len(loc_preds)
      )
      num_levels = len(cls_scores)
      featmap_sizes = [featmap.size()[-2:] for featmap in cls_scores]
      device = cls_scores[0].device
      # get guided anchors
      _, guided_anchors, loc_masks = self.get_anchors(
          featmap_sizes,
          shape_preds,
          loc_preds,
          img_metas,
          use_loc_filter=not self.training,
          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_pred_list = [
              bbox_preds[i][img_id].detach() for i in range(num_levels)
          ]
          guided_anchor_list = [
              guided_anchors[img_id][i].detach()
              for i in range(num_levels)
          ]
          loc_mask_list = [
              loc_masks[img_id][i].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_pred_list,
              guided_anchor_list,
              loc_mask_list,
              img_shape,
              scale_factor,
              cfg,
              rescale,
          )
          result_list.append(proposals)
      return result_list
  
imports: import torch
  import torch.nn
  from mmcv.cnn import bias_init_with_prob, normal_init
  from mmcv.ops import DeformConv2d, MaskedConv2d
  from mmcv.runner import force_fp32
  from mmdet.core import anchor_inside_flags, build_anchor_generator, build_assigner, build_bbox_coder, build_sampler, calc_region, images_to_levels, multi_apply, multiclass_nms, unmap
  from ..builder import HEADS, build_loss
  from .anchor_head import AnchorHead
label_desc: Use image node_id 15 for calling the GuidedAnchorHead obj's underlying member method code with example usage: obj.get_bboxes(cls_scores, bbox_preds, shape_preds, loc_preds, img_metas, cfg, rescale) and returns: result_list