class_docstr: Bucketing BBox Coder for Side-Aware Bounday Localization (SABL).
  
  Boundary Localization with Bucketing and Bucketing Guided Rescoring
  are implemented here.
  
  Please refer to https://arxiv.org/abs/1912.04260 for more details.
  
  Args:
      num_buckets (int): Number of buckets.
      scale_factor (int): Scale factor of proposals to generate buckets.
      offset_topk (int): Topk buckets are used to generate
           bucket fine regression targets. Defaults to 2.
      offset_upperbound (float): Offset upperbound to generate
           bucket fine regression targets.
           To avoid too large offset displacements. Defaults to 1.0.
      cls_ignore_neighbor (bool): Ignore second nearest bucket or Not.
           Defaults to True.
      clip_border (bool, optional): Whether clip the objects outside the
          border of the image. Defaults to True.
docstr: Apply transformation `pred_bboxes` to `boxes`.
  Args:
      boxes (torch.Tensor): Basic boxes.
      pred_bboxes (torch.Tensor): Predictions for bucketing estimation
          and fine regression
      max_shape (tuple[int], optional): Maximum shape of boxes.
          Defaults to None.
  
  Returns:
      torch.Tensor: Decoded boxes.
docstr_tok: ["Apply","transformation","`","pred_bboxes","`","to","`","boxes","`",".","Args",":","boxes","(","torch.Tensor",")",":","Basic","boxes",".","pred_bboxes","(","torch.Tensor",")",":","Predictions","for","bucketing","estimation","and","fine","regression","max_shape","(","tuple","[","int","]",",","optional",")",":","Maximum","shape","of","boxes",".","Defaults","to","None",".","Returns",":","torch.Tensor",":","Decoded","boxes","."]
code: def decode(self, bboxes, pred_bboxes, max_shape=None):
      """Apply transformation `pred_bboxes` to `boxes`.
      Args:
          boxes (torch.Tensor): Basic boxes.
          pred_bboxes (torch.Tensor): Predictions for bucketing estimation
              and fine regression
          max_shape (tuple[int], optional): Maximum shape of boxes.
              Defaults to None.
  
      Returns:
          torch.Tensor: Decoded boxes.
      """
      assert len(pred_bboxes) == 2
      cls_preds, offset_preds = pred_bboxes
      assert cls_preds.size(0) == bboxes.size(0) and offset_preds.size(
          0
      ) == bboxes.size(0)
      decoded_bboxes = bucket2bbox(
          bboxes,
          cls_preds,
          offset_preds,
          self.num_buckets,
          self.scale_factor,
          max_shape,
          self.clip_border,
      )
  
      return decoded_bboxes
  
file_path: insightface/detection/scrfd/mmdet/core/bbox/coder/bucketing_bbox_coder.py
imports: import numpy
  import torch
  import torch.nn.functional
  from ..builder import BBOX_CODERS
  from ..transforms import bbox_rescale
  from .base_bbox_coder import BaseBBoxCoder
label_desc: Use image node_id 3 for calling the BucketingBBoxCoder obj's underlying member method code with example usage: obj.decode(bboxes, pred_bboxes, max_shape) and returns: decoded_bboxes