-
Notifications
You must be signed in to change notification settings - Fork 3
/
read_config.py
28 lines (22 loc) · 708 Bytes
/
read_config.py
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
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Tue Jul 30 11:21:46 2019
@author: jihyeonje
"""
from configparser import ConfigParser
def read_cfg(cfg_file):
config = ConfigParser()
config.read(cfg_file)
power = []
scale = config['Additional Augmentations']
power.append(int(scale['HighContrast']))
power.append(int(scale['LowContrast']))
power.append(int(scale['Blur']))
power.append(int(scale['Sharpen']))
power.append(int(scale['UniformNoise']))
power.append(int(scale['TV_Chambolle']))
power.append(int(scale['HistogramEqualization']))
power.append(int(scale['Skew']))
power.append(int(scale['ElasticDistortion']))
return power