parameters: (self, mbox_loc, mbox_priorbox, variances)
return_statement: return decode_bbox
docstring: Convert bboxes from local predictions to shifted priors.
  
          # Arguments
              mbox_loc: Numpy array of predicted locations.
              mbox_priorbox: Numpy array of prior boxes.
              variances: Numpy array of variances.
  
          # Return
              decode_bbox: Shifted priors.
docstring_summary: Convert bboxes from local predictions to shifted priors.
docstring_tokens: Convert bboxes from local predictions to shifted priors .
function: def decode_boxes(self, mbox_loc, mbox_priorbox, variances):
          """Convert bboxes from local predictions to shifted priors.
  
          # Arguments
              mbox_loc: Numpy array of predicted locations.
              mbox_priorbox: Numpy array of prior boxes.
              variances: Numpy array of variances.
  
          # Return
              decode_bbox: Shifted priors.
          """
          prior_width = mbox_priorbox[:, 2] - mbox_priorbox[:, 0]
          prior_height = mbox_priorbox[:, 3] - mbox_priorbox[:, 1]
          prior_center_x = 0.5 * (mbox_priorbox[:, 2] + mbox_priorbox[:, 0])
          prior_center_y = 0.5 * (mbox_priorbox[:, 3] + mbox_priorbox[:, 1])
          decode_bbox_center_x = mbox_loc[:, 0] * prior_width * variances[:, 0]
          decode_bbox_center_x += prior_center_x
          decode_bbox_center_y = mbox_loc[:, 1] * prior_width * variances[:, 1]
          decode_bbox_center_y += prior_center_y
          decode_bbox_width = np.exp(mbox_loc[:, 2] * variances[:, 2])
          decode_bbox_width *= prior_width
          decode_bbox_height = np.exp(mbox_loc[:, 3] * variances[:, 3])
          decode_bbox_height *= prior_height
          decode_bbox_xmin = decode_bbox_center_x - 0.5 * decode_bbox_width
          decode_bbox_ymin = decode_bbox_center_y - 0.5 * decode_bbox_height
          decode_bbox_xmax = decode_bbox_center_x + 0.5 * decode_bbox_width
          decode_bbox_ymax = decode_bbox_center_y + 0.5 * decode_bbox_height
          decode_bbox = np.concatenate((decode_bbox_xmin[:, None],
                                        decode_bbox_ymin[:, None],
                                        decode_bbox_xmax[:, None],
                                        decode_bbox_ymax[:, None]), axis=-1)
          decode_bbox = np.minimum(np.maximum(decode_bbox, 0.0), 1.0)
          return decode_bbox
function_tokens: def decode_boxes ( self , mbox_loc , mbox_priorbox , variances ) : prior_width = mbox_priorbox [ : , 2 ] - mbox_priorbox [ : , 0 ] prior_height = mbox_priorbox [ : , 3 ] - mbox_priorbox [ : , 1 ] prior_center_x = 0.5 * ( mbox_priorbox [ : , 2 ] + mbox_priorbox [ : , 0 ] ) prior_center_y = 0.5 * ( mbox_priorbox [ : , 3 ] + mbox_priorbox [ : , 1 ] ) decode_bbox_center_x = mbox_loc [ : , 0 ] * prior_width * variances [ : , 0 ] decode_bbox_center_x += prior_center_x decode_bbox_center_y = mbox_loc [ : , 1 ] * prior_width * variances [ : , 1 ] decode_bbox_center_y += prior_center_y decode_bbox_width = np . exp ( mbox_loc [ : , 2 ] * variances [ : , 2 ] ) decode_bbox_width *= prior_width decode_bbox_height = np . exp ( mbox_loc [ : , 3 ] * variances [ : , 3 ] ) decode_bbox_height *= prior_height decode_bbox_xmin = decode_bbox_center_x - 0.5 * decode_bbox_width decode_bbox_ymin = decode_bbox_center_y - 0.5 * decode_bbox_height decode_bbox_xmax = decode_bbox_center_x + 0.5 * decode_bbox_width decode_bbox_ymax = decode_bbox_center_y + 0.5 * decode_bbox_height decode_bbox = np . concatenate ( ( decode_bbox_xmin [ : , None ] , decode_bbox_ymin [ : , None ] , decode_bbox_xmax [ : , None ] , decode_bbox_ymax [ : , None ] ) , axis = - 1 ) decode_bbox = np . minimum ( np . maximum ( decode_bbox , 0.0 ) , 1.0 ) return decode_bbox