class_docstr: Bucketing BBox Coder for Side-Aware Boundary 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.
code: def __init__(
      self,
      num_buckets: int,
      scale_factor: int,
      offset_topk: int = 2,
      offset_upperbound: float = 1.0,
      cls_ignore_neighbor: bool = True,
      clip_border: bool = True,
      **kwargs,
  ) -> None:
      super().__init__(**kwargs)
      self.num_buckets = num_buckets
      self.scale_factor = scale_factor
      self.offset_topk = offset_topk
      self.offset_upperbound = offset_upperbound
      self.cls_ignore_neighbor = cls_ignore_neighbor
      self.clip_border = clip_border
  
file_path: mmdetection/mmdet/models/task_modules/coders/bucketing_bbox_coder.py
imports: from typing import Optional, Sequence, Tuple, Union
  import numpy
  import torch
  import torch.nn.functional
  from torch import Tensor
  from mmdet.registry import TASK_UTILS
  from mmdet.structures.bbox import BaseBoxes, HorizontalBoxes, bbox_rescale, get_box_tensor
  from .base_bbox_coder import BaseBBoxCoder
label_desc: Use image node_id 1 to create a new BucketingBBoxCoder object from inherited base classes: BaseBBoxCoder with example: obj = BucketingBBoxCoder(num_buckets, scale_factor, offset_topk, offset_upperbound, cls_ignore_neighbor, clip_border)