class documentation

Output processor for instance segementers.

Parameters
classesthe list of class labels for the model
mask_thresha threshold to use to convert soft masks to binary masks
Method __call__ Parses the model output.
Method __init__ Undocumented
Instance Variable classes Undocumented
Instance Variable mask_thresh 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
  • masks (FloatTensor[N, 1, H, W]): the predicted masks for each instance, in [0, 1]. May also be boolean
  • scores (Tensor[N]): optional 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, mask_thresh=0.5): (source)
mask_thresh: 0.5 = (source)

Undocumented

def _parse_output(self, output, frame_size, confidence_thresh): (source)

Undocumented