parameters: (boxes, box_deltas)
return_statement: return pred_boxes
docstring: Transform the set of class-agnostic boxes into class-specific boxes
      by applying the predicted offsets (box_deltas)
      :param boxes: !important [N 4]
      :param box_deltas: [N, 4 * num_classes]
      :return: [N 4 * num_classes]
docstring_summary: Transform the set of class-agnostic boxes into class-specific boxes
      by applying the predicted offsets (box_deltas)
      :param boxes: !important [N 4]
      :param box_deltas: [N, 4 * num_classes]
      :return: [N 4 * num_classes]
docstring_tokens: Transform the set of class - agnostic boxes into class - specific boxes by applying the predicted offsets ( box_deltas ) : param boxes : !important [ N 4 ] : param box_deltas : [ N 4 * num_classes ] : return : [ N 4 * num_classes ]
function: def iou_pred(boxes, box_deltas):
      """
      Transform the set of class-agnostic boxes into class-specific boxes
      by applying the predicted offsets (box_deltas)
      :param boxes: !important [N 4]
      :param box_deltas: [N, 4 * num_classes]
      :return: [N 4 * num_classes]
      """
      if boxes.shape[0] == 0:
          return np.zeros((0, box_deltas.shape[1]))
  
      boxes = boxes.astype(np.float, copy=False)
      x1 = boxes[:, 0]
      y1 = boxes[:, 1]
      x2 = boxes[:, 2]
      y2 = boxes[:, 3]
  
      dx1 = box_deltas[:, 0::4]
      dy1 = box_deltas[:, 1::4]
      dx2 = box_deltas[:, 2::4]
      dy2 = box_deltas[:, 3::4]
  
      pred_boxes = np.zeros(box_deltas.shape)
      # x1
      pred_boxes[:, 0::4] = dx1 + x1[:, np.newaxis]
      # y1
      pred_boxes[:, 1::4] = dy1 + y1[:, np.newaxis]
      # x2
      pred_boxes[:, 2::4] = dx2 + x2[:, np.newaxis]
      # y2
      pred_boxes[:, 3::4] = dy2 + y2[:, np.newaxis]
  
      return pred_boxes
function_tokens: def iou_pred ( boxes , box_deltas ) : if boxes . shape [ 0 ] == 0 : return np . zeros ( ( 0 , box_deltas . shape [ 1 ] ) ) boxes = boxes . astype ( np . float , copy = False ) x1 = boxes [ : , 0 ] y1 = boxes [ : , 1 ] x2 = boxes [ : , 2 ] y2 = boxes [ : , 3 ] dx1 = box_deltas [ : , 0 : : 4 ] dy1 = box_deltas [ : , 1 : : 4 ] dx2 = box_deltas [ : , 2 : : 4 ] dy2 = box_deltas [ : , 3 : : 4 ] pred_boxes = np . zeros ( box_deltas . shape ) # x1 pred_boxes [ : , 0 : : 4 ] = dx1 + x1 [ : , np . newaxis ] # y1 pred_boxes [ : , 1 : : 4 ] = dy1 + y1 [ : , np . newaxis ] # x2 pred_boxes [ : , 2 : : 4 ] = dx2 + x2 [ : , np . newaxis ] # y2 pred_boxes [ : , 3 : : 4 ] = dy2 + y2 [ : , np . newaxis ] return pred_boxes