class_docstr: Legacy Delta XYWH BBox coder used in MMDet V1.x.
  
  Following the practice in R-CNN [1]_, this coder encodes bbox (x1, y1, x2,
  y2) into delta (dx, dy, dw, dh) and decodes delta (dx, dy, dw, dh)
  back to original bbox (x1, y1, x2, y2).
  
  Note:
      The main difference between :class`LegacyDeltaXYWHBBoxCoder` and
      :class:`DeltaXYWHBBoxCoder` is whether ``+ 1`` is used during width and
      height calculation. We suggest to only use this coder when testing with
      MMDet V1.x models.
  
  References:
      .. [1] https://arxiv.org/abs/1311.2524
  
  Args:
      target_means (Sequence[float]): denormalizing means of target for
          delta coordinates
      target_stds (Sequence[float]): denormalizing standard deviation of
          target for delta coordinates
class_docstr_tok: ["Legacy","Delta","XYWH","BBox","coder","used","in","MMDet","V1.x",".","Following","the","practice","in","R-CNN","[","1","]","_",",","this","coder","encodes","bbox","(","x1",",","y1",",","x2",",","y2",")","into","delta","(","dx",",","dy",",","dw",",","dh",")","and","decodes","delta","(","dx",",","dy",",","dw",",","dh",")","back","to","original","bbox","(","x1",",","y1",",","x2",",","y2",")",".","Note",":","The","main","difference","between",":","class","`","LegacyDeltaXYWHBBoxCoder","`","and",":","class",":","`","DeltaXYWHBBoxCoder","`","is","whether","``","+","1","``","is","used","during","width","and","height","calculation",".","We","suggest","to","only","use","this","coder","when","testing","with","MMDet","V1.x","models",".","References",":","..","[","1","]","https",":","\/\/arxiv.org\/abs\/1311.2524","Args",":","target_means","(","Sequence","[","float","]",")",":","denormalizing","means","of","target","for","delta","coordinates","target_stds","(","Sequence","[","float","]",")",":","denormalizing","standard","deviation","of","target","for","delta","coordinates"]
docstr: Apply transformation `pred_bboxes` to `boxes`.
  
  Args:
      boxes (torch.Tensor or :obj:`BaseBoxes`): Basic boxes.
      pred_bboxes (torch.Tensor): Encoded boxes with shape
      max_shape (tuple[int], optional): Maximum shape of boxes.
          Defaults to None.
      wh_ratio_clip (float, optional): The allowed ratio between
          width and height.
  
  Returns:
      Union[torch.Tensor, :obj:`BaseBoxes`]: Decoded boxes.
docstr_tok: ["Apply","transformation","`","pred_bboxes","`","to","`","boxes","`",".","Args",":","boxes","(","torch.Tensor","or",":","obj",":","`","BaseBoxes","`",")",":","Basic","boxes",".","pred_bboxes","(","torch.Tensor",")",":","Encoded","boxes","with","shape","max_shape","(","tuple","[","int","]",",","optional",")",":","Maximum","shape","of","boxes",".","Defaults","to","None",".","wh_ratio_clip","(","float",",","optional",")",":","The","allowed","ratio","between","width","and","height",".","Returns",":","Union","[","torch.Tensor",",",":","obj",":","`","BaseBoxes","`","]",":","Decoded","boxes","."]
code: def decode(
      self,
      bboxes: Union[Tensor, BaseBoxes],
      pred_bboxes: Tensor,
      max_shape: Optional[
          Union[Sequence[int], Tensor, Sequence[Sequence[int]]]
      ] = None,
      wh_ratio_clip: Optional[float] = 16 / 1000,
  ) -> Union[Tensor, BaseBoxes]:
      """Apply transformation `pred_bboxes` to `boxes`.
  
      Args:
          boxes (torch.Tensor or :obj:`BaseBoxes`): Basic boxes.
          pred_bboxes (torch.Tensor): Encoded boxes with shape
          max_shape (tuple[int], optional): Maximum shape of boxes.
              Defaults to None.
          wh_ratio_clip (float, optional): The allowed ratio between
              width and height.
  
      Returns:
          Union[torch.Tensor, :obj:`BaseBoxes`]: Decoded boxes.
      """
      bboxes = get_box_tensor(bboxes)
      assert pred_bboxes.size(0) == bboxes.size(0)
      decoded_bboxes = legacy_delta2bbox(
          bboxes,
          pred_bboxes,
          self.means,
          self.stds,
          max_shape,
          wh_ratio_clip,
      )
  
      if self.use_box_type:
          assert decoded_bboxes.size(-1) == 4, (
              "Cannot warp decoded boxes with box type when decoded boxes"
              "have shape of (N, num_classes * 4)"
          )
          decoded_bboxes = HorizontalBoxes(decoded_bboxes)
      return decoded_bboxes
  
file_path: mmdetection/mmdet/models/task_modules/coders/legacy_delta_xywh_bbox_coder.py
imports: from typing import Optional, Sequence, Union
  import numpy
  import torch
  from torch import Tensor
  from mmdet.registry import TASK_UTILS
  from mmdet.structures.bbox import BaseBoxes, HorizontalBoxes, get_box_tensor
  from .base_bbox_coder import BaseBBoxCoder
label_desc: Use image node_id 3 for calling the LegacyDeltaXYWHBBoxCoder obj's underlying member method code with example usage: obj.decode(bboxes, pred_bboxes, max_shape, wh_ratio_clip) and returns: decoded_bboxes