blocks.utils.rpn

Functions

blocks.utils.rpn.decode_rpn_predictions(dataset, classifier_probabilities, regression_predictions, non_maximum_suppression=0.3, min_probability=None, top_k=None)[source]

Decode the given RPN predictions to a list of regions.

Optionally:
  • use non maximum suppression

  • filter out regions with low probability

  • output only top k regions

Parameters
  • dataset (RPNDataset) – RPN dataset which created the anchors

  • classifier_probabilities (ndarray) – predicted classifier probabilities (in 0-1 interval)

  • regression_predictions (ndarray) – predicted diffs regression values

  • non_maximum_suppression (Optional[float]) – if specified, use nms with the given threshold

  • min_probability (Optional[float]) – if specified, filter out regions with probability lower than the specified threshold

  • top_k (Optional[int]) – if specified, output only top k regions

Return type

List[Sequence[float]]

Returns

list of decoded regions