def image_label_generator(emotion_map):
    labels = []
    _i = 0
    image_lists = []
    for (k, v) in tqdm.tqdm(emotion_map.items()):
        path = os.path.join(FACE_IMAGES_PATH, k)
        logger.debug('reading images at path: {}'.format(path))
        image_list = glob.glob((path + '/*.png'))
        logger.debug('length images list: {}'.format(len(image_list)))
        image_lists.append(image_list)
        labels.extend(([v] * len(image_list)))
    images = np.vstack((image_reader(image_list) for image_list in image_lists))
    return (images, labels)
def image_label_generator(emotion_map):
    labels = []
    _i = 0
    image_lists = []
    for (k, v) in tqdm.tqdm(emotion_map.items()):
        path = os.path.join(FACE_IMAGES_PATH, k)
        logger.debug('reading images at path: {}'.format(path))
        image_list = glob.glob((path + '/*.png'))
        logger.debug('length images list: {}'.format(len(image_list)))
        image_lists.append(image_list)
        labels.extend(([v] * len(image_list)))
    images = np.vstack((image_reader(image_list) for image_list in image_lists))
    return (images, labels)