class_docstr: TBLR BBox coder.
  
  Following the practice in `FSAF <https://arxiv.org/abs/1903.00621>`_,
  this coder encodes gt bboxes (x1, y1, x2, y2) into (top, bottom, left,
  right) and decode it back to the original.
  
  Args:
      normalizer (list | float): Normalization factor to be
        divided with when coding the coordinates. If it is a list, it should
        have length of 4 indicating normalization factor in tblr dims.
        Otherwise it is a unified float factor for all dims. Default: 4.0
      clip_border (bool, optional): Whether clip the objects outside the
          border of the image. Defaults to True.
class_docstr_tok: ["TBLR","BBox","coder",".","Following","the","practice","in","`","FSAF","<","https",":","\/\/arxiv.org\/abs\/1903.00621",">","`","_",",","this","coder","encodes","gt","bboxes","(","x1",",","y1",",","x2",",","y2",")","into","(","top",",","bottom",",","left",",","right",")","and","decode","it","back","to","the","original",".","Args",":","normalizer","(","list","|","float",")",":","Normalization","factor","to","be","divided","with","when","coding","the","coordinates",".","If","it","is","a","list",",","it","should","have","length","of","4","indicating","normalization","factor","in","tblr","dims",".","Otherwise","it","is","a","unified","float","factor","for","all","dims",".","Default",":","4.0","clip_border","(","bool",",","optional",")",":","Whether","clip","the","objects","outside","the","border","of","the","image",".","Defaults","to","True","."]
docstr: Get box regression transformation deltas that can be used to
  transform the ``bboxes`` into the ``gt_bboxes`` in the (top, left,
  bottom, right) order.
  
  Args:
      bboxes (torch.Tensor or :obj:`BaseBoxes`): source boxes,
          e.g., object proposals.
      gt_bboxes (torch.Tensor or :obj:`BaseBoxes`): target of the
          transformation, e.g., ground truth boxes.
  
  Returns:
      torch.Tensor: Box transformation deltas
docstr_tok: ["Get","box","regression","transformation","deltas","that","can","be","used","to","transform","the","``","bboxes","``","into","the","``","gt_bboxes","``","in","the","(","top",",","left",",","bottom",",","right",")","order",".","Args",":","bboxes","(","torch.Tensor","or",":","obj",":","`","BaseBoxes","`",")",":","source","boxes",",","e.g.",",","object","proposals",".","gt_bboxes","(","torch.Tensor","or",":","obj",":","`","BaseBoxes","`",")",":","target","of","the","transformation",",","e.g.",",","ground","truth","boxes",".","Returns",":","torch.Tensor",":","Box","transformation","deltas"]
code: def encode(
      self,
      bboxes: Union[Tensor, BaseBoxes],
      gt_bboxes: Union[Tensor, BaseBoxes],
  ) -> Tensor:
      """Get box regression transformation deltas that can be used to
      transform the ``bboxes`` into the ``gt_bboxes`` in the (top, left,
      bottom, right) order.
  
      Args:
          bboxes (torch.Tensor or :obj:`BaseBoxes`): source boxes,
              e.g., object proposals.
          gt_bboxes (torch.Tensor or :obj:`BaseBoxes`): target of the
              transformation, e.g., ground truth boxes.
  
      Returns:
          torch.Tensor: Box transformation deltas
      """
      bboxes = get_box_tensor(bboxes)
      gt_bboxes = get_box_tensor(gt_bboxes)
      assert bboxes.size(0) == gt_bboxes.size(0)
      assert bboxes.size(-1) == gt_bboxes.size(-1) == 4
      encoded_bboxes = bboxes2tblr(
          bboxes, gt_bboxes, normalizer=self.normalizer
      )
      return encoded_bboxes
  
file_path: mmdetection/mmdet/models/task_modules/coders/tblr_bbox_coder.py
imports: from typing import Optional, Sequence, Union
  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 2 for calling the TBLRBBoxCoder obj's underlying member method code with example usage: obj.encode(bboxes, gt_bboxes) and returns: encoded_bboxes