コード例 #1
0
        for fb_noext, fig in zip(ffiles, figs):
            for ext in FIGS_EXTENSIONS:
                if ext == 'pdf':
                    pass
                    fig.savefig(pp, format='pdf')
                else:
                    if mode == 'infer':
                        noext = fb_noext + '-infer'
                    else:
                        noext = fb_noext + '-train'

                    fig.savefig(
                        fname=os.path.join(dirs['figures'], noext + "." + ext),
                        transparent=TRANSPARENT,
                    )
                pass
        if pp:
            pp.close()

if 'show' in FIGS_SAVESHOW:
    plt.show()

#FIGS_ESXTENSIONS

qsf.evaluateAllResults(result_files=files['result'],
                       absolute_disparity=ABSOLUTE_DISPARITY,
                       cluster_radius=CLUSTER_RADIUS)
print("All done")
exit(0)
コード例 #2
0
if TEST_TITLES is None:
    TEST_TITLES = qsf.defaultTestTitles(files)

partials = None
partials = qsf.concentricSquares(CLUSTER_RADIUS)
PARTIALS_WEIGHTS = [
    1.0 * pw / sum(PARTIALS_WEIGHTS) for pw in PARTIALS_WEIGHTS
]
if not USE_PARTIALS:
    partials = partials[0:1]
    PARTIALS_WEIGHTS = [1.0]

qsf.evaluateAllResults(result_files=files['result'],
                       absolute_disparity=ABSOLUTE_DISPARITY,
                       cluster_radius=CLUSTER_RADIUS,
                       labels=SLICE_LABELS,
                       logpath=LOGPATH)

image_data = qsf.initImageData(files=files,
                               max_imgs=MAX_IMGS_IN_MEM,
                               cluster_radius=CLUSTER_RADIUS,
                               tile_layers=TILE_LAYERS,
                               tile_side=TILE_SIDE,
                               width=IMG_WIDTH,
                               replace_nans=True)

corr2d_len, target_disparity_len, _ = qsf.get_lengths(CLUSTER_RADIUS,
                                                      TILE_LAYERS, TILE_SIDE)

train_next, dataset_train, datasets_test = qsf.initTrainTestData(