In [21]:
# get all of the boxes above a confidence level
def get_boxes(boxes, labels, thresh):
    v_boxes, v_labels, v_scores = list(), list(), list()
    # enumerate all boxes
    for box in boxes:
        # enumerate all possible labels
        for i in range(len(labels)):
            # check if the threshold for this label is high enough
            if box.classes[i] > thresh:
                # don't break, many labels may trigger for one box
    return v_boxes, v_labels, v_scores