class_docstr: Distance Point BBox coder.
  
  This coder encodes gt bboxes (x1, y1, x2, y2) into (top, bottom, left,
  right) and decode it back to the original.
  
  Args:
      clip_border (bool, optional): Whether clip the objects outside the
          border of the image. Defaults to True.
docstr: Decode distance prediction to bounding box.
  
  Args:
      points (Tensor): Shape (B, N, 2) or (N, 2).
      pred_bboxes (Tensor): Distance from the given point to 4
          boundaries (left, top, right, bottom). Shape (B, N, 4)
          or (N, 4)
      max_shape (Sequence[int] or torch.Tensor or Sequence[
          Sequence[int]],optional): Maximum bounds for boxes, specifies
          (H, W, C) or (H, W). If priors shape is (B, N, 4), then
          the max_shape should be a Sequence[Sequence[int]],
          and the length of max_shape should also be B.
          Default None.
  Returns:
      Union[Tensor, :obj:`BaseBoxes`]: Boxes with shape (N, 4) or
      (B, N, 4)
docstr_tok: ["Decode","distance","prediction","to","bounding","box",".","Args",":","points","(","Tensor",")",":","Shape","(","B",",","N",",","2",")","or","(","N",",","2",")",".","pred_bboxes","(","Tensor",")",":","Distance","from","the","given","point","to","4","boundaries","(","left",",","top",",","right",",","bottom",")",".","Shape","(","B",",","N",",","4",")","or","(","N",",","4",")","max_shape","(","Sequence","[","int","]","or","torch.Tensor","or","Sequence","[","Sequence","[","int","]","]",",","optional",")",":","Maximum","bounds","for","boxes",",","specifies","(","H",",","W",",","C",")","or","(","H",",","W",")",".","If","priors","shape","is","(","B",",","N",",","4",")",",","then","the","max_shape","should","be","a","Sequence","[","Sequence","[","int","]","]",",","and","the","length","of","max_shape","should","also","be","B",".","Default","None",".","Returns",":","Union","[","Tensor",",",":","obj",":","`","BaseBoxes","`","]",":","Boxes","with","shape","(","N",",","4",")","or","(","B",",","N",",","4",")"]
code: def decode(
      self,
      points: Tensor,
      pred_bboxes: Tensor,
      max_shape: Optional[
          Union[Sequence[int], Tensor, Sequence[Sequence[int]]]
      ] = None,
  ) -> Union[Tensor, BaseBoxes]:
      """Decode distance prediction to bounding box.
  
      Args:
          points (Tensor): Shape (B, N, 2) or (N, 2).
          pred_bboxes (Tensor): Distance from the given point to 4
              boundaries (left, top, right, bottom). Shape (B, N, 4)
              or (N, 4)
          max_shape (Sequence[int] or torch.Tensor or Sequence[
              Sequence[int]],optional): Maximum bounds for boxes, specifies
              (H, W, C) or (H, W). If priors shape is (B, N, 4), then
              the max_shape should be a Sequence[Sequence[int]],
              and the length of max_shape should also be B.
              Default None.
      Returns:
          Union[Tensor, :obj:`BaseBoxes`]: Boxes with shape (N, 4) or
          (B, N, 4)
      """
      assert points.size(0) == pred_bboxes.size(0)
      assert points.size(-1) == 2
      assert pred_bboxes.size(-1) == 4
      if self.clip_border is False:
          max_shape = None
      bboxes = distance2bbox(points, pred_bboxes, max_shape)
  
      if self.use_box_type:
          bboxes = HorizontalBoxes(bboxes)
      return bboxes
  
file_path: mmdetection/mmdet/models/task_modules/coders/distance_point_bbox_coder.py
imports: from typing import Optional, Sequence, Union
  from torch import Tensor
  from mmdet.registry import TASK_UTILS
  from mmdet.structures.bbox import BaseBoxes, HorizontalBoxes, bbox2distance, distance2bbox, get_box_tensor
  from .base_bbox_coder import BaseBBoxCoder
label_desc: Use image node_id 3 for calling the DistancePointBBoxCoder obj's underlying member method code with example usage: obj.decode(points, pred_bboxes, max_shape) and returns: bboxes