def __init__(self, ROOT_DIR, period, transform=None):
    self.root_dir = ROOT_DIR
    self.rst_dir = os.path.join(self.root_dir, 'ADEChallengeData2016', 'result')
    self.period = period
    self.num_categories = 150
    self.transform = transform
    self.odgt = None
    if (self.period == 'train'):
        self.odgt = os.path.join(self.root_dir, 'ADEChallengeData2016', 'train.odgt')
    else:
        self.odgt = os.path.join(self.root_dir, 'ADEChallengeData2016', 'validation.odgt')
    self.list_sample = [json.loads(x.rstrip()) for x in open(self.odgt, 'r')]
def __init__(self, ROOT_DIR, period, transform=None):
    self.root_dir = ROOT_DIR
    self.rst_dir = os.path.join(self.root_dir, 'ADEChallengeData2016', 'result')
    self.period = period
    self.num_categories = 150
    self.transform = transform
    self.odgt = None
    if (self.period == 'train'):
        self.odgt = os.path.join(self.root_dir, 'ADEChallengeData2016', 'train.odgt')
    else:
        self.odgt = os.path.join(self.root_dir, 'ADEChallengeData2016', 'validation.odgt')
    self.list_sample = [json.loads(x.rstrip()) for x in open(self.odgt, 'r')]