def loadImgPath(dataset, dataFolder):
    print 'Loading image paths...'
    cocoImgIdRegex = 'COCO_((train)|(val))2014_0*(?P<imgid>[1-9][0-9]*)'
    if dataset == 'cocoqa':
        imgidDictFilename = \
            os.path.join(dataFolder, 'imgid_dict.pkl')
        with open(imgidDictFilename, 'rb') as f:
            imgidDict = pkl.load(f)
        pathList = [None] * len(imgidDict)
        pathDict = {}
        with open('/u/mren/data/mscoco/train/image_list.txt') as f:
            imageList = f.readlines()
        with open('/u/mren/data/mscoco/valid/image_list.txt') as f:
            imageList.extend(f.readlines())
        for imgPath in imageList:
            match = re.search(cocoImgIdRegex, imgPath)
            imgid = match.group('imgid')
            pathDict[imgid] = imgPath[:-1]
        for i, key in enumerate(imgidDict):
            pathList[i] = pathDict[key]
        return pathList
    elif dataset == 'daquar':
        pathList = []
        for i in range(1, 1450):
            pathList.append(i % '/u/mren/data/nyu-depth/jpg/image%d.jpg')
        return pathList
    else:
        raise Exception('Unknown dataset: ' + dataset)
dataset/ETHPy150Open renmengye/imageqa-public/src/imageqa_render.py/loadImgPath/swapped operands of `%`