class_docstr: BBoxL1Cost.
  
  Note: ``bboxes`` in ``InstanceData`` passed in is of format 'xyxy'
  and its coordinates are unnormalized.
  
  Args:
      box_format (str, optional): 'xyxy' for DETR, 'xywh' for Sparse_RCNN.
          Defaults to 'xyxy'.
      weight (Union[float, int]): Cost weight. Defaults to 1.
  
  Examples:
      >>> from mmdet.models.task_modules.assigners.
      ... match_costs.match_cost import BBoxL1Cost
      >>> import torch
      >>> self = BBoxL1Cost()
      >>> bbox_pred = torch.rand(1, 4)
      >>> gt_bboxes= torch.FloatTensor([[0, 0, 2, 4], [1, 2, 3, 4]])
      >>> factor = torch.tensor([10, 8, 10, 8])
      >>> self(bbox_pred, gt_bboxes, factor)
      tensor([[1.6172, 1.6422]])
class_docstr_tok: ["BBoxL1Cost",".","Note",":","``","bboxes","``","in","``","InstanceData","``","passed","in","is","of","format","'xyxy'","and","its","coordinates","are","unnormalized",".","Args",":","box_format","(","str",",","optional",")",":","'xyxy","'","for","DETR",",","'xywh","'","for","Sparse_RCNN",".","Defaults","to","'xyxy","'",".","weight","(","Union","[","float",",","int","]",")",":","Cost","weight",".","Defaults","to","1",".","Examples",":",">",">",">","from","mmdet.models.task_modules.assigners",".","...","match_costs.match_cost","import","BBoxL1Cost",">",">",">","import","torch",">",">",">","self","=","BBoxL1Cost","(",")",">",">",">","bbox_pred","=","torch.rand","(","1",",","4",")",">",">",">","gt_bboxes=","torch.FloatTensor","(","[","[","0",",","0",",","2",",","4","]",",","[","1",",","2",",","3",",","4","]","]",")",">",">",">","factor","=","torch.tensor","(","[","10",",","8",",","10",",","8","]",")",">",">",">","self","(","bbox_pred",",","gt_bboxes",",","factor",")","tensor","(","[","[","1.6172",",","1.6422","]","]",")"]
docstr: Compute match cost.
  
  Args:
      pred_instances (:obj:`InstanceData`): ``bboxes`` inside is
          predicted boxes with unnormalized coordinate
          (x, y, x, y).
      gt_instances (:obj:`InstanceData`): ``bboxes`` inside is gt
          bboxes with unnormalized coordinate (x, y, x, y).
      img_meta (Optional[dict]): Image information. Defaults to None.
  
  Returns:
      Tensor: Match Cost matrix of shape (num_preds, num_gts).
code: def __call__(
      self,
      pred_instances: InstanceData,
      gt_instances: InstanceData,
      img_meta: Optional[dict] = None,
      **kwargs,
  ) -> Tensor:
      """Compute match cost.
  
      Args:
          pred_instances (:obj:`InstanceData`): ``bboxes`` inside is
              predicted boxes with unnormalized coordinate
              (x, y, x, y).
          gt_instances (:obj:`InstanceData`): ``bboxes`` inside is gt
              bboxes with unnormalized coordinate (x, y, x, y).
          img_meta (Optional[dict]): Image information. Defaults to None.
  
      Returns:
          Tensor: Match Cost matrix of shape (num_preds, num_gts).
      """
      pred_bboxes = pred_instances.bboxes
      gt_bboxes = gt_instances.bboxes
  
      # convert box format
      if self.box_format == "xywh":
          gt_bboxes = bbox_xyxy_to_cxcywh(gt_bboxes)
          pred_bboxes = bbox_xyxy_to_cxcywh(pred_bboxes)
  
      # normalized
      img_h, img_w = img_meta["img_shape"]
      factor = gt_bboxes.new_tensor(
          [img_w, img_h, img_w, img_h]
      ).unsqueeze(0)
      gt_bboxes = gt_bboxes / factor
      pred_bboxes = pred_bboxes / factor
  
      bbox_cost = torch.cdist(pred_bboxes, gt_bboxes, p=1)
      return bbox_cost * self.weight
  
imports: from abc import abstractmethod
  from typing import Optional, Union
  import torch
  import torch.nn.functional
  from mmengine.structures import InstanceData
  from torch import Tensor
  from mmdet.registry import TASK_UTILS
  from mmdet.structures.bbox import bbox_overlaps, bbox_xyxy_to_cxcywh
label_desc: Use image node_id 2 for calling the BBoxL1Cost obj's underlying member method code with example usage: obj.__call__(pred_instances, gt_instances, img_meta) and returns: unknown