Пример #1
0
def streets(INPUT_SIZE, dataaug_args):

    nb_classes = 11 + 1

    train_data = 'lst/streets_train.txt'  # to fix
    val_data = 'lst/streets_val.txt'  # to fix
    #image_dir = '/storage/gby/datasets/streets/all_imgs/'
    #label_dir = '/storage/gby/datasets/streets/all_labels/'
    segments_dir = ''

    #train_rate = 0.85
    #allow_randomness = False
    #ds = split_train_test(image_dir,label_dir, train_rate, allow_randomness, INPUT_SIZE, nb_classes)
    ds = split_from_list(train_data, val_data, image_dir, label_dir,
                         INPUT_SIZE, nb_classes, dataaug_args)

    ds.segments_dir = segments_dir
    ds.train_list = train_data
    ds.test_list = val_data
    ds.datagen_train = generate_arrays_from_file(train_data, image_dir,
                                                 label_dir, INPUT_SIZE,
                                                 nb_classes, dataaug_args)
    ds.datagen_test = generate_arrays_from_file(val_data, image_dir, label_dir,
                                                INPUT_SIZE, nb_classes, None)

    return ds
Пример #2
0
def personcoarse(INPUT_SIZE, dataaug_args):

    nb_classes = 6 + 1
    #person: head, torso, upper/lower arms and legs

    train_data = 'lst/personcoarse_train.txt'
    val_data = 'lst/personcoarse_test.txt'
    #image_dir = "/storage/gby/datasets/horse_coarse_parts/images_orig/"
    image_dir = '/storage/gby/datasets/pascal_voc12/images_orig/'
    label_dir = '/storage/gby/datasets/person_coarse_parts/labels_orig/'
    segments_dir = '/storage/cfmata/deeplab/crf_rnn/crfasrnn_keras/data/person_coarse_parts/sp_seg/'

    ds = split_from_list(train_data, val_data, image_dir, label_dir,
                         INPUT_SIZE, nb_classes, dataaug_args)

    ds.segments_dir = segments_dir
    ds.train_list = train_data
    ds.test_list = val_data
    ds.datagen_train = generate_arrays_from_file(train_data, image_dir,
                                                 label_dir, INPUT_SIZE,
                                                 nb_classes, dataaug_args)
    ds.datagen_test = generate_arrays_from_file(val_data, image_dir, label_dir,
                                                INPUT_SIZE, nb_classes, None)

    return ds
Пример #3
0
def horsecoarsedbg(INPUT_SIZE, dataaug_args):

    nb_classes = 5 + 1
    #horse: head, tail, torso, upper legs, lower legs

    train_data = 'lst/horsecoarse_train_dbg.txt'
    val_data = 'lst/horsecoarse_test_dbg.txt'
    #image_dir = "/storage/gby/datasets/horse_coarse_parts/images_orig/"
    image_dir = '/storage/gby/datasets/pascal_voc12/images_orig/'
    label_dir = '/storage/gby/datasets/horse_coarse_parts/labels_orig/'
    segments_dir = '/storage/gby/datasets/horse_coarse_parts/sp_seg/'

    ds = split_from_list(train_data, val_data, image_dir, label_dir,
                         INPUT_SIZE, nb_classes, dataaug_args)

    ds.segments_dir = segments_dir
    ds.train_list = train_data
    ds.test_list = val_data
    ds.datagen_train = generate_arrays_from_file(train_data, image_dir,
                                                 label_dir, INPUT_SIZE,
                                                 nb_classes, dataaug_args)
    ds.datagen_test = generate_arrays_from_file(val_data, image_dir, label_dir,
                                                INPUT_SIZE, nb_classes, None)

    return ds
Пример #4
0
def voc2012(INPUT_SIZE, dataaug_args):

    nb_classes = 20 + 1

    train_data = 'lst/voc2012_train.txt'
    val_data = 'lst/voc2012_val.txt'
    image_dir = 'data/pascal_voc12/images_orig/'
    label_dir = 'data/pascal_voc12/labels_orig/'
    segments_dir = ''

    ds = split_from_list(train_data, val_data, image_dir, label_dir,
                         INPUT_SIZE, nb_classes, dataaug_args)

    ds.segments_dir = segments_dir
    ds.train_list = train_data
    ds.test_list = val_data
    ds.datagen_train = generate_arrays_from_file(train_data, image_dir,
                                                 label_dir, INPUT_SIZE,
                                                 nb_classes, dataaug_args)
    ds.datagen_test = generate_arrays_from_file(val_data, image_dir, label_dir,
                                                INPUT_SIZE, nb_classes, None)

    return ds
Пример #5
0
def horsecoarse_small(INPUT_SIZE, dataaug_args, batch_size):

    nb_classes = 5 + 1
    #horse: head, tail, torso, upper legs, lower legs

    train_data = 'lst/horsecoarse_train_small.txt'
    val_data = 'lst/horsecoarse_test_small.txt'
    image_dir = '/om2/user/cfmata/voc12/train/VOCdevkit/VOC2012/JPEGImages/'
    label_dir = 'data/horse_coarse_parts/labels_orig/'
    segments_dir = 'data/horse_coarse_parts/sp_seg/'

    ds = split_from_list(train_data, val_data, image_dir, label_dir,
                         INPUT_SIZE, nb_classes, dataaug_args)

    ds.segments_dir = segments_dir
    ds.train_list = train_data
    ds.test_list = val_data
    ds.datagen_train = generate_arrays_from_file(train_data, image_dir,
                                                 label_dir, INPUT_SIZE,
                                                 nb_classes, dataaug_args)
    ds.datagen_test = generate_arrays_from_file(val_data, image_dir, label_dir,
                                                INPUT_SIZE, nb_classes, None)

    return ds