rapid.TensorToBBoxConverter

Inheritance diagram of TensorToBBoxConverter

TensorToBBoxConverter inheritance diagram

class savant.converter.rapid.TensorToBBoxConverter(confidence_threshold=0.4, nms_iou_threshold=0.5, top_k=70)

RAPiD output to bbox converter.

Parameters:
  • confidence_threshold (float) – confidence threshold (pre-cluster-threshold)

  • nms_iou_threshold (float) – nms iou threshold

  • top_k (int) – leave no more than top K bboxes with maximum confidence

__call__(*output_layers, model, roi)

Converts RAPiD detector output layer tensor to bbox tensor.

Parameters:
  • output_layers (ndarray) – Output layer tensor

  • model (ObjectModel) – Model definition, required parameters: input tensor shape, maintain_aspect_ratio

  • roi (Tuple[float, float, float, float]) – [top, left, width, height] of the rectangle on which the model infers

Returns:

BBox tensor (class_id, confidence, xc, yc, width, height, angle) in roi scale

Return type:

ndarray