def main():

    labels = json.load(open('../models/benchmark_scores.json'))

    ind = np.argsort(labels['off_score'])[::-1]
    scores = [labels['off_score'][i] for i in ind[:9]]
    images = [ex(labels['off'][i]) for i in ind[:9]]

    for i in range(9):
        p = labels['off'][ind[i]]
        b, d = closest_bubble(p)
        print "Offset: %0.2f\t radii: %0.2f %0.2f" % (d, p[-1], b[-1])

    ims = np.vstack(np.hstack(images[i:i+3]) for i in [0, 3, 6])
    plt.imshow(ims, origin='upper')

    dx = images[0].shape[0]
    kw = {'color': 'white'}
    plt.axhline(dx, **kw)
    plt.axhline(dx * 2, **kw)

    plt.axvline(dx, **kw)
    plt.axvline(dx * 2, **kw)

    for i in range(9):
        x = dx * (i % 3) + dx / 10
        y = dx * (i / 3) + 9.5 * dx / 10
        plt.annotate("%0.2f" % scores[i], xy=(x, y), color='white')


    hide_axes()
    plt.savefig('fp.eps')
dataset/ETHPy150Open ChrisBeaumont/brut/figures/fp.py/main/original