IliaLarchenko commited on
Commit
a99d36a
1 Parent(s): a467828

fixed min_max config

Browse files
Files changed (2) hide show
  1. configs/augmentations.json +71 -62
  2. src/control.py +1 -1
configs/augmentations.json CHANGED
@@ -202,40 +202,43 @@
202
  ],
203
  "JpegCompression": [
204
  {
205
- "param_name": ["quality_lower","quality_upper"],
 
 
 
206
  "type": "min_max",
207
  "limits_list": [
208
  0,
209
  100
210
  ],
211
- "defaults_list": [80,100]
 
 
 
212
  }
213
  ],
214
  "ImageCompression": [
215
  {
216
- "param_name": "quality_lower",
217
- "type": "int_interval",
218
- "limits_list": [
219
  0,
220
- 100
221
- ],
222
- "defaults": 99
223
  },
224
  {
225
- "param_name": "quality_upper",
226
- "type": "int_interval",
 
 
 
227
  "limits_list": [
228
  0,
229
  100
230
  ],
231
- "defaults": 100
232
- },
233
- {
234
- "param_name": "compression_type",
235
- "type": "radio",
236
- "options_list": [
237
- 0,
238
- 1
239
  ]
240
  }
241
  ],
@@ -310,51 +313,51 @@
310
  ],
311
  "RandomSnow": [
312
  {
313
- "param_name": "snow_point_lower",
314
- "type": "int_interval",
315
- "limits_list": [
316
- 0.0,
317
- 1.0
318
  ],
319
- "defaults": 0.1
320
- },
321
- {
322
- "param_name": "snow_point_upper",
323
- "type": "int_interval",
324
  "limits_list": [
325
  0.0,
326
  1.0
327
  ],
328
- "defaults": 0.1
 
 
 
329
  },
330
  {
331
- "param_name": "brightness_coeff",
332
- "type": "int_interval",
 
 
 
333
  "limits_list": [
334
  0.0,
335
  20.0
336
  ],
337
- "defaults": 2.5
 
 
 
338
  }
339
  ],
340
  "RandomFog": [
341
  {
342
- "param_name": "fog_coef_lower",
343
- "type": "int_interval",
344
- "limits_list": [
345
- 0.0,
346
- 1.0
347
  ],
348
- "defaults": 0.1
349
- },
350
- {
351
- "param_name": "fog_coef_upper",
352
- "type": "int_interval",
353
  "limits_list": [
354
  0.0,
355
  1.0
356
  ],
357
- "defaults": 0.1
 
 
 
358
  },
359
  {
360
  "param_name": "alpha_coef",
@@ -413,24 +416,30 @@
413
  "param_name": "by_channels",
414
  "type": "checkbox",
415
  "defaults": 1
416
- }],
417
- "CenterCrop" :
418
- [
419
- {
420
- "param_name": "height",
421
- "type": "int_interval",
422
- "placeholder": {
423
- "limits_list" : [1, "image_height"],
424
- "defaults" : "image_half_height"
425
- }
426
- },
427
- {
428
- "param_name": "width",
429
- "type": "int_interval",
430
- "placeholder": {
431
- "limits_list" : [1, "image_width"],
432
- "defaults" : "image_half_width"
433
- }
 
 
 
 
 
434
  }
435
- ]
436
  }
 
 
 
202
  ],
203
  "JpegCompression": [
204
  {
205
+ "param_name": [
206
+ "quality_lower",
207
+ "quality_upper"
208
+ ],
209
  "type": "min_max",
210
  "limits_list": [
211
  0,
212
  100
213
  ],
214
+ "defaults_list": [
215
+ 80,
216
+ 100
217
+ ]
218
  }
219
  ],
220
  "ImageCompression": [
221
  {
222
+ "param_name": "compression_type",
223
+ "type": "radio",
224
+ "options_list": [
225
  0,
226
+ 1
227
+ ]
 
228
  },
229
  {
230
+ "param_name": [
231
+ "quality_lower",
232
+ "quality_upper"
233
+ ],
234
+ "type": "min_max",
235
  "limits_list": [
236
  0,
237
  100
238
  ],
239
+ "defaults_list": [
240
+ 80,
241
+ 100
 
 
 
 
 
242
  ]
243
  }
244
  ],
 
313
  ],
314
  "RandomSnow": [
315
  {
316
+ "param_name": [
317
+ "snow_point_lower",
318
+ "snow_point_upper"
 
 
319
  ],
320
+ "type": "min_max",
 
 
 
 
321
  "limits_list": [
322
  0.0,
323
  1.0
324
  ],
325
+ "defaults_list": [
326
+ 0.1,
327
+ 0.2
328
+ ]
329
  },
330
  {
331
+ "param_name": [
332
+ "brightness_lower",
333
+ "brightness_upper"
334
+ ],
335
+ "type": "min_max",
336
  "limits_list": [
337
  0.0,
338
  20.0
339
  ],
340
+ "defaults_list": [
341
+ 2.5,
342
+ 3.5
343
+ ]
344
  }
345
  ],
346
  "RandomFog": [
347
  {
348
+ "param_name": [
349
+ "fog_coef_lower",
350
+ "fog_coef_upper"
 
 
351
  ],
352
+ "type": "min_max",
 
 
 
 
353
  "limits_list": [
354
  0.0,
355
  1.0
356
  ],
357
+ "defaults_list": [
358
+ 0.1,
359
+ 0.2
360
+ ]
361
  },
362
  {
363
  "param_name": "alpha_coef",
 
416
  "param_name": "by_channels",
417
  "type": "checkbox",
418
  "defaults": 1
419
+ }
420
+ ],
421
+ "CenterCrop": [
422
+ {
423
+ "param_name": "height",
424
+ "type": "int_interval",
425
+ "placeholder": {
426
+ "limits_list": [
427
+ 1,
428
+ "image_height"
429
+ ],
430
+ "defaults": "image_half_height"
431
+ }
432
+ },
433
+ {
434
+ "param_name": "width",
435
+ "type": "int_interval",
436
+ "placeholder": {
437
+ "limits_list": [
438
+ 1,
439
+ "image_width"
440
+ ],
441
+ "defaults": "image_half_width"
442
  }
 
443
  }
444
+ ]
445
+ }
src/control.py CHANGED
@@ -30,7 +30,7 @@ def select_several_ints(
30
 
31
  def select_min_max(param_name, limits_list, defaults_list, **kwargs):
32
  assert len(param_name) == 2
33
- return select_int_interval(' and '.join(param_name), limits_list, defaults_list)
34
 
35
 
36
  def select_RGB(param_name, **kwargs):
 
30
 
31
  def select_min_max(param_name, limits_list, defaults_list, **kwargs):
32
  assert len(param_name) == 2
33
+ return select_int_interval(' & '.join(param_name), limits_list, defaults_list)
34
 
35
 
36
  def select_RGB(param_name, **kwargs):