def d2_parse_output(predictor_output):
    """
    Returns valuable information from Detectron2 predictor output.

    Args:
        coco_output (dictionary) : Output from Detectron2 COCO Predictor.

    Returns:
        pred_masks  (np.array) : Each predicted binary mask. 
        mask_scores (np.array) : Score of each mask.
        pred_class  (int)      : Integer representing predicted class.
        pred_bboxed (np.array) : Predicted Boxes. 

    """
    instances = predictor_output["instances"]

    pred_bboxes  = instances.pred_boxes.tensor.cpu().numpy()
    pred_classes = instances.pred_classes.cpu().numpy()
    pred_masks   = instances.pred_masks.cpu().numpy()  
    mask_scores  = instances.scores.cpu().numpy()

    return pred_masks, mask_scores, pred_classes, pred_bboxes