towhee.models.retina_face.utils.decode

towhee.models.retina_face.utils.decode(loc, priors, variances)[source]

Decode locations from predictions using priors to undo the encoding we did for offset regression at train time.

Parameters:
  • loc (torch.FloatTensor) – location predictions for loc layers, Shape: [num_priors,4].

  • priors (torch.FloatTensor) – Prior boxes in center-offset form. Shape: [num_priors,4].

  • variances (list[float]) – Variances of priorboxes.

Returns:

(torch.FloatTensor)

decoded bounding box predictions.