def getXmls(imgPath, maskPath, savePath):
    logger.info('currently, only *.jpg supported')
    if os.path.isfile(imgPath):
        getMultiShapes.getMultiObjs_voc(imgPath, maskPath, savePath)
    elif os.path.isdir(imgPath):
        oriImgs = glob.glob(((imgPath + os.sep) + '*.jpg'))
        maskImgs = glob.glob(((maskPath + os.sep) + '*.jpg'))
        for i in tqdm(oriImgs):
            i_mask = i.replace(imgPath, maskPath)
            if os.path.exists(i_mask):
                getMultiShapes.getMultiObjs_voc(i, i_mask, savePath)
            else:
                logger.warning('corresponding mask image not found!')
                continue
    else:
        logger.error('input error. got [{},{},{}]. file maybe missing.'.format(imgPath, maskPath, savePath))
    logger.info('Done! See here. {}'.format(savePath))
def getXmls(imgPath, maskPath, savePath):
    logger.info('currently, only *.jpg supported')
    if os.path.isfile(imgPath):
        getMultiShapes.getMultiObjs_voc(imgPath, maskPath, savePath)
    elif os.path.isdir(imgPath):
        oriImgs = glob.glob(((imgPath + os.sep) + '*.jpg'))
        maskImgs = glob.glob(((maskPath + os.sep) + '*.jpg'))
        for i in tqdm(oriImgs):
            i_mask = i.replace(imgPath, maskPath)
            if os.path.exists(i_mask):
                getMultiShapes.getMultiObjs_voc(i, i_mask, savePath)
            else:
                logger.warning('corresponding mask image not found!')
                continue
    else:
        logger.error('input error. got [{},{},{}]. file maybe missing.'.format(imgPath, maskPath, savePath))
    logger.info('Done! See here. {}'.format(savePath))