Пример #1
0
def evaluate_proposal_file(dataset, proposal_file, output_dir):
    """Evaluate box proposal average recall."""
    roidb = dataset.get_roidb(gt=True, proposal_file=proposal_file)
    results = task_evaluation.evaluate_box_proposals(dataset, roidb)
    task_evaluation.log_box_proposal_results(results)
    recall_file = os.path.join(output_dir, 'rpn_proposal_recall.pkl')
    save_object(results, recall_file)
    return results
def evaluate_proposal_file(dataset, proposal_file, output_dir):
    """Evaluate box proposal average recall."""
    roidb = dataset.get_roidb(gt=True, proposal_file=proposal_file)
    results = task_evaluation.evaluate_box_proposals(dataset, roidb)
    task_evaluation.log_box_proposal_results(results)
    recall_file = os.path.join(output_dir, 'rpn_proposal_recall.pkl')
    save_object(results, recall_file)
    return results
Пример #3
0
def evaluate_proposal_file(dataset, proposal_file, output_dir):
    """Evaluate box proposal average recall."""
    roidb = dataset.get_roidb(gt=True, proposal_file=proposal_file)
    results = task_evaluation.evaluate_box_proposals(dataset, roidb)
    task_evaluation.log_box_proposal_results(results)
    recall_file = os.path.join(output_dir, 'rpn_proposal_recall.pkl')
    save_object(results, recall_file)

    all_boxes = np.array([[],
                          smd.prep_proposal_file(proposal_file,
                                                 output_dir,
                                                 top_k=100)])
    """Plot Precision Recall curve for proposal file"""
    smd.evaluate_boxes(dataset, all_boxes, output_dir)
    smd.draw_histos(filepath=output_dir)
    """Plot recall-proposals curve"""
    boxes = np.array(all_boxes[1:][0])
    scores = boxes[:, :, -1]
    boxes = boxes[:, :, :-1]
    smd.plot_rec_prop_curve(boxes, scores, dataset, output_dir, n=40)
    return results