def main():
    args = arg.preprocess_args()
    data = helper.get_data(folder=args.folder, data_file=args.data)
    print('data_loaded')
    append(data, args)
    for i in range(10):
        append(data, args, str(i), '_')
Exemple #2
0
def main():
    args = arg.preprocess_args()
    rand = random.randint(0, 9999999)
    data, _ = helper.pre_processed_data(args, rand, dry=False)
    #  data = data.reshape(-1,48,48)
    if args.mean:
        label, _ = helper.pre_processed_label(args, rand, dry=False)
        data = preprocess.mean_image(label, data)
    elif args.split is not None or args.randomize:
        label, _ = helper.pre_processed_label(args, rand, dry=False)
        helper.write_data_to_file(
            (args.folder or helper.FOLDER) + (args.name or 'processed_data') +
            '_l' + helper.EXT,
            label,
            fmt='%d',
            h='0')
    # for i in range(4):
    #     for j in range(4):
    helper.write_data_to_file(
        (args.folder or helper.FOLDER) +
        (args.name or 'processed_data')  # + str(i) + str(j)
        + helper.EXT,
        data,
        #  [k[i*12:(i*12)+12,j*12:(j*12)+12].flatten() for k in data],
        h=', '.join(str(i) for i in range(len(data[0]))))
def main():
    args = arg.preprocess_args()
    rand = 0
    data, _ = helper.pre_processed_data_all(args, rand, dry=False)
    if args.mean:
        rand = random.randint(0, 9999999)
        label, _ = helper.pre_processed_label_all(args, rand, dry=False)
        data = preprocess.mean_image(label, data)
    helper.create_images_from_rows((args.name or 'img'), data)
Exemple #4
0
def main():
    args = arg.preprocess_args()
    rand = random.randint(0, 9999999)
    data, _ = helper.pre_processed_data_all(args, rand, dry=False)
    if args.mean:
        label, _ = helper.pre_processed_label_all(args, rand, dry=False)
        data = preprocess.mean_image(label, data)
    elif args.split is not None or args.randomize:
        label, _ = helper.pre_processed_label(args, rand, dry=False)
        helper.write_data_to_file(
            (args.folder or helper.FOLDER) + (args.name or 'processed_data') +
            '_l' + helper.EXT,
            label,
            fmt='%d',
            h='0')
    # for i in range(4):
    #     for j in range(4):
    helper.write_data_to_file((args.folder or helper.FOLDER) +
                              (args.name or 'processed_data') + helper.EXT,
                              data,
                              h=', '.join(str(i) for i in range(len(data[0]))))