def voc2012dbg(INPUT_SIZE,dataaug_args): nb_classes = 20 + 1 train_data = 'lst/voc2012_train_dbg.txt' val_data = 'lst/voc2012_val_dbg.txt' image_dir = '/storage/gby/datasets/pascal_voc12/images_orig/' label_dir = '/storage/gby/datasets/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
def personfine(INPUT_SIZE, dataaug_args): nb_classes = 24+1 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_fine_parts/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
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
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