Esempio n. 1
0
def visualize_score(scores, heatmaps, grid):

    # Visualize score
    fig_score = plt.figure(num='score', figsize=(8, 6))
    fig_score.clear()

    oft.vis_score(scores[0, 0], grid[0], ax=plt.subplot(121))
    oft.vis_score(heatmaps[0, 0], grid[0], ax=plt.subplot(122))

    return fig_score
Esempio n. 2
0
def visualize_score(preds, targets, grid):

    # Expand tuples
    score, pos_offsets, dim_offsets, ang_offsets = preds
    labels, sqr_dists, gt_pos_offsets, gt_dim_offsets, gt_ang_offsets = targets

    # Visualize score
    fig_score = plt.figure(num='score', figsize=(8, 6))
    fig_score.clear()
    # oft.vis_score(score[0, 0], grid[0], ax=plt.subplot(121))
    oft.vis_score(score[0, 0].sigmoid(), grid[0], ax=plt.subplot(121))
    oft.vis_score(labels[0, 0].float(), grid[0], ax=plt.subplot(122))

    return fig_score
Esempio n. 3
0
def visualize_score(preds, targets, grid):

    # Expand tuples
    score, pos_offsets, dim_offsets, ang_offsets = preds
    labels, sqr_dists, gt_pos_offsets, gt_dim_offsets, gt_ang_offsets = targets

    # TODO Compute
    # score = oft.model.loss.compute_uncertainty(score, sqr_dists, 0.25)

    # Visualize score
    fig_score = plt.figure(num='score', figsize=(8, 6))
    fig_score.clear()
    # oft.vis_score(score[0, 0], grid[0], ax=plt.subplot(121))
    oft.vis_score(score[0, 0].sigmoid(), grid[0], ax=plt.subplot(121))
    oft.vis_score(labels[0, 0].float(), grid[0], ax=plt.subplot(122))

    return oft.convert_figure(fig_score)