original_docstring: 
      Returns the IoU of two bounding boxes
      
docstring: Returns the IoU of two bounding boxes
docstring_tokens: Returns the IoU of two bounding boxes
code: def bbox_iou(box1, box2, x1y1x2y2=True):
      """
      Returns the IoU of two bounding boxes
      """
      if not x1y1x2y2:
          # Transform from center and width to exact coordinates
          b1_x1, b1_x2 = box1[:, 0] - box1[:, 2] / 2, box1[:, 0] + box1[:, 2] / 2
          b1_y1, b1_y2 = box1[:, 1] - box1[:, 3] / 2, box1[:, 1] + box1[:, 3] / 2
          b2_x1, b2_x2 = box2[:, 0] - box2[:, 2] / 2, box2[:, 0] + box2[:, 2] / 2
          b2_y1, b2_y2 = box2[:, 1] - box2[:, 3] / 2, box2[:, 1] + box2[:, 3] / 2
      else:
          # Get the coordinates of bounding boxes
          b1_x1, b1_y1, b1_x2, b1_y2 = box1[:, 0], box1[:, 1], box1[:, 2], box1[:, 3]
          b2_x1, b2_y1, b2_x2, b2_y2 = box2[:, 0], box2[:, 1], box2[:, 2], box2[:, 3]
  
      # get the corrdinates of the intersection rectangle
      inter_rect_x1 = paddle.maximum(b1_x1, b2_x1)
      inter_rect_y1 = paddle.maximum(b1_y1, b2_y1)
      inter_rect_x2 = paddle.minimum(b1_x2, b2_x2)
      inter_rect_y2 = paddle.minimum(b1_y2, b2_y2)
      # Intersection area
      inter_area = paddle.clip(inter_rect_x2 - inter_rect_x1 + 1, min=0) * paddle.clip(
          inter_rect_y2 - inter_rect_y1 + 1, min=0
      )
      # Union Area
      b1_area = (b1_x2 - b1_x1 + 1) * (b1_y2 - b1_y1 + 1)
      b2_area = (b2_x2 - b2_x1 + 1) * (b2_y2 - b2_y1 + 1)
  
      iou = inter_area / (b1_area + b2_area - inter_area + 1e-16)
  
      return iou
code_tokens: def bbox_iou ( box1 , box2 , x1y1x2y2 = True ) : if not x1y1x2y2 : b1_x1 , b1_x2 = box1 [ : , 0 ] - box1 [ : , 2 ] / 2 , box1 [ : , 0 ] + box1 [ : , 2 ] / 2 b1_y1 , b1_y2 = box1 [ : , 1 ] - box1 [ : , 3 ] / 2 , box1 [ : , 1 ] + box1 [ : , 3 ] / 2 b2_x1 , b2_x2 = box2 [ : , 0 ] - box2 [ : , 2 ] / 2 , box2 [ : , 0 ] + box2 [ : , 2 ] / 2 b2_y1 , b2_y2 = box2 [ : , 1 ] - box2 [ : , 3 ] / 2 , box2 [ : , 1 ] + box2 [ : , 3 ] / 2 else : b1_x1 , b1_y1 , b1_x2 , b1_y2 = box1 [ : , 0 ] , box1 [ : , 1 ] , box1 [ : , 2 ] , box1 [ : , 3 ] b2_x1 , b2_y1 , b2_x2 , b2_y2 = box2 [ : , 0 ] , box2 [ : , 1 ] , box2 [ : , 2 ] , box2 [ : , 3 ] inter_rect_x1 = paddle . maximum ( b1_x1 , b2_x1 ) inter_rect_y1 = paddle . maximum ( b1_y1 , b2_y1 ) inter_rect_x2 = paddle . minimum ( b1_x2 , b2_x2 ) inter_rect_y2 = paddle . minimum ( b1_y2 , b2_y2 ) inter_area = paddle . clip ( inter_rect_x2 - inter_rect_x1 + 1 , min = 0 ) * paddle . clip ( inter_rect_y2 - inter_rect_y1 + 1 , min = 0 ) b1_area = ( b1_x2 - b1_x1 + 1 ) * ( b1_y2 - b1_y1 + 1 ) b2_area = ( b2_x2 - b2_x1 + 1 ) * ( b2_y2 - b2_y1 + 1 ) iou = inter_area / ( b1_area + b2_area - inter_area + 1e-16 ) return iou
short_docstring: Returns the IoU of two bounding boxes
short_docstring_tokens: Returns the IoU of two bounding boxes
comment: """
      Returns the IoU of two bounding boxes
      """$SEP$# Transform from center and width to exact coordinates
  $SEP$# Get the coordinates of bounding boxes
  $SEP$# get the corrdinates of the intersection rectangle
  $SEP$# Intersection area
  $SEP$# Union Area
  