forked from NicoRahm/CGvsPhoto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_pipeline.py
23 lines (17 loc) · 798 Bytes
/
test_pipeline.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from CGvsPhoto import Model
# to change to your favorite database
database_path = '/work/smg/v-nicolas/level-design_raise_100_color/'
# database_path = '/work/smg/v-nicolas/face_DB_100_2/'
database_path = '/home/nicolas/Database/level-design_raise_100_color/'
# to change to the format of your image
image_size = 100
# define a single-image classifier
clf = Model(database_path, image_size, config = 'Personal', filters = [32,32,64],
batch_size = 50, feature_extractor = 'Stats', remove_context = True,
remove_filter_size = 5, only_green = False)
# trains the classifier and test it on the testing set
clf.train(nb_train_batch = 1,
nb_test_batch = 80,
nb_validation_batch = 40,
validation_frequency = 20,
show_filters = True)