class documentation

class DetectorOutputProcessor(OutputProcessor): (source)

Constructor: DetectorOutputProcessor(classes)

View In Hierarchy

Output processor for object detectors.

Parameters
classesthe list of class labels for the model
Method __call__ Parses the model output.
Method __init__ Undocumented
Instance Variable classes Undocumented
Method _parse_output Undocumented
def __call__(self, output, frame_size, confidence_thresh=None): (source)

Parses the model output.

Parameters
output

a batch of predictions output = List[Dict[Tensor]], where each dict has the following keys:

  • boxes (FloatTensor[N, 4]): the predicted boxes in [x1, y1, x2, y2] format (absolute coordinates)
  • labels (Int64Tensor[N]): the predicted labels
  • scores (Tensor[N]): the scores for each prediction
frame_sizethe (width, height) of the frames in the batch
confidence_thresh:Nonean optional confidence threshold to use to filter any applicable predictions
Returns
a list of fiftyone.core.labels.Detections instances
def __init__(self, classes=None): (source)
def _parse_output(self, output, frame_size, confidence_thresh): (source)

Undocumented