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"]
code: def __init__(
      self,
      target_means: Sequence[float] = (0.0, 0.0, 0.0, 0.0),
      target_stds: Sequence[float] = (1.0, 1.0, 1.0, 1.0),
      **kwargs,
  ) -> None:
      super().__init__(**kwargs)
      self.means = target_means
      self.stds = target_stds
  
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 1 to create a new LegacyDeltaXYWHBBoxCoder object from inherited base classes: BaseBBoxCoder with example: obj = LegacyDeltaXYWHBBoxCoder(target_means, target_stds)