-
Notifications
You must be signed in to change notification settings - Fork 2
/
config.yml
323 lines (302 loc) · 10.4 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
# Note that, unless stated otherwise, you cannot use ~ in any of the paths in
# this file (you must write out the full path to your home directory, e.g.,
# /home/billbrod or /Users/billbrod). Also, the paths should probably not have
# capital letters -- there's a discrepancy between how Mac and Linux handle
# capital letters in paths, which might create problems.
# Only the paths in this first section should be modified, and only the first
# one (DATA_DIR) must be modified.
DATA_DIR: "/home/billbrod/Desktop/metamers"
# The root of the data directory. Recommended you place this in a new, empty
# directory, such as $HOME/Desktop/metamers.
# required for making some of the figures. this can contain ~ (for home
# directory) and is probably correct on Linux or Macs. On Windows, it's
# probably: %userprofile\Application\Data\Inkscape\, but you should double
# check.
INKSCAPE_PREF_FILE: "~/.config/inkscape/preferences.xml"
# if you want to run the checks against the original Freeman and Simoncelli
# (rule freeman_check in Snakefile), 2011 windows, download these two matlab
# packages from github (https://github.com/freeman-lab/metamers/ and
# https://github.com/LabForComputationalVision/matlabPyrTools, respectively) and
# update the paths below. These paths are allowed to contain ~ (for home
# directory)
FREEMAN_METAMER_PATH: "~/Documents/freeman_metamers"
MATLABPYRTOOLS_PATH: "~/Documents/matlab_toolboxes/matlabPyrTools"
# ------------------------------------------
# The following paths should not be modified
# The following templates define how snakemake will find the original images,
# model metamers, and MAD competition images. They should not be modified.
REF_IMAGE_TEMPLATE_PATH: "{DATA_DIR}/ref_images/{image_name}.png"
METAMER_TEMPLATE_PATH: "{DATA_DIR}/metamers/{model_name}/{image_name}/scaling-{scaling}/opt-{optimizer}_loss-{loss}/fr-{fract_removed}_lc-{loss_fract}_lt-{loss_change_thresh}_li-{loss_change_iter}_cf-{coarse_to_fine}_{clamp}-{clamp_each_iter}/seed-{seed}_init-{init_type}_lr-{learning_rate}_e0-{min_ecc:.03f}_em-{max_ecc:.03f}_iter-{max_iter}_thresh-{loss_thresh}_gpu-{gpu}{save_all}_metamer.png"
MAD_TEMPLATE_PATH: "{DATA_DIR}/mad_images/{model_name}_{synth_target}/{met_model_name}_comp-{comp}_scaling-{scaling}_ref-{image_name}_synth-{synth_init_type}/opt-{optimizer}_tradeoff-{tradeoff_lambda:.0e}_penalty-{range_lambda:.1e}_stop-iters-{stop_iters}/seed-{seed}_lr-{learning_rate}_iter-{max_iter}_stop-crit-{stop_criterion:.0e}_gpu-{gpu}_mad.png"
# Path containing the texture images used to generate the statistics for
# normalizing model representations. You probably don't need this, given that we
# provide an array with these values. If you wish to generate your own, the path
# should either contain the string "textures-subset-for-testing" or this
# directory should contain at least 800 images, or line 101 in the Snakefile
# will generate an exception
TEXTURE_DIR: "/home/billbrod/Desktop/metamers/textures-subset-for-testing"
# Directory where the NYU research compute share has been mounted, for staging
# files to upload to the Faculty Digital Archive.
RCS_DIR: "/mnt/rcs/foveated_metamers"
# ------------------------------------------
# Metamer-related options, do not modify
# The following options define the metamers we synthesized: the names of the
# original images (here called ref images), the RNG seeds used, the scaling
# values used for each comparison, etc.
# The path for the images whose model representation match should follow the
# given template and have the following components
IMAGE_NAME:
template: "{ref_image}_{preproc}_size-{size}"
ref_image:
- 'azulejos'
- 'tiles'
- 'bike'
- 'graffiti'
- 'llama'
- 'terraces'
- 'treetop_symmetric'
- 'grooming_symmetric'
- 'palm_symmetric'
- 'leaves_symmetric'
- 'portrait_symmetric'
- 'troop_symmetric'
- 'quad_symmetric'
- 'highway_symmetric'
- 'ivy'
- 'nyc'
- 'rocks'
- 'boats'
- 'gnarled'
- 'lettuce'
preproc: 'range-.05,.95'
size: '2048,2600'
# At the beginning of this project, I was seeding all model metamers with the
# same three seeds. There's nothing *definitely* wrong with this, but it's
# probably not the right way to do it, so we switched so each model metamer has
# a unique seed (based on its target image and scaling value). But metamer
# synthesis takes a long time, so the following defines the model metamers that
# were generated using these seeds:
OLD_SEEDS:
seeds:
- 0
- 1
- 2
image_names:
- 'azulejos_range-.05,.95_size-2048,2600'
- 'tiles_range-.05,.95_size-2048,2600'
- 'bike_range-.05,.95_size-2048,2600'
- 'graffiti_range-.05,.95_size-2048,2600'
- 'llama_range-.05,.95_size-2048,2600'
- 'terraces_range-.05,.95_size-2048,2600'
scaling:
RGC:
- .01
- .013
- .017
- .021
- .027
- .035
- .045
- .058
- .075
V1:
- .095
- .12
- .14
- .18
- .22
- .27
- .33
- .4
- .5
# this dict gives us a specific image index for a set of images (whose metamers
# were already generated using that value, back when I was looking at a broader
# set of images). Any image names that are found in DEFAULT_METAMERS:image_name
# but not here will get the lowest image index that's not already in this
# dictionary
FIXED_IMAGE_IDX:
azulejos_range-.05,.95_size-2048,2600: 0
tiles_range-.05,.95_size-2048,2600: 1
bike_range-.05,.95_size-2048,2600: 2
graffiti_range-.05,.95_size-2048,2600: 3
llama_range-.05,.95_size-2048,2600: 4
terraces_range-.05,.95_size-2048,2600: 7
treetop_symmetric_range-.05,.95_size-2048,2600: 12
grooming_symmetric_range-.05,.95_size-2048,2600: 15
palm_symmetric_range-.05,.95_size-2048,2600: 17
leaves_symmetric_range-.05,.95_size-2048,2600: 23
portrait_symmetric_range-.05,.95_size-2048,2600: 24
troop_symmetric_range-.05,.95_size-2048,2600: 25
quad_symmetric_range-.05,.95_size-2048,2600: 29
highway_symmetric_range-.05,.95_size-2048,2600: 35
ivy_range-.05,.95_size-2048,2600: 42
nyc_range-.05,.95_size-2048,2600: 43
rocks_range-.05,.95_size-2048,2600: 46
boats_range-.05,.95_size-2048,2600: 49
gnarled_range-.05,.95_size-2048,2600: 51
lettuce_range-.05,.95_size-2048,2600: 53
# same as above, but for scaling values
FIXED_SCALING_IDX:
RGC:
.01: 0
.013: 1
.017: 2
.021: 3
.027: 4
.035: 5
.045: 6
.058: 7
.075: 8
V1:
.063: 9
.078: 10
.095: 0
.12: 1
.14: 2
.18: 3
.22: 4
.27: 5
.33: 6
.4: 7
.5: 8
# metamers with scaling below this value will use 0 gpus, metamers with scaling
# above will use 1
GPU_SPLIT: .09
# This gives the default options for all model metamers. The keys here (e.g.,
# optimizer, loss) are inserted into the METAMER_TEMPLATE_PATH defined at the
# top of this file.
DEFAULT_METAMERS:
image_name:
- 'azulejos_range-.05,.95_size-2048,2600'
- 'tiles_range-.05,.95_size-2048,2600'
- 'bike_range-.05,.95_size-2048,2600'
- 'graffiti_range-.05,.95_size-2048,2600'
- 'llama_range-.05,.95_size-2048,2600'
- 'terraces_range-.05,.95_size-2048,2600'
- 'treetop_symmetric_range-.05,.95_size-2048,2600'
- 'grooming_symmetric_range-.05,.95_size-2048,2600'
- 'palm_symmetric_range-.05,.95_size-2048,2600'
- 'leaves_symmetric_range-.05,.95_size-2048,2600'
- 'portrait_symmetric_range-.05,.95_size-2048,2600'
- 'troop_symmetric_range-.05,.95_size-2048,2600'
- 'quad_symmetric_range-.05,.95_size-2048,2600'
- 'highway_symmetric_range-.05,.95_size-2048,2600'
- 'ivy_range-.05,.95_size-2048,2600'
- 'nyc_range-.05,.95_size-2048,2600'
- 'rocks_range-.05,.95_size-2048,2600'
- 'boats_range-.05,.95_size-2048,2600'
- 'gnarled_range-.05,.95_size-2048,2600'
- 'lettuce_range-.05,.95_size-2048,2600'
optimizer: 'Adam'
loss: 'mse'
fract_removed: 0
loss_fract: 1
loss_change_thresh: 1e-04
coarse_to_fine: False
clamp: 'clamp'
clamp_each_iter: True
init_type: 'white'
learning_rate: .01
min_ecc: 0.5
# this is for single monitor (with chin rest) set up at NYU
max_ecc: 26.8
loss_thresh: 1e-09
loss_change_iter: 50
max_iter: 15000
save_all: ''
# specifies the options specific for the luminance model
RGC:
model_name: 'RGC_norm_gaussian'
scaling:
- .01
- .013
- .017
- .021
- .027
- .035
- .045
- .058
met_v_met_scaling:
- .092
- .15
- .23
- .37
- .59
- .94
- 1.5
max_iter: 5000
# specifies the options specific for the energy model
V1:
model_name: 'V1_norm_s6_gaussian'
scaling:
- .063
- .078
- .095
- .12
- .14
- .18
- .22
- .27
met_v_met_scaling:
- .33
- .4
- .5
- .66
- .87
- 1.14
- 1.5
loss: 'mse_range-0,1_beta-0.5'
optimizer: 'Adam-SWA_s-50_f-5'
coarse_to_fine: 'together'
clamp_each_iter: False
# ---------------------------------------------
# psychophysics-related options, do not modify.
#
# These define the subject numbers, how many sessions do they each do, how many
# runs in each session, and how do we break up the images across subjects
PSYCHOPHYSICS:
SESSIONS:
- 0
- 1
- 2
RUNS:
- 0
- 1
- 2
- 3
- 4
# all subjects see the images in IMAGE_SET all, the even-numbered ones see the
# images in set A, the odd-numbered ones see those in set B
IMAGE_SETS:
all:
- 'tiles_range-.05,.95_size-2048,2600'
- 'llama_range-.05,.95_size-2048,2600'
- 'treetop_symmetric_range-.05,.95_size-2048,2600'
- 'palm_symmetric_range-.05,.95_size-2048,2600'
- 'portrait_symmetric_range-.05,.95_size-2048,2600'
- 'quad_symmetric_range-.05,.95_size-2048,2600'
- 'highway_symmetric_range-.05,.95_size-2048,2600'
- 'ivy_range-.05,.95_size-2048,2600'
- 'rocks_range-.05,.95_size-2048,2600'
- 'gnarled_range-.05,.95_size-2048,2600'
A:
- 'azulejos_range-.05,.95_size-2048,2600'
- 'terraces_range-.05,.95_size-2048,2600'
- 'grooming_symmetric_range-.05,.95_size-2048,2600'
- 'leaves_symmetric_range-.05,.95_size-2048,2600'
- 'boats_range-.05,.95_size-2048,2600'
B:
- 'bike_range-.05,.95_size-2048,2600'
- 'graffiti_range-.05,.95_size-2048,2600'
- 'troop_symmetric_range-.05,.95_size-2048,2600'
- 'nyc_range-.05,.95_size-2048,2600'
- 'lettuce_range-.05,.95_size-2048,2600'
SUBJECTS:
- 'sub-00'
- 'sub-01'
- 'sub-02'
- 'sub-03'
- 'sub-04'
- 'sub-05'
- 'sub-06'
- 'sub-07'